Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL - Add Resource Identity swagger to common v2 #14439

Merged
merged 3 commits into from
May 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,7 @@
],
"properties": {
"identity": {
"$ref": "#/definitions/ResourceIdentityWithUserAssignedIdentities",
"$ref": "../../../common/v2/types.json#/definitions/ResourceIdentity",
"description": "The Azure Active Directory identity of the managed instance.",
"x-ms-mutability": [
"read",
Expand All @@ -996,7 +996,7 @@
"description": "Managed instance sku"
},
"identity": {
"$ref": "#/definitions/ResourceIdentityWithUserAssignedIdentities",
"$ref": "../../../common/v2/types.json#/definitions/ResourceIdentity",
"description": "Managed instance identity"
},
"properties": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@
],
"properties": {
"identity": {
"$ref": "#/definitions/ResourceIdentityWithUserAssignedIdentities",
"$ref": "../../../common/v2/types.json#/definitions/ResourceIdentity",
"description": "The Azure Active Directory identity of the server.",
"x-ms-mutability": [
"read",
Expand All @@ -760,7 +760,7 @@
"type": "object",
"properties": {
"identity": {
"$ref": "#/definitions/ResourceIdentityWithUserAssignedIdentities",
"$ref": "../../../common/v2/types.json#/definitions/ResourceIdentity",
"description": "Server identity"
},
"properties": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,7 @@
],
"properties": {
"identity": {
"$ref": "#/definitions/ResourceIdentityWithUserAssignedIdentities",
"$ref": "../../../common/v2/types.json#/definitions/ResourceIdentity",
"description": "The Azure Active Directory identity of the managed instance.",
"x-ms-mutability": [
"read",
Expand All @@ -1005,7 +1005,7 @@
"description": "Managed instance sku"
},
"identity": {
"$ref": "#/definitions/ResourceIdentityWithUserAssignedIdentities",
"$ref": "../../../common/v2/types.json#/definitions/ResourceIdentity",
"description": "Managed instance identity"
},
"properties": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@
],
"properties": {
"identity": {
"$ref": "#/definitions/ResourceIdentityWithUserAssignedIdentities",
"$ref": "../../../common/v2/types.json#/definitions/ResourceIdentity",
"description": "The Azure Active Directory identity of the server.",
"x-ms-mutability": [
"read",
Expand All @@ -773,7 +773,7 @@
"type": "object",
"properties": {
"identity": {
"$ref": "#/definitions/ResourceIdentityWithUserAssignedIdentities",
"$ref": "../../../common/v2/types.json#/definitions/ResourceIdentity",
"description": "Server identity"
},
"properties": {
Expand Down
66 changes: 66 additions & 0 deletions specification/sql/resource-manager/common/v2/types.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"swagger": "2.0",
"info": {
"version": "v2",
"title": "Common types"
},
"paths": {},
"definitions": {
"UserIdentity": {
"description": "Azure Active Directory identity configuration for a resource.",
"type": "object",
"properties": {
"principalId": {
"format": "uuid",
"description": "The Azure Active Directory principal id.",
"type": "string",
"readOnly": true
},
"clientId": {
"format": "uuid",
"description": "The Azure Active Directory client id.",
"type": "string",
"readOnly": true
}
}
},
"ResourceIdentity": {
"description": "Azure Active Directory identity configuration for a resource.",
"type": "object",
"properties": {
"userAssignedIdentities": {
"description": "The resource ids of the user assigned identities to use",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/UserIdentity"
}
},
"principalId": {
"format": "uuid",
"description": "The Azure Active Directory principal id.",
"type": "string",
"readOnly": true
},
"type": {
"description": "The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource.",
"enum": [
"None",
"SystemAssigned",
"UserAssigned"
],
"type": "string",
"x-ms-enum": {
"name": "IdentityType",
"modelAsString": true
}
},
"tenantId": {
"format": "uuid",
"description": "The Azure Active Directory tenant id.",
"type": "string",
"readOnly": true
}
}
}
}
}