import requests
url = "https://platform.ankra.app/api/v1/clusters/{cluster_id}/dns-zone/token-rotation"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/clusters/{cluster_id}/dns-zone/token-rotation', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/clusters/{cluster_id}/dns-zone/token-rotation \
--header 'Authorization: Bearer <token>'{
"success": true,
"fqdn": "<string>",
"state": "<string>",
"rotation_requested_at": "2023-11-07T05:31:56Z",
"previous_token_pending_revocation": true,
"revocation_requested_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Rotate the cluster's DNS token
Asks Ankra to replace the write token the cluster’s external-dns uses to publish into its DNS zone. Ankra mints the replacement within about a minute and republishes the external-dns Secret; the replaced token stays valid until it is revoked, so the cluster keeps publishing meanwhile. Restart external-dns on the cluster so it reads the new Secret, confirm records still publish, then revoke the replaced token. Idempotent while a rotation is pending.
import requests
url = "https://platform.ankra.app/api/v1/clusters/{cluster_id}/dns-zone/token-rotation"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/clusters/{cluster_id}/dns-zone/token-rotation', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/clusters/{cluster_id}/dns-zone/token-rotation \
--header 'Authorization: Bearer <token>'{
"success": true,
"fqdn": "<string>",
"state": "<string>",
"rotation_requested_at": "2023-11-07T05:31:56Z",
"previous_token_pending_revocation": true,
"revocation_requested_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Successful Response
When a rotation was asked for; null once the replacement token is minted and stored, or when none is pending.
True while the token the last rotation replaced is still valid in Avura.
When the replaced token's revoke was asked for; null when none is pending.