ecs

package
v0.0.41 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 38 Imported by: 5 modules, 7 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ALB

type ALB struct {
	VpcId     string
	Listeners []*elbv2.Listener
	Domain    string
	Rules     map[string][]*elbv2.Rule
	DnsName   string
	// contains filtered or unexported fields
}

ALB struct

func NewALB

func NewALB(loadBalancerName string) (*ALB, error)

func NewALBAndCreate

func NewALBAndCreate(loadBalancerName, ipAddressType string, scheme string, securityGroups []string, subnets []string, lbType string) (*ALB, error)

get the listeners for the loadbalancer

func (*ALB) CreateHTTPSRedirectRule added in v0.0.39

func (a *ALB) CreateHTTPSRedirectRule(ruleType string, listenerArn string, targetGroupArn string, rules []string, priority int64) error

func (*ALB) CreateListener

func (a *ALB) CreateListener(protocol string, port int64, targetGroupArn string) error

func (*ALB) CreateRule

func (a *ALB) CreateRule(ruleType string, listenerArn string, targetGroupArn string, rules []string, priority int64, cognitoAuth service.DeployRuleConditionsCognitoAuth) error

func (*ALB) CreateRuleForAllListeners

func (a *ALB) CreateRuleForAllListeners(ruleType string, targetGroupArn string, rules []string, priority int64) ([]string, error)

func (*ALB) CreateRuleForListeners

func (a *ALB) CreateRuleForListeners(ruleType string, listeners []string, targetGroupArn string, rules []string, priority int64, cognitoAuth service.DeployRuleConditionsCognitoAuth) ([]string, error)

func (*ALB) CreateTargetGroup

func (a *ALB) CreateTargetGroup(serviceName string, d service.Deploy) (*string, error)

func (*ALB) DeleteListener

func (a *ALB) DeleteListener(listenerArn string) error

func (*ALB) DeleteLoadBalancer

func (a *ALB) DeleteLoadBalancer() error

func (*ALB) DeleteRule added in v0.0.39

func (a *ALB) DeleteRule(ruleArn string) error

func (*ALB) DeleteTargetGroup

func (a *ALB) DeleteTargetGroup(targetGroupArn string) error

func (*ALB) FindRule

func (a *ALB) FindRule(listener string, targetGroupArn string, conditionField []string, conditionValue []string) (*string, *string, error)

* FindRule tries to find a matching rule in the Rules map

func (*ALB) GetConditionsForRule added in v0.0.39

func (a *ALB) GetConditionsForRule(ruleArn string) ([]string, []string)

func (*ALB) GetDomain

func (a *ALB) GetDomain() string

func (*ALB) GetDomainUsingCertificate

func (a *ALB) GetDomainUsingCertificate() error

get the domain using certificates

func (*ALB) GetHighestRule

func (a *ALB) GetHighestRule() (int64, error)

func (*ALB) GetListenerArnForProtocol added in v0.0.39

func (a *ALB) GetListenerArnForProtocol(listener string) string

* Gets listeners ARN based on http / https string

func (*ALB) GetListeners

func (a *ALB) GetListeners() error

get the listeners for the loadbalancer

func (*ALB) GetRuleByTargetGroupArnWithAuth added in v0.0.39

func (a *ALB) GetRuleByTargetGroupArnWithAuth(targetGroupArn string) []string

func (*ALB) GetRulesByTargetGroupArn added in v0.0.39

func (a *ALB) GetRulesByTargetGroupArn(targetGroupArn string) []string

func (*ALB) GetRulesForAllListeners

func (a *ALB) GetRulesForAllListeners() error

get rules by listener

func (*ALB) GetTargetGroupArn

func (a *ALB) GetTargetGroupArn(serviceName string) (*string, error)

func (*ALB) ModifyTargetGroupAttributes

func (a *ALB) ModifyTargetGroupAttributes(targetGroupArn string, d service.Deploy) error

func (*ALB) UpdateHealthCheck

func (a *ALB) UpdateHealthCheck(targetGroupArn string, healthCheck service.DeployHealthCheck) error

func (*ALB) UpdateRule added in v0.0.39

