Azure / azure-rest-api-specs

The source for REST API specifications for Microsoft Azure.
MIT License
2.63k stars 5.08k forks source link

Microsoft.Media/mediaservices@2021-11-01 identity `"type": "SystemAssigned, UserAssigned"` return 500 error #21905

Open teowa opened 1 year ago

teowa commented 1 year ago

swagger

https://github.com/Azure/azure-rest-api-specs/blob/55dd4f72d2b2769c1e02f2b952e597f806d40f9a/specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/Accounts.json#L624-L629 if pass "type": "SystemAssigned, UserAssigned" will get 500 error. the allowed value should be "SystemAssigned,UserAssigned" with no space in it.

API flow:

PUT https://management.azure.com/subscriptions/XXXX/resourceGroups/acctestRG-media-1/providers/Microsoft.Media/mediaservices/acctestmswtwtas?api-version=2021-11-01

{
    "name": "acctestXXXXtas",
    "id": "/subscriptions/XXXX/resourceGroups/acctestRG-media-1/providers/Microsoft.Media/mediaservices/acctestmswtwtas",
    "type": "Microsoft.Media/mediaservices",
    "location": "West US",
    "tags": {
        "environment": "staging"
    },
    "properties": {
        "mediaServiceId": "XXXX",
        "storageAccounts": [
            {
                "id": "/subscriptions/XXXX/resourceGroups/acctestRG-media-1/providers/Microsoft.Storage/storageAccounts/accteXXXXwestus",
                "type": "Primary"
            }
        ],
        "storageAuthentication": "System",
        "encryption": {
            "type": "SystemKey"
        },
        "keyDelivery": {
            "accessControl": {
                "defaultAction": "Allow",
                "ipAllowList": []
            }
        },
        "publicNetworkAccess": "Enabled",
        "privateEndpointConnections": []
    },
    "identity": {
        "type": "SystemAssigned, UserAssigned",
        "userAssignedIdentities": {
            "/subscriptions/XXXX/resourceGroups/acctestRG-media-1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/acctestwestus": {}
        }
    }
}

500 Internal Server Error x-ms-request-id: 81d05c24-51b8-4042-9d5e-06750f540ef3

{
    "error": {
        "code": "InternalServerError",
        "message": "The server encountered an internal error. Please try again later."
    }
}
ghost commented 1 year ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @akucer.

Issue Details
### swagger https://github.com/Azure/azure-rest-api-specs/blob/55dd4f72d2b2769c1e02f2b952e597f806d40f9a/specification/mediaservices/resource-manager/Microsoft.Media/Accounts/stable/2021-11-01/Accounts.json#L624-L629 if pass `"type": "SystemAssigned, UserAssigned"` will get 500 error. the allowed value should be `"SystemAssigned,UserAssigned"` with no space in it. ### API flow: PUT https://management.azure.com/subscriptions/XXXX/resourceGroups/acctestRG-media-1/providers/Microsoft.Media/mediaservices/acctestmswtwtas?api-version=2021-11-01 ```json { "name": "acctestXXXXtas", "id": "/subscriptions/XXXX/resourceGroups/acctestRG-media-1/providers/Microsoft.Media/mediaservices/acctestmswtwtas", "type": "Microsoft.Media/mediaservices", "location": "West US", "tags": { "environment": "staging" }, "properties": { "mediaServiceId": "XXXX", "storageAccounts": [ { "id": "/subscriptions/XXXX/resourceGroups/acctestRG-media-1/providers/Microsoft.Storage/storageAccounts/accteXXXXwestus", "type": "Primary" } ], "storageAuthentication": "System", "encryption": { "type": "SystemKey" }, "keyDelivery": { "accessControl": { "defaultAction": "Allow", "ipAllowList": [] } }, "publicNetworkAccess": "Enabled", "privateEndpointConnections": [] }, "identity": { "type": "SystemAssigned, UserAssigned", "userAssignedIdentities": { "/subscriptions/XXXX/resourceGroups/acctestRG-media-1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/acctestwestus": {} } } } ``` 500 Internal Server Error x-ms-request-id: 81d05c24-51b8-4042-9d5e-06750f540ef3 ```json { "error": { "code": "InternalServerError", "message": "The server encountered an internal error. Please try again later." } } ```
Author: teowa
Assignees: -
Labels: `Media Services`, `Service Attention`, `needs-triage`
Milestone: -