You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::ECS::Types::ContainerInstance

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-ecs/lib/aws-sdk-ecs/types.rb

Overview

An EC2 instance that is running the Amazon ECS agent and has been registered with a cluster.

Instance Attribute Summary collapse

Instance Attribute Details

#agent_connectedBoolean

This parameter returns true if the agent is actually connected to Amazon ECS. Registered instances with an agent that may be unhealthy or stopped return false, and instances without a connected agent cannot accept placement requests.

Returns:

  • (Boolean)


901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
# File 'gems/aws-sdk-ecs/lib/aws-sdk-ecs/types.rb', line 901

class ContainerInstance < Struct.new(
  :container_instance_arn,
  :ec2_instance_id,
  :version,
  :version_info,
  :remaining_resources,
  :registered_resources,
  :status,
  :agent_connected,
  :running_tasks_count,
  :pending_tasks_count,
  :agent_update_status,
  :attributes,
  :registered_at)
  include Aws::Structure
end

#agent_update_statusString

The status of the most recent agent update. If an update has never been requested, this value is NULL.

Returns:

  • (String)


901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
# File 'gems/aws-sdk-ecs/lib/aws-sdk-ecs/types.rb', line 901

class ContainerInstance < Struct.new(
  :container_instance_arn,
  :ec2_instance_id,
  :version,
  :version_info,
  :remaining_resources,
  :registered_resources,
  :status,
  :agent_connected,
  :running_tasks_count,
  :pending_tasks_count,
  :agent_update_status,
  :attributes,
  :registered_at)
  include Aws::Structure
end

#attributesArray<Types::Attribute>

The attributes set for the container instance, either by the Amazon ECS container agent at instance registration or manually with the PutAttributes operation.

Returns:



901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
# File 'gems/aws-sdk-ecs/lib/aws-sdk-ecs/types.rb', line 901

class ContainerInstance < Struct.new(
  :container_instance_arn,
  :ec2_instance_id,
  :version,
  :version_info,
  :remaining_resources,
  :registered_resources,
  :status,
  :agent_connected,
  :running_tasks_count,
  :pending_tasks_count,
  :agent_update_status,
  :attributes,
  :registered_at)
  include Aws::Structure
end

#container_instance_arnString

The Amazon Resource Name (ARN) of the container instance. The ARN contains the arn:aws:ecs namespace, followed by the region of the container instance, the AWS account ID of the container instance owner, the container-instance namespace, and then the container instance ID. For example, arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID .

Returns:

  • (String)


901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
# File 'gems/aws-sdk-ecs/lib/aws-sdk-ecs/types.rb', line 901

class ContainerInstance < Struct.new(
  :container_instance_arn,
  :ec2_instance_id,
  :version,
  :version_info,
  :remaining_resources,
  :registered_resources,
  :status,
  :agent_connected,
  :running_tasks_count,
  :pending_tasks_count,
  :agent_update_status,
  :attributes,
  :registered_at)
  include Aws::Structure
end

#ec2_instance_idString

The EC2 instance ID of the container instance.

Returns:

  • (String)


901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
# File 'gems/aws-sdk-ecs/lib/aws-sdk-ecs/types.rb', line 901

class ContainerInstance < Struct.new(
  :container_instance_arn,
  :ec2_instance_id,
  :version,
  :version_info,
  :remaining_resources,
  :registered_resources,
  :status,
  :agent_connected,
  :running_tasks_count,
  :pending_tasks_count,
  :agent_update_status,
  :attributes,
  :registered_at)
  include Aws::Structure
end

#pending_tasks_countInteger

The number of tasks on the container instance that are in the PENDING status.

Returns:

  • (Integer)


901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
# File 'gems/aws-sdk-ecs/lib/aws-sdk-ecs/types.rb', line 901

class ContainerInstance < Struct.new(
  :container_instance_arn,
  :ec2_instance_id,
  :version,
  :version_info,
  :remaining_resources,
  :registered_resources,
  :status,
  :agent_connected,
  :running_tasks_count,
  :pending_tasks_count,
  :agent_update_status,
  :attributes,
  :registered_at)
  include Aws::Structure
end

#registered_atTime

The Unix timestamp for when the container instance was registered.

Returns:

  • (Time)


901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
# File 'gems/aws-sdk-ecs/lib/aws-sdk-ecs/types.rb', line 901

class ContainerInstance < Struct.new(
  :container_instance_arn,
  :ec2_instance_id,
  :version,
  :version_info,
  :remaining_resources,
  :registered_resources,
  :status,
  :agent_connected,
  :running_tasks_count,
  :pending_tasks_count,
  :agent_update_status,
  :attributes,
  :registered_at)
  include Aws::Structure