func (a *ALB) UpdateRule(targetGroupArn, ruleArn string, ruleType string, rules []string, cognitoAuth service.DeployRuleConditionsCognitoAuth) error

func (*ALB) UpdateRuleToHTTPSRedirect added in v0.0.39

func (a *ALB) UpdateRuleToHTTPSRedirect(targetGroupArn, ruleArn string, ruleType string, rules []string) error

* modify an existing rule to a https redirect

type AppMesh added in v0.0.39

type AppMesh struct {
}

AppMesh struct

type AppMeshHealthCheck added in v0.0.39

type AppMeshHealthCheck struct {
	HealthyThreshold   int64
	IntervalMillis     int64
	Path               string
	Port               int64
	Protocol           string
	TimeoutMillis      int64
	UnhealthyThreshold int64
}

AppMeshHealthCheck is a struct that contains the healthcheck for the appmesh

type AutoScaling

type AutoScaling struct {
}

ECR struct

func (*AutoScaling) CompleteLifecycleAction

func (a *AutoScaling) CompleteLifecycleAction(autoScalingGroupName, instanceId, action, lifecycleHookName, lifecycleToken string) error

func (*AutoScaling) CompletePendingLifecycleAction

func (a *AutoScaling) CompletePendingLifecycleAction(autoScalingGroupName, instanceId, action, lifecycleHookName string) error

func (*AutoScaling) CreateAutoScalingGroup

func (a *AutoScaling) CreateAutoScalingGroup(clusterName string, desiredCapacity int64, maxSize int64, minSize int64, subnets []string) error

func (*AutoScaling) CreateLaunchConfiguration

func (a *AutoScaling) CreateLaunchConfiguration(clusterName string, keyName string, instanceType string, instanceProfile string, securitygroups []string) error

func (*AutoScaling) DeleteAutoScalingGroup

func (a *AutoScaling) DeleteAutoScalingGroup(clusterName string, forceDelete bool) error

func (*AutoScaling) DeleteLaunchConfiguration

func (a *AutoScaling) DeleteLaunchConfiguration(clusterName string) error

func (*AutoScaling) DeleteScalingPolicy added in v0.0.39

func (a *AutoScaling) DeleteScalingPolicy(policyName, resourceId string) error

func (*AutoScaling) DeregisterScalableTarget added in v0.0.39

func (a *AutoScaling) DeregisterScalableTarget(resourceId string) error

func (*AutoScaling) DescribeScalableTargets added in v0.0.39

func (a *AutoScaling) DescribeScalableTargets(resourceIds []string) ([]service.Autoscaling, error)

func (*AutoScaling) DescribeScalingPolicies added in v0.0.39

func (a *AutoScaling) DescribeScalingPolicies(policyNames []string, resourceId string) ([]service.AutoscalingPolicy, error)

func (*AutoScaling) GetAutoScalingGroupByTag

func (a *AutoScaling) GetAutoScalingGroupByTag(clusterName string) (string, error)

func (*AutoScaling) GetClusterNodeDesiredCount

func (a *AutoScaling) GetClusterNodeDesiredCount(autoScalingGroupName string) (int64, int64, int64, error)

func (*AutoScaling) GetLifecycleHookNames

func (a *AutoScaling) GetLifecycleHookNames(autoScalingGroupName, lifecycleHookType string) ([]string, error)

func (*AutoScaling) PutScalingPolicy added in v0.0.39

func (a *AutoScaling) PutScalingPolicy(policyName, resourceId string, cooldown, scalingAdjustment int64) (string, error)

func (*AutoScaling) RegisterScalableTarget added in v0.0.39

func (a *AutoScaling) RegisterScalableTarget(minCapacity, maxCapacity int64, resourceId, roleArn string) error

func (*AutoScaling) ScaleClusterNodes

func (a *AutoScaling) ScaleClusterNodes(autoScalingGroupName string, change int64) error

func (*AutoScaling) WaitForAutoScalingGroupInService

func (a *AutoScaling) WaitForAutoScalingGroupInService(clusterName string) error

func (*AutoScaling) WaitForAutoScalingGroupNotExists

