Kubernetes credentials API - PUT credentials
Updates an existing Kubernetes credentials configuration.
If a credentials configuration with the specified ID doesn't exist, a new configuration is created.
The request consumes and produces an application/json
payload.
This request is an early adopter release and may be changed in non compatible way.
PUT |
|
Parameters
Parameter | Type | Description | In | Required |
---|---|---|---|---|
id | string |
The ID of the Kubernetes credentials configuration to be updated. |
path | required |
body | KubernetesCredentials |
The JSON body of the request. Contains updated parameters of the Kubernetes credentials configuration. |
body | optional |
The KubernetesCredentials object
Configuration of a Kubernetes credentials.
Element | Type | Description | Required |
---|---|---|---|
metadata | ConfigurationMetadata |
Metadata useful for debugging. |
optional |
id | string |
The ID of the Kubernetes credentials configuration. |
optional |
label | string |
The name of the Kubernetes credentials configuration. Allowed characters are letters, numbers, whitespaces, and the following characters: |
required |
endpointUrl | string |
The URL of the Kubernetes API server. It must be unique within a DESK environment. The URL must valid according to RFC 2396. Leading or trailing whitespaces are not allowed. |
optional |
authToken | string |
The service account bearer token for the Kubernetes API server. Submit your token on creation or update of the configuration. For security reasons, GET requests return this field as If the field is omitted during an update, the old value is used. |
optional |
active | boolean |
The monitoring is enabled ( If not set on creation, the If the field is omitted during an update, the old value is used. |
optional |
endpointStatus | string |
The status of the Kubernetes endpoint. ASSIGNED: The credentials are assigned to an ActiveGate which is responsible for processing. UNASSIGNED: The credentials are not yet assigned to an ActiveGate so there is currently no processing. DISABLED: The credentials have been disabled by the user. FASTCHECK_AUTH_ERROR: The credentials are invalid. FASTCHECK_TLS_ERROR: The endpoint TLS certificate is invalid. FASTCHECK_NO_RESPONSE: The endpoint did not return a result until the timeout was reached. FASTCHECK_INVALID_ENDPOINT: The endpoint URL was invalid. UNKNOWN: An unknown error occured. The endpointStatus element can hold these values. |
optional |
endpointStatusInfo | string |
The detailed status info of the Kubernetes endpoint. |
optional |
The ConfigurationMetadata object
Metadata useful for debugging
Element | Type | Description | Required |
---|---|---|---|
configurationVersions | integer[] |
A Sorted list of the version numbers of the configuration. |
optional |
clusterVersion | string |
DESK server version. |
optional |
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request. See the Example expandable section for working sample request.
{
"id": "KUBERNETES_CLUSTER-CC06304728FC9396",
"label": "K8s credentials - REST example",
"endpointUrl": "https://k8s-api.sample.org",
"authToken": "abcd9876",
"active": true,
"endpointStatus": "ASSIGNED",
"endpointStatusInfo": ""
}
Possible values
Possible values for the endpointStatus element in the KubernetesCredentials object:
- ASSIGNED
- DISABLED
- FASTCHECK_AUTH_ERROR
- FASTCHECK_AUTH_LOCKED
- FASTCHECK_INVALID_ENDPOINT
- FASTCHECK_NO_RESPONSE
- FASTCHECK_TLS_ERROR
- UNASSIGNED
- UNKNOWN
Response codes
Code | Description |
---|---|
201 | Success. The new Kubernetes credentials configuration has been created. The response body contains the ID of the configuration. |
204 | Success. The Kubernetes credentials configuration has been updated. Response doesn't have a body. |
400 | Failed. The input is invalid. |
Response format
The EntityShortRepresentation object
The short representation of a DESK entity.
Element | Type | Description |
---|---|---|
id | string | The ID of the DESK entity. |
name | string | The name of the DESK entity. |
description | string | A short description of the DESK entity. |
{}
Validate payload
We recommend that you validate the payload before submitting it with an actual request. A response code of 204 indicates a valid payload.
The request consumes an application/json
payload.
This request is an early adopter release and may be changed in non compatible way.
POST |
|
Response codes
Code | Description |
---|---|
204 | Validated. The submitted configuration is valid. The response doesn't have a body. |
400 | Failed. The input is invalid. |