From 866e2be2d5f190a89138e92acb1f373d493762ec Mon Sep 17 00:00:00 2001 From: Qingqing Zheng Date: Fri, 27 Jul 2018 13:00:50 -0700 Subject: [PATCH 1/3] add new credential api to swagger --- ...edClustersListClusterCredentialResult.json | 20 +++ .../stable/2018-03-31/managedClusters.json | 121 +++++++++++++++++- 2 files changed, 140 insertions(+), 1 deletion(-) create mode 100644 specification/containerservices/resource-manager/Microsoft.ContainerService/stable/2018-03-31/examples/ManagedClustersListClusterCredentialResult.json diff --git a/specification/containerservices/resource-manager/Microsoft.ContainerService/stable/2018-03-31/examples/ManagedClustersListClusterCredentialResult.json b/specification/containerservices/resource-manager/Microsoft.ContainerService/stable/2018-03-31/examples/ManagedClustersListClusterCredentialResult.json new file mode 100644 index 000000000000..f8f9b5f7380d --- /dev/null +++ b/specification/containerservices/resource-manager/Microsoft.ContainerService/stable/2018-03-31/examples/ManagedClustersListClusterCredentialResult.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2018-03-31", + "subscriptionId": "subid1", + "resourceGroupName": "rg1", + "resourceName": "clustername1" + }, + "responses": { + "200": { + "body": { + "values": [ + { + "name": "credentialName1", + "value": "credentialValue1" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/containerservices/resource-manager/Microsoft.ContainerService/stable/2018-03-31/managedClusters.json b/specification/containerservices/resource-manager/Microsoft.ContainerService/stable/2018-03-31/managedClusters.json index 374873f52428..c1cea105ae58 100644 --- a/specification/containerservices/resource-manager/Microsoft.ContainerService/stable/2018-03-31/managedClusters.json +++ b/specification/containerservices/resource-manager/Microsoft.ContainerService/stable/2018-03-31/managedClusters.json @@ -231,6 +231,96 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential": { + "post": { + "tags": [ + "ManagedClusters" + ], + "operationId": "ManagedClusters_list_clusteradmin_credential", + "summary": "Gets clusteradmin credential of a managed cluster.", + "description": "Gets clusteradmin credential of the managed cluster with a specified resource group and name.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "resourceName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the managed cluster resource." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/CredentialResults" + } + } + }, + "x-ms-examples": { + "Get Managed Cluster": { + "$ref": "./examples/ManagedClustersListClusterCredentialResult.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential": { + "post": { + "tags": [ + "ManagedClusters" + ], + "operationId": "ManagedClusters_list_clusteruser_credential", + "summary": "Gets clusteruser credential of a managed cluster.", + "description": "Gets clusteruser credential of the managed cluster with a specified resource group and name.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "resourceName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the managed cluster resource." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/CredentialResults" + } + } + }, + "x-ms-examples": { + "Get Managed Cluster": { + "$ref": "./examples/ManagedClustersListClusterCredentialResult.json" + } + } + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}": { "get": { "tags": [ @@ -1311,6 +1401,35 @@ "modelAsString": true }, "description": "OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux." + }, + "CredentialResults":{ + "properties": { + "values": { + "type" : "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/CredentialResult" + } + }, + "description": "The list of credential result." + }, + "description": "The list of credential result response." + }, + "CredentialResult": { + "type": "object", + "properties": { + "name":{ + "type": "string", + "readOnly": true, + "description": "The name of the credential." + }, + "value": { + "type": "string", + "readOnly": true, + "description": "The value of the credential." + } + }, + "description": "The credential result response." } }, "parameters": { @@ -1331,4 +1450,4 @@ "x-ms-parameter-location": "client" } } -} +} \ No newline at end of file From 517a1784732e80a50493149918336dbc9316c8c5 Mon Sep 17 00:00:00 2001 From: Qingqing Zheng Date: Fri, 27 Jul 2018 13:02:23 -0700 Subject: [PATCH 2/3] add new line at end of files --- .../examples/ManagedClustersListClusterCredentialResult.json | 2 +- .../stable/2018-03-31/managedClusters.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/containerservices/resource-manager/Microsoft.ContainerService/stable/2018-03-31/examples/ManagedClustersListClusterCredentialResult.json b/specification/containerservices/resource-manager/Microsoft.ContainerService/stable/2018-03-31/examples/ManagedClustersListClusterCredentialResult.json index f8f9b5f7380d..65915ca79949 100644 --- a/specification/containerservices/resource-manager/Microsoft.ContainerService/stable/2018-03-31/examples/ManagedClustersListClusterCredentialResult.json +++ b/specification/containerservices/resource-manager/Microsoft.ContainerService/stable/2018-03-31/examples/ManagedClustersListClusterCredentialResult.json @@ -17,4 +17,4 @@ } } } -} \ No newline at end of file +} diff --git a/specification/containerservices/resource-manager/Microsoft.ContainerService/stable/2018-03-31/managedClusters.json b/specification/containerservices/resource-manager/Microsoft.ContainerService/stable/2018-03-31/managedClusters.json index c1cea105ae58..ed7e44840cc4 100644 --- a/specification/containerservices/resource-manager/Microsoft.ContainerService/stable/2018-03-31/managedClusters.json +++ b/specification/containerservices/resource-manager/Microsoft.ContainerService/stable/2018-03-31/managedClusters.json @@ -1450,4 +1450,4 @@ "x-ms-parameter-location": "client" } } -} \ No newline at end of file +} From ddc68a8949630bf9901fa4480f9a63e2cfe2a22f Mon Sep 17 00:00:00 2001 From: Qingqing Zheng Date: Mon, 30 Jul 2018 09:17:49 -0700 Subject: [PATCH 3/3] rename operationId --- .../stable/2018-03-31/managedClusters.json | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/specification/containerservices/resource-manager/Microsoft.ContainerService/stable/2018-03-31/managedClusters.json b/specification/containerservices/resource-manager/Microsoft.ContainerService/stable/2018-03-31/managedClusters.json index ed7e44840cc4..50501f4bfca5 100644 --- a/specification/containerservices/resource-manager/Microsoft.ContainerService/stable/2018-03-31/managedClusters.json +++ b/specification/containerservices/resource-manager/Microsoft.ContainerService/stable/2018-03-31/managedClusters.json @@ -236,7 +236,7 @@ "tags": [ "ManagedClusters" ], - "operationId": "ManagedClusters_list_clusteradmin_credential", + "operationId": "ManagedClusters_ListClusterAdminCredentials", "summary": "Gets clusteradmin credential of a managed cluster.", "description": "Gets clusteradmin credential of the managed cluster with a specified resource group and name.", "parameters": [ @@ -281,7 +281,7 @@ "tags": [ "ManagedClusters" ], - "operationId": "ManagedClusters_list_clusteruser_credential", + "operationId": "ManagedClusters_ListClusterUserCredentials", "summary": "Gets clusteruser credential of a managed cluster.", "description": "Gets clusteruser credential of the managed cluster with a specified resource group and name.", "parameters": [ @@ -1410,8 +1410,7 @@ "items": { "$ref": "#/definitions/CredentialResult" } - }, - "description": "The list of credential result." + } }, "description": "The list of credential result response." },