ecs

package
v0.0.0-...-c35091c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2017 License: LGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	ClusterArn  string `xml:"clusterArn"`
	ClusterName string `xml:"clusterName"`
	Status      string `xml:"status"`
}

Cluster encapsulates the cluster datatype

See

type Container

type Container struct {
	ContainerArn    string           `xml:"containerArn"`
	ExitCode        int32            `xml:"exitCode"`
	LastStatus      string           `xml:"lastStatus"`
	Name            string           `xml:"name"`
	NetworkBindings []NetworkBinding `xml:"networkBindings>member"`
	Reason          string           `xml:"reason"`
	TaskArn         string           `xml:"taskArn"`
}

Container encapsulates the container data type

type ContainerDefinition

type ContainerDefinition struct {
	Command      []string       `xml:"command>member"`
	Cpu          int32          `xml:"cpu"`
	EntryPoint   []string       `xml:"entryPoint>member"`
	Environment  []KeyValuePair `xml:"environment>member"`
	Essential    bool           `xml:"essential"`
	Image        string         `xml:"image"`
	Links        []string       `xml:"links>member"`
	Memory       int32          `xml:"memory"`
	MountPoints  []MountPoint   `xml:"mountPoints>member"`
	Name         string         `xml:"name"`
	PortMappings []PortMapping  `xml:"portMappings>member"`
	VolumesFrom  []VolumeFrom   `xml:"volumesFrom>member"`
}

ContainerDefinition encapsulates the container definition type Container definitions are used in task definitions to describe the different containers that are launched as part of a task

type ContainerInstance

type ContainerInstance struct {
	AgentConnected       bool       `xml:"agentConnected"`
	ContainerInstanceArn string     `xml:"containerInstanceArn"`
	Ec2InstanceId        string     `xml:"ec2InstanceId"`
	RegisteredResources  []Resource `xml:"registeredResources>member"`
	RemainingResources   []Resource `xml:"remainingResources>member"`
	Status               string     `xml:"status"`
}

ContainerInstance represents n Amazon EC2 instance that is running the Amazon ECS agent and has been registered with a cluster

type ContainerOverride

type ContainerOverride struct {
	Command     []string       `xml:"command>member"`
	Environment []KeyValuePair `xml:"environment>member"`
	Name        string         `xml:"name"`
}

ContainerOverride encapsulates the container override data type

type CreateClusterReq

type CreateClusterReq struct {
	ClusterName string
}

CreateClusterReq encapsulates the createcluster req params

type CreateClusterResp

type CreateClusterResp struct {
	Cluster   Cluster `xml:"CreateClusterResult>cluster"`
	RequestId string  `xml:"ResponseMetadata>RequestId"`
}

CreateClusterResp encapsulates the createcluster response

type DeregisterContainerInstanceReq

type DeregisterContainerInstanceReq struct {
	Cluster string
	// arn:aws:ecs:region:aws_account_id:container-instance/container_instance_UUID.
	ContainerInstance string
	Force             bool
}

DeregisterContainerInstanceReq encapsulates DeregisterContainerInstance request params

type DeregisterContainerInstanceResp

type DeregisterContainerInstanceResp struct {
	ContainerInstance ContainerInstance `xml:"DeregisterContainerInstanceResult>containerInstance"`
	RequestId         string            `xml:"ResponseMetadata>RequestId"`
}

DeregisterContainerInstanceResp encapsulates DeregisterContainerInstance response

type DeregisterTaskDefinitionReq

type DeregisterTaskDefinitionReq struct {
	TaskDefinition string
}

DeregisterTaskDefinitionReq encapsulates DeregisterTaskDefinition req params

type DeregisterTaskDefinitionResp

type DeregisterTaskDefinitionResp struct {
	TaskDefinition TaskDefinition `xml:"DeregisterTaskDefinitionResult>taskDefinition"`
	RequestId      string         `xml:"ResponseMetadata>RequestId"`
}

DeregisterTaskDefinitionResp encapsuates the DeregisterTaskDefinition response

type DescribeClustersReq

type DescribeClustersReq struct {
	Clusters []string
}

DescribeClustersReq encapsulates DescribeClusters req params

type DescribeClustersResp

type DescribeClustersResp struct {
	Clusters  []Cluster `xml:"DescribeClustersResult>clusters>member"`
	Failures  []Failure `xml:"DescribeClustersResult>failures>member"`
	RequestId string    `xml:"ResponseMetadata>RequestId"`
}

