import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/stacks/adopt-profile"
payload = {
"profile_id": "<string>",
"stack_name": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({profile_id: '<string>', stack_name: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/stacks/adopt-profile', 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/org/clusters/imported/{cluster_id}/stacks/adopt-profile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"profile_id": "<string>",
"stack_name": "<string>"
}
'{
"current_version": 123,
"drift": {
"only_in_version": [
"<string>"
],
"only_on_cluster": [
"<string>"
]
},
"outdated": true,
"profile_version": 123,
"retracked": true,
"stack_name": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Adopt a stack into a stack profile
Records a stack the cluster already runs as a deployment of a stack profile version, so later profile rollouts can track it. Only the profile link is written: nothing is deployed or changed on the cluster. Requires stacks.write; the response lists the add-ons and manifests that differ between the live stack and the profile version.
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/stacks/adopt-profile"
payload = {
"profile_id": "<string>",
"stack_name": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({profile_id: '<string>', stack_name: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/stacks/adopt-profile', 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/org/clusters/imported/{cluster_id}/stacks/adopt-profile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"profile_id": "<string>",
"stack_name": "<string>"
}
'{
"current_version": 123,
"drift": {
"only_in_version": [
"<string>"
],
"only_on_cluster": [
"<string>"
]
},
"outdated": true,
"profile_version": 123,
"retracked": true,
"stack_name": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
Name of the stack already deployed on this cluster.
Non-secret parameter bindings recorded on the deployment and carried forward by a later rollout.
Show child attributes
Show child attributes
Published version the stack is recorded at. Defaults to the profile's current version.
Response
Successful Response
Show child attributes
Show child attributes
True when the stack was already a deployment of this profile and the adoption only moved the recorded version.