From 83f13e9bba9320199ccd41bff5fedf8d12b90ef9 Mon Sep 17 00:00:00 2001 From: Haitao Chen Date: Mon, 27 Jun 2022 23:27:49 -0700 Subject: [PATCH] aks fleet list credentials api (#19559) * add fleet list credential api * tweaks * fix example filename * fix casing * add resourceId on hubProfile * drop the new field, keep it as internal field * fix duplicate shema error * different name for fleet credential results * use xms-identifier on the array items * prettier fi Co-authored-by: Stephane Erbrech --- .../Fleets_ListCredentialsResult.json | 20 +++++ .../preview/2022-06-02-preview/fleets.json | 76 +++++++++++++++++++ 2 files changed, 96 insertions(+) create mode 100644 specification/containerservice/resource-manager/Microsoft.ContainerService/preview/2022-06-02-preview/examples/Fleets_ListCredentialsResult.json diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/preview/2022-06-02-preview/examples/Fleets_ListCredentialsResult.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/preview/2022-06-02-preview/examples/Fleets_ListCredentialsResult.json new file mode 100644 index 000000000000..8fdb69428fb0 --- /dev/null +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/preview/2022-06-02-preview/examples/Fleets_ListCredentialsResult.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2022-06-02-preview", + "subscriptionId": "subid1", + "resourceGroupName": "rg1", + "fleetName": "fleet" + }, + "responses": { + "200": { + "body": { + "kubeconfigs": [ + { + "name": "credentialName1", + "value": "credentialValue1" + } + ] + } + } + } +} diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/preview/2022-06-02-preview/fleets.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/preview/2022-06-02-preview/fleets.json index b7152395880c..d7ec03f8882c 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/preview/2022-06-02-preview/fleets.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/preview/2022-06-02-preview/fleets.json @@ -511,6 +511,48 @@ } } } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/listCredentials": { + "post": { + "tags": [ + "Fleets" + ], + "operationId": "Fleets_ListCredentials", + "summary": "Lists the user credentials of a Fleet.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/FleetNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/FleetCredentialResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "List Fleet Credentials": { + "$ref": "./examples/Fleets_ListCredentialsResult.json" + } + } + } } }, "definitions": { @@ -686,6 +728,40 @@ "description": "The provisioning state of the last accepted operation." } } + }, + "FleetCredentialResults": { + "type": "object", + "properties": { + "kubeconfigs": { + "type": "array", + "x-ms-identifiers": [ + "name" + ], + "readOnly": true, + "items": { + "$ref": "#/definitions/FleetCredentialResult" + }, + "description": "Base64-encoded Kubernetes configuration file." + } + }, + "description": "The list credential result response." + }, + "FleetCredentialResult": { + "type": "object", + "properties": { + "name": { + "type": "string", + "readOnly": true, + "description": "The name of the credential." + }, + "value": { + "type": "string", + "format": "byte", + "readOnly": true, + "description": "Base64-encoded Kubernetes configuration file." + } + }, + "description": "The credential result response." } }, "parameters": {