DescribeClustersResp encapsuates the DescribeClusters response

type DescribeContainerInstancesReq

type DescribeContainerInstancesReq struct {
	Cluster            string
	ContainerInstances []string
}

DescribeContainerInstancesReq ecapsulates DescribeContainerInstances req params

type DescribeContainerInstancesResp

type DescribeContainerInstancesResp struct {
	ContainerInstances []ContainerInstance `xml:"DescribeContainerInstancesResult>containerInstances>member"`
	Failures           []Failure           `xml:"DescribeContainerInstancesResult>failures>member"`
	RequestId          string              `xml:"ResponseMetadata>RequestId"`
}

DescribeContainerInstancesResp ecapsulates DescribeContainerInstances response

type DescribeTaskDefinitionReq

type DescribeTaskDefinitionReq struct {
	TaskDefinition string
}

DescribeTaskDefinitionReq encapsulates DescribeTaskDefinition req params

type DescribeTaskDefinitionResp

type DescribeTaskDefinitionResp struct {
	TaskDefinition TaskDefinition `xml:"DescribeTaskDefinitionResult>taskDefinition"`
	RequestId      string         `xml:"ResponseMetadata>RequestId"`
}

DescribeTaskDefinitionResp encapsuates the DescribeTaskDefinition response

type DescribeTasksReq

type DescribeTasksReq struct {
	Cluster string
	Tasks   []string
}

DescribeTasksReq encapsulates DescribeTasks req params

type DescribeTasksResp

type DescribeTasksResp struct {
	Tasks     []Task    `xml:"DescribeTasksResult>tasks>member"`
	Failures  []Failure `xml:"DescribeTasksResult>failures>member"`
	RequestId string    `xml:"ResponseMetadata>RequestId"`
}

DescribeTasksResp encapsuates the DescribeTasks response

type DiscoverPollEndpointReq

type DiscoverPollEndpointReq struct {
	ContainerInstance string
}

DiscoverPollEndpointReq encapsulates DiscoverPollEndpoint req params

type DiscoverPollEndpointResp

type DiscoverPollEndpointResp struct {
	Endpoint  string `xml:"DiscoverPollEndpointResult>endpoint"`
	RequestId string `xml:"ResponseMetadata>RequestId"`
}

DiscoverPollEndpointResp encapsuates the DiscoverPollEndpoint response

type ECS

type ECS struct {
	aws.Auth
	aws.Region
}

ECS contains the details of the AWS region to perform operations against.

func New

func New(auth aws.Auth, region aws.Region) *ECS

New creates a new ECS Client.

func (*ECS) CreateCluster

func (e *ECS) CreateCluster(req *CreateClusterReq) (resp *CreateClusterResp, err error)

CreateCluster creates a new Amazon ECS cluster. By default, your account will receive a default cluster when you launch your first container instance

func (*ECS) DeregisterContainerInstance

func (e *ECS) DeregisterContainerInstance(req *DeregisterContainerInstanceReq) (
	resp *DeregisterContainerInstanceResp, err error)

DeregisterContainerInstance deregisters an Amazon ECS container instance from the specified cluster

func (*ECS) DeregisterTaskDefinition

func (e *ECS) DeregisterTaskDefinition(req *DeregisterTaskDefinitionReq) (
	*DeregisterTaskDefinitionResp, error)

DeregisterTaskDefinition deregisters the specified task definition

func (*ECS) DescribeClusters

func (e *ECS) DescribeClusters(req *DescribeClustersReq) (*DescribeClustersResp, error)

DescribeClusters describes one or more of your clusters

func (*ECS) DescribeContainerInstances

func (e *ECS) DescribeContainerInstances(req *DescribeContainerInstancesReq) (
	*DescribeContainerInstancesResp, error)

DescribeContainerInstances describes Amazon EC2 Container Service container instances Returns metadata about registered and remaining resources on each container instance requested

func (*ECS) DescribeTaskDefinition

func (e *ECS) DescribeTaskDefinition(req *DescribeTaskDefinitionReq) (
	*DescribeTaskDefinitionResp, error)

DescribeTaskDefinition describes a task definition

func (*ECS) DescribeTasks

func (e *ECS) DescribeTasks(req *DescribeTasksReq) (*DescribeTasksResp, error)

DescribeTasks describes a task definition

func (*ECS) DiscoverPollEndpoint

