Skip to content

Commit

Permalink
Add test scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
giakas committed Jan 11, 2023
1 parent b29f6bd commit 9456029
Show file tree
Hide file tree
Showing 8 changed files with 712 additions and 171 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1077,6 +1077,9 @@
"x-ms-examples": {
"Create a Media Services account": {
"$ref": "examples/async-accounts-create.json"
},
"Create a Media Services account with user managed managed identity": {
"$ref": "examples/async-accounts-create-managed-identity.json"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
{
"parameters": {
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "contoso",
"accountName": "contososports",
"api-version": "2021-11-01",
"parameters": {
"location": "South Central US",
"tags": {
"key1": "value1",
"key2": "value2"
},
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {},
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": {}
}
},
"properties": {
"encryption": {
"type": "CustomerKey",
"identity": {
"userAssignedIdentity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1",
"useSystemAssignedIdentity": false
}
},
"storageAccounts": [
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Storage/storageAccounts/contososportsstore",
"type": "Primary",
"identity": {
"userAssignedIdentity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1",
"useSystemAssignedIdentity": false
}
}
],
"storageAuthentication": "ManagedIdentity",
"publicNetworkAccess": "Enabled",
"keyDelivery": {
"accessControl": {
"defaultAction": "Allow"
}
}
}
}
},
"responses": {
"201": {
"headers": {
"azure-asyncoperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Media/locations/westus2/mediaServicesOperationStatuses/62e4d893-d233-4005-988e-a428d9f77076?api-version=2021-11-01",
"location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Media/locations/westus2/mediaServicesOperationResults/62e4d893-d233-4005-988e-a428d9f77076?api-version=2021-11-01"
},
"body": {
"location": "South Central US",
"tags": {
"key1": "value1",
"key2": "value2"
},
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {},
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": {}
}
},
"properties": {
"provisioningState": "InProgress",
"encryption": {
"type": "CustomerKey",
"keyVaultProperties": {
"keyIdentifier": "https://keyvault.vault.azure.net/keys/key1",
"currentKeyIdentifier": "https://keyvault.vault.azure.net/keys/key1/ver1"
},
"identity": {
"userAssignedIdentity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1",
"useSystemAssignedIdentity": false
}
},
"storageAccounts": [
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Storage/storageAccounts/contososportsstore",
"type": "Primary",
"identity": {
"userAssignedIdentity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1",
"useSystemAssignedIdentity": false
}
}
],
"storageAuthentication": "ManagedIdentity",
"publicNetworkAccess": "Enabled",
"keyDelivery": {
"accessControl": {
"defaultAction": "Allow"
}
},
"privateEndpointConnections": [
{
"name": "00000000-0000-0000-0000-000000000001",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contososports/privateEndpointConnections/00000000-0000-0000-0000-000000000001",
"type": "Microsoft.Media/mediaservices/privateEndpointConnections",
"properties": {
"provisioningState": "Succeeded",
"privateLinkServiceConnectionState": {
"status": "Approved",
"description": "test description"
},
"privateEndpoint": {
"id": "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/reosuceGroup1/providers/Microsoft.Network/privateEndpoints/pe1"
}
}
},
{
"name": "00000000-0000-0000-0000-000000000002",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contososports/privateEndpointConnections/00000000-0000-0000-0000-000000000002",
"type": "Microsoft.Media/mediaservices/privateEndpointConnections",
"properties": {
"provisioningState": "Succeeded",
"privateLinkServiceConnectionState": {
"status": "Pending",
"description": "test description"
},
"privateEndpoint": {
"id": "/subscriptions/22222222-2222-2222-2222-222222222222/resourceGroups/reosuceGroup2/providers/Microsoft.Network/privateEndpoints/pe2"
}
}
}
]
}
}
},
"200": {
"body": {
"location": "South Central US",
"tags": {
"key1": "value1",
"key2": "value2"
},
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {},
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": {}
}
},
"properties": {
"provisioningState": "InProgress",
"encryption": {
"type": "CustomerKey",
"keyVaultProperties": {
"keyIdentifier": "https://keyvault.vault.azure.net/keys/key1",
"currentKeyIdentifier": "https://keyvault.vault.azure.net/keys/key1/ver1"
},
"identity": {
"userAssignedIdentity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1",
"useSystemAssignedIdentity": false
}
},
"storageAccounts": [
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Storage/storageAccounts/contososportsstore",
"type": "Primary",
"identity": {
"userAssignedIdentity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1",
"useSystemAssignedIdentity": false
}
}
],
"storageAuthentication": "ManagedIdentity",
"publicNetworkAccess": "Enabled",
"keyDelivery": {
"accessControl": {
"defaultAction": "Allow"
}
},
"privateEndpointConnections": [
{
"name": "00000000-0000-0000-0000-000000000001",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contososports/privateEndpointConnections/00000000-0000-0000-0000-000000000001",
"type": "Microsoft.Media/mediaservices/privateEndpointConnections",
"properties": {
"provisioningState": "Succeeded",
"privateLinkServiceConnectionState": {
"status": "Approved",
"description": "test description"
},
"privateEndpoint": {
"id": "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/reosuceGroup1/providers/Microsoft.Network/privateEndpoints/pe1"
}
}
},
{
"name": "00000000-0000-0000-0000-000000000002",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.Media/mediaservices/contososports/privateEndpointConnections/00000000-0000-0000-0000-000000000002",
"type": "Microsoft.Media/mediaservices/privateEndpointConnections",
"properties": {
"provisioningState": "Succeeded",
"privateLinkServiceConnectionState": {
"status": "Pending",
"description": "test description"
},
"privateEndpoint": {
"id": "/subscriptions/22222222-2222-2222-2222-222222222222/resourceGroups/reosuceGroup2/providers/Microsoft.Network/privateEndpoints/pe2"
}
}
}
]
}
}
}
}
}
Loading

0 comments on commit 9456029

Please sign in to comment.