AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

ContainerInstance

import "github.com/aws/aws-sdk-go/service/ecs"

type ContainerInstance struct { AgentConnected *bool `locationName:"agentConnected" type:"boolean"` AgentUpdateStatus *string `locationName:"agentUpdateStatus" type:"string" enum:"AgentUpdateStatus"` Attachments []*Attachment `locationName:"attachments" type:"list"` Attributes []*Attribute `locationName:"attributes" type:"list"` ContainerInstanceArn *string `locationName:"containerInstanceArn" type:"string"` Ec2InstanceId *string `locationName:"ec2InstanceId" type:"string"` PendingTasksCount *int64 `locationName:"pendingTasksCount" type:"integer"` RegisteredAt *time.Time `locationName:"registeredAt" type:"timestamp"` RegisteredResources []*Resource `locationName:"registeredResources" type:"list"` RemainingResources []*Resource `locationName:"remainingResources" type:"list"` RunningTasksCount *int64 `locationName:"runningTasksCount" type:"integer"` Status *string `locationName:"status" type:"string"` Tags []*Tag `locationName:"tags" type:"list"` Version *int64 `locationName:"version" type:"long"` VersionInfo *VersionInfo `locationName:"versionInfo" type:"structure"` }

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

AgentConnected

Type: *bool

This parameter returns true if the agent is connected to Amazon ECS. Registered instances with an agent that may be unhealthy or stopped return false. Only instances connected to an agent can accept placement requests.

AgentUpdateStatus

Type: *string

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

Attachments

An object representing a container instance or task attachment.

Attributes

An attribute is a name-value pair associated with an Amazon ECS object. Attributes enable you to extend the Amazon ECS data model by adding custom metadata to your resources. For more information, see Attributes (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html#attributes) in the Amazon Elastic Container Service Developer Guide.

ContainerInstanceArn

Type: *string

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.

Ec2InstanceId

Type: *string

The EC2 instance ID of the container instance.

PendingTasksCount

Type: *int64

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

RegisteredAt

Type: *time.Time

The Unix timestamp for when the container instance was registered.

RegisteredResources

Describes the resources available for a container instance.

RemainingResources

Describes the resources available for a container instance.

RunningTasksCount

Type: *int64

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

Status

Type: *string

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 (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/container-instance-draining.html) in the Amazon Elastic Container Service Developer Guide.

Tags

The metadata that you apply to a resource to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.

Version

Type: *int64

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.

VersionInfo

The Docker and Amazon ECS container agent version information about a container instance.

Method

GoString

func (s ContainerInstance) GoString() string

GoString returns the string representation

SetAgentConnected

func (s *ContainerInstance) SetAgentConnected(v bool) *ContainerInstance

SetAgentConnected sets the AgentConnected field's value.

SetAgentUpdateStatus

func (s *ContainerInstance) SetAgentUpdateStatus(v string) *ContainerInstance

SetAgentUpdateStatus sets the AgentUpdateStatus field's value.

SetAttachments

func (s *ContainerInstance) SetAttachments(v []*Attachment) *ContainerInstance

SetAttachments sets the Attachments field's value.

SetAttributes

func (s *ContainerInstance) SetAttributes(v []*Attribute) *ContainerInstance

SetAttributes sets the Attributes field's value.

SetContainerInstanceArn

func (s *ContainerInstance) SetContainerInstanceArn(v string) *ContainerInstance

SetContainerInstanceArn sets the ContainerInstanceArn field's value.

SetEc2InstanceId

func (s *ContainerInstance) SetEc2InstanceId(v string) *ContainerInstance

SetEc2InstanceId sets the Ec2InstanceId field's value.

SetPendingTasksCount

func (s *ContainerInstance) SetPendingTasksCount(v int64) *ContainerInstance

SetPendingTasksCount sets the PendingTasksCount field's value.

SetRegisteredAt

func (s *ContainerInstance) SetRegisteredAt(v time.Time) *ContainerInstance

SetRegisteredAt sets the RegisteredAt field's value.

SetRegisteredResources

func (s *ContainerInstance) SetRegisteredResources(v []*Resource) *ContainerInstance

SetRegisteredResources sets the RegisteredResources field's value.

SetRemainingResources

func (s *ContainerInstance) SetRemainingResources(v []*Resource) *ContainerInstance

SetRemainingResources sets the RemainingResources field's value.

SetRunningTasksCount

func (s *ContainerInstance) SetRunningTasksCount(v int64) *ContainerInstance

SetRunningTasksCount sets the RunningTasksCount field's value.

SetStatus

func (s *ContainerInstance) SetStatus(v string) *ContainerInstance

SetStatus sets the Status field's value.

SetTags

func (s *ContainerInstance) SetTags(v []*Tag) *ContainerInstance

SetTags sets the Tags field's value.

SetVersion

func (s *ContainerInstance) SetVersion(v int64) *ContainerInstance

SetVersion sets the Version field's value.

SetVersionInfo

func (s *ContainerInstance) SetVersionInfo(v *VersionInfo) *ContainerInstance

SetVersionInfo sets the VersionInfo field's value.

String

func (s ContainerInstance) String() string

String returns the string representation

On this page: