зеркало из https://github.com/Azure/azure-cli.git
Added Test for Revoke Token API
This commit is contained in:
Родитель
7187178b53
Коммит
b35cec7551
|
@ -15,7 +15,7 @@ from azure.cli.core.aaz import *
|
|||
"identity",
|
||||
)
|
||||
class __CMDGroup(AAZCommandGroup):
|
||||
"""Managed Identity Command Group
|
||||
"""Managed Identities
|
||||
"""
|
||||
pass
|
||||
|
||||
|
|
|
@ -1,47 +1,4 @@
|
|||
interactions:
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- application/json
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
CommandName:
|
||||
- identity create
|
||||
Connection:
|
||||
- keep-alive
|
||||
ParameterSetName:
|
||||
- -n -g
|
||||
User-Agent:
|
||||
- AZURECLI/2.46.0 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.10.10 (Linux-5.15.0-1033-azure-x86_64-with-glibc2.31)
|
||||
VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_federated_identity_credential_000001?api-version=2022-09-01
|
||||
response:
|
||||
body:
|
||||
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_federated_identity_credential_000001","name":"cli_test_federated_identity_credential_000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2euap","tags":{"product":"azurecli","cause":"automation","date":"2023-03-13T11:09:47Z"},"properties":{"provisioningState":"Succeeded"}}'
|
||||
headers:
|
||||
cache-control:
|
||||
- no-cache
|
||||
content-length:
|
||||
- '373'
|
||||
content-type:
|
||||
- application/json; charset=utf-8
|
||||
date:
|
||||
- Mon, 13 Mar 2023 11:09:47 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
pragma:
|
||||
- no-cache
|
||||
strict-transport-security:
|
||||
- max-age=31536000; includeSubDomains
|
||||
vary:
|
||||
- Accept-Encoding
|
||||
x-content-type-options:
|
||||
- nosniff
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: '{"location": "eastus2euap"}'
|
||||
headers:
|
||||
|
@ -60,13 +17,12 @@ interactions:
|
|||
ParameterSetName:
|
||||
- -n -g
|
||||
User-Agent:
|
||||
- AZURECLI/2.46.0 azsdk-python-azure-mgmt-msi/7.0.0 Python/3.10.10 (Linux-5.15.0-1033-azure-x86_64-with-glibc2.31)
|
||||
VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0
|
||||
- AZURECLI/2.55.0 azsdk-python-azure-mgmt-msi/7.0.0 Python/3.9.13 (Windows-10-10.0.22631-SP0)
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_federated_identity_credential_000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ide?api-version=2023-01-31
|
||||
response:
|
||||
body:
|
||||
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_federated_identity_credential_000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ide","name":"ide","type":"Microsoft.ManagedIdentity/userAssignedIdentities","location":"eastus2euap","tags":{},"properties":{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","principalId":"ef8d816a-b3c1-4c46-b6b4-165744b66522","clientId":"35cf13b5-bb51-4634-b257-4a13bdfd706b"}}'
|
||||
string: '{"location":"eastus2euap","tags":{},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_federated_identity_credential_000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ide","name":"ide","type":"Microsoft.ManagedIdentity/userAssignedIdentities","properties":{"tenantId":"bea21ebe-8b64-4d06-9f6d-6a889b120a7c","principalId":"54f58517-dcfc-4861-b0ba-30be100d795a","clientId":"12f7018b-b93b-460c-b349-ea4312acf678"}}'
|
||||
headers:
|
||||
cache-control:
|
||||
- no-cache
|
||||
|
@ -75,7 +31,7 @@ interactions:
|
|||
content-type:
|
||||
- application/json; charset=utf-8
|
||||
date:
|
||||
- Mon, 13 Mar 2023 11:09:49 GMT
|
||||
- Wed, 13 Dec 2023 02:41:16 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
location:
|
||||
|
@ -87,7 +43,7 @@ interactions:
|
|||
x-content-type-options:
|
||||
- nosniff
|
||||
x-ms-ratelimit-remaining-subscription-writes:
|
||||
- '1194'
|
||||
- '1199'
|
||||
status:
|
||||
code: 201
|
||||
message: Created
|
||||
|
@ -110,8 +66,7 @@ interactions:
|
|||
ParameterSetName:
|
||||
- --name --identity-name --resource-group --subject --issuer --audiences
|
||||
User-Agent:
|
||||
- AZURECLI/2.46.0 azsdk-python-azure-mgmt-msi/7.0.0 Python/3.10.10 (Linux-5.15.0-1033-azure-x86_64-with-glibc2.31)
|
||||
VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0
|
||||
- AZURECLI/2.55.0 azsdk-python-azure-mgmt-msi/7.0.0 Python/3.9.13 (Windows-10-10.0.22631-SP0)
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_federated_identity_credential_000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ide/federatedIdentityCredentials/fic1?api-version=2023-01-31
|
||||
response:
|
||||
|
@ -125,7 +80,7 @@ interactions:
|
|||
content-type:
|
||||
- application/json; charset=utf-8
|
||||
date:
|
||||
- Mon, 13 Mar 2023 11:09:49 GMT
|
||||
- Wed, 13 Dec 2023 02:41:17 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
location:
|
||||
|
@ -137,7 +92,7 @@ interactions:
|
|||
x-content-type-options:
|
||||
- nosniff
|
||||
x-ms-ratelimit-remaining-subscription-writes:
|
||||
- '1195'
|
||||
- '1199'
|
||||
status:
|
||||
code: 201
|
||||
message: Created
|
||||
|
@ -160,8 +115,7 @@ interactions:
|
|||
ParameterSetName:
|
||||
- --name --identity-name --resource-group --subject --issuer --audiences
|
||||
User-Agent:
|
||||
- AZURECLI/2.46.0 azsdk-python-azure-mgmt-msi/7.0.0 Python/3.10.10 (Linux-5.15.0-1033-azure-x86_64-with-glibc2.31)
|
||||
VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0
|
||||
- AZURECLI/2.55.0 azsdk-python-azure-mgmt-msi/7.0.0 Python/3.9.13 (Windows-10-10.0.22631-SP0)
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_federated_identity_credential_000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ide/federatedIdentityCredentials/fic2?api-version=2023-01-31
|
||||
response:
|
||||
|
@ -175,7 +129,7 @@ interactions:
|
|||
content-type:
|
||||
- application/json; charset=utf-8
|
||||
date:
|
||||
- Mon, 13 Mar 2023 11:09:50 GMT
|
||||
- Wed, 13 Dec 2023 02:41:18 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
location:
|
||||
|
@ -187,7 +141,7 @@ interactions:
|
|||
x-content-type-options:
|
||||
- nosniff
|
||||
x-ms-ratelimit-remaining-subscription-writes:
|
||||
- '1196'
|
||||
- '1199'
|
||||
status:
|
||||
code: 201
|
||||
message: Created
|
||||
|
@ -205,8 +159,7 @@ interactions:
|
|||
ParameterSetName:
|
||||
- --name --identity-name --resource-group
|
||||
User-Agent:
|
||||
- AZURECLI/2.46.0 azsdk-python-azure-mgmt-msi/7.0.0 Python/3.10.10 (Linux-5.15.0-1033-azure-x86_64-with-glibc2.31)
|
||||
VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0
|
||||
- AZURECLI/2.55.0 azsdk-python-azure-mgmt-msi/7.0.0 Python/3.9.13 (Windows-10-10.0.22631-SP0)
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_federated_identity_credential_000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ide/federatedIdentityCredentials/fic1?api-version=2023-01-31
|
||||
response:
|
||||
|
@ -220,17 +173,13 @@ interactions:
|
|||
content-type:
|
||||
- application/json; charset=utf-8
|
||||
date:
|
||||
- Mon, 13 Mar 2023 11:09:51 GMT
|
||||
- Wed, 13 Dec 2023 02:41:19 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
pragma:
|
||||
- no-cache
|
||||
strict-transport-security:
|
||||
- max-age=31536000; includeSubDomains
|
||||
transfer-encoding:
|
||||
- chunked
|
||||
vary:
|
||||
- Accept-Encoding
|
||||
x-content-type-options:
|
||||
- nosniff
|
||||
status:
|
||||
|
@ -250,8 +199,7 @@ interactions:
|
|||
ParameterSetName:
|
||||
- --identity-name --resource-group
|
||||
User-Agent:
|
||||
- AZURECLI/2.46.0 azsdk-python-azure-mgmt-msi/7.0.0 Python/3.10.10 (Linux-5.15.0-1033-azure-x86_64-with-glibc2.31)
|
||||
VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0
|
||||
- AZURECLI/2.55.0 azsdk-python-azure-mgmt-msi/7.0.0 Python/3.9.13 (Windows-10-10.0.22631-SP0)
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_federated_identity_credential_000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ide/federatedIdentityCredentials?api-version=2023-01-31
|
||||
response:
|
||||
|
@ -265,7 +213,7 @@ interactions:
|
|||
content-type:
|
||||
- application/json; charset=utf-8
|
||||
date:
|
||||
- Mon, 13 Mar 2023 11:09:52 GMT
|
||||
- Wed, 13 Dec 2023 02:41:20 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
pragma:
|
||||
|
@ -300,8 +248,7 @@ interactions:
|
|||
ParameterSetName:
|
||||
- --name --identity-name --resource-group --subject --issuer --audiences
|
||||
User-Agent:
|
||||
- AZURECLI/2.46.0 azsdk-python-azure-mgmt-msi/7.0.0 Python/3.10.10 (Linux-5.15.0-1033-azure-x86_64-with-glibc2.31)
|
||||
VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0
|
||||
- AZURECLI/2.55.0 azsdk-python-azure-mgmt-msi/7.0.0 Python/3.9.13 (Windows-10-10.0.22631-SP0)
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_federated_identity_credential_000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ide/federatedIdentityCredentials/fic1?api-version=2023-01-31
|
||||
response:
|
||||
|
@ -315,7 +262,7 @@ interactions:
|
|||
content-type:
|
||||
- application/json; charset=utf-8
|
||||
date:
|
||||
- Mon, 13 Mar 2023 11:09:52 GMT
|
||||
- Wed, 13 Dec 2023 02:41:21 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
pragma:
|
||||
|
@ -329,7 +276,7 @@ interactions:
|
|||
x-content-type-options:
|
||||
- nosniff
|
||||
x-ms-ratelimit-remaining-subscription-writes:
|
||||
- '1197'
|
||||
- '1199'
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
|
@ -349,8 +296,7 @@ interactions:
|
|||
ParameterSetName:
|
||||
- --name --identity-name --resource-group --yes
|
||||
User-Agent:
|
||||
- AZURECLI/2.46.0 azsdk-python-azure-mgmt-msi/7.0.0 Python/3.10.10 (Linux-5.15.0-1033-azure-x86_64-with-glibc2.31)
|
||||
VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0
|
||||
- AZURECLI/2.55.0 azsdk-python-azure-mgmt-msi/7.0.0 Python/3.9.13 (Windows-10-10.0.22631-SP0)
|
||||
method: DELETE
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_federated_identity_credential_000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ide/federatedIdentityCredentials/fic1?api-version=2023-01-31
|
||||
response:
|
||||
|
@ -362,7 +308,7 @@ interactions:
|
|||
content-length:
|
||||
- '0'
|
||||
date:
|
||||
- Mon, 13 Mar 2023 11:09:54 GMT
|
||||
- Wed, 13 Dec 2023 02:41:22 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
pragma:
|
||||
|
@ -390,8 +336,7 @@ interactions:
|
|||
ParameterSetName:
|
||||
- --identity-name --resource-group
|
||||
User-Agent:
|
||||
- AZURECLI/2.46.0 azsdk-python-azure-mgmt-msi/7.0.0 Python/3.10.10 (Linux-5.15.0-1033-azure-x86_64-with-glibc2.31)
|
||||
VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0
|
||||
- AZURECLI/2.55.0 azsdk-python-azure-mgmt-msi/7.0.0 Python/3.9.13 (Windows-10-10.0.22631-SP0)
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_federated_identity_credential_000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ide/federatedIdentityCredentials?api-version=2023-01-31
|
||||
response:
|
||||
|
@ -405,7 +350,7 @@ interactions:
|
|||
content-type:
|
||||
- application/json; charset=utf-8
|
||||
date:
|
||||
- Mon, 13 Mar 2023 11:09:54 GMT
|
||||
- Wed, 13 Dec 2023 02:41:23 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
pragma:
|
||||
|
@ -437,8 +382,7 @@ interactions:
|
|||
ParameterSetName:
|
||||
- --name --identity-name --resource-group --yes
|
||||
User-Agent:
|
||||
- AZURECLI/2.46.0 azsdk-python-azure-mgmt-msi/7.0.0 Python/3.10.10 (Linux-5.15.0-1033-azure-x86_64-with-glibc2.31)
|
||||
VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0
|
||||
- AZURECLI/2.55.0 azsdk-python-azure-mgmt-msi/7.0.0 Python/3.9.13 (Windows-10-10.0.22631-SP0)
|
||||
method: DELETE
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_federated_identity_credential_000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ide/federatedIdentityCredentials/fic2?api-version=2023-01-31
|
||||
response:
|
||||
|
@ -450,7 +394,7 @@ interactions:
|
|||
content-length:
|
||||
- '0'
|
||||
date:
|
||||
- Mon, 13 Mar 2023 11:09:54 GMT
|
||||
- Wed, 13 Dec 2023 02:41:24 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
pragma:
|
||||
|
@ -460,7 +404,7 @@ interactions:
|
|||
x-content-type-options:
|
||||
- nosniff
|
||||
x-ms-ratelimit-remaining-subscription-deletes:
|
||||
- '14996'
|
||||
- '14999'
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
|
@ -478,8 +422,7 @@ interactions:
|
|||
ParameterSetName:
|
||||
- --identity-name --resource-group
|
||||
User-Agent:
|
||||
- AZURECLI/2.46.0 azsdk-python-azure-mgmt-msi/7.0.0 Python/3.10.10 (Linux-5.15.0-1033-azure-x86_64-with-glibc2.31)
|
||||
VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0
|
||||
- AZURECLI/2.55.0 azsdk-python-azure-mgmt-msi/7.0.0 Python/3.9.13 (Windows-10-10.0.22631-SP0)
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_federated_identity_credential_000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ide/federatedIdentityCredentials?api-version=2023-01-31
|
||||
response:
|
||||
|
@ -493,13 +436,17 @@ interactions:
|
|||
content-type:
|
||||
- application/json; charset=utf-8
|
||||
date:
|
||||
- Mon, 13 Mar 2023 11:09:55 GMT
|
||||
- Wed, 13 Dec 2023 02:41:24 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
pragma:
|
||||
- no-cache
|
||||
strict-transport-security:
|
||||
- max-age=31536000; includeSubDomains
|
||||
transfer-encoding:
|
||||
- chunked
|
||||
vary:
|
||||
- Accept-Encoding
|
||||
x-content-type-options:
|
||||
- nosniff
|
||||
status:
|
||||
|
|
|
@ -11,8 +11,7 @@ interactions:
|
|||
Connection:
|
||||
- keep-alive
|
||||
User-Agent:
|
||||
- AZURECLI/2.46.0 azsdk-python-azure-mgmt-msi/7.0.0 Python/3.10.10 (Linux-5.15.0-1033-azure-x86_64-with-glibc2.31)
|
||||
VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0
|
||||
- AZURECLI/2.55.0 azsdk-python-azure-mgmt-msi/7.0.0 Python/3.9.13 (Windows-10-10.0.22631-SP0)
|
||||
method: GET
|
||||
uri: https://management.azure.com/providers/Microsoft.ManagedIdentity/operations?api-version=2023-01-31
|
||||
response:
|
||||
|
@ -48,16 +47,19 @@ interactions:
|
|||
Assigned Identity","description":"Gets an existing user assigned identity"}},{"name":"Microsoft.ManagedIdentity/userAssignedIdentities/write","display":{"provider":"Microsoft
|
||||
Managed Identity","resource":"User Assigned Identities","operation":"Create/Update
|
||||
User Assigned Identity","description":"Creates a new user assigned identity
|
||||
or updates the tags associated with an existing user assigned identity"}}]}'
|
||||
or updates the tags associated with an existing user assigned identity"}},{"name":"Microsoft.ManagedIdentity/userAssignedIdentities/revokeTokens/action","display":{"provider":"Microsoft
|
||||
Managed Identity","resource":"User Assigned Identities","operation":"Revokes
|
||||
tokens minted on User Assigned Identity","description":"Revoked all the existing
|
||||
tokens on a user assigned identity"}}]}'
|
||||
headers:
|
||||
cache-control:
|
||||
- no-cache
|
||||
content-length:
|
||||
- '3233'
|
||||
- '3541'
|
||||
content-type:
|
||||
- application/json; charset=utf-8
|
||||
date:
|
||||
- Mon, 13 Mar 2023 11:09:57 GMT
|
||||
- Wed, 13 Dec 2023 02:41:14 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
pragma:
|
||||
|
@ -74,50 +76,7 @@ interactions:
|
|||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- application/json
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
CommandName:
|
||||
- identity create
|
||||
Connection:
|
||||
- keep-alive
|
||||
ParameterSetName:
|
||||
- -n -g
|
||||
User-Agent:
|
||||
- AZURECLI/2.46.0 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.10.10 (Linux-5.15.0-1033-azure-x86_64-with-glibc2.31)
|
||||
VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_identity_mgmt_000001?api-version=2022-09-01
|
||||
response:
|
||||
body:
|
||||
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_identity_mgmt_000001","name":"cli_test_identity_mgmt_000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2023-03-13T11:09:56Z"},"properties":{"provisioningState":"Succeeded"}}'
|
||||
headers:
|
||||
cache-control:
|
||||
- no-cache
|
||||
content-length:
|
||||
- '336'
|
||||
content-type:
|
||||
- application/json; charset=utf-8
|
||||
date:
|
||||
- Mon, 13 Mar 2023 11:09:57 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
pragma:
|
||||
- no-cache
|
||||
strict-transport-security:
|
||||
- max-age=31536000; includeSubDomains
|
||||
vary:
|
||||
- Accept-Encoding
|
||||
x-content-type-options:
|
||||
- nosniff
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: '{"location": "westus"}'
|
||||
body: '{"location": "eastus2euap"}'
|
||||
headers:
|
||||
Accept:
|
||||
- application/json
|
||||
|
@ -128,28 +87,27 @@ interactions:
|
|||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '22'
|
||||
- '27'
|
||||
Content-Type:
|
||||
- application/json
|
||||
ParameterSetName:
|
||||
- -n -g
|
||||
User-Agent:
|
||||
- AZURECLI/2.46.0 azsdk-python-azure-mgmt-msi/7.0.0 Python/3.10.10 (Linux-5.15.0-1033-azure-x86_64-with-glibc2.31)
|
||||
VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0
|
||||
- AZURECLI/2.55.0 azsdk-python-azure-mgmt-msi/7.0.0 Python/3.9.13 (Windows-10-10.0.22631-SP0)
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_identity_mgmt_000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity?api-version=2023-01-31
|
||||
response:
|
||||
body:
|
||||
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_identity_mgmt_000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity","name":"myidentity","type":"Microsoft.ManagedIdentity/userAssignedIdentities","location":"westus","tags":{},"properties":{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","principalId":"de46396d-0101-4c56-95a0-4daa96936d76","clientId":"390e69d8-5e41-49e3-89cf-463539faef9f"}}'
|
||||
string: '{"location":"eastus2euap","tags":{},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_identity_mgmt_000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity","name":"myidentity","type":"Microsoft.ManagedIdentity/userAssignedIdentities","properties":{"tenantId":"bea21ebe-8b64-4d06-9f6d-6a889b120a7c","principalId":"103ff2f3-bd10-4ee0-a2e7-6a484224f6ea","clientId":"94c9c0b0-b763-4b9c-af97-7f4fad96d529"}}'
|
||||
headers:
|
||||
cache-control:
|
||||
- no-cache
|
||||
content-length:
|
||||
- '451'
|
||||
- '456'
|
||||
content-type:
|
||||
- application/json; charset=utf-8
|
||||
date:
|
||||
- Mon, 13 Mar 2023 11:10:00 GMT
|
||||
- Wed, 13 Dec 2023 02:41:16 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
location:
|
||||
|
@ -161,7 +119,7 @@ interactions:
|
|||
x-content-type-options:
|
||||
- nosniff
|
||||
x-ms-ratelimit-remaining-subscription-writes:
|
||||
- '1198'
|
||||
- '1199'
|
||||
status:
|
||||
code: 201
|
||||
message: Created
|
||||
|
@ -181,8 +139,7 @@ interactions:
|
|||
ParameterSetName:
|
||||
- -g -n
|
||||
User-Agent:
|
||||
- AZURECLI/2.46.0 azsdk-python-azure-mgmt-msi/7.0.0 Python/3.10.10 (Linux-5.15.0-1033-azure-x86_64-with-glibc2.31)
|
||||
VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0
|
||||
- AZURECLI/2.55.0 azsdk-python-azure-mgmt-msi/7.0.0 Python/3.9.13 (Windows-10-10.0.22631-SP0)
|
||||
method: POST
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_identity_mgmt_000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity/listAssociatedResources?api-version=2022-01-31-preview
|
||||
response:
|
||||
|
@ -196,7 +153,7 @@ interactions:
|
|||
content-type:
|
||||
- application/json; charset=utf-8
|
||||
date:
|
||||
- Mon, 13 Mar 2023 11:10:02 GMT
|
||||
- Wed, 13 Dec 2023 02:41:18 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
pragma:
|
||||
|
@ -226,22 +183,21 @@ interactions:
|
|||
ParameterSetName:
|
||||
- -g
|
||||
User-Agent:
|
||||
- AZURECLI/2.46.0 azsdk-python-azure-mgmt-msi/7.0.0 Python/3.10.10 (Linux-5.15.0-1033-azure-x86_64-with-glibc2.31)
|
||||
VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0
|
||||
- AZURECLI/2.55.0 azsdk-python-azure-mgmt-msi/7.0.0 Python/3.9.13 (Windows-10-10.0.22631-SP0)
|
||||
method: GET
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_identity_mgmt_000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities?api-version=2023-01-31
|
||||
response:
|
||||
body:
|
||||
string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_identity_mgmt_000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity","name":"myidentity","type":"Microsoft.ManagedIdentity/userAssignedIdentities","location":"westus","tags":{},"properties":{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","principalId":"de46396d-0101-4c56-95a0-4daa96936d76","clientId":"390e69d8-5e41-49e3-89cf-463539faef9f"}}]}'
|
||||
string: '{"value":[{"location":"eastus2euap","tags":{},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_identity_mgmt_000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity","name":"myidentity","type":"Microsoft.ManagedIdentity/userAssignedIdentities","properties":{"tenantId":"bea21ebe-8b64-4d06-9f6d-6a889b120a7c","principalId":"103ff2f3-bd10-4ee0-a2e7-6a484224f6ea","clientId":"94c9c0b0-b763-4b9c-af97-7f4fad96d529"}}]}'
|
||||
headers:
|
||||
cache-control:
|
||||
- no-cache
|
||||
content-length:
|
||||
- '463'
|
||||
- '468'
|
||||
content-type:
|
||||
- application/json; charset=utf-8
|
||||
date:
|
||||
- Mon, 13 Mar 2023 11:10:02 GMT
|
||||
- Wed, 13 Dec 2023 02:41:20 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
pragma:
|
||||
|
@ -273,8 +229,7 @@ interactions:
|
|||
ParameterSetName:
|
||||
- -n -g
|
||||
User-Agent:
|
||||
- AZURECLI/2.46.0 azsdk-python-azure-mgmt-msi/7.0.0 Python/3.10.10 (Linux-5.15.0-1033-azure-x86_64-with-glibc2.31)
|
||||
VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0
|
||||
- AZURECLI/2.55.0 azsdk-python-azure-mgmt-msi/7.0.0 Python/3.9.13 (Windows-10-10.0.22631-SP0)
|
||||
method: DELETE
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_identity_mgmt_000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity?api-version=2023-01-31
|
||||
response:
|
||||
|
@ -286,7 +241,7 @@ interactions:
|
|||
content-length:
|
||||
- '0'
|
||||
date:
|
||||
- Mon, 13 Mar 2023 11:10:07 GMT
|
||||
- Wed, 13 Dec 2023 02:41:22 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
pragma:
|
||||
|
@ -296,7 +251,7 @@ interactions:
|
|||
x-content-type-options:
|
||||
- nosniff
|
||||
x-ms-ratelimit-remaining-subscription-deletes:
|
||||
- '14997'
|
||||
- '14999'
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
|
|
|
@ -0,0 +1,92 @@
|
|||
interactions:
|
||||
- request:
|
||||
body: '{"location": "eastus2euap"}'
|
||||
headers:
|
||||
Accept:
|
||||
- application/json
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
CommandName:
|
||||
- identity create
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '27'
|
||||
Content-Type:
|
||||
- application/json
|
||||
ParameterSetName:
|
||||
- -n -g
|
||||
User-Agent:
|
||||
- AZURECLI/2.55.0 azsdk-python-azure-mgmt-msi/7.0.0 Python/3.9.13 (Windows-10-10.0.22631-SP0)
|
||||
method: PUT
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_revoke_token_000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ide?api-version=2023-01-31
|
||||
response:
|
||||
body:
|
||||
string: '{"location":"eastus2euap","tags":{},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_revoke_token_000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ide","name":"ide","type":"Microsoft.ManagedIdentity/userAssignedIdentities","properties":{"tenantId":"bea21ebe-8b64-4d06-9f6d-6a889b120a7c","principalId":"863d3529-b79d-423b-b5f0-57f7d20e1989","clientId":"82b5725b-064c-4e80-b066-bcabfcc9fdc8"}}'
|
||||
headers:
|
||||
cache-control:
|
||||
- no-cache
|
||||
content-length:
|
||||
- '441'
|
||||
content-type:
|
||||
- application/json; charset=utf-8
|
||||
date:
|
||||
- Wed, 13 Dec 2023 02:41:16 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
location:
|
||||
- /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_revoke_token_000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ide
|
||||
pragma:
|
||||
- no-cache
|
||||
strict-transport-security:
|
||||
- max-age=31536000; includeSubDomains
|
||||
x-content-type-options:
|
||||
- nosniff
|
||||
x-ms-ratelimit-remaining-subscription-writes:
|
||||
- '1199'
|
||||
status:
|
||||
code: 201
|
||||
message: Created
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- '*/*'
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
CommandName:
|
||||
- identity revoke
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Length:
|
||||
- '0'
|
||||
ParameterSetName:
|
||||
- --resource-name --resource-group
|
||||
User-Agent:
|
||||
- AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.13 (Windows-10-10.0.22631-SP0)
|
||||
method: POST
|
||||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_revoke_token_000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ide/revokeTokens?api-version=2023-07-31-preview
|
||||
response:
|
||||
body:
|
||||
string: ''
|
||||
headers:
|
||||
cache-control:
|
||||
- no-cache
|
||||
content-length:
|
||||
- '0'
|
||||
date:
|
||||
- Wed, 13 Dec 2023 02:41:18 GMT
|
||||
expires:
|
||||
- '-1'
|
||||
pragma:
|
||||
- no-cache
|
||||
strict-transport-security:
|
||||
- max-age=31536000; includeSubDomains
|
||||
x-content-type-options:
|
||||
- nosniff
|
||||
x-ms-ratelimit-remaining-subscription-writes:
|
||||
- '1199'
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
version: 1
|
|
@ -118,3 +118,13 @@ class TestIdentity(ScenarioTest):
|
|||
self.check('type(@)', 'array'),
|
||||
self.check('length(@)', 0)
|
||||
])
|
||||
@ResourceGroupPreparer(name_prefix='cli_test_revoke_token_', location='eastus2euap')
|
||||
def test_revoke_token(self, resource_group):
|
||||
self.kwargs.update({
|
||||
'identity': 'ide'
|
||||
})
|
||||
|
||||
self.cmd('identity create -n {identity} -g {rg}')
|
||||
|
||||
# Revoke the identity
|
||||
self.cmd('identity revoke --resource-name {identity} --resource-group {rg}')
|
Загрузка…
Ссылка в новой задаче