import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/addons/{addon_name}/settings"
payload = {
"sync_policy": {
"automated": True,
"auto_prune": True,
"self_heal": True,
"sync_options": ["CreateNamespace=true", "ServerSideApply=true"]
},
"sync_window": {
"enabled": False,
"schedule": "<string>",
"duration": "<string>",
"timezone": "UTC"
},
"ignore_differences": [
{
"group": "<string>",
"kind": "<string>",
"name": "<string>",
"namespace": "<string>",
"json_pointers": ["<string>"],
"jq_path_expressions": ["<string>"],
"managed_fields_managers": ["<string>"]
}
],
"retry_policy": {
"limit": 5,
"backoff": {
"duration": "5s",
"factor": 2,
"max_duration": "3m"
}
},
"revision_history_limit": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)