func (a *AutoScaling) WaitForAutoScalingGroupNotExists(clusterName string) error

type AutoScalingIf added in v0.0.39

type AutoScalingIf interface {
	GetAutoScalingGroupByTag(clusterName string) (string, error)
	ScaleClusterNodes(autoScalingGroupName string, change int64) error
}

type CloudWatch

type CloudWatch struct{}

func (*CloudWatch) CreateLogGroup

func (cloudwatch *CloudWatch) CreateLogGroup(clusterName, logGroup string) error

func (*CloudWatch) DeleteAlarms added in v0.0.39

func (c *CloudWatch) DeleteAlarms(alarmNames []string) error

func (*CloudWatch) DeleteLogGroup

func (cloudwatch *CloudWatch) DeleteLogGroup(logGroup string) error

func (*CloudWatch) DescribeAlarms added in v0.0.39

func (c *CloudWatch) DescribeAlarms(alarmNames []string) ([]service.AutoscalingPolicy, error)

func (*CloudWatch) GetLogEventsByTime

func (cloudwatch *CloudWatch) GetLogEventsByTime(logGroup, logStream string, startTime, endTime time.Time, nextToken string) (CloudWatchLog, error)

func (*CloudWatch) PutMetricAlarm added in v0.0.39

func (c *CloudWatch) PutMetricAlarm(serviceName, clusterName, alarmName string, alarmActions []string, alarmDescription string, datapointsToAlarm int64, metricName string, namespace string, period int64, threshold float64, comparisonOperator string, statistic string, evaluationPeriods int64) error

type CloudWatchLog

type CloudWatchLog struct {
	NextBackwardToken string               `json:"nextBackwardToken"`
	NextForwardToken  string               `json:"nextForwardToken"`
	LogEvents         []CloudWatchLogEvent `json:"logEvents"`
}

type CloudWatchLogEvent

type CloudWatchLogEvent struct {
	IngestionTime time.Time `json:"ingestionTime"`
	Message       string    `json:"message"`
	Timestamp     time.Time `json:"timestamp"`
}

type CognitoIdp added in v0.0.39

type CognitoIdp struct {
}

Cognito struct

type ContainerDefinition

type ContainerDefinition struct {
	Name      string `json:"name"`
	Essential bool   `json:"essential"`
}

type ContainerInstance

type ContainerInstance struct {
	ContainerInstanceArn string
	Ec2InstanceId        string
	AvailabilityZone     string
	PendingTasksCount    int64
	RegisteredAt         time.Time
	RegisteredResources  []ContainerInstanceResource
	RemainingResources   []ContainerInstanceResource
	RunningTasksCount    int64
	Status               string
	Version              int64
}

containerInstance

type ContainerInstanceResource

type ContainerInstanceResource struct {
	DoubleValue    float64  `json:"doubleValue"`
	IntegerValue   int64    `json:"integerValue"`
	Name           string   `json:"name"`
	StringSetValue []string `json:"stringSetValue"`
	Type           string   `json:"type"`
}

type EC2 added in v0.0.39

type EC2 struct {
}

EC2 struct

func (*EC2) GetSecurityGroupID added in v0.0.39

func (e *EC2) GetSecurityGroupID(name string) (string, error)

* GetSecurityGroupID retrieves the id from the security group based on the name

func (*EC2) GetSubnetID added in v0.0.39

func (e *EC2) GetSubnetID(name string) (string, error)

* GetSubnetId retrieves the id from the subnet based on the name

type ECR

type ECR struct {
	RepositoryName, RepositoryURI string
}

ECR struct

func (*ECR) CreateRepository

func (e *ECR) CreateRepository() error

Creates ECR repository

func (*ECR) ListImagesWithTag

func (e *ECR) ListImagesWithTag(repositoryName string) (map[string]string, error)

func (*ECR) RepositoryExists added in v0.0.39

func (e *ECR) RepositoryExists(repositoryName string) (bool, error)

type ECS

type ECS struct {
	ClusterName    string
	ServiceName    string
	IamRoleArn     string
	TaskDefinition *ecs.RegisterTaskDefinitionInput
	TaskDefArn     *string
	TargetGroupArn *string
}

