diff --git a/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Create_WithManagedIdentity.json b/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Create_WithManagedIdentity.json new file mode 100644 index 000000000000..89398a1c66b7 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Create_WithManagedIdentity.json @@ -0,0 +1,94 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "api-version": "2024-03-03", + "galleryName": "myGalleryName", + "gallery": { + "location": "West US", + "identity": { + "type": "SystemAssigned, UserAssigned", + "userAssignedIdentities": { + "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity": {} + } + }, + "properties": { + "description": "This is the gallery description." + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName", + "identity": { + "type": "SystemAssigned, UserAssigned", + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "userAssignedIdentities": { + "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity": {} + } + }, + "properties": { + "description": "This is the gallery description.", + "identifier": { + "uniqueName": "{subscription-id}-MYGALLERYNAME" + }, + "provisioningState": "Updating" + }, + "location": "West US", + "name": "myGalleryName" + } + }, + "201": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName", + "identity": { + "type": "SystemAssigned, UserAssigned", + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "userAssignedIdentities": { + "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity": {} + } + }, + "properties": { + "description": "This is the gallery description.", + "identifier": { + "uniqueName": "{subscription-id}-MYGALLERYNAME" + }, + "provisioningState": "Creating", + "softDeletePolicy": { + "isSoftDeleteEnabled": true + } + }, + "location": "West US", + "name": "myGalleryName" + } + }, + "202": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName", + "identity": { + "type": "SystemAssigned, UserAssigned", + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "userAssignedIdentities": { + "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity": {} + } + }, + "properties": { + "description": "This is the gallery description.", + "identifier": { + "uniqueName": "{subscription-id}-MYGALLERYNAME" + }, + "provisioningState": "Updating", + "softDeletePolicy": { + "isSoftDeleteEnabled": true + } + }, + "location": "West US", + "name": "myGalleryName" + } + } + } +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Get_WithManagedIdentity.json b/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Get_WithManagedIdentity.json new file mode 100644 index 000000000000..ad61029684af --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/examples/galleryExamples/Gallery_Get_WithManagedIdentity.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "api-version": "2024-03-03", + "galleryName": "myGalleryName" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName", + "identity": { + "type": "SystemAssigned, UserAssigned", + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "userAssignedIdentities": { + "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity": { + "principalId": "00000000-0000-0000-0000-000000000000", + "clientId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "properties": { + "description": "This is the gallery description.", + "identifier": { + "uniqueName": "{subscription-id}-MYGALLERYNAME" + }, + "provisioningState": "Succeeded" + }, + "location": "West US", + "name": "myGalleryName" + } + } + } +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/gallery.json b/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/gallery.json index 3c7a9174096e..59f177ded889 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/gallery.json +++ b/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2024-03-03/gallery.json @@ -107,6 +107,9 @@ }, "Create a community gallery.": { "$ref": "./examples/galleryExamples/CommunityGallery_Create.json" + }, + "Create or update a simple gallery with system-assigned and user-assigned managed identities.": { + "$ref": "./examples/galleryExamples/Gallery_Create_WithManagedIdentity.json" } } }, @@ -231,6 +234,9 @@ }, "Get a community gallery.": { "$ref": "./examples/galleryExamples/CommunityGallery_Get.json" + }, + "Get a gallery with system-assigned and user-assigned managed identities.": { + "$ref": "./examples/galleryExamples/Gallery_Get_WithManagedIdentity.json" } } }, @@ -1745,6 +1751,10 @@ "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/GalleryProperties" + }, + "identity": { + "$ref": "#/definitions/GalleryIdentity", + "description": "The identity of the gallery, if configured." } }, "allOf": [ @@ -1759,6 +1769,10 @@ "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/GalleryProperties" + }, + "identity": { + "$ref": "#/definitions/GalleryIdentity", + "description": "The identity of the gallery, if configured." } }, "allOf": [ @@ -1960,6 +1974,40 @@ } } }, + "GalleryIdentity": { + "type": "object", + "properties": { + "principalId": { + "readOnly": true, + "type": "string", + "description": "The principal id of the gallery identity. This property will only be provided for a system assigned identity." + }, + "tenantId": { + "readOnly": true, + "type": "string", + "description": "The AAD tenant id of the gallery identity. This property will only be provided for a system assigned identity." + }, + "type": { + "type": "string", + "description": "The type of identity used for the gallery. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove all identities from the gallery.", + "enum": [ + "SystemAssigned", + "UserAssigned", + "SystemAssigned, UserAssigned", + "None" + ], + "x-ms-enum": { + "name": "ResourceIdentityType", + "modelAsString": false + } + }, + "userAssignedIdentities": { + "$ref": "../../../common-types/v1/common.json#/definitions/UserAssignedIdentities", + "description": "The list of user identities associated with the gallery. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'." + } + }, + "description": "Identity for the virtual machine." + }, "GalleryApplication": { "properties": { "properties": {