diff --git a/src/devcenter/azext_devcenter/azext_metadata.json b/src/devcenter/azext_devcenter/azext_metadata.json index cfc30c747c7..30fdaf614ee 100644 --- a/src/devcenter/azext_devcenter/azext_metadata.json +++ b/src/devcenter/azext_devcenter/azext_metadata.json @@ -1,4 +1,4 @@ { - "azext.isExperimental": true, + "azext.isPreview": true, "azext.minCliCoreVersion": "2.15.0" } \ No newline at end of file diff --git a/src/devcenter/azext_devcenter/manual/commands.py b/src/devcenter/azext_devcenter/manual/commands.py index ab5ea27bbbb..48e3e9d6e9b 100644 --- a/src/devcenter/azext_devcenter/manual/commands.py +++ b/src/devcenter/azext_devcenter/manual/commands.py @@ -208,7 +208,7 @@ def load_command_table(self, _): client_factory=cf_check_name_availability, ) - with self.command_group("devcenter", is_experimental=True): + with self.command_group("devcenter", is_preview=True): pass with self.command_group("devcenter dev"): diff --git a/src/devcenter/azext_devcenter/manual/helper.py b/src/devcenter/azext_devcenter/manual/helper.py index 82d3682b995..4cb766b2d7b 100644 --- a/src/devcenter/azext_devcenter/manual/helper.py +++ b/src/devcenter/azext_devcenter/manual/helper.py @@ -29,7 +29,7 @@ def get_project_arg(cli_ctx, dev_center_name, project_name=None): "POST", request_url, body=json.dumps(content), - resource=cli_ctx.cloud.endpoints.active_directory_resource_id, + resource=cli_ctx.cloud.endpoints.resource_manager, ) return response.json()["data"] diff --git a/src/devcenter/azext_devcenter/tests/latest/helper.py b/src/devcenter/azext_devcenter/tests/latest/helper.py index 97243e14314..be15ed4f2cf 100644 --- a/src/devcenter/azext_devcenter/tests/latest/helper.py +++ b/src/devcenter/azext_devcenter/tests/latest/helper.py @@ -295,3 +295,86 @@ def create_pool_with_schedule(self): '--time "{time}" ' '--time-zone "{timeZone}" ' ) + +def add_deployment_env_user_role_to_project(self): + project = self.cmd('az devcenter admin project show ' + '--name "{projectName}" ' + '--resource-group "{rg}"').get_output_in_json() + + self.kwargs.update({ + 'projectId': project['id'] + }) + + if (self.is_live): + user = self.cmd('az ad signed-in-user show').get_output_in_json() + self.kwargs.update({ + 'userId': user['id'], + }) + + self.cmd('az role assignment create --role "/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/roleDefinitions/18e40d4e-8d2e-438d-97e1-9528336e149c" ' + '--assignee "{userId}" ' + '--scope "{projectId}"') + +def catalog_create_and_sync_cmds(self): + self.kwargs.update({ + 'catalogName': self.create_random_name(prefix='c2', length=12), + 'branch': 'main', + 'path': "/Catalog_v2", + 'secretIdentifier': "https://clitesting.vault.azure.net/secrets/cli-secret2/eb08c2be51644082a5e56e2deaf76979", + 'uri': "https://github.com/amandalim95/Project-Fidalgo-PrivatePreview.git" + }) + + self.cmd('az devcenter admin catalog create ' + '--dev-center "{devcenterName}" ' + '--name "{catalogName}" ' + '--git-hub path="{path}" branch="{branch}" ' + 'secret-identifier="{secretIdentifier}" uri="{uri}" ' + '--resource-group "{rg}" ' + ) + + self.cmd('az devcenter admin catalog sync ' + '--dev-center "{devcenterName}" ' + '--name "{catalogName}" ' + '--resource-group "{rg}" ' + ) + +def create_catalog(self): + create_dev_center_with_identity(self) + create_kv_policy(self) + create_project(self) + add_deployment_env_user_role_to_project(self) + catalog_create_and_sync_cmds(self) + + tenantId = self.cmd('az account show').get_output_in_json()['tenantId'] + catalogItemId = f"{tenantId}:{self.kwargs.get('devcenterName', '')}:{self.kwargs.get('catalogName', '')}:empty" + self.kwargs.update({ + 'catalogItemId': catalogItemId, + }) + +def create_proj_env_type(self): + self.kwargs.update({ + 'ownerRole': "8e3af657-a8ff-443c-a75c-2fe8c4bcb635" + }) + + create_dev_center_with_identity(self) + create_project(self) + add_deployment_env_user_role_to_project(self) + create_env_type(self) + + self.cmd('az devcenter admin project-environment-type create ' + '--project "{projectName}" ' + '--environment-type-name "{envTypeName}" ' + '--deployment-target-id "/subscriptions/{subscriptionId}" ' + '--status "Enabled" ' + '--identity-type "SystemAssigned, UserAssigned" ' + '--user-assigned-identities "{{\\"{userAssignedIdentity}\\":{{}}}}" ' + '--user-role-assignments "{{\\"{identityPrincipalId}\\":{{\\"roles\\":{{\\"{ownerRole}\\":{{}}}}}}}}" ' + '--location "{location}" ' + '--roles "{{\\"{ownerRole}\\":{{}}}}" ' + '--resource-group "{rg}"' + ) + +def create_environment_dependencies(self): + create_proj_env_type(self) + create_kv_policy(self) + catalog_create_and_sync_cmds(self) diff --git a/src/devcenter/azext_devcenter/tests/latest/recordings/test_catalog_item_dataplane_scenario.yaml b/src/devcenter/azext_devcenter/tests/latest/recordings/test_catalog_item_dataplane_scenario.yaml new file mode 100644 index 00000000000..4240e40ac3b --- /dev/null +++ b/src/devcenter/azext_devcenter/tests/latest/recordings/test_catalog_item_dataplane_scenario.yaml @@ -0,0 +1,1565 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - identity create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name + User-Agent: + - AZURECLI/2.44.1 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2021-04-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":"2023-02-04T02:13:26Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '304' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 02:13: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: '{"location": "westus"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - identity create + Connection: + - keep-alive + Content-Length: + - '22' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name + User-Agent: + - AZURECLI/2.44.1 azsdk-python-azure-mgmt-msi/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testid_000003?api-version=2022-01-31-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testid_000003","name":"testid_000003","type":"Microsoft.ManagedIdentity/userAssignedIdentities","location":"westus","tags":{},"properties":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","principalId":"077395a2-c8be-417e-affa-3fc42c1c243d","clientId":"be40e21f-f6e6-47d6-a323-2f6d6071355f"}}' + headers: + cache-control: + - no-cache + content-length: + - '441' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 02:13:28 GMT + expires: + - '-1' + location: + - /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testid_000003 + pragma: + - no-cache + 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: '{"tags": {"CostCode": "12345"}, "location": "westus3", "identity": {"type": + "UserAssigned", "userAssignedIdentities": {"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testid_000003": + {}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - devcenter admin devcenter create + Connection: + - keep-alive + Content-Length: + - '281' + Content-Type: + - application/json + ParameterSetName: + - --identity-type --user-assigned-identities --location --tags --name --resource-group + User-Agent: + - AZURECLI/2.44.1 azsdk-python-devcenter/unknown Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/devcenters/cli000002?api-version=2022-11-11-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/devcenters/cli000002","name":"cli000002","type":"microsoft.devcenter/devcenters","location":"westus3","tags":{"CostCode":"12345"},"systemData":{"createdBy":"amlim@microsoft.com","createdByType":"User","createdAt":"2023-02-04T02:13:29.9558485Z","lastModifiedBy":"amlim@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-04T02:13:29.9558485Z"},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testid_000003":{"principalId":"077395a2-c8be-417e-affa-3fc42c1c243d","clientId":"be40e21f-f6e6-47d6-a323-2f6d6071355f"}}},"properties":{"provisioningState":"Accepted"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevCenter/locations/WESTUS3/operationStatuses/64c8a4df-5f3e-4cd5-84d7-2427462cd3e1*1D5362ABD15009BB1670C56AA9493EECB9699D4C02C43F7EFE4F0FAB3F561AF1?api-version=2022-11-11-preview + cache-control: + - no-cache + content-length: + - '847' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 02:13:31 GMT + etag: + - '"3500a172-0000-4d00-0000-63ddbf4b0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-quota: + - '{"name":{"localizedValue":null,"value":"devCenters"},"limit":100,"currentUsed":22,"category":"Informational","scope":"subscription","target":"/subscriptions/3de261df-f2d8-4c00-a0ee-a0be30f1e48e/","region":"westus3"}' + x-ms-ratelimit-remaining-subscription-writes: + - '1197' + x-rate-limit-limit: + - 1m + x-rate-limit-remaining: + - '299' + x-rate-limit-reset: + - '2023-02-04T02:14:30.4407897Z' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - devcenter admin devcenter create + Connection: + - keep-alive + ParameterSetName: + - --identity-type --user-assigned-identities --location --tags --name --resource-group + User-Agent: + - AZURECLI/2.44.1 azsdk-python-devcenter/unknown Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevCenter/locations/WESTUS3/operationStatuses/64c8a4df-5f3e-4cd5-84d7-2427462cd3e1*1D5362ABD15009BB1670C56AA9493EECB9699D4C02C43F7EFE4F0FAB3F561AF1?api-version=2022-11-11-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevCenter/locations/WESTUS3/operationStatuses/64c8a4df-5f3e-4cd5-84d7-2427462cd3e1*1D5362ABD15009BB1670C56AA9493EECB9699D4C02C43F7EFE4F0FAB3F561AF1","name":"64c8a4df-5f3e-4cd5-84d7-2427462cd3e1*1D5362ABD15009BB1670C56AA9493EECB9699D4C02C43F7EFE4F0FAB3F561AF1","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/devcenters/cli000002","status":"Accepted","startTime":"2023-02-04T02:13:30.4580077Z"}' + headers: + cache-control: + - no-cache + content-length: + - '549' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 02:14:02 GMT + etag: + - '"0000d22e-0000-4d00-0000-63ddbf4a0000"' + expires: + - '-1' + pragma: + - no-cache + 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: + - devcenter admin devcenter create + Connection: + - keep-alive + ParameterSetName: + - --identity-type --user-assigned-identities --location --tags --name --resource-group + User-Agent: + - AZURECLI/2.44.1 azsdk-python-devcenter/unknown Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevCenter/locations/WESTUS3/operationStatuses/64c8a4df-5f3e-4cd5-84d7-2427462cd3e1*1D5362ABD15009BB1670C56AA9493EECB9699D4C02C43F7EFE4F0FAB3F561AF1?api-version=2022-11-11-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevCenter/locations/WESTUS3/operationStatuses/64c8a4df-5f3e-4cd5-84d7-2427462cd3e1*1D5362ABD15009BB1670C56AA9493EECB9699D4C02C43F7EFE4F0FAB3F561AF1","name":"64c8a4df-5f3e-4cd5-84d7-2427462cd3e1*1D5362ABD15009BB1670C56AA9493EECB9699D4C02C43F7EFE4F0FAB3F561AF1","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/devcenters/cli000002","status":"Succeeded","startTime":"2023-02-04T02:13:30.4580077Z","endTime":"2023-02-04T02:14:23.8984991Z","properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '609' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 02:14:32 GMT + etag: + - '"0000d52e-0000-4d00-0000-63ddbf7f0000"' + expires: + - '-1' + pragma: + - no-cache + 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: + - devcenter admin devcenter create + Connection: + - keep-alive + ParameterSetName: + - --identity-type --user-assigned-identities --location --tags --name --resource-group + User-Agent: + - AZURECLI/2.44.1 azsdk-python-devcenter/unknown Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/devcenters/cli000002?api-version=2022-11-11-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/devcenters/cli000002","name":"cli000002","type":"microsoft.devcenter/devcenters","location":"westus3","tags":{"CostCode":"12345"},"systemData":{"createdBy":"amlim@microsoft.com","createdByType":"User","createdAt":"2023-02-04T02:13:29.9558485Z","lastModifiedBy":"amlim@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-04T02:13:29.9558485Z"},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testid_000003":{"principalId":"077395a2-c8be-417e-affa-3fc42c1c243d","clientId":"be40e21f-f6e6-47d6-a323-2f6d6071355f"}}},"properties":{"provisioningState":"Succeeded","devCenterUri":"https://72f988bf-86f1-41af-91ab-2d7cd011db47-cli000002.westus3.devcenter.azure.com/"}}' + headers: + cache-control: + - no-cache + content-length: + - '949' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 02:14:32 GMT + etag: + - '"3500a672-0000-4d00-0000-63ddbf7f0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault set-policy + Connection: + - keep-alive + ParameterSetName: + - -n --secret-permissions --object-id + User-Agent: + - AZURECLI/2.44.1 azsdk-python-azure-mgmt-keyvault/10.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resources?$filter=resourceType%20eq%20%27Microsoft.KeyVault%2Fvaults%27&api-version=2015-11-01 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nipope-rg/providers/Microsoft.KeyVault/vaults/nipope-catalog-keyvault","name":"nipope-catalog-keyvault","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{"SkipDelete":""}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/LJ/providers/Microsoft.KeyVault/vaults/LJ-Fidalgo","name":"LJ-Fidalgo","type":"Microsoft.KeyVault/vaults","location":"southeastasia","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/maharlan-test/providers/Microsoft.KeyVault/vaults/maharlan-ade-test","name":"maharlan-ade-test","type":"Microsoft.KeyVault/vaults","location":"westus3","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jamaaltest/providers/Microsoft.KeyVault/vaults/jamaal-euap-keyvault","name":"jamaal-euap-keyvault","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{"SkipDelete":"jamaalhay"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/delvissantosrg/providers/Microsoft.KeyVault/vaults/delvissantoskv","name":"delvissantoskv","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/delvissantosrg/providers/Microsoft.KeyVault/vaults/delvissantoskv2","name":"delvissantoskv2","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ymtest-rg-centraluseuap/providers/Microsoft.KeyVault/vaults/ymtest-keyvault","name":"ymtest-keyvault","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/amlim-test/providers/Microsoft.KeyVault/vaults/amlim-kv-test","name":"amlim-kv-test","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-jarewert/providers/Microsoft.KeyVault/vaults/kv-jarewert-01","name":"kv-jarewert-01","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{"SkipDelete":"jarewert"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/varshagangu-rg/providers/Microsoft.KeyVault/vaults/varshagangu-kv","name":"varshagangu-kv","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/oldemche-rg/providers/Microsoft.KeyVault/vaults/oldemche-kv","name":"oldemche-kv","type":"Microsoft.KeyVault/vaults","location":"westus3","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PJ/providers/Microsoft.KeyVault/vaults/pj-catalog","name":"pj-catalog","type":"Microsoft.KeyVault/vaults","location":"southeastasia","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/erica-test/providers/Microsoft.KeyVault/vaults/erica-kv-pat","name":"erica-kv-pat","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/GJY/providers/Microsoft.KeyVault/vaults/GJY-catalog-test","name":"GJY-catalog-test","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jaymarfreemantesting/providers/Microsoft.KeyVault/vaults/jaymarf-keyvault","name":"jaymarf-keyvault","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-bug-bash/providers/Microsoft.KeyVault/vaults/kv-jarewert-bug-bash","name":"kv-jarewert-bug-bash","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/erica-test/providers/Microsoft.KeyVault/vaults/erica-kv-rolebased","name":"erica-kv-rolebased","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ndepinet-test/providers/Microsoft.KeyVault/vaults/ndepinet-env-test","name":"ndepinet-env-test","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/syvander-rg/providers/Microsoft.KeyVault/vaults/svander-kv","name":"svander-kv","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jiakou-resource-group/providers/Microsoft.KeyVault/vaults/jiakou-key-vault","name":"jiakou-key-vault","type":"Microsoft.KeyVault/vaults","location":"westus3","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/daellwan/providers/Microsoft.KeyVault/vaults/daellwan","name":"daellwan","type":"Microsoft.KeyVault/vaults","location":"westus3","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/andrewyingKeyVault20221108/providers/Microsoft.KeyVault/vaults/andrewyingKeyVault1","name":"andrewyingKeyVault1","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/kevinnguyen-rp/providers/Microsoft.KeyVault/vaults/kevinnguyen-kv","name":"kevinnguyen-kv","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mflemming-testing-rg/providers/Microsoft.KeyVault/vaults/micah-kv-test","name":"micah-kv-test","type":"Microsoft.KeyVault/vaults","location":"westus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/apatters-test/providers/Microsoft.KeyVault/vaults/apatters-vault","name":"apatters-vault","type":"Microsoft.KeyVault/vaults","location":"westus3","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/amlim-cli-test/providers/Microsoft.KeyVault/vaults/clitesting","name":"clitesting","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jraj-mou/providers/Microsoft.KeyVault/vaults/jraj-keyvault","name":"jraj-keyvault","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{}}]}' + headers: + cache-control: + - no-cache + content-length: + - '6328' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 02:14:33 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: + - keyvault set-policy + Connection: + - keep-alive + ParameterSetName: + - -n --secret-permissions --object-id + User-Agent: + - AZURECLI/2.44.1 azsdk-python-azure-mgmt-keyvault/10.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/amlim-cli-test/providers/Microsoft.KeyVault/vaults/clitesting?api-version=2022-07-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/amlim-cli-test/providers/Microsoft.KeyVault/vaults/clitesting","name":"clitesting","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{},"systemData":{"createdBy":"amlim@microsoft.com","createdByType":"User","createdAt":"2023-01-24T00:55:42.359Z","lastModifiedBy":"amlim@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-04T02:07:44.047Z"},"properties":{"sku":{"family":"A","name":"Standard"},"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","accessPolicies":[{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","objectId":"17755109-de29-4032-8853-f390afd630a2","permissions":{"keys":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","GetRotationPolicy","SetRotationPolicy","Rotate"],"secrets":["Get","List","Set","Delete","Recover","Backup","Restore"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","ManageContacts","ManageIssuers","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers"]}},{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","objectId":"da2a1a6b-6414-4089-a1d5-d530f59f5865","permissions":{"secrets":["list","get"]}},{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","objectId":"c6ff0231-e51d-499a-993f-f1fcbc6c1059","permissions":{"secrets":["list","get"]}},{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","objectId":"383e9e95-a578-4921-93ac-eb250bc357d4","permissions":{"secrets":["get","list"]}},{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","objectId":"8a9eecb3-7701-42d2-bbf8-cd009a63eb9d","permissions":{"secrets":["get","list"]}},{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","objectId":"f8d11665-f5ba-4565-ac8a-06c630527228","permissions":{"secrets":["list","get"]}},{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","objectId":"d15af3d8-104d-4bfe-b51a-636acbdfef6a","permissions":{"secrets":["list","get"]}},{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","objectId":"b12e0460-8925-422a-ac16-ac1f672c6fdf","permissions":{"secrets":["list","get"]}},{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","objectId":"bc0a4269-f298-40ba-9208-d7e08eb17c3e","permissions":{"secrets":["list","get"]}},{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","objectId":"51300a0b-f360-43f0-802f-c573f29b6a47","permissions":{"secrets":["list","get"]}},{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","objectId":"cd84fce5-79aa-4f9e-8196-c41cd05c1602","permissions":{"secrets":["list","get"]}},{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","objectId":"25a3e34a-32a4-4900-8d4f-c5d39643109b","permissions":{"secrets":["list","get"]}}],"enabledForDeployment":false,"enabledForDiskEncryption":false,"enabledForTemplateDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enableRbacAuthorization":false,"vaultUri":"https://clitesting.vault.azure.net/","provisioningState":"Succeeded","publicNetworkAccess":"Enabled"}}' + headers: + cache-control: + - no-cache + content-length: + - '2946' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 02:14:33 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-service-version: + - 1.5.644.0 + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus", "tags": {}, "properties": {"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "sku": {"family": "A", "name": "Standard"}, "accessPolicies": [{"tenantId": + "72f988bf-86f1-41af-91ab-2d7cd011db47", "objectId": "17755109-de29-4032-8853-f390afd630a2", + "permissions": {"keys": ["Get", "List", "Update", "Create", "Import", "Delete", + "Recover", "Backup", "Restore", "GetRotationPolicy", "SetRotationPolicy", "Rotate"], + "secrets": ["Get", "List", "Set", "Delete", "Recover", "Backup", "Restore"], + "certificates": ["Get", "List", "Update", "Create", "Import", "Delete", "Recover", + "Backup", "Restore", "ManageContacts", "ManageIssuers", "GetIssuers", "ListIssuers", + "SetIssuers", "DeleteIssuers"]}}, {"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "objectId": "da2a1a6b-6414-4089-a1d5-d530f59f5865", "permissions": {"secrets": + ["list", "get"]}}, {"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", "objectId": + "c6ff0231-e51d-499a-993f-f1fcbc6c1059", "permissions": {"secrets": ["list", + "get"]}}, {"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", "objectId": "383e9e95-a578-4921-93ac-eb250bc357d4", + "permissions": {"secrets": ["get", "list"]}}, {"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "objectId": "8a9eecb3-7701-42d2-bbf8-cd009a63eb9d", "permissions": {"secrets": + ["get", "list"]}}, {"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", "objectId": + "f8d11665-f5ba-4565-ac8a-06c630527228", "permissions": {"secrets": ["list", + "get"]}}, {"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", "objectId": "d15af3d8-104d-4bfe-b51a-636acbdfef6a", + "permissions": {"secrets": ["list", "get"]}}, {"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "objectId": "b12e0460-8925-422a-ac16-ac1f672c6fdf", "permissions": {"secrets": + ["list", "get"]}}, {"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", "objectId": + "bc0a4269-f298-40ba-9208-d7e08eb17c3e", "permissions": {"secrets": ["list", + "get"]}}, {"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", "objectId": "51300a0b-f360-43f0-802f-c573f29b6a47", + "permissions": {"secrets": ["list", "get"]}}, {"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "objectId": "cd84fce5-79aa-4f9e-8196-c41cd05c1602", "permissions": {"secrets": + ["list", "get"]}}, {"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", "objectId": + "25a3e34a-32a4-4900-8d4f-c5d39643109b", "permissions": {"secrets": ["list", + "get"]}}, {"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", "objectId": "077395a2-c8be-417e-affa-3fc42c1c243d", + "permissions": {"secrets": ["list", "get"]}}], "vaultUri": "https://clitesting.vault.azure.net/", + "enabledForDeployment": false, "enabledForDiskEncryption": false, "enabledForTemplateDeployment": + false, "enableSoftDelete": true, "softDeleteRetentionInDays": 90, "enableRbacAuthorization": + false, "provisioningState": "Succeeded", "publicNetworkAccess": "Enabled"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - keyvault set-policy + Connection: + - keep-alive + Content-Length: + - '2844' + Content-Type: + - application/json + ParameterSetName: + - -n --secret-permissions --object-id + User-Agent: + - AZURECLI/2.44.1 azsdk-python-azure-mgmt-keyvault/10.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/amlim-cli-test/providers/Microsoft.KeyVault/vaults/clitesting?api-version=2022-07-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/amlim-cli-test/providers/Microsoft.KeyVault/vaults/clitesting","name":"clitesting","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{},"systemData":{"createdBy":"amlim@microsoft.com","createdByType":"User","createdAt":"2023-01-24T00:55:42.359Z","lastModifiedBy":"amlim@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-04T02:14:34.387Z"},"properties":{"sku":{"family":"A","name":"Standard"},"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","accessPolicies":[{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","objectId":"17755109-de29-4032-8853-f390afd630a2","permissions":{"keys":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","GetRotationPolicy","SetRotationPolicy","Rotate"],"secrets":["Get","List","Set","Delete","Recover","Backup","Restore"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","ManageContacts","ManageIssuers","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers"]}},{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","objectId":"da2a1a6b-6414-4089-a1d5-d530f59f5865","permissions":{"secrets":["list","get"]}},{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","objectId":"c6ff0231-e51d-499a-993f-f1fcbc6c1059","permissions":{"secrets":["list","get"]}},{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","objectId":"383e9e95-a578-4921-93ac-eb250bc357d4","permissions":{"secrets":["get","list"]}},{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","objectId":"8a9eecb3-7701-42d2-bbf8-cd009a63eb9d","permissions":{"secrets":["get","list"]}},{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","objectId":"f8d11665-f5ba-4565-ac8a-06c630527228","permissions":{"secrets":["list","get"]}},{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","objectId":"d15af3d8-104d-4bfe-b51a-636acbdfef6a","permissions":{"secrets":["list","get"]}},{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","objectId":"b12e0460-8925-422a-ac16-ac1f672c6fdf","permissions":{"secrets":["list","get"]}},{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","objectId":"bc0a4269-f298-40ba-9208-d7e08eb17c3e","permissions":{"secrets":["list","get"]}},{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","objectId":"51300a0b-f360-43f0-802f-c573f29b6a47","permissions":{"secrets":["list","get"]}},{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","objectId":"cd84fce5-79aa-4f9e-8196-c41cd05c1602","permissions":{"secrets":["list","get"]}},{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","objectId":"25a3e34a-32a4-4900-8d4f-c5d39643109b","permissions":{"secrets":["list","get"]}},{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","objectId":"077395a2-c8be-417e-affa-3fc42c1c243d","permissions":{"secrets":["list","get"]}}],"enabledForDeployment":false,"enabledForDiskEncryption":false,"enabledForTemplateDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enableRbacAuthorization":false,"vaultUri":"https://clitesting.vault.azure.net/","provisioningState":"Succeeded","publicNetworkAccess":"Enabled"}}' + headers: + cache-control: + - no-cache + content-length: + - '3089' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 02:14:34 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-service-version: + - 1.5.644.0 + x-ms-ratelimit-remaining-subscription-writes: + - '1197' + status: + code: 200 + message: OK +- request: + body: '{"location": "westus3", "properties": {"devCenterId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/devcenters/cli000002"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - devcenter admin project create + Connection: + - keep-alive + Content-Length: + - '189' + Content-Type: + - application/json + ParameterSetName: + - --location --name --dev-center-id --resource-group + User-Agent: + - AZURECLI/2.44.1 azsdk-python-devcenter/unknown Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/projects/cli000004?api-version=2022-11-11-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/projects/cli000004","name":"cli000004","type":"microsoft.devcenter/projects","location":"westus3","systemData":{"createdBy":"amlim@microsoft.com","createdByType":"User","createdAt":"2023-02-04T02:14:36.2916507Z","lastModifiedBy":"amlim@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-04T02:14:36.2916507Z"},"properties":{"provisioningState":"Accepted","devCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/devcenters/cli000002"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevCenter/locations/WESTUS3/operationStatuses/7475345b-1dd4-411b-95f4-3de3afe46fc4*F26964E4CA46F6F16883A38CB61E264A56EDC60CFDF17553E71E3EB6D75989E2?api-version=2022-11-11-preview + cache-control: + - no-cache + content-length: + - '640' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 02:14:37 GMT + etag: + - '"0000f806-0000-4d00-0000-63ddbf8d0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-quota: + - '{"name":{"localizedValue":null,"value":"projects"},"limit":500,"currentUsed":19,"category":"Informational","scope":"subscription","target":"/subscriptions/3de261df-f2d8-4c00-a0ee-a0be30f1e48e/","region":"westus3"}' + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + x-rate-limit-limit: + - 1m + x-rate-limit-remaining: + - '299' + x-rate-limit-reset: + - '2023-02-04T02:15:36.6123754Z' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - devcenter admin project create + Connection: + - keep-alive + ParameterSetName: + - --location --name --dev-center-id --resource-group + User-Agent: + - AZURECLI/2.44.1 azsdk-python-devcenter/unknown Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevCenter/locations/WESTUS3/operationStatuses/7475345b-1dd4-411b-95f4-3de3afe46fc4*F26964E4CA46F6F16883A38CB61E264A56EDC60CFDF17553E71E3EB6D75989E2?api-version=2022-11-11-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevCenter/locations/WESTUS3/operationStatuses/7475345b-1dd4-411b-95f4-3de3afe46fc4*F26964E4CA46F6F16883A38CB61E264A56EDC60CFDF17553E71E3EB6D75989E2","name":"7475345b-1dd4-411b-95f4-3de3afe46fc4*F26964E4CA46F6F16883A38CB61E264A56EDC60CFDF17553E71E3EB6D75989E2","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/projects/cli000004","status":"Succeeded","startTime":"2023-02-04T02:14:36.7804834Z","endTime":"2023-02-04T02:14:52.2907611Z","properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '607' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 02:15:06 GMT + etag: + - '"0000d82e-0000-4d00-0000-63ddbf9c0000"' + expires: + - '-1' + pragma: + - no-cache + 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: + - devcenter admin project create + Connection: + - keep-alive + ParameterSetName: + - --location --name --dev-center-id --resource-group + User-Agent: + - AZURECLI/2.44.1 azsdk-python-devcenter/unknown Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/projects/cli000004?api-version=2022-11-11-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/projects/cli000004","name":"cli000004","type":"microsoft.devcenter/projects","location":"westus3","systemData":{"createdBy":"amlim@microsoft.com","createdByType":"User","createdAt":"2023-02-04T02:14:36.2916507Z","lastModifiedBy":"amlim@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-04T02:14:36.2916507Z"},"properties":{"provisioningState":"Succeeded","devCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/devcenters/cli000002","devCenterUri":"https://72f988bf-86f1-41af-91ab-2d7cd011db47-cli000002.westus3.devcenter.azure.com/"}}' + headers: + cache-control: + - no-cache + content-length: + - '742' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 02:15:06 GMT + etag: + - '"0000fa06-0000-4d00-0000-63ddbf9c0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - devcenter admin project show + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group + User-Agent: + - AZURECLI/2.44.1 azsdk-python-devcenter/unknown Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/projects/cli000004?api-version=2022-11-11-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/projects/cli000004","name":"cli000004","type":"microsoft.devcenter/projects","location":"westus3","systemData":{"createdBy":"amlim@microsoft.com","createdByType":"User","createdAt":"2023-02-04T02:14:36.2916507Z","lastModifiedBy":"amlim@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-04T02:14:36.2916507Z"},"properties":{"provisioningState":"Succeeded","devCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/devcenters/cli000002","devCenterUri":"https://72f988bf-86f1-41af-91ab-2d7cd011db47-cli000002.westus3.devcenter.azure.com/"}}' + headers: + cache-control: + - no-cache + content-length: + - '742' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 02:15:07 GMT + etag: + - '"0000fa06-0000-4d00-0000-63ddbf9c0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - ad signed-in-user show + Connection: + - keep-alive + User-Agent: + - python/3.10.7 (Windows-10-10.0.22621-SP0) AZURECLI/2.44.1 + method: GET + uri: https://graph.microsoft.com/v1.0/me + response: + body: + string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#users/$entity","id":"17755109-de29-4032-8853-f390afd630a2"}' + headers: + cache-control: + - no-cache + content-length: + - '406' + content-type: + - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 + date: + - Sat, 04 Feb 2023 02:15:08 GMT + odata-version: + - '4.0' + request-id: + - 7e20ff22-5b30-4916-bfb1-334588fe2b91 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-ms-ags-diagnostic: + - '{"ServerInfo":{"DataCenter":"West US","Slice":"E","Ring":"4","ScaleUnit":"004","RoleInstance":"BY3PEPF0001C14E"}}' + x-ms-resource-unit: + - '1' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - role assignment create + Connection: + - keep-alive + ParameterSetName: + - --role --assignee --scope + User-Agent: + - python/3.10.7 (Windows-10-10.0.22621-SP0) AZURECLI/2.44.1 + method: GET + uri: https://graph.microsoft.com/v1.0/servicePrincipals?$filter=servicePrincipalNames%2Fany%28c%3Ac%20eq%20%2717755109-de29-4032-8853-f390afd630a2%27%29 + response: + body: + string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#servicePrincipals","value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '92' + content-type: + - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 + date: + - Sat, 04 Feb 2023 02:15:07 GMT + odata-version: + - '4.0' + request-id: + - cd512d3a-01e8-4d32-98dc-dfa8492d4609 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-ms-ags-diagnostic: + - '{"ServerInfo":{"DataCenter":"West US","Slice":"E","Ring":"4","ScaleUnit":"004","RoleInstance":"BY3PEPF0001C14F"}}' + x-ms-resource-unit: + - '1' + status: + code: 200 + message: OK +- request: + body: '{"ids": ["17755109-de29-4032-8853-f390afd630a2"], "types": ["user", "group", + "servicePrincipal", "directoryObjectPartnerReference"]}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - role assignment create + Connection: + - keep-alive + Content-Length: + - '132' + Content-Type: + - application/json + ParameterSetName: + - --role --assignee --scope + User-Agent: + - python/3.10.7 (Windows-10-10.0.22621-SP0) AZURECLI/2.44.1 + method: POST + uri: https://graph.microsoft.com/v1.0/directoryObjects/getByIds + response: + body: + string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#directoryObjects","value":[{"@odata.type":"#microsoft.graph.user","id":"17755109-de29-4032-8853-f390afd630a2"}]}' + headers: + cache-control: + - no-cache + content-length: + - '459' + content-type: + - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 + date: + - Sat, 04 Feb 2023 02:15:08 GMT + location: + - https://graph.microsoft.com + odata-version: + - '4.0' + request-id: + - 3a3e5cc0-82ce-40e4-ba7e-2e85f7b48901 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-ms-ags-diagnostic: + - '{"ServerInfo":{"DataCenter":"West US","Slice":"E","Ring":"4","ScaleUnit":"004","RoleInstance":"BY3PEPF0001C150"}}' + x-ms-resource-unit: + - '3' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"roleDefinitionId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/18e40d4e-8d2e-438d-97e1-9528336e149c", + "principalId": "17755109-de29-4032-8853-f390afd630a2", "principalType": "User"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - role assignment create + Connection: + - keep-alive + Content-Length: + - '258' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - --role --assignee --scope + User-Agent: + - python/3.10.7 (Windows-10-10.0.22621-SP0) msrest/0.7.1 msrest_azure/0.6.4 + azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.44.1 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/projects/cli000004/providers/Microsoft.Authorization/roleAssignments/944dd1cc-9f0f-4160-a8fb-fce8d9c9fdc7?api-version=2020-04-01-preview + response: + body: + string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/18e40d4e-8d2e-438d-97e1-9528336e149c","principalId":"17755109-de29-4032-8853-f390afd630a2","principalType":"User","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/projects/cli000004","condition":null,"conditionVersion":null,"createdOn":"2023-02-04T02:15:09.3184091Z","updatedOn":"2023-02-04T02:15:10.1791314Z","createdBy":null,"updatedBy":"17755109-de29-4032-8853-f390afd630a2","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/projects/cli000004/providers/Microsoft.Authorization/roleAssignments/944dd1cc-9f0f-4160-a8fb-fce8d9c9fdc7","type":"Microsoft.Authorization/roleAssignments","name":"944dd1cc-9f0f-4160-a8fb-fce8d9c9fdc7"}' + headers: + cache-control: + - no-cache + content-length: + - '967' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 02:15: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: + - '1198' + status: + code: 201 + message: Created +- request: + body: '{"properties": {"gitHub": {"uri": "https://github.com/amandalim95/Project-Fidalgo-PrivatePreview.git", + "branch": "main", "secretIdentifier": "https://clitesting.vault.azure.net/secrets/cli-secret2/eb08c2be51644082a5e56e2deaf76979", + "path": "/Catalog_v2"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - devcenter admin catalog create + Connection: + - keep-alive + Content-Length: + - '256' + Content-Type: + - application/json + ParameterSetName: + - --dev-center --name --git-hub --resource-group + User-Agent: + - AZURECLI/2.44.1 azsdk-python-devcenter/unknown Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/devcenters/cli000002/catalogs/c2000005?api-version=2022-11-11-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/devcenters/cli000002/catalogs/c2000005","name":"c2000005","type":"microsoft.devcenter/devcenters/catalogs","systemData":{"createdBy":"amlim@microsoft.com","createdByType":"User","createdAt":"2023-02-04T02:15:12.7332171Z","lastModifiedBy":"amlim@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-04T02:15:12.7332171Z"},"properties":{"provisioningState":"Accepted","syncState":"InProgress","gitHub":{"uri":"https://github.com/amandalim95/Project-Fidalgo-PrivatePreview.git","branch":"main","secretIdentifier":"https://clitesting.vault.azure.net/secrets/cli-secret2/eb08c2be51644082a5e56e2deaf76979","path":"/Catalog_v2"}}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevCenter/locations/WESTUS3/operationStatuses/8844bb5e-7015-4dba-b5cf-68f6f4ba12fe*AFE7C391360301233175E17924AC82A984D91838C566E3C6F8549BD550F95AB1?api-version=2022-11-11-preview + cache-control: + - no-cache + content-length: + - '757' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 02:15:13 GMT + etag: + - '"0000f309-0000-4d00-0000-63ddbfb10000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-rate-limit-limit: + - 1m + x-rate-limit-remaining: + - '299' + x-rate-limit-reset: + - '2023-02-04T02:16:13.0321039Z' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - devcenter admin catalog create + Connection: + - keep-alive + ParameterSetName: + - --dev-center --name --git-hub --resource-group + User-Agent: + - AZURECLI/2.44.1 azsdk-python-devcenter/unknown Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevCenter/locations/WESTUS3/operationStatuses/8844bb5e-7015-4dba-b5cf-68f6f4ba12fe*AFE7C391360301233175E17924AC82A984D91838C566E3C6F8549BD550F95AB1?api-version=2022-11-11-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevCenter/locations/WESTUS3/operationStatuses/8844bb5e-7015-4dba-b5cf-68f6f4ba12fe*AFE7C391360301233175E17924AC82A984D91838C566E3C6F8549BD550F95AB1","name":"8844bb5e-7015-4dba-b5cf-68f6f4ba12fe*AFE7C391360301233175E17924AC82A984D91838C566E3C6F8549BD550F95AB1","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/devcenters/cli000002/catalogs/c2000005","status":"Succeeded","startTime":"2023-02-04T02:15:13.0463152Z","endTime":"2023-02-04T02:15:18.572145Z","properties":["Successfully + synced 3 catalog items."]}' + headers: + cache-control: + - no-cache + content-length: + - '662' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 02:15:43 GMT + etag: + - '"0000da2e-0000-4d00-0000-63ddbfb60000"' + expires: + - '-1' + pragma: + - no-cache + 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: + - devcenter admin catalog create + Connection: + - keep-alive + ParameterSetName: + - --dev-center --name --git-hub --resource-group + User-Agent: + - AZURECLI/2.44.1 azsdk-python-devcenter/unknown Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/devcenters/cli000002/catalogs/c2000005?api-version=2022-11-11-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/devcenters/cli000002/catalogs/c2000005","name":"c2000005","type":"microsoft.devcenter/devcenters/catalogs","systemData":{"createdBy":"amlim@microsoft.com","createdByType":"User","createdAt":"2023-02-04T02:15:12.7332171Z","lastModifiedBy":"amlim@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-04T02:15:12.7332171Z"},"properties":{"provisioningState":"Succeeded","syncState":"Succeeded","gitHub":{"uri":"https://github.com/amandalim95/Project-Fidalgo-PrivatePreview.git","branch":"main","secretIdentifier":"https://clitesting.vault.azure.net/secrets/cli-secret2/eb08c2be51644082a5e56e2deaf76979","path":"/Catalog_v2"},"lastSyncTime":"2023-02-04T02:15:18.286043Z"}}' + headers: + cache-control: + - no-cache + content-length: + - '802' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 02:15:43 GMT + etag: + - '"0000f709-0000-4d00-0000-63ddbfb60000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - devcenter admin catalog sync + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --dev-center --name --resource-group + User-Agent: + - AZURECLI/2.44.1 azsdk-python-devcenter/unknown Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/devcenters/cli000002/catalogs/c2000005/sync?api-version=2022-11-11-preview + response: + body: + string: '{}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevCenter/locations/WESTUS3/operationStatuses/3771719b-cdc4-4d13-bf33-c18da6f7e03b*AFE7C391360301233175E17924AC82A984D91838C566E3C6F8549BD550F95AB1?api-version=2022-11-11-preview + cache-control: + - no-cache + content-length: + - '2' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 02:15:44 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevCenter/locations/WESTUS3/operationStatuses/3771719b-cdc4-4d13-bf33-c18da6f7e03b*AFE7C391360301233175E17924AC82A984D91838C566E3C6F8549BD550F95AB1?api-version=2022-11-11-preview + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-rate-limit-limit: + - 1m + x-rate-limit-remaining: + - '299' + x-rate-limit-reset: + - '2023-02-04T02:16:44.2118464Z' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - devcenter admin catalog sync + Connection: + - keep-alive + ParameterSetName: + - --dev-center --name --resource-group + User-Agent: + - AZURECLI/2.44.1 azsdk-python-devcenter/unknown Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevCenter/locations/WESTUS3/operationStatuses/3771719b-cdc4-4d13-bf33-c18da6f7e03b*AFE7C391360301233175E17924AC82A984D91838C566E3C6F8549BD550F95AB1?api-version=2022-11-11-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevCenter/locations/WESTUS3/operationStatuses/3771719b-cdc4-4d13-bf33-c18da6f7e03b*AFE7C391360301233175E17924AC82A984D91838C566E3C6F8549BD550F95AB1","name":"3771719b-cdc4-4d13-bf33-c18da6f7e03b*AFE7C391360301233175E17924AC82A984D91838C566E3C6F8549BD550F95AB1","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/devcenters/cli000002/catalogs/c2000005","status":"Succeeded","startTime":"2023-02-04T02:15:44.0710255Z","endTime":"2023-02-04T02:15:47.6718577Z","properties":["Successfully + synced 3 catalog items."]}' + headers: + cache-control: + - no-cache + content-length: + - '663' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 02:16:14 GMT + etag: + - '"0000dc2e-0000-4d00-0000-63ddbfd30000"' + expires: + - '-1' + pragma: + - no-cache + 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: '{"query": " Resources |where type =~''Microsoft.devcenter/projects''\n | + where name =~ ''cli000004''\n | extend devCenterArr = split(properties.devCenterId, + ''/'')\n | extend devCenterName = devCenterArr[array_length(devCenterArr) + -1]\n | where devCenterName =~ ''cli000002''\n | take 1\n | extend + devCenterUri = properties.devCenterUri\n | project name,devCenterUri "}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - devcenter dev catalog-item list + Connection: + - keep-alive + Content-Length: + - '382' + Content-Type: + - application/json + ParameterSetName: + - --dev-center --project + User-Agent: + - python/3.10.7 (Windows-10-10.0.22621-SP0) AZURECLI/2.44.1 + method: POST + uri: https://management.azure.com/providers/Microsoft.ResourceGraph/resources?api-version=2021-03-01 + response: + body: + string: '{"totalRecords":1,"count":1,"data":[{"name":"cli000004","devCenterUri":"https://72f988bf-86f1-41af-91ab-2d7cd011db47-cli000002.westus3.devcenter.azure.com/"}],"facets":[],"resultTruncated":"false"}' + headers: + cache-control: + - no-cache + content-length: + - '197' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 02:16:16 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: + - '14' + x-ms-resource-graph-request-duration: + - '0:00:00:00.3165209' + x-ms-user-quota-remaining: + - '14' + x-ms-user-quota-resets-after: + - 00:00:05 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - devcenter dev catalog-item list + Connection: + - keep-alive + ParameterSetName: + - --dev-center --project + User-Agent: + - AZURECLI/2.44.1 azsdk-python-devcenterdataplaneclient/unknown Python/3.10.7 + (Windows-10-10.0.22621-SP0) + method: GET + uri: https://72f988bf-86f1-41af-91ab-2d7cd011db47-cli000002.westus3.devcenter.azure.com/projects/cli000004/catalogItems?api-version=2022-11-11-preview + response: + body: + string: "{\n \"value\": [\n {\n \"id\": \"72f988bf-86f1-41af-91ab-2d7cd011db47:cli000002:c2000005:empty\",\n + \ \"name\": \"Empty\",\n \"catalogName\": \"c2000005\"\n },\n + \ {\n \"id\": \"72f988bf-86f1-41af-91ab-2d7cd011db47:cli000002:c2000005:functionapp\",\n + \ \"name\": \"FunctionApp\",\n \"catalogName\": \"c2000005\"\n },\n + \ {\n \"id\": \"72f988bf-86f1-41af-91ab-2d7cd011db47:cli000002:c2000005:webapp\",\n + \ \"name\": \"WebApp\",\n \"catalogName\": \"c2000005\"\n }\n + \ ]\n}" + headers: + connection: + - keep-alive + content-length: + - '468' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 02:16:17 GMT + strict-transport-security: + - max-age=15724800; includeSubDomains + transfer-encoding: + - chunked + x-rate-limit-limit: + - 1m + x-rate-limit-remaining: + - '299' + x-rate-limit-reset: + - '2023-02-04T02:17:17.3464668Z' + status: + code: 200 + message: OK +- request: + body: '{"query": " Resources |where type =~''Microsoft.devcenter/projects''\n | + where name =~ ''cli000004''\n | extend devCenterArr = split(properties.devCenterId, + ''/'')\n | extend devCenterName = devCenterArr[array_length(devCenterArr) + -1]\n | where devCenterName =~ ''cli000002''\n | take 1\n | extend + devCenterUri = properties.devCenterUri\n | project name,devCenterUri "}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - devcenter dev catalog-item show + Connection: + - keep-alive + Content-Length: + - '382' + Content-Type: + - application/json + ParameterSetName: + - --dev-center --project --catalog-item-id + User-Agent: + - python/3.10.7 (Windows-10-10.0.22621-SP0) AZURECLI/2.44.1 + method: POST + uri: https://management.azure.com/providers/Microsoft.ResourceGraph/resources?api-version=2021-03-01 + response: + body: + string: '{"totalRecords":1,"count":1,"data":[{"name":"cli000004","devCenterUri":"https://72f988bf-86f1-41af-91ab-2d7cd011db47-cli000002.westus3.devcenter.azure.com/"}],"facets":[],"resultTruncated":"false"}' + headers: + cache-control: + - no-cache + content-length: + - '197' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 02:16:17 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: + - '13' + x-ms-resource-graph-request-duration: + - '0:00:00:00.1846515' + x-ms-user-quota-remaining: + - '13' + x-ms-user-quota-resets-after: + - 00:00:05 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - devcenter dev catalog-item show + Connection: + - keep-alive + ParameterSetName: + - --dev-center --project --catalog-item-id + User-Agent: + - AZURECLI/2.44.1 azsdk-python-devcenterdataplaneclient/unknown Python/3.10.7 + (Windows-10-10.0.22621-SP0) + method: GET + uri: https://72f988bf-86f1-41af-91ab-2d7cd011db47-cli000002.westus3.devcenter.azure.com/projects/cli000004/catalogItems/72f988bf-86f1-41af-91ab-2d7cd011db47%3Acli000002%3Ac2000005%3Aempty?api-version=2022-11-11-preview + response: + body: + string: "{\n \"id\": \"72f988bf-86f1-41af-91ab-2d7cd011db47:cli000002:c2000005:empty\",\n + \ \"name\": \"Empty\",\n \"catalogName\": \"c2000005\"\n}" + headers: + connection: + - keep-alive + content-length: + - '123' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 02:16:18 GMT + strict-transport-security: + - max-age=15724800; includeSubDomains + x-rate-limit-limit: + - 1m + x-rate-limit-remaining: + - '298' + x-rate-limit-reset: + - '2023-02-04T02:16:42.6917792Z' + status: + code: 200 + message: OK +- request: + body: '{"query": " Resources |where type =~''Microsoft.devcenter/projects''\n | + where name =~ ''cli000004''\n | extend devCenterArr = split(properties.devCenterId, + ''/'')\n | extend devCenterName = devCenterArr[array_length(devCenterArr) + -1]\n | where devCenterName =~ ''cli000002''\n | take 1\n | extend + devCenterUri = properties.devCenterUri\n | project name,devCenterUri "}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - devcenter dev catalog-item-version list + Connection: + - keep-alive + Content-Length: + - '382' + Content-Type: + - application/json + ParameterSetName: + - --dev-center --project --catalog-item-id + User-Agent: + - python/3.10.7 (Windows-10-10.0.22621-SP0) AZURECLI/2.44.1 + method: POST + uri: https://management.azure.com/providers/Microsoft.ResourceGraph/resources?api-version=2021-03-01 + response: + body: + string: '{"totalRecords":1,"count":1,"data":[{"name":"cli000004","devCenterUri":"https://72f988bf-86f1-41af-91ab-2d7cd011db47-cli000002.westus3.devcenter.azure.com/"}],"facets":[],"resultTruncated":"false"}' + headers: + cache-control: + - no-cache + content-length: + - '197' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 02:16:18 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: + - '12' + x-ms-resource-graph-request-duration: + - '0:00:00:00.1893410' + x-ms-user-quota-remaining: + - '12' + x-ms-user-quota-resets-after: + - 00:00:05 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - devcenter dev catalog-item-version list + Connection: + - keep-alive + ParameterSetName: + - --dev-center --project --catalog-item-id + User-Agent: + - AZURECLI/2.44.1 azsdk-python-devcenterdataplaneclient/unknown Python/3.10.7 + (Windows-10-10.0.22621-SP0) + method: GET + uri: https://72f988bf-86f1-41af-91ab-2d7cd011db47-cli000002.westus3.devcenter.azure.com/projects/cli000004/catalogItems/72f988bf-86f1-41af-91ab-2d7cd011db47%3Acli000002%3Ac2000005%3Aempty/versions?api-version=2022-11-11-preview + response: + body: + string: "{\n \"value\": [\n {\n \"catalogItemId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47:cli000002:c2000005:empty:1.0.0\",\n + \ \"actions\": [],\n \"catalogItemName\": \"Empty\",\n \"catalogName\": + \"c2000005\",\n \"version\": \"1.0.0\",\n \"summary\": \"Empty environment\",\n + \ \"description\": \"Deploys an empty environment\",\n \"templatePath\": + \"Catalog_v2/Empty/azuredeploy.json\",\n \"parametersSchema\": \"{\\\"type\\\":\\\"object\\\"}\",\n + \ \"parameters\": [],\n \"runner\": \"ARM\",\n \"status\": \"Enabled\",\n + \ \"eligibleForLatestVersion\": true\n }\n ]\n}" + headers: + connection: + - keep-alive + content-length: + - '554' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 02:16:19 GMT + strict-transport-security: + - max-age=15724800; includeSubDomains + transfer-encoding: + - chunked + x-rate-limit-limit: + - 1m + x-rate-limit-remaining: + - '299' + x-rate-limit-reset: + - '2023-02-04T02:17:19.0589872Z' + status: + code: 200 + message: OK +- request: + body: '{"query": " Resources |where type =~''Microsoft.devcenter/projects''\n | + where name =~ ''cli000004''\n | extend devCenterArr = split(properties.devCenterId, + ''/'')\n | extend devCenterName = devCenterArr[array_length(devCenterArr) + -1]\n | where devCenterName =~ ''cli000002''\n | take 1\n | extend + devCenterUri = properties.devCenterUri\n | project name,devCenterUri "}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - devcenter dev catalog-item-version show + Connection: + - keep-alive + Content-Length: + - '382' + Content-Type: + - application/json + ParameterSetName: + - --dev-center --project --catalog-item-id --version + User-Agent: + - python/3.10.7 (Windows-10-10.0.22621-SP0) AZURECLI/2.44.1 + method: POST + uri: https://management.azure.com/providers/Microsoft.ResourceGraph/resources?api-version=2021-03-01 + response: + body: + string: '{"totalRecords":1,"count":1,"data":[{"name":"cli000004","devCenterUri":"https://72f988bf-86f1-41af-91ab-2d7cd011db47-cli000002.westus3.devcenter.azure.com/"}],"facets":[],"resultTruncated":"false"}' + headers: + cache-control: + - no-cache + content-length: + - '197' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 02:16:19 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: + - '11' + x-ms-resource-graph-request-duration: + - '0:00:00:00.2867586' + x-ms-user-quota-remaining: + - '11' + x-ms-user-quota-resets-after: + - 00:00:05 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - devcenter dev catalog-item-version show + Connection: + - keep-alive + ParameterSetName: + - --dev-center --project --catalog-item-id --version + User-Agent: + - AZURECLI/2.44.1 azsdk-python-devcenterdataplaneclient/unknown Python/3.10.7 + (Windows-10-10.0.22621-SP0) + method: GET + uri: https://72f988bf-86f1-41af-91ab-2d7cd011db47-cli000002.westus3.devcenter.azure.com/projects/cli000004/catalogItems/72f988bf-86f1-41af-91ab-2d7cd011db47%3Acli000002%3Ac2000005%3Aempty/versions/1.0.0?api-version=2022-11-11-preview + response: + body: + string: "{\n \"catalogItemId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47:cli000002:c2000005:empty:1.0.0\",\n + \ \"actions\": [],\n \"catalogItemName\": \"Empty\",\n \"catalogName\": + \"c2000005\",\n \"version\": \"1.0.0\",\n \"summary\": \"Empty environment\",\n + \ \"description\": \"Deploys an empty environment\",\n \"templatePath\": + \"Catalog_v2/Empty/azuredeploy.json\",\n \"parametersSchema\": \"{\\\"type\\\":\\\"object\\\"}\",\n + \ \"parameters\": [],\n \"runner\": \"ARM\",\n \"status\": \"Enabled\",\n + \ \"eligibleForLatestVersion\": true\n}" + headers: + connection: + - keep-alive + content-length: + - '473' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 02:16:20 GMT + strict-transport-security: + - max-age=15724800; includeSubDomains + transfer-encoding: + - chunked + x-rate-limit-limit: + - 1m + x-rate-limit-remaining: + - '299' + x-rate-limit-reset: + - '2023-02-04T02:17:20.0402077Z' + status: + code: 200 + message: OK +version: 1 diff --git a/src/devcenter/azext_devcenter/tests/latest/recordings/test_env_type_dataplane_scenario.yaml b/src/devcenter/azext_devcenter/tests/latest/recordings/test_env_type_dataplane_scenario.yaml new file mode 100644 index 00000000000..c9d583c6e88 --- /dev/null +++ b/src/devcenter/azext_devcenter/tests/latest/recordings/test_env_type_dataplane_scenario.yaml @@ -0,0 +1,969 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - identity create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name + User-Agent: + - AZURECLI/2.44.1 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2021-04-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":"2023-02-04T01:11:05Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '304' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 01:11:05 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - identity create + Connection: + - keep-alive + Content-Length: + - '22' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name + User-Agent: + - AZURECLI/2.44.1 azsdk-python-azure-mgmt-msi/6.1.0 Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testid_000003?api-version=2022-01-31-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testid_000003","name":"testid_000003","type":"Microsoft.ManagedIdentity/userAssignedIdentities","location":"westus","tags":{},"properties":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","principalId":"53abe43d-74ab-46ac-b102-e8c6b1723f85","clientId":"e61c3e10-624c-41dd-8ffe-fc2eab7b747b"}}' + headers: + cache-control: + - no-cache + content-length: + - '441' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 01:11:08 GMT + expires: + - '-1' + location: + - /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testid_000003 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1195' + status: + code: 201 + message: Created +- request: + body: '{"tags": {"CostCode": "12345"}, "location": "westus3", "identity": {"type": + "UserAssigned", "userAssignedIdentities": {"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testid_000003": + {}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - devcenter admin devcenter create + Connection: + - keep-alive + Content-Length: + - '281' + Content-Type: + - application/json + ParameterSetName: + - --identity-type --user-assigned-identities --location --tags --name --resource-group + User-Agent: + - AZURECLI/2.44.1 azsdk-python-devcenter/unknown Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/devcenters/cli000002?api-version=2022-11-11-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/devcenters/cli000002","name":"cli000002","type":"microsoft.devcenter/devcenters","location":"westus3","tags":{"CostCode":"12345"},"systemData":{"createdBy":"amlim@microsoft.com","createdByType":"User","createdAt":"2023-02-04T01:11:10.2961623Z","lastModifiedBy":"amlim@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-04T01:11:10.2961623Z"},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testid_000003":{"principalId":"53abe43d-74ab-46ac-b102-e8c6b1723f85","clientId":"e61c3e10-624c-41dd-8ffe-fc2eab7b747b"}}},"properties":{"provisioningState":"Accepted"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevCenter/locations/WESTUS3/operationStatuses/cea054e8-e0e7-4b9c-b963-7c62bef8172c*B073D40E771FF2587191847568C883F450B327BA49C842DFDEC07ABF5D5C2305?api-version=2022-11-11-preview + cache-control: + - no-cache + content-length: + - '847' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 01:11:11 GMT + etag: + - '"340001e6-0000-4d00-0000-63ddb0af0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-quota: + - '{"name":{"localizedValue":null,"value":"devCenters"},"limit":100,"currentUsed":21,"category":"Informational","scope":"subscription","target":"/subscriptions/3de261df-f2d8-4c00-a0ee-a0be30f1e48e/","region":"westus3"}' + x-ms-ratelimit-remaining-subscription-writes: + - '1194' + x-rate-limit-limit: + - 1m + x-rate-limit-remaining: + - '299' + x-rate-limit-reset: + - '2023-02-04T01:12:10.7181044Z' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - devcenter admin devcenter create + Connection: + - keep-alive + ParameterSetName: + - --identity-type --user-assigned-identities --location --tags --name --resource-group + User-Agent: + - AZURECLI/2.44.1 azsdk-python-devcenter/unknown Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevCenter/locations/WESTUS3/operationStatuses/cea054e8-e0e7-4b9c-b963-7c62bef8172c*B073D40E771FF2587191847568C883F450B327BA49C842DFDEC07ABF5D5C2305?api-version=2022-11-11-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevCenter/locations/WESTUS3/operationStatuses/cea054e8-e0e7-4b9c-b963-7c62bef8172c*B073D40E771FF2587191847568C883F450B327BA49C842DFDEC07ABF5D5C2305","name":"cea054e8-e0e7-4b9c-b963-7c62bef8172c*B073D40E771FF2587191847568C883F450B327BA49C842DFDEC07ABF5D5C2305","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/devcenters/cli000002","status":"Accepted","startTime":"2023-02-04T01:11:10.737414Z"}' + headers: + cache-control: + - no-cache + content-length: + - '548' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 01:11:41 GMT + etag: + - '"00009d2e-0000-4d00-0000-63ddb0ae0000"' + expires: + - '-1' + pragma: + - no-cache + 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: + - devcenter admin devcenter create + Connection: + - keep-alive + ParameterSetName: + - --identity-type --user-assigned-identities --location --tags --name --resource-group + User-Agent: + - AZURECLI/2.44.1 azsdk-python-devcenter/unknown Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevCenter/locations/WESTUS3/operationStatuses/cea054e8-e0e7-4b9c-b963-7c62bef8172c*B073D40E771FF2587191847568C883F450B327BA49C842DFDEC07ABF5D5C2305?api-version=2022-11-11-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevCenter/locations/WESTUS3/operationStatuses/cea054e8-e0e7-4b9c-b963-7c62bef8172c*B073D40E771FF2587191847568C883F450B327BA49C842DFDEC07ABF5D5C2305","name":"cea054e8-e0e7-4b9c-b963-7c62bef8172c*B073D40E771FF2587191847568C883F450B327BA49C842DFDEC07ABF5D5C2305","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/devcenters/cli000002","status":"Accepted","startTime":"2023-02-04T01:11:10.737414Z"}' + headers: + cache-control: + - no-cache + content-length: + - '548' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 01:12:11 GMT + etag: + - '"00009d2e-0000-4d00-0000-63ddb0ae0000"' + expires: + - '-1' + pragma: + - no-cache + 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: + - devcenter admin devcenter create + Connection: + - keep-alive + ParameterSetName: + - --identity-type --user-assigned-identities --location --tags --name --resource-group + User-Agent: + - AZURECLI/2.44.1 azsdk-python-devcenter/unknown Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevCenter/locations/WESTUS3/operationStatuses/cea054e8-e0e7-4b9c-b963-7c62bef8172c*B073D40E771FF2587191847568C883F450B327BA49C842DFDEC07ABF5D5C2305?api-version=2022-11-11-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevCenter/locations/WESTUS3/operationStatuses/cea054e8-e0e7-4b9c-b963-7c62bef8172c*B073D40E771FF2587191847568C883F450B327BA49C842DFDEC07ABF5D5C2305","name":"cea054e8-e0e7-4b9c-b963-7c62bef8172c*B073D40E771FF2587191847568C883F450B327BA49C842DFDEC07ABF5D5C2305","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/devcenters/cli000002","status":"Succeeded","startTime":"2023-02-04T01:11:10.737414Z","endTime":"2023-02-04T01:12:20.4422389Z","properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '608' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 01:12:41 GMT + etag: + - '"0000a22e-0000-4d00-0000-63ddb0f40000"' + expires: + - '-1' + pragma: + - no-cache + 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: + - devcenter admin devcenter create + Connection: + - keep-alive + ParameterSetName: + - --identity-type --user-assigned-identities --location --tags --name --resource-group + User-Agent: + - AZURECLI/2.44.1 azsdk-python-devcenter/unknown Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/devcenters/cli000002?api-version=2022-11-11-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/devcenters/cli000002","name":"cli000002","type":"microsoft.devcenter/devcenters","location":"westus3","tags":{"CostCode":"12345"},"systemData":{"createdBy":"amlim@microsoft.com","createdByType":"User","createdAt":"2023-02-04T01:11:10.2961623Z","lastModifiedBy":"amlim@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-04T01:11:10.2961623Z"},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testid_000003":{"principalId":"53abe43d-74ab-46ac-b102-e8c6b1723f85","clientId":"e61c3e10-624c-41dd-8ffe-fc2eab7b747b"}}},"properties":{"provisioningState":"Succeeded","devCenterUri":"https://72f988bf-86f1-41af-91ab-2d7cd011db47-cli000002.westus3.devcenter.azure.com/"}}' + headers: + cache-control: + - no-cache + content-length: + - '949' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 01:12:41 GMT + etag: + - '"340064ef-0000-4d00-0000-63ddb0f40000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: '{"location": "westus3", "properties": {"devCenterId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/devcenters/cli000002"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - devcenter admin project create + Connection: + - keep-alive + Content-Length: + - '189' + Content-Type: + - application/json + ParameterSetName: + - --location --name --dev-center-id --resource-group + User-Agent: + - AZURECLI/2.44.1 azsdk-python-devcenter/unknown Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/projects/cli000004?api-version=2022-11-11-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/projects/cli000004","name":"cli000004","type":"microsoft.devcenter/projects","location":"westus3","systemData":{"createdBy":"amlim@microsoft.com","createdByType":"User","createdAt":"2023-02-04T01:12:43.7414941Z","lastModifiedBy":"amlim@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-04T01:12:43.7414941Z"},"properties":{"provisioningState":"Accepted","devCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/devcenters/cli000002"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevCenter/locations/WESTUS3/operationStatuses/a35eeca3-e70a-4912-a22d-126ec5f96f0b*55141726148331C13DA7697582200C6BC5A14C80048665C28FCF2534D86E6557?api-version=2022-11-11-preview + cache-control: + - no-cache + content-length: + - '640' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 01:12:44 GMT + etag: + - '"0000f006-0000-4d00-0000-63ddb10c0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-quota: + - '{"name":{"localizedValue":null,"value":"projects"},"limit":500,"currentUsed":19,"category":"Informational","scope":"subscription","target":"/subscriptions/3de261df-f2d8-4c00-a0ee-a0be30f1e48e/","region":"westus3"}' + x-ms-ratelimit-remaining-subscription-writes: + - '1196' + x-rate-limit-limit: + - 1m + x-rate-limit-remaining: + - '299' + x-rate-limit-reset: + - '2023-02-04T01:13:43.8647848Z' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - devcenter admin project create + Connection: + - keep-alive + ParameterSetName: + - --location --name --dev-center-id --resource-group + User-Agent: + - AZURECLI/2.44.1 azsdk-python-devcenter/unknown Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevCenter/locations/WESTUS3/operationStatuses/a35eeca3-e70a-4912-a22d-126ec5f96f0b*55141726148331C13DA7697582200C6BC5A14C80048665C28FCF2534D86E6557?api-version=2022-11-11-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevCenter/locations/WESTUS3/operationStatuses/a35eeca3-e70a-4912-a22d-126ec5f96f0b*55141726148331C13DA7697582200C6BC5A14C80048665C28FCF2534D86E6557","name":"a35eeca3-e70a-4912-a22d-126ec5f96f0b*55141726148331C13DA7697582200C6BC5A14C80048665C28FCF2534D86E6557","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/projects/cli000004","status":"Succeeded","startTime":"2023-02-04T01:12:44.1689341Z","endTime":"2023-02-04T01:12:49.32188Z","properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '605' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 01:13:15 GMT + etag: + - '"0000a42e-0000-4d00-0000-63ddb1110000"' + expires: + - '-1' + pragma: + - no-cache + 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: + - devcenter admin project create + Connection: + - keep-alive + ParameterSetName: + - --location --name --dev-center-id --resource-group + User-Agent: + - AZURECLI/2.44.1 azsdk-python-devcenter/unknown Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/projects/cli000004?api-version=2022-11-11-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/projects/cli000004","name":"cli000004","type":"microsoft.devcenter/projects","location":"westus3","systemData":{"createdBy":"amlim@microsoft.com","createdByType":"User","createdAt":"2023-02-04T01:12:43.7414941Z","lastModifiedBy":"amlim@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-04T01:12:43.7414941Z"},"properties":{"provisioningState":"Succeeded","devCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/devcenters/cli000002","devCenterUri":"https://72f988bf-86f1-41af-91ab-2d7cd011db47-cli000002.westus3.devcenter.azure.com/"}}' + headers: + cache-control: + - no-cache + content-length: + - '742' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 01:13:15 GMT + etag: + - '"0000f206-0000-4d00-0000-63ddb1110000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - devcenter admin project show + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group + User-Agent: + - AZURECLI/2.44.1 azsdk-python-devcenter/unknown Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/projects/cli000004?api-version=2022-11-11-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/projects/cli000004","name":"cli000004","type":"microsoft.devcenter/projects","location":"westus3","systemData":{"createdBy":"amlim@microsoft.com","createdByType":"User","createdAt":"2023-02-04T01:12:43.7414941Z","lastModifiedBy":"amlim@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-04T01:12:43.7414941Z"},"properties":{"provisioningState":"Succeeded","devCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/devcenters/cli000002","devCenterUri":"https://72f988bf-86f1-41af-91ab-2d7cd011db47-cli000002.westus3.devcenter.azure.com/"}}' + headers: + cache-control: + - no-cache + content-length: + - '742' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 01:13:15 GMT + etag: + - '"0000f206-0000-4d00-0000-63ddb1110000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - ad signed-in-user show + Connection: + - keep-alive + User-Agent: + - python/3.10.7 (Windows-10-10.0.22621-SP0) AZURECLI/2.44.1 + method: GET + uri: https://graph.microsoft.com/v1.0/me + response: + body: + string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#users/$entity", "id":"17755109-de29-4032-8853-f390afd630a2"}' + headers: + cache-control: + - no-cache + content-length: + - '406' + content-type: + - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 + date: + - Sat, 04 Feb 2023 01:13:15 GMT + odata-version: + - '4.0' + request-id: + - 2fc86368-af46-4281-8004-e44448cba2dd + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-ms-ags-diagnostic: + - '{"ServerInfo":{"DataCenter":"West US","Slice":"E","Ring":"4","ScaleUnit":"004","RoleInstance":"BY3PEPF00010586"}}' + x-ms-resource-unit: + - '1' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - role assignment create + Connection: + - keep-alive + ParameterSetName: + - --role --assignee --scope + User-Agent: + - python/3.10.7 (Windows-10-10.0.22621-SP0) AZURECLI/2.44.1 + method: GET + uri: https://graph.microsoft.com/v1.0/servicePrincipals?$filter=servicePrincipalNames%2Fany%28c%3Ac%20eq%20%2717755109-de29-4032-8853-f390afd630a2%27%29 + response: + body: + string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#servicePrincipals","value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '92' + content-type: + - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 + date: + - Sat, 04 Feb 2023 01:13:16 GMT + odata-version: + - '4.0' + request-id: + - 1f2050aa-780c-4273-b728-743da4f9afa7 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-ms-ags-diagnostic: + - '{"ServerInfo":{"DataCenter":"West US","Slice":"E","Ring":"4","ScaleUnit":"004","RoleInstance":"BY3PEPF00014A56"}}' + x-ms-resource-unit: + - '1' + status: + code: 200 + message: OK +- request: + body: '{"ids": ["17755109-de29-4032-8853-f390afd630a2"], "types": ["user", "group", + "servicePrincipal", "directoryObjectPartnerReference"]}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - role assignment create + Connection: + - keep-alive + Content-Length: + - '132' + Content-Type: + - application/json + ParameterSetName: + - --role --assignee --scope + User-Agent: + - python/3.10.7 (Windows-10-10.0.22621-SP0) AZURECLI/2.44.1 + method: POST + uri: https://graph.microsoft.com/v1.0/directoryObjects/getByIds + response: + body: + string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#directoryObjects","value":[{"@odata.type":"#microsoft.graph.user","id":"17755109-de29-4032-8853-f390afd630a2"}]}' + headers: + cache-control: + - no-cache + content-length: + - '459' + content-type: + - application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 + date: + - Sat, 04 Feb 2023 01:13:16 GMT + location: + - https://graph.microsoft.com + odata-version: + - '4.0' + request-id: + - 4abbbbce-f1f1-4851-a46a-dfa726c102b1 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-ms-ags-diagnostic: + - '{"ServerInfo":{"DataCenter":"West US","Slice":"E","Ring":"4","ScaleUnit":"004","RoleInstance":"BY3PEPF00010596"}}' + x-ms-resource-unit: + - '3' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"roleDefinitionId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/18e40d4e-8d2e-438d-97e1-9528336e149c", + "principalId": "17755109-de29-4032-8853-f390afd630a2", "principalType": "User"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - role assignment create + Connection: + - keep-alive + Content-Length: + - '258' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - --role --assignee --scope + User-Agent: + - python/3.10.7 (Windows-10-10.0.22621-SP0) msrest/0.7.1 msrest_azure/0.6.4 + azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.44.1 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/projects/cli000004/providers/Microsoft.Authorization/roleAssignments/30ab56c6-482c-418c-99ff-df1650baade9?api-version=2020-04-01-preview + response: + body: + string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/18e40d4e-8d2e-438d-97e1-9528336e149c","principalId":"17755109-de29-4032-8853-f390afd630a2","principalType":"User","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/projects/cli000004","condition":null,"conditionVersion":null,"createdOn":"2023-02-04T01:13:17.6308241Z","updatedOn":"2023-02-04T01:13:18.4950412Z","createdBy":null,"updatedBy":"17755109-de29-4032-8853-f390afd630a2","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/projects/cli000004/providers/Microsoft.Authorization/roleAssignments/30ab56c6-482c-418c-99ff-df1650baade9","type":"Microsoft.Authorization/roleAssignments","name":"30ab56c6-482c-418c-99ff-df1650baade9"}' + headers: + cache-control: + - no-cache + content-length: + - '967' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 01:13:19 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: + - '1195' + status: + code: 201 + message: Created +- request: + body: '{"tags": {"val1": "key1"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - devcenter admin environment-type create + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + ParameterSetName: + - --dev-center --resource-group --name --tags + User-Agent: + - AZURECLI/2.44.1 azsdk-python-devcenter/unknown Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/devcenters/cli000002/environmentTypes/c000005?api-version=2022-11-11-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/devcenters/cli000002/environmentTypes/c000005","name":"c000005","type":"microsoft.devcenter/devcenters/environmenttypes","tags":{"val1":"key1"},"systemData":{"createdBy":"amlim@microsoft.com","createdByType":"User","createdAt":"2023-02-04T01:13:21.0630698Z","lastModifiedBy":"amlim@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-04T01:13:21.0630698Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '539' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 01:13:21 GMT + etag: + - '"0000c423-0000-4d00-0000-63ddb1310000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1197' + x-rate-limit-limit: + - 1m + x-rate-limit-remaining: + - '298' + x-rate-limit-reset: + - '2023-02-04T01:13:43.8647848Z' + status: + code: 200 + message: OK +- request: + body: '{"identity": {"type": "SystemAssigned, UserAssigned", "userAssignedIdentities": + {"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testid_000003": + {}}}, "location": "westus3", "properties": {"deploymentTargetId": "/subscriptions/00000000-0000-0000-0000-000000000000", + "status": "Enabled", "creatorRoleAssignment": {"roles": {"8e3af657-a8ff-443c-a75c-2fe8c4bcb635": + {}}}, "userRoleAssignments": {"53abe43d-74ab-46ac-b102-e8c6b1723f85": {"roles": + {"8e3af657-a8ff-443c-a75c-2fe8c4bcb635": {}}}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - devcenter admin project-environment-type create + Connection: + - keep-alive + Content-Length: + - '584' + Content-Type: + - application/json + ParameterSetName: + - --project --environment-type-name --deployment-target-id --status --identity-type + --user-assigned-identities --user-role-assignments --location --roles --resource-group + User-Agent: + - AZURECLI/2.44.1 azsdk-python-devcenter/unknown Python/3.10.7 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/projects/cli000004/environmentTypes/c000005?api-version=2022-11-11-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.DevCenter/projects/cli000004/environmentTypes/c000005","name":"c000005","type":"microsoft.devcenter/projects/environmenttypes","location":"westus3","systemData":{"createdBy":"amlim@microsoft.com","createdByType":"User","createdAt":"2023-02-04T01:13:22.547252Z","lastModifiedBy":"amlim@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-04T01:13:22.547252Z"},"identity":{"principalId":"bb8444ad-ce89-4c32-a227-6662f4fe91d5","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned, + UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testid_000003":{"principalId":"53abe43d-74ab-46ac-b102-e8c6b1723f85","clientId":"e61c3e10-624c-41dd-8ffe-fc2eab7b747b"}}},"properties":{"provisioningState":"Succeeded","deploymentTargetId":"/subscriptions/00000000-0000-0000-0000-000000000000","status":"Enabled","creatorRoleAssignment":{"roles":{"8e3af657-a8ff-443c-a75c-2fe8c4bcb635":{}}},"userRoleAssignments":{"53abe43d-74ab-46ac-b102-e8c6b1723f85":{"roles":{"8e3af657-a8ff-443c-a75c-2fe8c4bcb635":{}}}}}}' + headers: + cache-control: + - no-cache + content-length: + - '1262' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 01:13:25 GMT + etag: + - '"0100d546-0000-4d00-0000-63ddb1350000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1197' + x-rate-limit-limit: + - 1m + x-rate-limit-remaining: + - '297' + x-rate-limit-reset: + - '2023-02-04T01:13:44.2099446Z' + status: + code: 200 + message: OK +- request: + body: '{"query": " Resources |where type =~''Microsoft.devcenter/projects''\n | + where name =~ ''cli000004''\n | extend devCenterArr = split(properties.devCenterId, + ''/'')\n | extend devCenterName = devCenterArr[array_length(devCenterArr) + -1]\n | where devCenterName =~ ''cli000002''\n | take 1\n | extend + devCenterUri = properties.devCenterUri\n | project name,devCenterUri "}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - devcenter dev environment-type list + Connection: + - keep-alive + Content-Length: + - '382' + Content-Type: + - application/json + ParameterSetName: + - --dev-center --project + User-Agent: + - python/3.10.7 (Windows-10-10.0.22621-SP0) AZURECLI/2.44.1 + method: POST + uri: https://management.azure.com/providers/Microsoft.ResourceGraph/resources?api-version=2021-03-01 + response: + body: + string: '{"totalRecords":1,"count":1,"data":[{"name":"cli000004","devCenterUri":"https://72f988bf-86f1-41af-91ab-2d7cd011db47-cli000002.westus3.devcenter.azure.com/"}],"facets":[],"resultTruncated":"false"}' + headers: + cache-control: + - no-cache + content-length: + - '197' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 01:13:25 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: + - '14' + x-ms-resource-graph-request-duration: + - '0:00:00:00.3409229' + x-ms-user-quota-remaining: + - '14' + x-ms-user-quota-resets-after: + - 00:00:05 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - devcenter dev environment-type list + Connection: + - keep-alive + ParameterSetName: + - --dev-center --project + User-Agent: + - AZURECLI/2.44.1 azsdk-python-devcenterdataplaneclient/unknown Python/3.10.7 + (Windows-10-10.0.22621-SP0) + method: GET + uri: https://72f988bf-86f1-41af-91ab-2d7cd011db47-cli000002.westus3.devcenter.azure.com/projects/cli000004/environmentTypes?api-version=2022-11-11-preview + response: + body: + string: "{\n \"value\": [\n {\n \"name\": \"c000005\",\n \"deploymentTargetId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000\",\n \"status\": + \"Enabled\"\n }\n ]\n}" + headers: + connection: + - keep-alive + content-length: + - '166' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 04 Feb 2023 01:13:27 GMT + strict-transport-security: + - max-age=15724800; includeSubDomains + x-rate-limit-limit: + - 1m + x-rate-limit-remaining: + - '299' + x-rate-limit-reset: + - '2023-02-04T01:14:26.6931408Z' + status: + code: 200 + message: OK +version: 1 diff --git a/src/devcenter/azext_devcenter/tests/latest/recordings/test_pool_dataplane_scenario.yaml b/src/devcenter/azext_devcenter/tests/latest/recordings/test_pool_dataplane_scenario.yaml index 421970e7053..0dfb2bd6804 100644 --- a/src/devcenter/azext_devcenter/tests/latest/recordings/test_pool_dataplane_scenario.yaml +++ b/src/devcenter/azext_devcenter/tests/latest/recordings/test_pool_dataplane_scenario.yaml @@ -419,9 +419,7 @@ interactions: uri: https://graph.microsoft.com/v1.0/me response: body: - string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#users/$entity","businessPhones":["+1 - (425) 7041454"],"displayName":"Amanda Lim","givenName":"Amanda","jobTitle":"SOFTWARE - ENGINEER II","mail":"Amanda.Lim@microsoft.com","mobilePhone":null,"officeLocation":"18/3100FL","preferredLanguage":null,"surname":"Lim","userPrincipalName":"amlim@microsoft.com","id":"17755109-de29-4032-8853-f390afd630a2"}' + string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#users/$entity","id":"17755109-de29-4032-8853-f390afd630a2"}' headers: cache-control: - no-cache @@ -518,9 +516,7 @@ interactions: uri: https://graph.microsoft.com/v1.0/directoryObjects/getByIds response: body: - string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#directoryObjects","value":[{"@odata.type":"#microsoft.graph.user","id":"17755109-de29-4032-8853-f390afd630a2","businessPhones":["+1 - (425) 7041454"],"displayName":"Amanda Lim","givenName":"Amanda","jobTitle":"SOFTWARE - ENGINEER II","mail":"Amanda.Lim@microsoft.com","mobilePhone":null,"officeLocation":"18/3100FL","preferredLanguage":null,"surname":"Lim","userPrincipalName":"amlim@microsoft.com"}]}' + string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#directoryObjects","value":[{"@odata.type":"#microsoft.graph.user","id":"17755109-de29-4032-8853-f390afd630a2"}]}' headers: cache-control: - no-cache diff --git a/src/devcenter/azext_devcenter/tests/latest/recordings/test_project_dataplane_scenario.yaml b/src/devcenter/azext_devcenter/tests/latest/recordings/test_project_dataplane_scenario.yaml index 1d5f13a2743..70b879c069c 100644 --- a/src/devcenter/azext_devcenter/tests/latest/recordings/test_project_dataplane_scenario.yaml +++ b/src/devcenter/azext_devcenter/tests/latest/recordings/test_project_dataplane_scenario.yaml @@ -527,9 +527,7 @@ interactions: uri: https://graph.microsoft.com/v1.0/me response: body: - string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#users/$entity","businessPhones":["+1 - (425) 7041454"],"displayName":"Amanda Lim","givenName":"Amanda","jobTitle":"SOFTWARE - ENGINEER II","mail":"Amanda.Lim@microsoft.com","mobilePhone":null,"officeLocation":"18/3100FL","preferredLanguage":null,"surname":"Lim","userPrincipalName":"amlim@microsoft.com","id":"17755109-de29-4032-8853-f390afd630a2"}' + string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#users/$entity","id":"17755109-de29-4032-8853-f390afd630a2"}' headers: cache-control: - no-cache @@ -626,9 +624,7 @@ interactions: uri: https://graph.microsoft.com/v1.0/directoryObjects/getByIds response: body: - string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#directoryObjects","value":[{"@odata.type":"#microsoft.graph.user","id":"17755109-de29-4032-8853-f390afd630a2","businessPhones":["+1 - (425) 7041454"],"displayName":"Amanda Lim","givenName":"Amanda","jobTitle":"SOFTWARE - ENGINEER II","mail":"Amanda.Lim@microsoft.com","mobilePhone":null,"officeLocation":"18/3100FL","preferredLanguage":null,"surname":"Lim","userPrincipalName":"amlim@microsoft.com"}]}' + string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#directoryObjects","value":[{"@odata.type":"#microsoft.graph.user","id":"17755109-de29-4032-8853-f390afd630a2"]}' headers: cache-control: - no-cache diff --git a/src/devcenter/azext_devcenter/tests/latest/test_devcenter_scenario.py b/src/devcenter/azext_devcenter/tests/latest/test_devcenter_scenario.py index f6ac70a1647..52ce6f3f113 100644 --- a/src/devcenter/azext_devcenter/tests/latest/test_devcenter_scenario.py +++ b/src/devcenter/azext_devcenter/tests/latest/test_devcenter_scenario.py @@ -27,7 +27,10 @@ create_kv_policy, create_env_type, add_dev_box_user_role_to_project, - create_pool_with_schedule + create_pool_with_schedule, + create_catalog, + create_proj_env_type, + create_environment_dependencies ) @@ -1340,62 +1343,114 @@ def test_pool_dataplane_scenario(self): ) @ResourceGroupPreparer(name_prefix='clitestdevcenter_rg1'[:7], key='rg', parameter_name='rg') - def test_dev_box_dataplane_scenario(self): - self.kwargs.update({ - 'devcenterName': self.create_random_name(prefix='cli', length=24), - }) - - create_dev_center(self) - create_project(self) - add_dev_box_user_role_to_project(self) - create_pool_with_schedule(self) + def test_catalog_item_dataplane_scenario(self): + create_catalog(self) - self.cmd('az devcenter dev pool list ' + self.cmd('az devcenter dev catalog-item list ' '--dev-center "{devcenterName}" ' '--project "{projectName}" ', checks=[ - self.check("length(@)", 1), - self.check("[0].name", "{poolName}"), + self.check("length(@)", 3), + self.check("[0].catalogName", "{catalogName}"), + self.check("[0].name", "Empty") ] ) - self.cmd('az devcenter dev pool show ' - '--name "{poolName}" ' + if (self.is_live): + self.cmd('az devcenter dev catalog-item show ' + '--dev-center "{devcenterName}" ' + '--project "{projectName}" ' + '--catalog-item-id "{catalogItemId}" ', + checks=[ + self.check("id", "{catalogItemId}"), + self.check("catalogName", "{catalogName}"), + self.check("name", "Empty") + ] + ) + + self.cmd('az devcenter dev catalog-item-version list ' + '--dev-center "{devcenterName}" ' + '--project "{projectName}" ' + '--catalog-item-id "{catalogItemId}" ', + checks=[ + self.check("length(@)", 1), + self.check("[0].catalogName", "{catalogName}"), + self.check("[0].catalogItemName", "Empty"), + self.check("[0].description", "Deploys an empty environment"), + self.check("[0].eligibleForLatestVersion", True), + self.check("[0].runner", "ARM"), + self.check("[0].status", "Enabled"), + self.check("[0].summary", "Empty environment"), + self.check("[0].templatePath", "Catalog_v2/Empty/azuredeploy.json"), + self.check("[0].version", "1.0.0"), + ] + ) + + self.cmd('az devcenter dev catalog-item-version show ' + '--dev-center "{devcenterName}" ' + '--project "{projectName}" ' + '--catalog-item-id "{catalogItemId}" ' + '--version "1.0.0" ', + checks=[ + self.check("catalogName", "{catalogName}"), + self.check("catalogItemName", "Empty"), + self.check("description", "Deploys an empty environment"), + self.check("eligibleForLatestVersion", True), + self.check("runner", "ARM"), + self.check("status", "Enabled"), + self.check("summary", "Empty environment"), + self.check("templatePath", "Catalog_v2/Empty/azuredeploy.json"), + self.check("version", "1.0.0"), + ] + ) + + @ResourceGroupPreparer(name_prefix='clitestdevcenter_rg1'[:7], key='rg', parameter_name='rg') + def test_env_type_dataplane_scenario(self): + create_proj_env_type(self) + + self.cmd('az devcenter dev environment-type list ' '--dev-center "{devcenterName}" ' '--project "{projectName}" ', checks=[ - self.check('name', "{poolName}"), - self.check('storageProfile.osDisk.diskSizeGb', "1024"), - self.check('hardwareProfile.skuName', "{skuName}"), - self.check('localAdministrator', "Enabled"), - self.check('osType', "Windows"), - self.check('location', "{location}"), - self.check('hibernateSupport', "Enabled"), - self.check('imageReference.name', 'microsoftwindowsdesktop_windows-ent-cpc_win11-21h2-ent-cpc-m365') + self.check("length(@)", 1), + self.check("[0].status", "Enabled"), + self.check("[0].name", "{envTypeName}"), + self.check("[0].deploymentTargetId", "/subscriptions/{subscriptionId}"), ] ) - self.cmd('az devcenter dev schedule list ' - '--pool "{poolName}" ' + @ResourceGroupPreparer(name_prefix='clitestdevcenter_rg1'[:7], key='rg', parameter_name='rg') + def test_environment_dataplane_scenario(self): + self.kwargs.update({ + 'envName': self.create_random_name(prefix='cli', length=12), + }) + create_environment_dependencies(self) + + self.cmd('az devcenter dev environment list ' '--dev-center "{devcenterName}" ' '--project "{projectName}" ', checks=[ - self.check("length(@)", 1), - self.check("[0].name", "default"), + self.check("length(@)", 0), ] ) - - self.cmd('az devcenter dev schedule show ' - '-n "default" ' - '--pool "{poolName}" ' + + self.cmd('az devcenter dev environment create ' + '--catalog-item-name "Empty" ' + '--catalog-name "{catalogName}" ' + '--name "{envName}" ' + '--environment-type "{envTypeName}" ' '--dev-center "{devcenterName}" ' '--project "{projectName}" ', checks=[ - self.check('name', "default"), - self.check('frequency', "Daily"), - self.check('time', "{time}"), - self.check('timeZone', "{timeZone}"), - self.check('type', "StopDevBox"), + self.check("length(@)", 0), + ] + ) + + self.cmd('az devcenter dev environment list ' + '--dev-center "{devcenterName}" ' + '--project "{projectName}" ', + checks=[ + self.check("length(@)", 1), + self.check("[0].name", "{envName}") ] ) -