ECS struct

func (*ECS) ConvertResourceToFir

func (e *ECS) ConvertResourceToFir(cir []ContainerInstanceResource) (FreeInstanceResource, error)

func (*ECS) ConvertResourceToRir

func (e *ECS) ConvertResourceToRir(cir []ContainerInstanceResource) (RegisteredInstanceResource, error)

func (*ECS) CreateCluster

func (e *ECS) CreateCluster(clusterName string) (*string, error)

create cluster

func (*ECS) CreateService

func (e *ECS) CreateService(d service.Deploy) error

create service

func (*ECS) CreateTaskDefinition

func (e *ECS) CreateTaskDefinition(d service.Deploy, secrets map[string]string) (*string, error)

func (*ECS) CreateTaskDefinitionInput added in v0.0.39

func (e *ECS) CreateTaskDefinitionInput(d service.Deploy, secrets map[string]string, accountId string) error

Creates ECS repository

func (*ECS) DeleteCluster

func (e *ECS) DeleteCluster(clusterName string) error

delete cluster

func (*ECS) DeleteKeyPair

func (e *ECS) DeleteKeyPair(keyName string) error

func (*ECS) DeleteService

func (e *ECS) DeleteService(clusterName, serviceName string) error

delete ECS service

func (*ECS) DescribeContainerInstances

func (e *ECS) DescribeContainerInstances(clusterName string, containerInstances []string) ([]ContainerInstance, error)

describe container instances

func (*ECS) DescribeService

func (e *ECS) DescribeService(clusterName string, serviceName string, showEvents bool, showTasks bool, showStoppedTasks bool) (service.RunningService, error)

describe services

func (*ECS) DescribeServices

func (e *ECS) DescribeServices(clusterName string, serviceNames []*string, showEvents bool, showTasks bool, showStoppedTasks bool) ([]service.RunningService, error)

func (*ECS) DescribeServicesWithOptions added in v0.0.39

func (e *ECS) DescribeServicesWithOptions(clusterName string, serviceNames []*string, showEvents bool, showTasks bool, showStoppedTasks bool, options map[string]string) ([]service.RunningService, error)

func (*ECS) DescribeTaskDefinition

func (e *ECS) DescribeTaskDefinition(taskDefinitionNameOrArn string) (TaskDefinition, error)

func (*ECS) DescribeTasks

func (e *ECS) DescribeTasks(clusterName string, tasks []*string) ([]service.RunningTask, error)

func (*ECS) DrainNode

func (e *ECS) DrainNode(clusterName, instance string) error

func (*ECS) GetClusterNameByInstanceId

func (e *ECS) GetClusterNameByInstanceId(instance string) (string, error)

func (*ECS) GetContainerInstanceArnByInstanceId

func (e *ECS) GetContainerInstanceArnByInstanceId(clusterName, instanceId string) (string, error)

func (*ECS) GetContainerLimits

func (e *ECS) GetContainerLimits(d service.Deploy) (int64, int64, int64, int64)

func (*ECS) GetECSAMI

func (e *ECS) GetECSAMI() (string, error)

func (*ECS) GetInstanceResources added in v0.0.39

func (e *ECS) GetInstanceResources(clusterName string) ([]FreeInstanceResource, []RegisteredInstanceResource, error)

func (*ECS) GetPubKeyFromPrivateKey

func (e *ECS) GetPubKeyFromPrivateKey(privateKey string) ([]byte, error)

func (*ECS) GetTaskDefinition

func (e *ECS) GetTaskDefinition(clusterName, serviceName string) (string, error)

func (*ECS) ImportKeyPair

func (e *ECS) ImportKeyPair(keyName string, publicKey []byte) error

func (*ECS) IsEqualContainerLimits

func (e *ECS) IsEqualContainerLimits(d1 service.Deploy, d2 service.Deploy) bool

func (*ECS) LaunchWaitForDrainedNode

func (e *ECS) LaunchWaitForDrainedNode(clusterName, containerInstanceArn, instanceId, autoScalingGroupName, lifecycleHookName, lifecycleHookToken string) error

