Skip to content

Commit

Permalink
SQL - Add Resource Identity swagger to common v2 (#14439)
Browse files Browse the repository at this point in the history
* Add Resource Identity swagger to common v2

* Change version number

* Changed version num. Removed parameters
  • Loading branch information
viparek committed May 17, 2021
1 parent 9fd8cee commit 1c801aa
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 8 deletions.
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
}
}
}
}
}

0 comments on commit 1c801aa

Please sign in to comment.