Skip to content

Commit e16ce2d

Browse files
Add commontypes/resource-management/v3/managedidentity (#15968)
* 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.
1 parent 88c4db7 commit e16ce2d

File tree

2 files changed

+114
-0
lines changed

2 files changed

+114
-0
lines changed

custom-words.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,6 +1092,7 @@ localmapview
10921092
localrun
10931093
localsearch
10941094
Lockdown
1095+
managedidentity
10951096
loganalytics
10961097
loggerid
10971098
logio
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"version": "3.0",
5+
"title": "Common types"
6+
},
7+
"paths": {},
8+
"definitions": {
9+
"UserAssignedIdentities": {
10+
"title": "User-Assigned Identities",
11+
"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.",
12+
"type": "object",
13+
"additionalProperties": {
14+
"$ref": "#/definitions/UserAssignedIdentity"
15+
}
16+
},
17+
"UserAssignedIdentity": {
18+
"type": "object",
19+
"description": "User assigned identity properties",
20+
"properties": {
21+
"principalId": {
22+
"description": "The principal ID of the assigned identity.",
23+
"format": "uuid",
24+
"type": "string",
25+
"readOnly": true
26+
},
27+
"clientId": {
28+
"description": "The client ID of the assigned identity.",
29+
"format": "uuid",
30+
"type": "string",
31+
"readOnly": true
32+
}
33+
}
34+
},
35+
"ManagedServiceIdentityType": {
36+
"description": "Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).",
37+
"enum": [
38+
"None",
39+
"SystemAssigned",
40+
"UserAssigned",
41+
"SystemAssigned,UserAssigned"
42+
],
43+
"type": "string",
44+
"x-ms-enum": {
45+
"name": "ManagedServiceIdentityType",
46+
"modelAsString": true
47+
}
48+
},
49+
"ManagedServiceIdentity": {
50+
"description": "Managed service identity (system assigned and/or user assigned identities)",
51+
"type": "object",
52+
"properties": {
53+
"principalId": {
54+
"readOnly": true,
55+
"format": "uuid",
56+
"type": "string",
57+
"description": "The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity."
58+
},
59+
"tenantId": {
60+
"readOnly": true,
61+
"format": "uuid",
62+
"type": "string",
63+
"description": "The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity."
64+
},
65+
"type": {
66+
"$ref": "#/definitions/ManagedServiceIdentityType"
67+
},
68+
"userAssignedIdentities": {
69+
"$ref": "#/definitions/UserAssignedIdentities"
70+
}
71+
},
72+
"required": [
73+
"type"
74+
]
75+
},
76+
"SystemAssignedServiceIdentityType": {
77+
"description": "Type of managed service identity (either system assigned, or none).",
78+
"enum": [
79+
"None",
80+
"SystemAssigned"
81+
],
82+
"type": "string",
83+
"x-ms-enum": {
84+
"name": "SystemAssignedServiceIdentityType",
85+
"modelAsString": true
86+
}
87+
},
88+
"SystemAssignedServiceIdentity": {
89+
"description": "Managed service identity (either system assigned, or none)",
90+
"type": "object",
91+
"properties": {
92+
"principalId": {
93+
"readOnly": true,
94+
"format": "uuid",
95+
"type": "string",
96+
"description": "The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity."
97+
},
98+
"tenantId": {
99+
"readOnly": true,
100+
"format": "uuid",
101+
"type": "string",
102+
"description": "The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity."
103+
},
104+
"type": {
105+
"$ref": "#/definitions/SystemAssignedServiceIdentityType"
106+
}
107+
},
108+
"required": [
109+
"type"
110+
]
111+
}
112+
}
113+
}

0 commit comments

Comments
 (0)