func (*ECS) LaunchWaitUntilServicesStable

func (e *ECS) LaunchWaitUntilServicesStable(dd, ddLast *service.DynamoDeployment, notification integrations.Notification) error

func (*ECS) ListContainerInstances

func (e *ECS) ListContainerInstances(clusterName string) ([]string, error)

func (*ECS) ListServices

func (e *ECS) ListServices(clusterName string) ([]*string, error)

list services

func (*ECS) ListTasks

func (e *ECS) ListTasks(clusterName, name, desiredStatus, filterBy string) ([]*string, error)

list tasks

func (*ECS) ManualScaleService

func (e *ECS) ManualScaleService(clusterName, serviceName string, desiredCount int64) error

manual scale ECS service

func (*ECS) Rollback

func (e *ECS) Rollback(clusterName, serviceName string) error

func (*ECS) RunTask

func (e *ECS) RunTask(clusterName, taskDefinition string, runTask service.RunTask, d service.Deploy) (string, error)

run one-off task

func (*ECS) ServiceExists

func (e *ECS) ServiceExists(serviceName string) (bool, error)

check whether service exists

func (*ECS) UpdateService

func (e *ECS) UpdateService(serviceName string, taskDefArn *string, d service.Deploy) (*string, error)

Update ECS service

func (*ECS) WaitUntilServicesInactive

func (e *ECS) WaitUntilServicesInactive(clusterName, serviceName string) error

wait until service is inactive

func (*ECS) WaitUntilServicesStable

func (e *ECS) WaitUntilServicesStable(clusterName, serviceName string, maxWaitMinutes int) error

wait until service is stable

type ECSIf added in v0.0.39

type ECSIf interface {
	GetInstanceResources(clusterName string) ([]FreeInstanceResource, []RegisteredInstanceResource, error)
}

type EcsTaskMetadata added in v0.0.39

type EcsTaskMetadata struct {
	Cluster       string                         `json:"Cluster"`
	TaskARN       string                         `json:"TaskARN"`
	Family        string                         `json:"Family"`
	Revision      string                         `json:"Revision"`
	DesiredStatus string                         `json:"DesiredStatus"`
	KnownStatus   string                         `json:"KnownStatus"`
	Containers    []EcsTaskMetadataItemContainer `json:"Containers"`
}

task metadata

type EcsTaskMetadataItemContainer added in v0.0.39

type EcsTaskMetadataItemContainer struct {
	DockerId      string                                 `json:"DockerId"`
	DockerName    string                                 `json:"DockerName"`
	Name          string                                 `json:"Name"`
	Image         string                                 `json:"Image"`
	ImageID       string                                 `json:"ImageID"`
	Labels        map[string]string                      `json:"Labels"`
	DesiredStatus string                                 `json:"DesiredStatus"`
	KnownStatus   string                                 `json:"KnownStatus"`
	CreatedAt     time.Time                              `json:"CreatedAt"`
	StartedAt     time.Time                              `json:"CreatedAt"`
	Limits        EcsTaskMetadataItemContainerLimits     `json:"Limits"`
	Type          string                                 `json:"Type"`
	Networks      []EcsTaskMetadataItemContainerNetworks `json:"Networks"`
}

type EcsTaskMetadataItemContainerLimits added in v0.0.39

type EcsTaskMetadataItemContainerLimits struct {
	CPU    int64 `json:"CPU"`
	Memory int64 `json:"Memory"`
}

type EcsTaskMetadataItemContainerNetworks added in v0.0.39

type EcsTaskMetadataItemContainerNetworks struct {
	NetworkMode   string   `json:"NetworkMode"`
	Ipv4Addresses []string `json:"Ipv4Addresses"`
}

type EcsVersionInfo

type EcsVersionInfo struct {
	AgentHash     string `json:"agentHash"`
	AgentVersion  string `json:"agentVersion"`
	DockerVersion string `json:"dockerVersion"`
}

version info

type FreeInstanceResource

type FreeInstanceResource struct {
	InstanceId       string
	AvailabilityZone string
	Status           string
	FreeMemory       int64
	FreeCpu          int64
}