func (e *ECS) DiscoverPollEndpoint(req *DiscoverPollEndpointReq) (
	*DiscoverPollEndpointResp, error)

DiscoverPollEndpoint returns an endpoint for the Amazon EC2 Container Service agent to poll for updates

func (*ECS) ListClusters

func (e *ECS) ListClusters(req *ListClustersReq) (
	*ListClustersResp, error)

ListClusters returns a list of existing clusters

func (*ECS) ListContainerInstances

func (e *ECS) ListContainerInstances(req *ListContainerInstancesReq) (
	*ListContainerInstancesResp, error)

ListContainerInstances returns a list of container instances in a specified cluster.

func (*ECS) ListTaskDefinitions

func (e *ECS) ListTaskDefinitions(req *ListTaskDefinitionsReq) (
	*ListTaskDefinitionsResp, error)

ListTaskDefinitions Returns a list of task definitions that are registered to your account.

func (*ECS) ListTasks

func (e *ECS) ListTasks(req *ListTasksReq) (
	*ListTasksResp, error)

ListTasks Returns a list of tasks for a specified cluster. You can filter the results by family name or by a particular container instance with the family and containerInstance parameters.

func (*ECS) RegisterContainerInstance

func (e *ECS) RegisterContainerInstance(req *RegisterContainerInstanceReq) (
	resp *RegisterContainerInstanceResp, err error)

RegisterContainerInstance registers an Amazon EC2 instance into the specified cluster. This instance will become available to place containers on.

func (*ECS) RegisterTaskDefinition

func (e *ECS) RegisterTaskDefinition(req *RegisterTaskDefinitionReq) (
	resp *RegisterTaskDefinitionResp, err error)

RegisterTaskDefinition registers a new task definition from the supplied family and containerDefinitions.

func (*ECS) RunTask

func (e *ECS) RunTask(req *RunTaskReq) (*RunTaskResp, error)

RunTask Start a task using random placement and the default Amazon ECS scheduler. If you want to use your own scheduler or place a task on a specific container instance, use StartTask instead.

func (*ECS) StartTask

func (e *ECS) StartTask(req *StartTaskReq) (*StartTaskResp, error)

StartTask Starts a new task from the specified task definition on the specified container instance or instances. If you want to use the default Amazon ECS scheduler to place your task, use RunTask instead.

func (*ECS) StopTask

func (e *ECS) StopTask(req *StopTaskReq) (*StopTaskResp, error)

StopTask stops a running task

func (*ECS) SubmitContainerStateChange

func (e *ECS) SubmitContainerStateChange(req *SubmitContainerStateChangeReq) (
	*SubmitContainerStateChangeResp, error)

SubmitContainerStateChange is used to acknowledge that a container changed states. Note: This action is only used by the Amazon EC2 Container Service agent, and it is not intended for use outside of the agent.

func (*ECS) SubmitTaskStateChange

func (e *ECS) SubmitTaskStateChange(req *SubmitTaskStateChangeReq) (
	*SubmitTaskStateChangeResp, error)

SubmitTaskStateChange is used to acknowledge that a task changed states. Note: This action is only used by the Amazon EC2 Container Service agent, and it is not intended for use outside of the agent.

type Error

type Error struct {
	// HTTP status code (200, 403, ...)
	StatusCode int
	// ECS error code ("UnsupportedOperation", ...)
	Code string
	// The error type
	Type string
	// The human-oriented error message
	Message   string
	RequestId string `xml:"RequestID"`
}

Error encapsulates an error returned by the AWS ECS API.

See http://goo.gl/VZGuC for more details.

func (*Error) Error

func (err *Error) Error() string

type Failure

type Failure struct {
	Arn    string `xml:"arn"`
	Reason string `xml:"reason"`
}

Failure encapsulates the failure type

type HostVolumeProperties

type HostVolumeProperties struct {
	SourcePath string `xml:"sourcePath"`
}

HostVolumeProperties encapsulates the HostVolumeProperties data type

type KeyValuePair

type KeyValuePair struct {
	Name  string `xml:"name"`
	Value string `xml:"value"`
}

KeyValuePair encapsulates the KeyValuePair data type

type ListClustersReq

type ListClustersReq struct {
	MaxResults int32
	NextToken  string
}

ListClustersReq encapsulates ListClusters req params

type ListClustersResp

type ListClustersResp struct {
	ClusterArns []string `xml:"ListClustersResult>clusterArns>member"`
	NextToken   string   `xml:"ListClustersResult>nextToken"`
	RequestId   string   `xml:"ResponseMetadata>RequestId"`
}

