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 |
|
Authentication
To execute this request, you need the Write configuration (WriteConfig
) permission assigned to your API token. To learn how to obtain and use it, see Tokens and authentication.
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 |
Body format
The KubernetesCredentials object
Configuration for specific Kubernetes credentials.
Element | Type | Description | Required |
---|---|---|---|
metadata | ConfigurationMetadata | optional | |
id | string |
The ID of the given credentials configuration. |
optional |
active | boolean |
The monitoring is enabled ( If not set on creation, the If the field is omitted during an update, the old value remains unaffected. |
optional |
endpointStatus | string |
The status of the configured 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. FASTCHECK_AUTH_LOCKED: The credentials seem to be locked. UNKNOWN: An unknown error occured. |
optional |
endpointStatusInfo | string |
The detailed status info of the configured endpoint. |
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 Dynatrace environment. The URL must valid according to RFC 2396. Leading or trailing whitespaces are not allowed. |
required |
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 remains unaffected. |
optional |
eventsIntegrationEnabled | boolean |
The monitoring of events is enabled ( If not set on creation, the If the field is omitted during an update, the old value remains unaffected. |
optional |
workloadIntegrationEnabled | boolean |
Workload and cloud application processing is enabled ( |
optional |
prometheusExportersIntegrationEnabled | boolean |
Prometheus exporters integration is enabled ( |
optional |
eventsFieldSelectors | KubernetesEventPattern[] |
Kubernetes event filters based on field-selectors. If set to |
optional |
certificateCheckEnabled | boolean |
The check of SSL certificates is enabled ( If not set on creation, the If the field is omitted during an update, the old value remains unaffected. |
optional |
The KubernetesEventPattern object
Represents a single Kubernetes events field selector (=event filter based on the K8s field selector).
Element | Type | Description | Required |
---|---|---|---|
label | string |
A label of the events field selector. |
required |
fieldSelector | string |
The field selector string (url decoding is applied) when storing it. |
required |
active | boolean |
Whether subscription to this events field selector is enabled (value set to |
required |
The ConfigurationMetadata object
Metadata useful for debugging
Element | Type | Description | Required |
---|---|---|---|
configurationVersions | integer[] |
A Sorted list of the version numbers of the configuration. |
optional |
currentConfigurationVersions | string[] |
A Sorted list of string version numbers of the configuration. |
optional |
clusterVersion | string |
Dynatrace 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",
"eventsFieldSelectors": [
{
"label": "Node events",
"fieldSelector": "involvedObject.kind=Node",
"active": true
}
],
"workloadIntegrationEnabled": true,
"eventsIntegrationEnabled": true,
"authToken": "abcd9876",
"active": true,
"certificateCheckEnabled": true
}
Response
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 body
The EntityShortRepresentation object
The short representation of a Dynatrace entity.
Element | Type | Description |
---|---|---|
id | string | The ID of the Dynatrace entity. |
name | string | The name of the Dynatrace entity. |
description | string | A short description of the Dynatrace entity. |
{
"id": "6a98d7bc-abb9-44f8-ae6a-73e68e71812a",
"name": "Dynatrace entity",
"description": "Dynatrace entity for the REST API example\n"
}
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 |
|
Authentication
To execute this request, you need the Write configuration (WriteConfig
) permission assigned to your API token. To learn how to obtain and use it, see Tokens and authentication.
Response
Response codes
Code | Description |
---|---|
204 | Validated. The submitted configuration is valid. The response doesn't have a body. |
400 | Failed. The input is invalid. |
Response body
A successful request doesn't return any content.