free instance resource

type IAM

type IAM struct {
	AccountId string
	// contains filtered or unexported fields
}

IAM struct

func (*IAM) AddRoleToInstanceProfile

func (e *IAM) AddRoleToInstanceProfile(instanceProfileName, roleName string) error

func (*IAM) AssumeRole

func (e *IAM) AssumeRole(roleArn, roleSessionName, prevCreds string) (*credentials.Credentials, string, error)

func (*IAM) AttachRolePolicy

func (e *IAM) AttachRolePolicy(roleName, policyArn string) error

func (*IAM) CreateInstanceProfile

func (e *IAM) CreateInstanceProfile(instanceProfileName string) error

func (*IAM) CreateRole

func (e *IAM) CreateRole(roleName, assumePolicyDocument string) (*string, error)

func (*IAM) CreateRoleWithPermissionBoundary added in v0.0.39

func (e *IAM) CreateRoleWithPermissionBoundary(roleName, assumePolicyDocument, permissionBoundaryARN string) (*string, error)

func (*IAM) DeleteInstanceProfile

func (e *IAM) DeleteInstanceProfile(instanceProfileName string) error

func (*IAM) DeleteRole

func (e *IAM) DeleteRole(roleName string) error

func (*IAM) DeleteRolePolicy

func (e *IAM) DeleteRolePolicy(roleName, policyName string) error

func (*IAM) GetAccountId

func (e *IAM) GetAccountId() error

func (*IAM) GetEC2IAMTrust

func (e *IAM) GetEC2IAMTrust() string

func (*IAM) GetEcsAppAutoscalingIAMTrust added in v0.0.39

func (e *IAM) GetEcsAppAutoscalingIAMTrust() string

func (*IAM) GetEcsServiceIAMTrust

func (e *IAM) GetEcsServiceIAMTrust() string

func (*IAM) GetEcsServicePolicy

func (e *IAM) GetEcsServicePolicy() string

func (*IAM) GetEcsTaskIAMTrust

func (e *IAM) GetEcsTaskIAMTrust() string

func (*IAM) PutRolePolicy

func (e *IAM) PutRolePolicy(roleName, policyName, policy string) error

func (*IAM) RemoveRoleFromInstanceProfile

func (e *IAM) RemoveRoleFromInstanceProfile(instanceProfileName, roleName string) error

func (*IAM) RoleExists

func (e *IAM) RoleExists(roleName string) (*string, error)

func (*IAM) WaitUntilInstanceProfileExists

func (e *IAM) WaitUntilInstanceProfileExists(instanceProfileName string) error

type Parameter

type Parameter struct {
	Arn     string `json:"arn"`
	Name    string `json:"name"`
	Type    string `json:"type"`
	Value   string `json:"value"`
	Version int64  `json:"version"`
}

parameter type

type Paramstore

type Paramstore struct {
	Parameters      map[string]Parameter
	SsmAssumingRole *ssm.SSM
}

Paramstore struct

func (*Paramstore) AssumeRole

func (p *Paramstore) AssumeRole(roleArn, roleSessionName, prevCreds string) (string, error)

func (*Paramstore) Bootstrap

func (p *Paramstore) Bootstrap(serviceName, prefix string, environment string, parameters []service.DeployServiceParameter) error

func (*Paramstore) DeleteParameter

func (p *Paramstore) DeleteParameter(serviceName, parameter string) error

func (*Paramstore) GetParameterValue

func (p *Paramstore) GetParameterValue(name string) (*string, error)

func (*Paramstore) GetParameters

func (p *Paramstore) GetParameters(prefix string, withDecryption bool) error

func (*Paramstore) GetParamstoreIAMPolicy

func (p *Paramstore) GetParamstoreIAMPolicy(path string) string

func (*Paramstore) GetPrefix

func (p *Paramstore) GetPrefix() string

func (*Paramstore) GetPrefixForService

func (p *Paramstore) GetPrefixForService(serviceName string) string

func (*Paramstore) IsEnabled

func (p *Paramstore) IsEnabled() bool

func (*Paramstore) PutParameter

