ecs

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildConsoleURLForService added in v0.0.7

func BuildConsoleURLForService(cluster, service string) string

BuildConsoleURLForService builds the console url for a service

func CreateNewTaskWithEnvironment added in v0.0.7

func CreateNewTaskWithEnvironment(existingTask *ecs.TaskDefinition, env []*ecs.KeyValuePair) (*ecs.TaskDefinition, error)

CreateNewTaskWithEnvironment registers a new task, based on the passed task, but with new environment.

func CreateScheduledTask added in v0.1.6

func CreateScheduledTask(cluster, service, taskSuffix, scheduleExpression, command string) error

CreateScheduledTask creates a scheduled task in an ECS cluster with the specified paramters

func DeployTaskToService added in v0.0.7

func DeployTaskToService(cluster, service string, task *ecs.TaskDefinition) (*ecs.Service, error)

DeployTaskToService deploys a given task definition to a cluster/service

func FindRoleByName added in v0.1.6

func FindRoleByName(name string) (*iam.Role, error)

FindRoleByName paginates through roles and returns any found that match the name string

func FindService added in v0.0.7

func FindService(cluster, service string) (*ecs.Service, error)

FindService finds a service struct by name

func GetAllLogs added in v0.1.9

func GetAllLogs(region string, params *cloudwatchlogs.GetLogEventsInput) ([]string, error)

GetAllLogs retrieves the entire log history

func GetAllTasksByDefinition added in v0.1.9

func GetAllTasksByDefinition(cluster string, def *ecs.TaskDefinition, status string) ([]*ecs.Task, error)

GetAllTasksByDefinition gets the tasks that have run recently for a cluster and service

func GetAllTasksByDefinitionStatus added in v0.1.9

func GetAllTasksByDefinitionStatus(cluster string, def *ecs.TaskDefinition, status *string) ([]*ecs.Task, error)

GetAllTasksByDefinitionStatus gets all of the tasks of a certain status for a task definition

func GetClusterInstances added in v0.1.4

func GetClusterInstances(cluster string) ([]string, error)

GetClusterInstances returns the container instances of a cluster by id

func GetClusterNames

func GetClusterNames() ([]string, error)

GetClusterNames returns a slice of strings representing cluster names

func GetContainerInstances

func GetContainerInstances(cluster string, service string) ([]string, error)

GetContainerInstances returns the container instances of a cluster

func GetCurrentTaskDefinition added in v0.0.6

func GetCurrentTaskDefinition(cluster, service string) (*ecs.TaskDefinition, error)

GetCurrentTaskDefinition returns a service's current task definition

func GetDeployedEssentialContainer added in v0.0.6

func GetDeployedEssentialContainer(cluster, service string) (*ecs.ContainerDefinition, error)

GetDeployedEssentialContainer gets the currently deployed "essential" container definition of a cluster service

func GetEssentialContainer added in v0.0.6

func GetEssentialContainer(task *ecs.TaskDefinition) (*ecs.ContainerDefinition, error)

GetEssentialContainer returns the essential container

func GetLogs added in v0.0.14

func GetLogs(cluster, service, status string) error

GetLogs returns cloudwatch logs for a specific set of log streams matching a pattern within a log group and region

func GetTaskDefinition added in v0.1.7

func GetTaskDefinition(arn string) (*ecs.TaskDefinition, error)

GetTaskDefinition returns a task definition by arn

func GetTaskIDFromArn added in v0.1.9

func GetTaskIDFromArn(arn string) string

GetTaskIDFromArn returns the last part of an arn for an ecs task

func GetTaskLogs added in v0.1.7

func GetTaskLogs(def *ecs.TaskDefinition, taskID string) error

GetTaskLogs prints logs to stdout

func KeyPairsToString added in v0.0.7

func KeyPairsToString(kv []*ecs.KeyValuePair) string

KeyPairsToString takes a list of key pairs... and prints them into a multiline block

func ListLogEvents added in v0.0.14

func ListLogEvents(group, name, region string) error

ListLogEvents accepts a single group and stream name and prints the cloudwatch logs to stdout

func ListServices added in v0.0.10

func ListServices(cluster string) ([]string, error)

ListServices lists services for a cluster by plain name

func RunTaskWithCommand added in v0.1.4

func RunTaskWithCommand(cluster, service, command string) (*ecs.RunTaskOutput, error)

RunTaskWithCommand runs a one-off task with a command override.

func ScaleService added in v0.0.11

func ScaleService(cluster, service string, desiredCount int) (*ecs.Service, error)

ScaleService sets the desired count of a service

func StringToKeyPairs added in v0.0.7

func StringToKeyPairs(input string) ([]*ecs.KeyValuePair, error)

StringToKeyPairs takes a string, and turns it back into an array of key pairs

func TaskExitCode added in v0.1.7

func TaskExitCode(task *ecs.Task) (*int64, error)

TaskExitCode will tell you if the exit code of a task

func UpdateAgent added in v0.1.4

func UpdateAgent(cluster, containerInstanceARN string) error

UpdateAgent will update the agents for all instances in a cluster

func ValidateCluster

func ValidateCluster(cluster string) error

ValidateCluster returns an error if the cluster is not found

Types

This section is empty.

Jump to

Keyboard shortcuts

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