Skip to content

Commit

Permalink
Add commontypes/resource-management/v3/managedidentity (Azure#15968)
Browse files Browse the repository at this point in the history
* Add commontypes/resource-management/v3/managedidentity which models managed identity for services supporting both SystemAssignedIdentity and UserAssignedIdentity.

* Add a canonical SystemAssignedServiceIdentityType type definition which supports 'None', since that is required going forward. Also make the 'type' property required, since omitting it from the request would not be clear in intent.

* Add principalId and tenantId.
  • Loading branch information
TimLovellSmith authored Sep 15, 2021
1 parent 88c4db7 commit e16ce2d
Show file tree
Hide file tree
Showing 2 changed files with 114 additions and 0 deletions.
1 change: 1 addition & 0 deletions custom-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1092,6 +1092,7 @@ localmapview
localrun
localsearch
Lockdown
managedidentity
loganalytics
loggerid
logio
Expand Down
113 changes: 113 additions & 0 deletions specification/common-types/resource-management/v3/managedidentity.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
{
"swagger": "2.0",
"info": {
"version": "3.0",
"title": "Common types"
},
"paths": {},
"definitions": {
"UserAssignedIdentities": {
"title": "User-Assigned Identities",
"description": "The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/UserAssignedIdentity"
}
},
"UserAssignedIdentity": {
"type": "object",
"description": "User assigned identity properties",
"properties": {
"principalId": {
"description": "The principal ID of the assigned identity.",
"format": "uuid",
"type": "string",
"readOnly": true
},
"clientId": {
"description": "The client ID of the assigned identity.",
"format": "uuid",
"type": "string",
"readOnly": true
}
}
},
"ManagedServiceIdentityType": {
"description": "Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).",
"enum": [
"None",
"SystemAssigned",
"UserAssigned",
"SystemAssigned,UserAssigned"
],
"type": "string",
"x-ms-enum": {
"name": "ManagedServiceIdentityType",
"modelAsString": true
}
},
"ManagedServiceIdentity": {
"description": "Managed service identity (system assigned and/or user assigned identities)",
"type": "object",
"properties": {
"principalId": {
"readOnly": true,
"format": "uuid",
"type": "string",
"description": "The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity."
},
"tenantId": {
"readOnly": true,
"format": "uuid",
"type": "string",
"description": "The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity."
},
"type": {
"$ref": "#/definitions/ManagedServiceIdentityType"
},
"userAssignedIdentities": {
"$ref": "#/definitions/UserAssignedIdentities"
}
},
"required": [
"type"
]
},
"SystemAssignedServiceIdentityType": {
"description": "Type of managed service identity (either system assigned, or none).",
"enum": [
"None",
"SystemAssigned"
],
"type": "string",
"x-ms-enum": {
"name": "SystemAssignedServiceIdentityType",
"modelAsString": true
}
},
"SystemAssignedServiceIdentity": {
"description": "Managed service identity (either system assigned, or none)",
"type": "object",
"properties": {
"principalId": {
"readOnly": true,
"format": "uuid",
"type": "string",
"description": "The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity."
},
"tenantId": {
"readOnly": true,
"format": "uuid",
"type": "string",
"description": "The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity."
},
"type": {
"$ref": "#/definitions/SystemAssignedServiceIdentityType"
}
},
"required": [
"type"
]
}
}
}

0 comments on commit e16ce2d

Please sign in to comment.