func (p *Paramstore) PutParameter(serviceName string, parameter service.DeployServiceParameter) (*int64, error)

func (*Paramstore) RetrieveKeys

func (p *Paramstore) RetrieveKeys() error

type RegisteredInstanceResource

type RegisteredInstanceResource struct {
	InstanceId       string
	RegisteredMemory int64
	RegisteredCpu    int64
}

registered instance resource

type SNSPayload

type SNSPayload struct {
	Message          string `json:"Message"`
	MessageId        string `json:"MessageId"`
	Signature        string `json:"Signature"`
	SignatureVersion string `json:"SignatureVersion"`
	SigningCertURL   string `json:"SigningCertURL"`
	SubscribeURL     string `json:"SubscribeURL"`
	Subject          string `json:"Subject"`
	Timestamp        string `json:"Timestamp"`
	Token            string `json:"Token"`
	TopicArn         string `json:"TopicArn"`
	Type             string `json:"Type" binding:"required"`
	UnsubscribeURL   string `json:"UnsubscribeURL"`
}

SNS payload

type SNSPayloadEcs

type SNSPayloadEcs struct {
	Version    string              `json:"version"`
	Id         string              `json:"id"`
	DetailType string              `json:"detail-type" binding:"required"`
	Source     string              `json:"source"`
	Account    string              `json:"account"`
	Time       string              `json:"time"`
	Region     string              `json:"region"`
	Resources  []string            `json:"resources"`
	Detail     SNSPayloadEcsDetail `json:"detail"`
}

ECS SNS Event

type SNSPayloadEcsDetail

type SNSPayloadEcsDetail struct {
	ClusterArn           string                          `json:"clusterArn"`
	ContainerInstanceArn string                          `json:"containerInstanceArn"`
	Ec2InstanceId        string                          `json:"ec2InstanceId"`
	RegisteredResources  []ContainerInstanceResource     `json:"registeredResources"`
	RemainingResources   []ContainerInstanceResource     `json:"remainingResources"`
	Status               string                          `json:"status"`
	Version              int64                           `json:"version"`
	VersionInfo          EcsVersionInfo                  `json:"versionInfo"`
	UpdatedAt            string                          `json:"updatedAt"`
	RegisteredAt         string                          `json:"registeredAt"`
	Attributes           []SNSPayloadEcsDetailAttributes `json:"attributes"`
}

type SNSPayloadEcsDetailAttributes

type SNSPayloadEcsDetailAttributes struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type SNSPayloadGeneric

type SNSPayloadGeneric struct {
	Version    string `json:"version"`
	Id         string `json:"id"`
	DetailType string `json:"detail-type" binding:"required"`
}

generic payload (to check detail type)

type SNSPayloadLifecycle

type SNSPayloadLifecycle struct {
	Version    string                    `json:"version"`
	Id         string                    `json:"id"`
	DetailType string                    `json:"detail-type" binding:"required"`
	Source     string                    `json:"source"`
	Account    string                    `json:"account"`
	Time       string                    `json:"time"`
	Region     string                    `json:"region"`
	Resources  []string                  `json:"resources"`
	Detail     SNSPayloadLifecycleDetail `json:"detail"`
}

lifecycle event

type SNSPayloadLifecycleDetail

type SNSPayloadLifecycleDetail struct {
	LifecycleActionToken string `json:"LifecycleActionToken"`
	AutoScalingGroupName string `json:"AutoScalingGroupName"`
	LifecycleHookName    string `json:"LifecycleHookName"`
	EC2InstanceId        string `json:"EC2InstanceId"`
	LifecycleTransition  string `json:"LifecycleTransition"`
}

type ServiceDiscovery added in v0.0.39

type ServiceDiscovery struct {
}

ECR struct

type TaskDefinition

type TaskDefinition struct {
	Family               string                `json:"family"`
	Revision             int64                 `json:"revision"`
	ExecutionRoleArn     string                `json:"executionRole"`
	ContainerDefinitions []ContainerDefinition `json:"containerDefinitions"`
}

Task definition and Container definition

Jump to

Keyboard shortcuts

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