ListClustersResp encapsuates the ListClusters response

type ListContainerInstancesReq

type ListContainerInstancesReq struct {
	Cluster    string
	MaxResults int32
	NextToken  string
}

ListContainerInstancesReq encapsulates ListContainerInstances req params

type ListContainerInstancesResp

type ListContainerInstancesResp struct {
	ContainerInstanceArns []string `xml:"ListContainerInstancesResult>containerInstanceArns>member"`
	NextToken             string   `xml:"ListContainerInstancesResult>nextToken"`
	RequestId             string   `xml:"ResponseMetadata>RequestId"`
}

ListContainerInstancesResp encapsuates the ListContainerInstances response

type ListTaskDefinitionsReq

type ListTaskDefinitionsReq struct {
	FamilyPrefix string
	MaxResults   int32
	NextToken    string
}

ListTaskDefinitionsReq encapsulates ListTaskDefinitions req params

type ListTaskDefinitionsResp

type ListTaskDefinitionsResp struct {
	TaskDefinitionArns []string `xml:"ListTaskDefinitionsResult>taskDefinitionArns>member"`
	NextToken          string   `xml:"ListTaskDefinitionsResult>nextToken"`
	RequestId          string   `xml:"ResponseMetadata>RequestId"`
}

ListTaskDefinitionsResp encapsuates the ListTaskDefinitions response

type ListTasksReq

type ListTasksReq struct {
	Cluster           string
	ContainerInstance string
	Family            string
	MaxResults        int32
	NextToken         string
}

ListTasksReq encapsulates ListTasks req params

type ListTasksResp

type ListTasksResp struct {
	TaskArns  []string `xml:"ListTasksResult>taskArns>member"`
	NextToken string   `xml:"ListTasksResult>nextToken"`
	RequestId string   `xml:"ResponseMetadata>RequestId"`
}

ListTasksResp encapsuates the ListTasks response

type MountPoint

type MountPoint struct {
	ContainerPath string `xml:"containerPath"`
	ReadOnly      bool   `xml:"readOnly"`
	SourceVolume  string `xml:"sourceVolume"`
}

MountPoint encapsulates the MountPoint data type

type NetworkBinding

type NetworkBinding struct {
	BindIp        string `xml:"bindIp"`
	ContainerPort int32  `xml:"containerPort"`
	HostPort      int32  `xml:"hostPort"`
}

NetworkBinding encapsulates the network binding data type

type PortMapping

type PortMapping struct {
	ContainerPort int32 `xml:containerPort`
	HostPort      int32 `xml:hostPort`
}

PortMapping encapsulates the PortMapping data type

type RegisterContainerInstanceReq

type RegisterContainerInstanceReq struct {
	Cluster                           string
	InstanceIdentityDocument          string
	InstanceIdentityDocumentSignature string
	TotalResources                    []Resource
}

RegisterContainerInstanceReq encapsulates RegisterContainerInstance req params

type RegisterContainerInstanceResp

type RegisterContainerInstanceResp struct {
	ContainerInstance ContainerInstance `xml:"RegisterContainerInstanceResult>containerInstance"`
	RequestId         string            `xml:"ResponseMetadata>RequestId"`
}

DeregisterContainerInstanceResp encapsulates RegisterContainerInstance response

type RegisterTaskDefinitionReq

type RegisterTaskDefinitionReq struct {
	Family               string
	ContainerDefinitions []ContainerDefinition
	Volumes              []Volume
}

RegisterTaskDefinitionReq encapsulates RegisterTaskDefinition req params

type RegisterTaskDefinitionResp

type RegisterTaskDefinitionResp struct {
	TaskDefinition TaskDefinition `xml:"RegisterTaskDefinitionResult>taskDefinition"`
	RequestId      string         `xml:"ResponseMetadata>RequestId"`
}

RegisterTaskDefinitionResp encapsulates RegisterTaskDefinition response

type Resource

type Resource struct {
	DoubleValue    float64  `xml:"doubleValue"`
	IntegerValue   int32    `xml:"integerValue"`
	LongValue      int64    `xml:"longValue"`
	Name           string   `xml:"name"`
	StringSetValue []string `xml:"stringSetValue>member"`
	Type           string   `xml:"type"`
}

Resource describes the resources available for a container instance.

type RunTaskReq

