ECS.Client.submit_container_state_change(**kwargs)¶Note
This action is only used by the Amazon ECS agent, and it is not intended for use outside of the agent.
Sent to acknowledge that a container changed states.
See also: AWS API Documentation
Request Syntax
response = client.submit_container_state_change(
cluster='string',
task='string',
containerName='string',
runtimeId='string',
status='string',
exitCode=123,
reason='string',
networkBindings=[
{
'bindIP': 'string',
'containerPort': 123,
'hostPort': 123,
'protocol': 'tcp'|'udp',
'containerPortRange': 'string',
'hostPortRange': 'string'
},
]
)
The network bindings of the container.
Details on the network bindings between a container and its host container instance. After a task reaches the RUNNING status, manual and automatic host and container port assignments are visible in the networkBindings section of DescribeTasks API responses.
The IP address that the container is bound to on the container instance.
The port number on the container that's used with the network binding.
The port number on the host that's used with the network binding.
The protocol used for the network binding.
The port number range on the container that's bound to the dynamically mapped host port range.
The following rules apply when you specify a containerPortRange :
bridge network mode or the awsvpc network mode.ecs-init packagehostPortRange . The value of the hostPortRange is set as follows:awsvpc network mode, the hostPort is set to the same value as the containerPort . This is a static mapping strategy.bridge network mode, the Amazon ECS agent finds open host ports from the default ephemeral range and passes it to docker to bind them to the container ports.containerPortRange valid values are between 1 and 65535.You can call DescribeTasks to view the hostPortRange which are the host ports that are bound to the container ports.
The port number range on the host that's used with the network binding. This is assigned is assigned by Docker and delivered by the Amazon ECS agent.
dict
Response Syntax
{
'acknowledgment': 'string'
}
Response Structure
(dict) --
acknowledgment (string) --
Acknowledgement of the state change.
Exceptions
ECS.Client.exceptions.ServerExceptionECS.Client.exceptions.ClientExceptionECS.Client.exceptions.AccessDeniedException