From 53b645a63ca7dc219b6716d8bfc5ded9b2294763 Mon Sep 17 00:00:00 2001 From: Ilavelan Kanniappan Date: Mon, 13 Dec 2021 18:18:46 -0800 Subject: [PATCH 01/23] Added listServicePrincipalId --- .../2021-04-30-preview/automanage.json | 54 +++++++++++++++++++ .../examples/listOperations.json | 9 ++++ .../examples/listServicePrincipalId.json | 16 ++++++ 3 files changed, 79 insertions(+) create mode 100644 specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listServicePrincipalId.json diff --git a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json index fbeea72e8cbb..cc042022bfaf 100644 --- a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json +++ b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json @@ -1283,6 +1283,49 @@ "application/json" ] } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Automanage/listServicePrincipalId": { + "post": { + "tags": [ + "serviceprincipalid" + ], + "operationId": "serviceprincipalid_List", + "description": "Returns the Automanage's ADD first party Application Service Principal Id for the subscription.", + "x-ms-examples": { + "List reports by configuration profiles assignment": { + "$ref": "./examples/listServicePrincipalId.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Returns the Automanage's ADD first party Application Service Principal Id for the subscription.", + "schema": { + "$ref": "#/definitions/ServicePrincipalId" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": false, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ] + } } }, "definitions": { @@ -1611,6 +1654,17 @@ "description": "Error message, if any, returned when deploying the resource." } } + }, + "ServicePrincipalId": { + "description": "The Service Principal Id for the subscription.", + "type": "object", + "properties": { + "servicePrincipalid": { + "type": "string", + "readOnly": true, + "description": "The Service Principal Id for the subscription." + } + } } }, "parameters": { diff --git a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listOperations.json b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listOperations.json index 8926f7e7eb16..f28da5292f71 100644 --- a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listOperations.json +++ b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listOperations.json @@ -123,6 +123,15 @@ "operation": "Microsoft.Automanage/configurationProfileAssignments/reports/read", "description": "Get report for configuration profile assignment." } + }, + { + "name": "Microsoft.Automanage/listServicePrincipalId/action", + "display": { + "provider": "Microsoft Automanage", + "resource": "Microsoft.Automanage/listServicePrincipalId", + "operation": "List Service Principal Id", + "description": "Retrieves the Service Principal Id for the subscription. This Service Principal Id is used to grant the Contributor RBAC permission to Automanage's ADD first party Application." + } } ] } diff --git a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listServicePrincipalId.json b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listServicePrincipalId.json new file mode 100644 index 000000000000..87d40df9c390 --- /dev/null +++ b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listServicePrincipalId.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "mySubscriptionId", + "api-version": "2021-04-30-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "properties": { + "servicePrincipalid": "" + } + } + } + } +} From 4fcf3182d5f7f29bd222422a2c9095210786e1be Mon Sep 17 00:00:00 2001 From: Ilavelan Kanniappan Date: Mon, 13 Dec 2021 19:00:53 -0800 Subject: [PATCH 02/23] Fixed few errors --- .../2021-04-30-preview/automanage.json | 20 ++++++++++--------- .../examples/listOperations.json | 2 +- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json index cc042022bfaf..d5504a27a9c7 100644 --- a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json +++ b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json @@ -1287,12 +1287,12 @@ "/subscriptions/{subscriptionId}/providers/Microsoft.Automanage/listServicePrincipalId": { "post": { "tags": [ - "serviceprincipalid" + "servicePrincipalId" ], - "operationId": "serviceprincipalid_List", - "description": "Returns the Automanage's ADD first party Application Service Principal Id for the subscription.", + "operationId": "servicePrincipalId_List", + "description": "Returns the Automanage ADD first party Application Service Principal Id for the subscription.", "x-ms-examples": { - "List reports by configuration profiles assignment": { + "List service principal id": { "$ref": "./examples/listServicePrincipalId.json" } }, @@ -1306,7 +1306,7 @@ ], "responses": { "200": { - "description": "Returns the Automanage's ADD first party Application Service Principal Id for the subscription.", + "description": "Returns the Automanage ADD first party Application Service Principal Id for the subscription.", "schema": { "$ref": "#/definitions/ServicePrincipalId" } @@ -1659,10 +1659,12 @@ "description": "The Service Principal Id for the subscription.", "type": "object", "properties": { - "servicePrincipalid": { - "type": "string", - "readOnly": true, - "description": "The Service Principal Id for the subscription." + "properties": { + "servicePrincipalid": { + "type": "string", + "readOnly": true, + "description": "The Service Principal Id for the subscription." + } } } } diff --git a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listOperations.json b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listOperations.json index f28da5292f71..fee570b5ac68 100644 --- a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listOperations.json +++ b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listOperations.json @@ -130,7 +130,7 @@ "provider": "Microsoft Automanage", "resource": "Microsoft.Automanage/listServicePrincipalId", "operation": "List Service Principal Id", - "description": "Retrieves the Service Principal Id for the subscription. This Service Principal Id is used to grant the Contributor RBAC permission to Automanage's ADD first party Application." + "description": "Retrieves the Service Principal Id for the subscription. This Service Principal Id is used to grant the Contributor RBAC permission to Automanage ADD first party Application." } } ] From 8bef96dcc63c295d482540f5652eef9c5c63e0a2 Mon Sep 17 00:00:00 2001 From: Ilavelan Kanniappan Date: Mon, 13 Dec 2021 19:11:28 -0800 Subject: [PATCH 03/23] Fixed spelling --- .../preview/2021-04-30-preview/automanage.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json index d5504a27a9c7..c90032ec5a20 100644 --- a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json +++ b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json @@ -1660,7 +1660,7 @@ "type": "object", "properties": { "properties": { - "servicePrincipalid": { + "servicePrincipalId": { "type": "string", "readOnly": true, "description": "The Service Principal Id for the subscription." From 75b6fabcdbd0c6cb562d9f4046705a8bc7336c80 Mon Sep 17 00:00:00 2001 From: Ilavelan Kanniappan Date: Mon, 13 Dec 2021 20:31:46 -0800 Subject: [PATCH 04/23] Fixed few errors --- .../2021-04-30-preview/examples/listServicePrincipalId.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listServicePrincipalId.json b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listServicePrincipalId.json index 87d40df9c390..b397cdef3d2d 100644 --- a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listServicePrincipalId.json +++ b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listServicePrincipalId.json @@ -8,7 +8,7 @@ "headers": {}, "body": { "properties": { - "servicePrincipalid": "" + "servicePrincipalId": "" } } } From bad0e65b258713d03e1fc668b54b5ea3be924c5c Mon Sep 17 00:00:00 2001 From: Ilavelan Kanniappan Date: Mon, 13 Dec 2021 20:45:37 -0800 Subject: [PATCH 05/23] Fixed few errors --- .../preview/2021-04-30-preview/automanage.json | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json index c90032ec5a20..a58508ecd43b 100644 --- a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json +++ b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json @@ -1659,12 +1659,10 @@ "description": "The Service Principal Id for the subscription.", "type": "object", "properties": { - "properties": { - "servicePrincipalId": { - "type": "string", - "readOnly": true, - "description": "The Service Principal Id for the subscription." - } + "servicePrincipalId": { + "type": "string", + "readOnly": true, + "description": "The Service Principal Id for the subscription." } } } From 34736832b8c71c51a6aab3ddb84f08ae9e547089 Mon Sep 17 00:00:00 2001 From: Ilavelan Kanniappan Date: Mon, 13 Dec 2021 20:58:49 -0800 Subject: [PATCH 06/23] Added listServicePrincipalId --- .../preview/2021-04-30-preview/automanage.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json index a58508ecd43b..ec4822e1de8e 100644 --- a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json +++ b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json @@ -1289,7 +1289,7 @@ "tags": [ "servicePrincipalId" ], - "operationId": "servicePrincipalId_List", + "operationId": "listserviceprincipalid", "description": "Returns the Automanage ADD first party Application Service Principal Id for the subscription.", "x-ms-examples": { "List service principal id": { From 3390e0c76e6ca93c471d016b648f1fafd73e42af Mon Sep 17 00:00:00 2001 From: Ilavelan Kanniappan Date: Mon, 13 Dec 2021 21:10:09 -0800 Subject: [PATCH 07/23] Fixed one error --- .../preview/2021-04-30-preview/automanage.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json index ec4822e1de8e..8e93648759b7 100644 --- a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json +++ b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json @@ -1319,6 +1319,9 @@ } }, "x-ms-long-running-operation": false, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, "produces": [ "application/json" ], From 4e9f4c27f2a073f883498f7184f02be7deccf9ec Mon Sep 17 00:00:00 2001 From: Ilavelan Kanniappan Date: Mon, 13 Dec 2021 21:21:18 -0800 Subject: [PATCH 08/23] Fixed few errors --- .../preview/2021-04-30-preview/automanage.json | 2 +- .../2021-04-30-preview/examples/listServicePrincipalId.json | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json index 8e93648759b7..e99b871efc5a 100644 --- a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json +++ b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json @@ -1289,7 +1289,7 @@ "tags": [ "servicePrincipalId" ], - "operationId": "listserviceprincipalid", + "operationId": "Listserviceprincipalids_List", "description": "Returns the Automanage ADD first party Application Service Principal Id for the subscription.", "x-ms-examples": { "List service principal id": { diff --git a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listServicePrincipalId.json b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listServicePrincipalId.json index b397cdef3d2d..95ee8d8b6d85 100644 --- a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listServicePrincipalId.json +++ b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listServicePrincipalId.json @@ -7,9 +7,7 @@ "200": { "headers": {}, "body": { - "properties": { - "servicePrincipalId": "" - } + "servicePrincipalId": "" } } } From e33795cb56c03eebac0eb97cc67aad0f804a82df Mon Sep 17 00:00:00 2001 From: Ilavelan Kanniappan Date: Mon, 13 Dec 2021 21:26:09 -0800 Subject: [PATCH 09/23] Fixed error --- .../preview/2021-04-30-preview/automanage.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json index e99b871efc5a..b769f4d6aa01 100644 --- a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json +++ b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json @@ -1289,7 +1289,7 @@ "tags": [ "servicePrincipalId" ], - "operationId": "Listserviceprincipalids_List", + "operationId": "listServicePrincipalId_List", "description": "Returns the Automanage ADD first party Application Service Principal Id for the subscription.", "x-ms-examples": { "List service principal id": { From c1b81cfa3eccf75aa017db69c5724906f913056f Mon Sep 17 00:00:00 2001 From: Ilavelan Kanniappan Date: Mon, 13 Dec 2021 21:33:38 -0800 Subject: [PATCH 10/23] Fixed error --- .../preview/2021-04-30-preview/automanage.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json index b769f4d6aa01..c2f55dbc9c30 100644 --- a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json +++ b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json @@ -1289,7 +1289,7 @@ "tags": [ "servicePrincipalId" ], - "operationId": "listServicePrincipalId_List", + "operationId": "Automanages_ListServicePrincipalId", "description": "Returns the Automanage ADD first party Application Service Principal Id for the subscription.", "x-ms-examples": { "List service principal id": { From f0966b7da23e750a517f5da5a56e43fe3de7d504 Mon Sep 17 00:00:00 2001 From: Ilavelan Kanniappan Date: Wed, 15 Dec 2021 17:24:38 -0800 Subject: [PATCH 11/23] Updated tag to trigger a build --- .../preview/2021-04-30-preview/automanage.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json index c2f55dbc9c30..d2aea04a0609 100644 --- a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json +++ b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json @@ -1287,7 +1287,7 @@ "/subscriptions/{subscriptionId}/providers/Microsoft.Automanage/listServicePrincipalId": { "post": { "tags": [ - "servicePrincipalId" + "ServicePrincipalId" ], "operationId": "Automanages_ListServicePrincipalId", "description": "Returns the Automanage ADD first party Application Service Principal Id for the subscription.", From 9984dc976159a3aecc3c1782323d5123eb7747f4 Mon Sep 17 00:00:00 2001 From: Ilavelan Kanniappan Date: Wed, 15 Dec 2021 17:30:56 -0800 Subject: [PATCH 12/23] Fixed spelling --- .../preview/2021-04-30-preview/automanage.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json index d2aea04a0609..6ae85bed46bf 100644 --- a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json +++ b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json @@ -1289,7 +1289,7 @@ "tags": [ "ServicePrincipalId" ], - "operationId": "Automanages_ListServicePrincipalId", + "operationId": "Automanage_ListServicePrincipalId", "description": "Returns the Automanage ADD first party Application Service Principal Id for the subscription.", "x-ms-examples": { "List service principal id": { From 1e58e7b8591343d2ec130c062a9ac666e4bfc69e Mon Sep 17 00:00:00 2001 From: Ilavelan Kanniappan Date: Thu, 16 Dec 2021 23:08:13 -0800 Subject: [PATCH 13/23] Fixed comment --- .../preview/2021-04-30-preview/automanage.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json index 6ae85bed46bf..a4d46c16f28c 100644 --- a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json +++ b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json @@ -1318,10 +1318,6 @@ } } }, - "x-ms-long-running-operation": false, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation" - }, "produces": [ "application/json" ], From 4dcbea105243b45240a5e4f7f5d372bb1aaa1736 Mon Sep 17 00:00:00 2001 From: Ilavelan Kanniappan Date: Thu, 3 Feb 2022 13:20:19 -0800 Subject: [PATCH 14/23] Changed from Post to get to work in ARM template --- .../2021-04-30-preview/automanage.json | 59 +++++++++++++++---- .../examples/getServicePrincipal.json | 22 +++++++ .../examples/listOperations.json | 8 +-- .../examples/listServicePrincipalId.json | 14 ----- 4 files changed, 75 insertions(+), 28 deletions(-) create mode 100644 specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getServicePrincipal.json delete mode 100644 specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listServicePrincipalId.json diff --git a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json index a4d46c16f28c..49d03ed2d5ab 100644 --- a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json +++ b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json @@ -1284,31 +1284,38 @@ ] } }, - "/subscriptions/{subscriptionId}/providers/Microsoft.Automanage/listServicePrincipalId": { - "post": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Automanage/servicePrincipals/{servicePrincipalName}": { + "get": { "tags": [ - "ServicePrincipalId" + "servicePrincipals" ], - "operationId": "Automanage_ListServicePrincipalId", - "description": "Returns the Automanage ADD first party Application Service Principal Id for the subscription.", + "operationId": "Automanage_ServicePrincipal_Get", + "description": "Get the Automanage AAD first party Application Service Principal details for the subscription id.", "x-ms-examples": { - "List service principal id": { - "$ref": "./examples/listServicePrincipalId.json" + "Get service principal": { + "$ref": "./examples/getServicePrincipal.json" } }, "parameters": [ { "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" }, + { + "name": "servicePrincipalName", + "in": "path", + "required": true, + "type": "string", + "description": "Name of the servicePrincipal Name. Only default is supported." + }, { "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { - "description": "Returns the Automanage ADD first party Application Service Principal Id for the subscription.", + "description": "Returns the Automanage ADD first party Application Service Principal details for the subscription.", "schema": { - "$ref": "#/definitions/ServicePrincipalId" + "$ref": "#/definitions/ServicePrincipal" } }, "default": { @@ -1654,14 +1661,46 @@ } } }, - "ServicePrincipalId": { + "ServicePrincipal": { "description": "The Service Principal Id for the subscription.", "type": "object", + "properties": { + "name": { + "type": "string", + "readOnly": true, + "description": "Name of the resource." + }, + "id": { + "type": "string", + "readOnly": true, + "description": "ARM id of the resource." + }, + "type": { + "type": "string", + "readOnly": true, + "description": "Type of the resource." + }, + "properties": { + "title": "Properties", + "x-ms-client-flatten": true, + "$ref": "#/definitions/ServicePrincipalProperties", + "description": "The Service Principal properties for the subscription" + } + } + }, + "ServicePrincipalProperties": { + "description": "The Service Principal properties for the subscription.", + "type": "object", "properties": { "servicePrincipalId": { "type": "string", "readOnly": true, "description": "The Service Principal Id for the subscription." + }, + "authorizationSet": { + "type": "bool", + "readOnly": true, + "description": "Returns the contributor RBAC Role exist or not for the Service Principal Id." } } } diff --git a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getServicePrincipal.json b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getServicePrincipal.json new file mode 100644 index 000000000000..bfa454f0586b --- /dev/null +++ b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getServicePrincipal.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "mySubscriptionId", + "servicePrincipalName": "default", + "api-version": "2021-04-30-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/subscriptionId/providers/Microsoft.Automanage/servicePrincipals/default", + "name": "default", + "type": "Microsoft.Automanage/ConfigurationProfileAssignments", + "properties": { + "authorizationSet": true, + "servicePrincipalId": "" + } + + } + } + } +} diff --git a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listOperations.json b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listOperations.json index fee570b5ac68..45d165404456 100644 --- a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listOperations.json +++ b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listOperations.json @@ -125,12 +125,12 @@ } }, { - "name": "Microsoft.Automanage/listServicePrincipalId/action", + "name": "Microsoft.Automanage/servicePrincipals/read", "display": { "provider": "Microsoft Automanage", - "resource": "Microsoft.Automanage/listServicePrincipalId", - "operation": "List Service Principal Id", - "description": "Retrieves the Service Principal Id for the subscription. This Service Principal Id is used to grant the Contributor RBAC permission to Automanage ADD first party Application." + "resource": "Microsoft.Automanage/servicePrincipals", + "operation": "Microsoft.Automanage/servicePrincipals/read", + "description": "Read the Automanage AAD first party service principal id and authorizationSet for the subscription. This service principal id is used to grant the Contributor RBAC permission to Automanage AAD first party Application." } } ] diff --git a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listServicePrincipalId.json b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listServicePrincipalId.json deleted file mode 100644 index 95ee8d8b6d85..000000000000 --- a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listServicePrincipalId.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "parameters": { - "subscriptionId": "mySubscriptionId", - "api-version": "2021-04-30-preview" - }, - "responses": { - "200": { - "headers": {}, - "body": { - "servicePrincipalId": "" - } - } - } -} From 09c569e8056dc413878f6093ec69785c559175a9 Mon Sep 17 00:00:00 2001 From: Ilavelan Kanniappan Date: Thu, 3 Feb 2022 13:41:38 -0800 Subject: [PATCH 15/23] fixed failure --- .../preview/2021-04-30-preview/automanage.json | 10 +++++----- .../examples/getServicePrincipal.json | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json index 49d03ed2d5ab..0d5727afca06 100644 --- a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json +++ b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json @@ -1665,15 +1665,15 @@ "description": "The Service Principal Id for the subscription.", "type": "object", "properties": { - "name": { + "id": { "type": "string", "readOnly": true, - "description": "Name of the resource." + "description": "ARM id of the resource." }, - "id": { + "name": { "type": "string", "readOnly": true, - "description": "ARM id of the resource." + "description": "Name of the resource." }, "type": { "type": "string", @@ -1698,7 +1698,7 @@ "description": "The Service Principal Id for the subscription." }, "authorizationSet": { - "type": "bool", + "type": "boolean", "readOnly": true, "description": "Returns the contributor RBAC Role exist or not for the Service Principal Id." } diff --git a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getServicePrincipal.json b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getServicePrincipal.json index bfa454f0586b..563e25b0d507 100644 --- a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getServicePrincipal.json +++ b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getServicePrincipal.json @@ -12,8 +12,8 @@ "name": "default", "type": "Microsoft.Automanage/ConfigurationProfileAssignments", "properties": { - "authorizationSet": true, - "servicePrincipalId": "" + "servicePrincipalId": "", + "authorizationSet": true } } From 91afd11b184ea3fae2d1e3bb262c45222e8730ff Mon Sep 17 00:00:00 2001 From: Ilavelan Kanniappan Date: Thu, 3 Feb 2022 13:52:58 -0800 Subject: [PATCH 16/23] fixed failure --- .../preview/2021-04-30-preview/automanage.json | 2 +- .../2021-04-30-preview/examples/getServicePrincipal.json | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json index 0d5727afca06..92dac5f40d3f 100644 --- a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json +++ b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json @@ -1289,7 +1289,7 @@ "tags": [ "servicePrincipals" ], - "operationId": "Automanage_ServicePrincipal_Get", + "operationId": "ServicePrincipal_Get", "description": "Get the Automanage AAD first party Application Service Principal details for the subscription id.", "x-ms-examples": { "Get service principal": { diff --git a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getServicePrincipal.json b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getServicePrincipal.json index 563e25b0d507..da64d977af09 100644 --- a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getServicePrincipal.json +++ b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getServicePrincipal.json @@ -14,8 +14,7 @@ "properties": { "servicePrincipalId": "", "authorizationSet": true - } - + } } } } From a77f221e9e98eeef0d85dde02c5195a4f15a2eb3 Mon Sep 17 00:00:00 2001 From: Ilavelan Kanniappan Date: Thu, 3 Feb 2022 14:00:22 -0800 Subject: [PATCH 17/23] fixed warning --- .../preview/2021-04-30-preview/automanage.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json index 92dac5f40d3f..67a2e238accd 100644 --- a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json +++ b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json @@ -1289,7 +1289,7 @@ "tags": [ "servicePrincipals" ], - "operationId": "ServicePrincipal_Get", + "operationId": "ServicePrincipals_Get", "description": "Get the Automanage AAD first party Application Service Principal details for the subscription id.", "x-ms-examples": { "Get service principal": { From a3220d27a2a3a70387b69ff4956116d005c33e89 Mon Sep 17 00:00:00 2001 From: Ilavelan Kanniappan Date: Fri, 4 Feb 2022 17:50:30 -0800 Subject: [PATCH 18/23] Refferred ProxyResource --- .../2021-04-30-preview/automanage.json | 22 +++++-------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json index 67a2e238accd..2af7e234a5d5 100644 --- a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json +++ b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json @@ -1665,27 +1665,17 @@ "description": "The Service Principal Id for the subscription.", "type": "object", "properties": { - "id": { - "type": "string", - "readOnly": true, - "description": "ARM id of the resource." - }, - "name": { - "type": "string", - "readOnly": true, - "description": "Name of the resource." - }, - "type": { - "type": "string", - "readOnly": true, - "description": "Type of the resource." - }, "properties": { "title": "Properties", "x-ms-client-flatten": true, "$ref": "#/definitions/ServicePrincipalProperties", "description": "The Service Principal properties for the subscription" - } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource" + } + ] } }, "ServicePrincipalProperties": { From 4e4f5c11fe8972d36b548a0d5bce6dbccd11f14c Mon Sep 17 00:00:00 2001 From: Ilavelan Kanniappan Date: Fri, 4 Feb 2022 18:14:36 -0800 Subject: [PATCH 19/23] Fixed ProxyResource and another comment --- .../2021-04-30-preview/automanage.json | 23 +++++++------------ .../examples/getServicePrincipal.json | 1 - 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json index 2af7e234a5d5..873475bf4880 100644 --- a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json +++ b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json @@ -1284,7 +1284,7 @@ ] } }, - "/subscriptions/{subscriptionId}/providers/Microsoft.Automanage/servicePrincipals/{servicePrincipalName}": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Automanage/servicePrincipals/default": { "get": { "tags": [ "servicePrincipals" @@ -1300,13 +1300,6 @@ { "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" }, - { - "name": "servicePrincipalName", - "in": "path", - "required": true, - "type": "string", - "description": "Name of the servicePrincipal Name. Only default is supported." - }, { "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" } @@ -1670,13 +1663,13 @@ "x-ms-client-flatten": true, "$ref": "#/definitions/ServicePrincipalProperties", "description": "The Service Principal properties for the subscription" - }, - "allOf": [ - { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource" - } - ] - } + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource" + } + ] }, "ServicePrincipalProperties": { "description": "The Service Principal properties for the subscription.", diff --git a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getServicePrincipal.json b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getServicePrincipal.json index da64d977af09..7269a8ca2db3 100644 --- a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getServicePrincipal.json +++ b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getServicePrincipal.json @@ -1,7 +1,6 @@ { "parameters": { "subscriptionId": "mySubscriptionId", - "servicePrincipalName": "default", "api-version": "2021-04-30-preview" }, "responses": { From 772e803fd2063f7224debd9a2a8cfb4437be919b Mon Sep 17 00:00:00 2001 From: Ilavelan Kanniappan Date: Fri, 4 Feb 2022 18:48:54 -0800 Subject: [PATCH 20/23] Added systemData for ServicePrincipal --- .../preview/2021-04-30-preview/automanage.json | 5 +++++ .../2021-04-30-preview/examples/getServicePrincipal.json | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json index 873475bf4880..ee3414a51596 100644 --- a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json +++ b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json @@ -1663,6 +1663,11 @@ "x-ms-client-flatten": true, "$ref": "#/definitions/ServicePrincipalProperties", "description": "The Service Principal properties for the subscription" + }, + "systemData": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", + "readOnly": true, + "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information." } }, "allOf": [ diff --git a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getServicePrincipal.json b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getServicePrincipal.json index 7269a8ca2db3..1e9b65eb112c 100644 --- a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getServicePrincipal.json +++ b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getServicePrincipal.json @@ -13,6 +13,14 @@ "properties": { "servicePrincipalId": "", "authorizationSet": true + }, + "systemData": { + "createdBy": "SYSTEM", + "createdByType": "User", + "createdAt": "0001-01-01T00:00:00.00Z", + "lastModifiedBy": "SYSTEM", + "lastModifiedByType": "User", + "lastModifiedAt": "0001-01-01T00:00:00.00Z" } } } From d6fe15363d3056f17a75012f6f41de3bd5e6b66a Mon Sep 17 00:00:00 2001 From: Ilavelan Kanniappan Date: Fri, 4 Feb 2022 19:10:49 -0800 Subject: [PATCH 21/23] Added Collection GET for Singleton --- .../2021-04-30-preview/automanage.json | 55 +++++++++++++++++++ .../listServicePrincipalBySubscription.json | 32 +++++++++++ 2 files changed, 87 insertions(+) create mode 100644 specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listServicePrincipalBySubscription.json diff --git a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json index ee3414a51596..01519e677e53 100644 --- a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json +++ b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json @@ -1284,6 +1284,48 @@ ] } }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Automanage/servicePrincipals": { + "get": { + "tags": [ + "servicePrincipals" + ], + "operationId": "ServicePrincipals_ListBySubscription", + "description": "Get the Automanage AAD first party Application Service Principal details for the subscription id.", + "x-ms-examples": { + "Get service principal": { + "$ref": "./examples/listServicePrincipalBySubscription.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Returns the Automanage ADD first party Application Service Principal details for the subscription.", + "schema": { + "$ref": "#/definitions/ServicePrincipalListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ] + } + }, "/subscriptions/{subscriptionId}/providers/Microsoft.Automanage/servicePrincipals/default": { "get": { "tags": [ @@ -1654,6 +1696,19 @@ } } }, + "ServicePrincipalListResult": { + "description": "The list of ServicePrincipals.", + "type": "object", + "properties": { + "value": { + "description": "The list of servicePrincipals.", + "type": "array", + "items": { + "$ref": "#/definitions/ServicePrincipal" + } + } + } + }, "ServicePrincipal": { "description": "The Service Principal Id for the subscription.", "type": "object", diff --git a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listServicePrincipalBySubscription.json b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listServicePrincipalBySubscription.json new file mode 100644 index 000000000000..e40bb7a23223 --- /dev/null +++ b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listServicePrincipalBySubscription.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "mySubscriptionId", + "api-version": "2021-04-30-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "id": "/subscriptions/subscriptionId/providers/Microsoft.Automanage/servicePrincipals/default", + "name": "default", + "type": "Microsoft.Automanage/ConfigurationProfileAssignments", + "properties": { + "servicePrincipalId": "", + "authorizationSet": true + }, + "systemData": { + "createdBy": "SYSTEM", + "createdByType": "User", + "createdAt": "0001-01-01T00:00:00.00Z", + "lastModifiedBy": "SYSTEM", + "lastModifiedByType": "User", + "lastModifiedAt": "0001-01-01T00:00:00.00Z" + } + } + ] + } + } + } +} From 4d2a6bb438323773e8f311df6add132d6bd7c79b Mon Sep 17 00:00:00 2001 From: Ilavelan Kanniappan Date: Fri, 4 Feb 2022 19:21:53 -0800 Subject: [PATCH 22/23] Fixed error and warnings --- .../preview/2021-04-30-preview/automanage.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json index 01519e677e53..03166863c8cb 100644 --- a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json +++ b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json @@ -1292,7 +1292,7 @@ "operationId": "ServicePrincipals_ListBySubscription", "description": "Get the Automanage AAD first party Application Service Principal details for the subscription id.", "x-ms-examples": { - "Get service principal": { + "List service principal by subscription": { "$ref": "./examples/listServicePrincipalBySubscription.json" } }, @@ -1318,6 +1318,9 @@ } } }, + "x-ms-pageable": { + "nextLinkName": null + }, "produces": [ "application/json" ], @@ -1708,7 +1711,7 @@ } } } - }, + }, "ServicePrincipal": { "description": "The Service Principal Id for the subscription.", "type": "object", From c2b9d5b4e39e0f48db0b8315245d8e7013f10c64 Mon Sep 17 00:00:00 2001 From: Ilavelan Kanniappan Date: Fri, 4 Feb 2022 19:26:55 -0800 Subject: [PATCH 23/23] Fixed PrettierCheck error --- .../preview/2021-04-30-preview/automanage.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json index 03166863c8cb..e70cd54f0ca0 100644 --- a/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json +++ b/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/automanage.json @@ -1320,7 +1320,7 @@ }, "x-ms-pageable": { "nextLinkName": null - }, + }, "produces": [ "application/json" ],