type RunTaskReq struct {
	Cluster        string
	Count          int32
	Overrides      TaskOverride
	TaskDefinition string
}

RunTaskReq encapsulates RunTask req params

type RunTaskResp

type RunTaskResp struct {
	Tasks     []Task    `xml:"RunTaskResult>tasks>member"`
	Failures  []Failure `xml:"RunTaskResult>failures>member"`
	RequestId string    `xml:"ResponseMetadata>RequestId"`
}

RunTaskResp encapsuates the RunTask response

type SimpleResp

type SimpleResp struct {
	XMLName   xml.Name
	RequestId string `xml:"ResponseMetadata>RequestId"`
}

SimpleResp is the beic response from most actions.

type StartTaskReq

type StartTaskReq struct {
	Cluster            string
	ContainerInstances []string
	Overrides          TaskOverride
	TaskDefinition     string
}

StartTaskReq encapsulates StartTask req params

type StartTaskResp

type StartTaskResp struct {
	Tasks     []Task    `xml:"StartTaskResult>tasks>member"`
	Failures  []Failure `xml:"StartTaskResult>failures>member"`
	RequestId string    `xml:"ResponseMetadata>RequestId"`
}

StartTaskResp encapsuates the StartTask response

type StopTaskReq

type StopTaskReq struct {
	Cluster string
	Task    string
}

StopTaskReq encapsulates StopTask req params

type StopTaskResp

type StopTaskResp struct {
	Task      Task   `xml:"StopTaskResult>task"`
	RequestId string `xml:"ResponseMetadata>RequestId"`
}

StopTaskResp encapsuates the StopTask response

type SubmitContainerStateChangeReq

type SubmitContainerStateChangeReq struct {
	Cluster         string
	ContainerName   string
	ExitCode        int32
	NetworkBindings []NetworkBinding
	Reason          string
	Status          string
	Task            string
}

SubmitContainerStateChangeReq encapsulates SubmitContainerStateChange req params

type SubmitContainerStateChangeResp

type SubmitContainerStateChangeResp struct {
	Acknowledgment string `xml:"SubmitContainerStateChangeResult>acknowledgment"`
	RequestId      string `xml:"ResponseMetadata>RequestId"`
}

SubmitContainerStateChangeResp encapsuates the SubmitContainerStateChange response

type SubmitTaskStateChangeReq

type SubmitTaskStateChangeReq struct {
	Cluster string
	Reason  string
	Status  string
	Task    string
}

SubmitTaskStateChangeReq encapsulates SubmitTaskStateChange req params

type SubmitTaskStateChangeResp

type SubmitTaskStateChangeResp struct {
	Acknowledgment string `xml:"SubmitTaskStateChangeResult>acknowledgment"`
	RequestId      string `xml:"ResponseMetadata>RequestId"`
}

SubmitTaskStateChangeResp encapsuates the SubmitTaskStateChange response

type Task

type Task struct {
	ClusterArn           string       `xml:"clusterArn"`
	ContainerInstanceArn string       `xml:"containerInstanceArn"`
	Containers           []Container  `xml:"containers>member"`
	DesiredStatus        string       `xml:"desiredStatus"`
	LastStatus           string       `xml:"lastStatus"`
	Overrides            TaskOverride `xml:"overrides"`
	TaskArn              string       `xml:"taskArn"`
	TaskDefinitionArn    string       `xml:"taskDefinitionArn"`
}

Task encapsulates the task data type

type TaskDefinition

type TaskDefinition struct {
	ContainerDefinitions []ContainerDefinition `xml:"containerDefinitions>member"`
	Family               string                `xml:"family"`
	Revision             int32                 `xml:"revision"`
	TaskDefinitionArn    string                `xml:"taskDefinitionArn"`
	Status               string                `xml:"status"`
	Volumes              []Volume              `xml:"volumes>member"`
}

TaskDefinition encapsulates the task definition type

type TaskOverride

type TaskOverride struct {
	ContainerOverrides []ContainerOverride `xml:"containerOverrides>member"`
}

TaskOverride encapsulates the task override data type

type Volume

type Volume struct {
	Host HostVolumeProperties `xml:"host"`
	Name string               `xml:"name"`
}

Volume encapsulates the Volume data type

type VolumeFrom

type VolumeFrom struct {
	ReadOnly        bool   `xml:"readOnly"`
	SourceContainer string `xml:"sourceContainer"`
}

VolumeFrom encapsulates the VolumeFrom data type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL