updateDaemon
Updates the specified daemon. When you update a daemon, a new deployment is triggered that progressively rolls out the changes to the container instances associated with the daemon's capacity providers. For more information, see Daemon deployments in the Amazon Elastic Container Service Developer Guide.
Amazon ECS drains existing container instances and provisions new instances with the updated daemon. Amazon ECS automatically launches replacement tasks for your services.
Updating a daemon triggers a rolling deployment that drains and replaces container instances. Plan updates during maintenance windows to minimize impact on running services.
ECS Managed Daemons is only supported for Amazon ECS Managed Instances Capacity Providers.
Samples
import aws.sdk.kotlin.services.ecs.model.DaemonDeploymentConfiguration
fun main() {
//sampleStart
// This example updates the my monitoring daemon daemon to use a new daemon task definition revision.
val resp = ecsClient.updateDaemon {
daemonArn = "arn:aws:ecs:us-east-1:123456789012:daemon/my-cluster/my-monitoring-daemon"
daemonTaskDefinitionArn = "arn:aws:ecs:us-east-1:123456789012:daemon-task-definition/monitoring-agent:2"
capacityProviderArns = listOf<String>(
"arn:aws:ecs:us-east-1:123456789012:capacity-provider/my-capacity-provider"
)
deploymentConfiguration = DaemonDeploymentConfiguration {
drainPercent = 10.0.toDouble()
bakeTimeInMinutes = 5
}
}
//sampleEnd
}