Skip to content

Commit

Permalink
aks fleet list credentials api (#19559)
Browse files Browse the repository at this point in the history
* 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 <stephane.erbrech@gmail.com>
  • Loading branch information
haitch and serbrech authored Jun 28, 2022
1 parent 1a9ea93 commit 83f13e9
Show file tree
Hide file tree
Showing 2 changed files with 96 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down

0 comments on commit 83f13e9

Please sign in to comment.