end

#registered_resourcesArray<Types::Resource>

For most resource types, this parameter describes the registered resources on the container instance that are in use by current tasks. For port resource types, this parameter describes the ports that were reserved by the Amazon ECS container agent when it registered the container instance with Amazon ECS.

Returns:



901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
# File 'gems/aws-sdk-ecs/lib/aws-sdk-ecs/types.rb', line 901

class ContainerInstance < Struct.new(
  :container_instance_arn,
  :ec2_instance_id,
  :version,
  :version_info,
  :remaining_resources,
  :registered_resources,
  :status,
  :agent_connected,
  :running_tasks_count,
  :pending_tasks_count,
  :agent_update_status,
  :attributes,
  :registered_at)
  include Aws::Structure
end

#remaining_resourcesArray<Types::Resource>

For most resource types, this parameter describes the remaining resources of the container instance that are available for new tasks. For port resource types, this parameter describes the ports that are reserved by the Amazon ECS container agent and any containers that have reserved port mappings; any port that is not specified here is available for new tasks.

Returns:



901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
# File 'gems/aws-sdk-ecs/lib/aws-sdk-ecs/types.rb', line 901

class ContainerInstance < Struct.new(
  :container_instance_arn,
  :ec2_instance_id,
  :version,
  :version_info,
  :remaining_resources,
  :registered_resources,
  :status,
  :agent_connected,
  :running_tasks_count,
  :pending_tasks_count,
  :agent_update_status,
  :attributes,
  :registered_at)
  include Aws::Structure
end

#running_tasks_countInteger

The number of tasks on the container instance that are in the RUNNING status.

Returns:

  • (Integer)


901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
# File 'gems/aws-sdk-ecs/lib/aws-sdk-ecs/types.rb', line 901

class ContainerInstance < Struct.new(
  :container_instance_arn,
  :ec2_instance_id,
  :version,
  :version_info,
  :remaining_resources,
  :registered_resources,
  :status,
  :agent_connected,
  :running_tasks_count,
  :pending_tasks_count,
  :agent_update_status,
  :attributes,
  :registered_at)
  include Aws::Structure
end

#statusString

The status of the container instance. The valid values are ACTIVE, INACTIVE, or DRAINING. ACTIVE indicates that the container instance can accept tasks. DRAINING indicates that new tasks are not placed on the container instance and any service tasks running on the container instance are removed if possible. For more information, see Container Instance Draining in the Amazon EC2 Container Service Developer Guide.

Returns:

  • (String)


901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
# File 'gems/aws-sdk-ecs/lib/aws-sdk-ecs/types.rb', line 901

class ContainerInstance < Struct.new(
  :container_instance_arn,
  :ec2_instance_id,
  :version,
  :version_info,
  :remaining_resources,
  :registered_resources,
  :status,
  :agent_connected,
  :running_tasks_count,
  :pending_tasks_count,
  :agent_update_status,
  :attributes,
  :registered_at)
  include Aws::Structure
end

#versionInteger

The version counter for the container instance. Every time a container instance experiences a change that triggers a CloudWatch event, the version counter is incremented. If you are replicating your Amazon ECS container instance state with CloudWatch events, you can compare the version of a container instance reported by the Amazon ECS APIs with the version reported in CloudWatch events for the container instance (inside the detail object) to verify that the version in your event stream is current.

Returns:

  • (Integer)


901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
# File 'gems/aws-sdk-ecs/lib/aws-sdk-ecs/types.rb', line 901

class ContainerInstance < Struct.new(
  :container_instance_arn,
  :ec2_instance_id,
  :version,
  :version_info,
  :remaining_resources,
  :registered_resources,
  :status,
  :agent_connected,
  :running_tasks_count,
  :pending_tasks_count,
  :agent_update_status,
  :attributes,
  :registered_at)
  include Aws::Structure
end

#version_infoTypes::VersionInfo

The version information for the Amazon ECS container agent and Docker daemon running on the container instance.

Returns:



901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
# File 'gems/aws-sdk-ecs/lib/aws-sdk-ecs/types.rb', line 901

class ContainerInstance < Struct.new(
  :container_instance_arn,
  :ec2_instance_id,
  :version,
  :version_info,
  :remaining_resources,
  :registered_resources,
  :status,
  :agent_connected,
  :running_tasks_count,
  :pending_tasks_count,
  :agent_update_status,
  :attributes,
  :registered_at)
  include Aws::Structure
end