Documentation ¶
Index ¶
- Constants
- type AutoScalingData
- type FullTaskDefinition
- type MetricsData
- type SsmStartSessionInput
- type Store
- func (store *Store) DescribeTaskDefinition(tdArn *string) (types.TaskDefinition, error)
- func (store *Store) GetAutoscaling(serviceArn *string) (*AutoScalingData, error)
- func (store *Store) GetLogs(tdArn *string) ([]cloudwatchlogsTypes.OutputLogEvent, error)
- func (store *Store) GetMetrics(cluster, service *string) (*MetricsData, error)
- func (store *Store) ListClusters() ([]types.Cluster, error)
- func (store *Store) ListFullTaskDefinition() (FullTaskDefinition, error)
- func (store *Store) ListServices(clusterName *string) ([]types.Service, error)
- func (store *Store) ListTaskDefinition(name *string) (TaskDefinitionRevision, error)
- func (store *Store) ListTaskDefinitionFamilies() ([]string, error)
- func (store *Store) ListTasks(clusterName, serviceName *string) ([]types.Task, error)
- func (store *Store) RegisterTaskDefinition(input *ecs.RegisterTaskDefinitionInput) (string, int32, error)
- func (store *Store) StartSession(input *SsmStartSessionInput) (*string, error)
- func (store *Store) TerminateSessions(sessionIds []*string) error
- func (store *Store) UpdateService(input *ecs.UpdateServiceInput) (*types.Service, error)
- type TaskDefinitionRevision
Constants ¶
const ( Namespace = "AWS/ECS" CPU = "CPUUtilization" Memory = "MemoryUtilization" )
const ( MaxTaskDefinitionFamily = 50 MaxTaskDefinitionRevision = 20 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AutoScalingData ¶
type AutoScalingData struct { Targets []types.ScalableTarget Policies []types.ScalingPolicy Actions []types.ScheduledAction Activities []types.ScalingActivity }
type FullTaskDefinition ¶
type MetricsData ¶
type SsmStartSessionInput ¶ added in v1.0.25
type Store ¶
func (*Store) DescribeTaskDefinition ¶
func (store *Store) DescribeTaskDefinition(tdArn *string) (types.TaskDefinition, error)
Equivalent to aws ecs describe-task-definition --task-definition ${taskDefinition}
func (*Store) GetAutoscaling ¶ added in v1.0.7
func (store *Store) GetAutoscaling(serviceArn *string) (*AutoScalingData, error)
func (*Store) GetLogs ¶ added in v1.0.11
func (store *Store) GetLogs(tdArn *string) ([]cloudwatchlogsTypes.OutputLogEvent, error)
Get the latest 10 log events from the log stream ¶
aws logs get-log-events \ --log-group-name "$log_group" \ --log-stream-name "$latest_log_stream" \ --limit 10 \ --query "events[*].[timestamp,message]" \ --output table
func (*Store) GetMetrics ¶
func (store *Store) GetMetrics(cluster, service *string) (*MetricsData, error)
Get ECS service metrics(CPU, Memory)
func (*Store) ListClusters ¶
Equivalent to aws ecs list-clusters aws ecs describe-clusters --clusters ${clusters}
func (*Store) ListFullTaskDefinition ¶
func (store *Store) ListFullTaskDefinition() (FullTaskDefinition, error)
Deprecated List all task definition family with revisions for service update form(not support yet)
func (*Store) ListServices ¶
Equivalent to aws ecs list-services --cluster ${cluster} aws ecs describe-services --cluster ${cluster} --services ${service}
func (*Store) ListTaskDefinition ¶
func (store *Store) ListTaskDefinition(name *string) (TaskDefinitionRevision, error)
Equivalent to aws ecs list-task-definitions --family-prefix ${prefix}
func (*Store) ListTaskDefinitionFamilies ¶ added in v1.0.2
Equivalent to aws ecs list-task-definition-families
func (*Store) ListTasks ¶
Equivalent to aws ecs list-tasks --cluster ${cluster} --service ${service} aws ecs describe-tasks --cluster ${cluster} --tasks ${taskID}
func (*Store) RegisterTaskDefinition ¶ added in v1.0.2
func (store *Store) RegisterTaskDefinition(input *ecs.RegisterTaskDefinitionInput) (string, int32, error)
aws ecs register-task-definition --family ${{family}} --... return registered task definition revision
func (*Store) StartSession ¶ added in v1.0.25
func (store *Store) StartSession(input *SsmStartSessionInput) (*string, error)
Equivalent to aws ssm start-session --target ecs:${cluster_id}_${task_id}_${runtime_id} --document-name AWS-StartPortForwardingSession --parameters {"portNumber":["${port}"], "localPortNumber":["${local_port}"]} OR aws ssm start-session --target ecs:${cluster_id}_${task_id}_${runtime_id} --document-name AWS-StartPortForwardingSession --parameters {"portNumber":["${port}"], "localPortNumber":["${local_port}"]}
func (*Store) TerminateSessions ¶ added in v1.0.25
func (*Store) UpdateService ¶
Equivalent to aws ecs update-service --cluster ${cluster} --service ${service} --task-definition ${task-definition} --desired-count ${count} --force-new-deployment
type TaskDefinitionRevision ¶
type TaskDefinitionRevision = []string