Documentation
¶
Index ¶
- Variables
- type AccountSetting
- type AttachmentStateChange
- type Attribute
- type AutoScalingGroupProvider
- type AutoScalingGroupProviderUpdate
- type AwsvpcConfiguration
- type Backend
- type CapacityProvider
- type CapacityProviderStrategyItem
- type Cluster
- type ClusterSetting
- type Container
- type ContainerDefinition
- type ContainerDependency
- type ContainerInstance
- type ContainerOverride
- type ContainerStateChangeItem
- type CreateCapacityProviderInput
- type CreateClusterInput
- type CreateDaemonInput
- type CreateExpressGatewayServiceInput
- type CreateServiceInput
- type CreateTaskSetInput
- type Daemon
- type DaemonAlarmConfiguration
- type DaemonContainerDefinition
- type DaemonDeployment
- type DaemonDeploymentConfiguration
- type DaemonRevision
- type DaemonTaskDefinition
- type DaemonVolume
- type Deployment
- type DeploymentAlarms
- type DeploymentCircuitBreaker
- type DeploymentConfiguration
- type DeploymentController
- type EFSAuthorizationConfig
- type EFSVolumeConfiguration
- type ELBTarget
- type ELBv2TargetRegistrar
- type EnvironmentFile
- type EphemeralStorage
- type ExecuteCommandOutput
- type ExpressGatewayContainer
- type ExpressGatewayRepositoryCredentials
- type ExpressGatewayScalingTarget
- type ExpressGatewayService
- type ExpressGatewayServiceAwsLogsConfiguration
- type ExpressGatewayServiceConfiguration
- type ExpressGatewayServiceNetworkConfiguration
- type ExpressGatewayServiceStatus
- type Failure
- type FirelensConfiguration
- type Handler
- func (h *Handler) ChaosOperations() []string
- func (h *Handler) ChaosRegions() []string
- func (h *Handler) ChaosServiceName() string
- func (h *Handler) ExecuteFISAction(_ context.Context, action service.FISActionExecution) error
- func (h *Handler) ExtractOperation(c *echo.Context) string
- func (h *Handler) ExtractResource(c *echo.Context) string
- func (h *Handler) FISActions() []service.FISActionDefinition
- func (h *Handler) GetSupportedOperations() []string
- func (h *Handler) Handler() echo.HandlerFunc
- func (h *Handler) MatchPriority() int
- func (h *Handler) Name() string
- func (h *Handler) Purge(ctx context.Context, cutoff time.Time)
- func (h *Handler) Reset()
- func (h *Handler) Restore(ctx context.Context, data []byte) error
- func (h *Handler) RouteMatcher() service.Matcher
- func (h *Handler) Snapshot(ctx context.Context) []byte
- type HealthCheck
- type HostVolumeProperties
- type InMemoryBackend
- func (b *InMemoryBackend) AddAccountSettingInternal(_ string, setting *AccountSetting)
- func (b *InMemoryBackend) AddAttributeInternal(cluster string, attr *Attribute)
- func (b *InMemoryBackend) AddCapacityProviderInternal(cp *CapacityProvider)
- func (b *InMemoryBackend) AddServiceDeploymentInternal(sd *ServiceDeployment)
- func (b *InMemoryBackend) ContinueServiceDeployment(serviceDeploymentArn, hookID, action string) (*ServiceDeployment, error)
- func (b *InMemoryBackend) CountRunningTasksForService(clusterName, serviceName string) int
- func (b *InMemoryBackend) CreateCapacityProvider(input CreateCapacityProviderInput) (*CapacityProvider, error)
- func (b *InMemoryBackend) CreateCluster(input CreateClusterInput) (*Cluster, error)
- func (b *InMemoryBackend) CreateDaemon(input CreateDaemonInput) (*Daemon, error)
- func (b *InMemoryBackend) CreateExpressGatewayService(input CreateExpressGatewayServiceInput) (*ExpressGatewayService, error)
- func (b *InMemoryBackend) CreateService(input CreateServiceInput) (*Service, error)
- func (b *InMemoryBackend) CreateTaskSet(input CreateTaskSetInput) (*TaskSet, error)
- func (b *InMemoryBackend) DeleteAccountSetting(name, principalArn string) (*AccountSetting, error)
- func (b *InMemoryBackend) DeleteAttributes(cluster string, attrs []Attribute) ([]Attribute, error)
- func (b *InMemoryBackend) DeleteCapacityProvider(nameOrArn string) (*CapacityProvider, error)
- func (b *InMemoryBackend) DeleteCluster(clusterName string) (*Cluster, error)
- func (b *InMemoryBackend) DeleteDaemon(daemonArn string) (*Daemon, error)
- func (b *InMemoryBackend) DeleteDaemonTaskDefinition(familyOrArn string) (*DaemonTaskDefinition, error)
- func (b *InMemoryBackend) DeleteExpressGatewayService(serviceArn string) (*ExpressGatewayService, error)
- func (b *InMemoryBackend) DeleteService(cluster, serviceName string) (*Service, error)
- func (b *InMemoryBackend) DeleteTaskDefinitions(taskDefinitionArns []string) ([]TaskDefinition, []Failure, error)
- func (b *InMemoryBackend) DeleteTaskSet(cluster, service, taskSet string) (*TaskSet, error)
- func (b *InMemoryBackend) DeregisterContainerInstance(cluster, containerInstance string, force bool) (*ContainerInstance, error)
- func (b *InMemoryBackend) DeregisterTaskDefinition(taskDefinitionArn string) (*TaskDefinition, error)
- func (b *InMemoryBackend) DescribeCapacityProviders(nameOrArns []string, cluster string) ([]CapacityProvider, []Failure, error)
- func (b *InMemoryBackend) DescribeClusters(clusterNames []string) ([]Cluster, []Failure, error)
- func (b *InMemoryBackend) DescribeContainerInstances(cluster string, containerInstances []string) ([]ContainerInstance, []Failure, error)
- func (b *InMemoryBackend) DescribeDaemon(daemonArn string) (*Daemon, error)
- func (b *InMemoryBackend) DescribeDaemonDeployments(arns []string) ([]DaemonDeployment, []Failure, error)
- func (b *InMemoryBackend) DescribeDaemonRevisions(arns []string) ([]DaemonRevision, []Failure, error)
- func (b *InMemoryBackend) DescribeDaemonTaskDefinition(familyOrArn string) (*DaemonTaskDefinition, error)
- func (b *InMemoryBackend) DescribeExpressGatewayService(serviceArn string) (*ExpressGatewayService, error)
- func (b *InMemoryBackend) DescribeServiceDeployments(serviceDeploymentArns []string) ([]ServiceDeployment, []Failure, error)
- func (b *InMemoryBackend) DescribeServiceRevisions(arns []string) ([]ServiceRevision, []Failure)
- func (b *InMemoryBackend) DescribeServices(cluster string, serviceNames []string) ([]Service, []Failure, error)
- func (b *InMemoryBackend) DescribeTaskDefinition(familyOrArn string) (*TaskDefinition, error)
- func (b *InMemoryBackend) DescribeTaskSets(cluster, service string, taskSets []string) ([]TaskSet, error)
- func (b *InMemoryBackend) DescribeTasks(cluster string, taskArns []string) ([]Task, []Failure, error)
- func (b *InMemoryBackend) DiscoverPollEndpoint() (string, string, string)
- func (b *InMemoryBackend) ExecuteCommand(cluster, task, container, command string, interactive bool) (*ExecuteCommandOutput, error)
- func (b *InMemoryBackend) GetRegion() string
- func (b *InMemoryBackend) GetTaskProtection(cluster string, taskArns []string) ([]TaskProtection, []Failure, error)
- func (b *InMemoryBackend) ListAccountSettings(name, principalArn string) ([]AccountSetting, error)
- func (b *InMemoryBackend) ListAttributes(cluster, targetType, attributeName, targetID string) ([]Attribute, error)
- func (b *InMemoryBackend) ListClusters() ([]Cluster, error)
- func (b *InMemoryBackend) ListContainerInstances(cluster, status string) ([]string, error)
- func (b *InMemoryBackend) ListDaemonDeployments(input ListDaemonDeploymentsInput) ([]DaemonDeployment, error)
- func (b *InMemoryBackend) ListDaemonTaskDefinitions(input ListDaemonTaskDefinitionsInput) ([]DaemonTaskDefinition, error)
- func (b *InMemoryBackend) ListDaemons(input ListDaemonsInput) ([]Daemon, error)
- func (b *InMemoryBackend) ListServiceDeployments(cluster, service string) ([]string, error)
- func (b *InMemoryBackend) ListServices(cluster, launchType, schedulingStrategy string) ([]string, error)
- func (b *InMemoryBackend) ListServicesByNamespace(cluster, namespace string) ([]string, error)
- func (b *InMemoryBackend) ListTagsForResource(resourceArn string) ([]Tag, error)
- func (b *InMemoryBackend) ListTaskDefinitionFamilies(familyPrefix, status string) ([]string, error)
- func (b *InMemoryBackend) ListTaskDefinitions(familyPrefix string) ([]string, error)
- func (b *InMemoryBackend) ListTaskDefinitionsFiltered(input ListTaskDefinitionsInput) ([]string, error)
- func (b *InMemoryBackend) ListTasks(cluster string) ([]string, error)
- func (b *InMemoryBackend) ListTasksFiltered(input ListTasksInput) ([]string, error)
- func (b *InMemoryBackend) Purge(_ context.Context, cutoff time.Time)
- func (b *InMemoryBackend) PutAccountSetting(name, value, principalArn string) (*AccountSetting, error)
- func (b *InMemoryBackend) PutAccountSettingDefault(name, value string) (*AccountSetting, error)
- func (b *InMemoryBackend) PutAttributes(cluster string, attrs []Attribute) ([]Attribute, error)
- func (b *InMemoryBackend) PutClusterCapacityProviders(cluster string, capacityProviders []string, ...) (*Cluster, error)
- func (b *InMemoryBackend) RegisterClusterDeleteHook(fn func(clusterName string))
- func (b *InMemoryBackend) RegisterContainerInstance(cluster, ec2InstanceID string) (*ContainerInstance, error)
- func (b *InMemoryBackend) RegisterDaemonTaskDefinition(input RegisterDaemonTaskDefinitionInput) (*DaemonTaskDefinition, error)
- func (b *InMemoryBackend) RegisterTaskDefinition(input RegisterTaskDefinitionInput) (*TaskDefinition, error)
- func (b *InMemoryBackend) Reset()
- func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
- func (b *InMemoryBackend) RunTask(input RunTaskInput) ([]Task, error)
- func (b *InMemoryBackend) SFNRunTask(_ context.Context, input map[string]any) (any, error)
- func (b *InMemoryBackend) SetELBv2Registrar(r ELBv2TargetRegistrar)
- func (b *InMemoryBackend) SetStartDelay(d time.Duration)
- func (b *InMemoryBackend) SetStopDelay(d time.Duration)
- func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
- func (b *InMemoryBackend) StartTask(input StartTaskInput) ([]Task, error)
- func (b *InMemoryBackend) StartTaskForService(clusterName, serviceName, taskDefinitionArn string) error
- func (b *InMemoryBackend) StopOldestServiceTask(clusterName, serviceName string) error
- func (b *InMemoryBackend) StopServiceDeployment(serviceDeploymentArn string) (*ServiceDeployment, error)
- func (b *InMemoryBackend) StopTask(cluster, taskArn, reason string) (*Task, error)
- func (b *InMemoryBackend) SubmitAttachmentStateChanges(cluster string, attachments []AttachmentStateChange) error
- func (b *InMemoryBackend) SubmitContainerStateChange(input SubmitContainerStateChangeInput) error
- func (b *InMemoryBackend) SubmitTaskStateChange(input SubmitTaskStateChangeInput) error
- func (b *InMemoryBackend) TagResource(resourceArn string, tags []Tag) error
- func (b *InMemoryBackend) TaggedResources() []TaggedEntry
- func (b *InMemoryBackend) UntagResource(resourceArn string, tagKeys []string) error
- func (b *InMemoryBackend) UpdateCapacityProvider(input UpdateCapacityProviderInput) (*CapacityProvider, error)
- func (b *InMemoryBackend) UpdateCluster(input UpdateClusterInput) (*Cluster, error)
- func (b *InMemoryBackend) UpdateClusterSettings(cluster string, settings []ClusterSetting) (*Cluster, error)
- func (b *InMemoryBackend) UpdateContainerAgent(cluster, containerInstance string) (*ContainerInstance, error)
- func (b *InMemoryBackend) UpdateContainerInstancesState(cluster string, containerInstances []string, status string) ([]ContainerInstance, error)
- func (b *InMemoryBackend) UpdateDaemon(input UpdateDaemonInput) (*Daemon, error)
- func (b *InMemoryBackend) UpdateExpressGatewayService(input UpdateExpressGatewayServiceInput) (*ExpressGatewayService, error)
- func (b *InMemoryBackend) UpdateService(input UpdateServiceInput) (*Service, error)
- func (b *InMemoryBackend) UpdateServicePrimaryTaskSet(cluster, service, primaryTaskSet string) (*TaskSet, error)
- func (b *InMemoryBackend) UpdateTaskProtection(cluster string, taskArns []string, protectionEnabled bool, ...) ([]TaskProtection, []Failure, error)
- func (b *InMemoryBackend) UpdateTaskSet(cluster, service, taskSet string, scale TaskSetScale) (*TaskSet, error)
- type InferenceAccelerator
- type IngressPathSummary
- type Janitor
- type KeyValuePair
- type ListDaemonDeploymentsInput
- type ListDaemonTaskDefinitionsInput
- type ListDaemonsInput
- type ListTaskDefinitionsInput
- type ListTasksInput
- type LoadBalancer
- type LogConfiguration
- type ManagedScaling
- type MountPoint
- type NetworkBinding
- type NetworkConfiguration
- type NetworkInterface
- type PlacementConstraint
- type PlacementStrategy
- type PortMapping
- type Provider
- type Reconciler
- type RegisterDaemonTaskDefinitionInput
- type RegisterTaskDefinitionInput
- type RepositoryCredentials
- type ResourceRequirement
- type RunTaskInput
- type RuntimePlatform
- type SecretOption
- type SecretReference
- type Service
- type ServiceConnectClientAlias
- type ServiceConnectConfiguration
- type ServiceConnectService
- type ServiceDeployment
- type ServiceRegistry
- type ServiceRevision
- type Session
- type Snapshottable
- type StartTaskInput
- type SubmitContainerStateChangeInput
- type SubmitTaskStateChangeInput
- type Tag
- type TaggedEntry
- type Task
- type TaskAttachment
- type TaskDefinition
- type TaskOverride
- type TaskProtection
- type TaskRunner
- type TaskSet
- type TaskSetScale
- type UpdateCapacityProviderInput
- type UpdateClusterInput
- type UpdateDaemonInput
- type UpdateExpressGatewayServiceInput
- type UpdateServiceInput
- type Volume
- type VolumeFrom
Constants ¶
This section is empty.
Variables ¶
var ( // ErrDaemonNotFound is returned when a daemon does not exist. This mirrors // types.DaemonNotFoundException in aws-sdk-go-v2/service/ecs. ErrDaemonNotFound = awserr.New("DaemonNotFoundException", awserr.ErrNotFound) // ErrDaemonNotActive is returned when attempting to update a daemon that is // not ACTIVE. This mirrors types.DaemonNotActiveException. ErrDaemonNotActive = awserr.New("DaemonNotActiveException", awserr.ErrConflict) // ErrDaemonTaskDefinitionNotFound is returned when a daemon task definition // does not exist. Amazon ECS does not model a dedicated NotFound exception // shape for daemon task definitions; it uses the generic ClientException // (mirrors real DescribeTaskDefinition / DeregisterTaskDefinition behavior). ErrDaemonTaskDefinitionNotFound = awserr.New("ClientException", awserr.ErrNotFound) // ErrDaemonAlreadyExists is returned when a daemon with the same name // already exists in the cluster. Amazon ECS does not model a dedicated // AlreadyExists exception for daemons; it uses the generic ResourceInUseException. ErrDaemonAlreadyExists = awserr.New("ResourceInUseException", awserr.ErrAlreadyExists) )
var ( // ErrClusterNotFound is returned when a cluster does not exist. ErrClusterNotFound = awserr.New("ClusterNotFoundException", awserr.ErrNotFound) // ErrClusterAlreadyExists is returned when a cluster already exists. ErrClusterAlreadyExists = awserr.New("ClusterAlreadyExistsException", awserr.ErrAlreadyExists) // ErrTaskDefinitionNotFound is returned when a task definition does not exist. ErrTaskDefinitionNotFound = awserr.New("TaskDefinitionNotFoundException", awserr.ErrNotFound) // ErrServiceNotFound is returned when a service does not exist. ErrServiceNotFound = awserr.New("ServiceNotFoundException", awserr.ErrNotFound) // ErrServiceAlreadyExists is returned when a service already exists. ErrServiceAlreadyExists = awserr.New("ServiceAlreadyExistsException", awserr.ErrAlreadyExists) // ErrTaskNotFound is returned when a task does not exist. ErrTaskNotFound = awserr.New("TaskNotFoundException", awserr.ErrNotFound) // ErrInvalidParameter is returned when a required parameter is missing or invalid. ErrInvalidParameter = awserr.New("InvalidParameterException", awserr.ErrInvalidParameter) // ErrClient is returned when a request is structurally invalid in a way that // AWS ECS reports as a ClientException (for example, malformed container // definitions or an unsupported network mode / launch-type combination). ErrClient = awserr.New("ClientException", awserr.ErrInvalidParameter) )
var ErrAccountSettingNotFound = awserr.New("AccountSettingNotFoundException", awserr.ErrNotFound)
ErrAccountSettingNotFound is returned when an account setting does not exist.
var ErrCapacityProviderAlreadyExists = awserr.New( "CapacityProviderAlreadyExistsException", awserr.ErrAlreadyExists, )
ErrCapacityProviderAlreadyExists is returned when a capacity provider already exists.
var ErrCapacityProviderNotFound = awserr.New( "CapacityProviderNotFoundException", awserr.ErrNotFound, )
ErrCapacityProviderNotFound is returned when a capacity provider does not exist.
var ErrContainerInstanceNotFound = awserr.New( "ContainerInstanceNotFoundException", awserr.ErrNotFound, )
ErrContainerInstanceNotFound is returned when a container instance does not exist.
var ErrExpressGatewayServiceAlreadyExists = awserr.New( "ExpressGatewayServiceAlreadyExistsException", awserr.ErrAlreadyExists, )
ErrExpressGatewayServiceAlreadyExists is returned when an express gateway service already exists.
var ErrExpressGatewayServiceNotFound = awserr.New( "ExpressGatewayServiceNotFoundException", awserr.ErrNotFound, )
ErrExpressGatewayServiceNotFound is returned when an express gateway service does not exist.
var ErrNilAppContext = errors.New("AppContext is required")
ErrNilAppContext is returned when Provider.Init is called with a nil AppContext.
var ErrServiceDeploymentNotFound = awserr.New( "ServiceDeploymentNotFoundException", awserr.ErrNotFound, )
ErrServiceDeploymentNotFound is returned when a service deployment does not exist.
var ErrTaskSetNotFound = awserr.New("TaskSetNotFoundException", awserr.ErrNotFound)
ErrTaskSetNotFound is returned when a task set does not exist.
Functions ¶
This section is empty.
Types ¶
type AccountSetting ¶
type AccountSetting struct {
Name string `json:"name"`
Value string `json:"value"`
PrincipalArn string `json:"principalArn,omitempty"`
}
AccountSetting represents an ECS account setting for a principal.
type AttachmentStateChange ¶
type AttachmentStateChange struct {
AttachmentArn string `json:"attachmentArn"`
Status string `json:"status"`
}
AttachmentStateChange reports a status transition for a single task attachment (e.g. an ENI), identified by the attachment ARN previously handed out by ECS.
type Attribute ¶
type Attribute struct {
Name string `json:"name"`
Value string `json:"value,omitempty"`
TargetID string `json:"targetId,omitempty"`
TargetType string `json:"targetType,omitempty"`
}
Attribute represents a custom ECS resource attribute.
type AutoScalingGroupProvider ¶
type AutoScalingGroupProvider struct {
AutoScalingGroupArn string `json:"autoScalingGroupArn"`
ManagedScaling *ManagedScaling `json:"managedScaling,omitempty"`
ManagedTerminationProtection string `json:"managedTerminationProtection,omitempty"`
ManagedDraining string `json:"managedDraining,omitempty"`
}
AutoScalingGroupProvider configures an ASG-backed capacity provider.
type AutoScalingGroupProviderUpdate ¶ added in v1.2.0
type AutoScalingGroupProviderUpdate struct {
ManagedScaling *ManagedScaling
ManagedTerminationProtection string
ManagedDraining string
}
AutoScalingGroupProviderUpdate holds the mutable subset of AutoScalingGroupProvider that UpdateCapacityProvider can change. Unlike AutoScalingGroupProvider (used at creation time), it has no AutoScalingGroupArn: the ASG a capacity provider wraps cannot be swapped after creation, matching the real UpdateCapacityProviderRequest's AutoScalingGroupProviderUpdate shape.
type AwsvpcConfiguration ¶
type AwsvpcConfiguration struct {
AssignPublicIP string `json:"assignPublicIp,omitempty"`
Subnets []string `json:"subnets"`
SecurityGroups []string `json:"securityGroups,omitempty"`
}
AwsvpcConfiguration holds awsvpc mode network settings.
type Backend ¶
type Backend interface {
CreateCluster(input CreateClusterInput) (*Cluster, error)
ListClusters() ([]Cluster, error)
DescribeClusters(clusterNames []string) ([]Cluster, []Failure, error)
DeleteCluster(clusterName string) (*Cluster, error)
RegisterTaskDefinition(input RegisterTaskDefinitionInput) (*TaskDefinition, error)
DescribeTaskDefinition(family string) (*TaskDefinition, error)
DeregisterTaskDefinition(taskDefinitionArn string) (*TaskDefinition, error)
ListTaskDefinitions(familyPrefix string) ([]string, error)
ListTaskDefinitionsFiltered(input ListTaskDefinitionsInput) ([]string, error)
DeleteTaskDefinitions(taskDefinitionArns []string) ([]TaskDefinition, []Failure, error)
CreateService(input CreateServiceInput) (*Service, error)
DescribeServices(cluster string, serviceNames []string) ([]Service, []Failure, error)
UpdateService(input UpdateServiceInput) (*Service, error)
DeleteService(cluster, serviceName string) (*Service, error)
ListServices(cluster, launchType, schedulingStrategy string) ([]string, error)
RunTask(input RunTaskInput) ([]Task, error)
DescribeTasks(cluster string, taskArns []string) ([]Task, []Failure, error)
StopTask(cluster, taskArn, reason string) (*Task, error)
ListTasks(cluster string) ([]string, error)
ListTasksFiltered(input ListTasksInput) ([]string, error)
RegisterContainerInstance(cluster, ec2InstanceID string) (*ContainerInstance, error)
DeregisterContainerInstance(
cluster, containerInstance string,
force bool,
) (*ContainerInstance, error)
DescribeContainerInstances(
cluster string,
containerInstances []string,
) ([]ContainerInstance, []Failure, error)
ListContainerInstances(cluster, status string) ([]string, error)
UpdateContainerInstancesState(
cluster string,
containerInstances []string,
status string,
) ([]ContainerInstance, error)
CreateTaskSet(input CreateTaskSetInput) (*TaskSet, error)
DeleteTaskSet(cluster, service, taskSet string) (*TaskSet, error)
DescribeTaskSets(cluster, service string, taskSets []string) ([]TaskSet, error)
UpdateTaskSet(cluster, service, taskSet string, scale TaskSetScale) (*TaskSet, error)
UpdateServicePrimaryTaskSet(cluster, service, primaryTaskSet string) (*TaskSet, error)
ExecuteCommand(
cluster, task, container, command string,
interactive bool,
) (*ExecuteCommandOutput, error)
CreateCapacityProvider(input CreateCapacityProviderInput) (*CapacityProvider, error)
DeleteCapacityProvider(nameOrArn string) (*CapacityProvider, error)
DescribeCapacityProviders(nameOrArns []string, cluster string) ([]CapacityProvider, []Failure, error)
DeleteAccountSetting(name, principalArn string) (*AccountSetting, error)
ListAccountSettings(name, principalArn string) ([]AccountSetting, error)
PutAccountSetting(name, value, principalArn string) (*AccountSetting, error)
PutAccountSettingDefault(name, value string) (*AccountSetting, error)
DeleteAttributes(cluster string, attrs []Attribute) ([]Attribute, error)
ListAttributes(cluster, targetType, attributeName, targetID string) ([]Attribute, error)
PutAttributes(cluster string, attrs []Attribute) ([]Attribute, error)
PutClusterCapacityProviders(
cluster string,
capacityProviders []string,
defaultCapacityProviderStrategy []CapacityProviderStrategyItem,
) (*Cluster, error)
UpdateClusterSettings(cluster string, settings []ClusterSetting) (*Cluster, error)
UpdateContainerAgent(cluster, containerInstance string) (*ContainerInstance, error)
UpdateCluster(input UpdateClusterInput) (*Cluster, error)
UpdateCapacityProvider(input UpdateCapacityProviderInput) (*CapacityProvider, error)
ListTaskDefinitionFamilies(familyPrefix, status string) ([]string, error)
StartTask(input StartTaskInput) ([]Task, error)
ListServicesByNamespace(cluster, namespace string) ([]string, error)
TagResource(resourceArn string, tags []Tag) error
UntagResource(resourceArn string, tagKeys []string) error
ListTagsForResource(resourceArn string) ([]Tag, error)
DescribeServiceDeployments(
serviceDeploymentArns []string,
) ([]ServiceDeployment, []Failure, error)
ListServiceDeployments(cluster, service string) ([]string, error)
StopServiceDeployment(serviceDeploymentArn string) (*ServiceDeployment, error)
ContinueServiceDeployment(serviceDeploymentArn, hookID, action string) (*ServiceDeployment, error)
CreateExpressGatewayService(
input CreateExpressGatewayServiceInput,
) (*ExpressGatewayService, error)
DeleteExpressGatewayService(serviceArn string) (*ExpressGatewayService, error)
DescribeExpressGatewayService(serviceArn string) (*ExpressGatewayService, error)
UpdateExpressGatewayService(
input UpdateExpressGatewayServiceInput,
) (*ExpressGatewayService, error)
GetTaskProtection(cluster string, taskArns []string) ([]TaskProtection, []Failure, error)
UpdateTaskProtection(
cluster string,
taskArns []string,
protectionEnabled bool,
expiresInMinutes *int,
) ([]TaskProtection, []Failure, error)
CreateDaemon(input CreateDaemonInput) (*Daemon, error)
DeleteDaemon(daemonArn string) (*Daemon, error)
DescribeDaemon(daemonArn string) (*Daemon, error)
UpdateDaemon(input UpdateDaemonInput) (*Daemon, error)
ListDaemons(input ListDaemonsInput) ([]Daemon, error)
DescribeDaemonDeployments(arns []string) ([]DaemonDeployment, []Failure, error)
ListDaemonDeployments(input ListDaemonDeploymentsInput) ([]DaemonDeployment, error)
DescribeDaemonRevisions(arns []string) ([]DaemonRevision, []Failure, error)
RegisterDaemonTaskDefinition(input RegisterDaemonTaskDefinitionInput) (*DaemonTaskDefinition, error)
DescribeDaemonTaskDefinition(familyOrArn string) (*DaemonTaskDefinition, error)
DeleteDaemonTaskDefinition(familyOrArn string) (*DaemonTaskDefinition, error)
ListDaemonTaskDefinitions(input ListDaemonTaskDefinitionsInput) ([]DaemonTaskDefinition, error)
DescribeServiceRevisions(arns []string) ([]ServiceRevision, []Failure)
DiscoverPollEndpoint() (endpoint, serviceConnectEndpoint, telemetryEndpoint string)
SubmitTaskStateChange(input SubmitTaskStateChangeInput) error
SubmitContainerStateChange(input SubmitContainerStateChangeInput) error
SubmitAttachmentStateChanges(cluster string, attachments []AttachmentStateChange) error
GetRegion() string
}
Backend defines the interface for ECS control-plane operations. InMemoryBackend implements this interface; alternative backends (e.g. test doubles or future persistence-aware backends) can implement it too.
type CapacityProvider ¶
type CapacityProvider struct {
CreatedAt time.Time `json:"createdAt"`
CapacityProviderArn string `json:"capacityProviderArn"`
Name string `json:"name"`
Status string `json:"status"`
UpdateStatus string `json:"updateStatus,omitempty"`
UpdateStatusReason string `json:"updateStatusReason,omitempty"`
AutoScalingGroupProvider *AutoScalingGroupProvider `json:"autoScalingGroupProvider,omitempty"`
Tags []Tag `json:"tags,omitempty"`
}
CapacityProvider represents an ECS capacity provider.
type CapacityProviderStrategyItem ¶
type CapacityProviderStrategyItem struct {
CapacityProvider string `json:"capacityProvider"`
Base int `json:"base,omitempty"`
Weight int `json:"weight,omitempty"`
}
CapacityProviderStrategyItem represents a single item in a default capacity provider strategy.
type Cluster ¶
type Cluster struct {
CreatedAt time.Time `json:"createdAt"`
ClusterArn string `json:"clusterArn"`
ClusterName string `json:"clusterName"`
Status string `json:"status"`
DefaultCapacityProviderStrategy []CapacityProviderStrategyItem `json:"defaultCapacityProviderStrategy,omitempty"`
Settings []ClusterSetting `json:"settings,omitempty"`
CapacityProviders []string `json:"capacityProviders,omitempty"`
ActiveServicesCount int `json:"activeServicesCount"`
PendingTasksCount int `json:"pendingTasksCount"`
RegisteredContainerInstancesCount int `json:"registeredContainerInstancesCount"`
RunningTasksCount int `json:"runningTasksCount"`
}
Cluster represents an ECS cluster.
type ClusterSetting ¶
ClusterSetting represents a single cluster setting name/value pair.
type Container ¶
type Container struct {
ContainerArn string `json:"containerArn,omitempty"`
TaskArn string `json:"taskArn,omitempty"`
Name string `json:"name"`
Image string `json:"image,omitempty"`
ImageDigest string `json:"imageDigest,omitempty"`
RuntimeID string `json:"runtimeId,omitempty"`
LastStatus string `json:"lastStatus"`
HealthStatus string `json:"healthStatus,omitempty"`
CPU string `json:"cpu,omitempty"`
Memory string `json:"memory,omitempty"`
MemoryReservation string `json:"memoryReservation,omitempty"`
Reason string `json:"reason,omitempty"`
ExitCode *int `json:"exitCode,omitempty"`
NetworkInterfaces []NetworkInterface `json:"networkInterfaces,omitempty"`
NetworkBindings []NetworkBinding `json:"networkBindings,omitempty"`
}
Container holds the runtime status of a single container within a task.
type ContainerDefinition ¶
type ContainerDefinition struct {
LogConfiguration *LogConfiguration `json:"logConfiguration,omitempty"`
FirelensConfiguration *FirelensConfiguration `json:"firelensConfiguration,omitempty"`
HealthCheck *HealthCheck `json:"healthCheck,omitempty"`
RepositoryCredentials *RepositoryCredentials `json:"repositoryCredentials,omitempty"`
Image string `json:"image"`
Name string `json:"name"`
EntryPoint []string `json:"entryPoint,omitempty"`
Command []string `json:"command,omitempty"`
Environment []KeyValuePair `json:"environment,omitempty"`
Secrets []SecretReference `json:"secrets,omitempty"`
EnvironmentFiles []EnvironmentFile `json:"environmentFiles,omitempty"`
ResourceRequirements []ResourceRequirement `json:"resourceRequirements,omitempty"`
PortMappings []PortMapping `json:"portMappings,omitempty"`
MountPoints []MountPoint `json:"mountPoints,omitempty"`
VolumesFrom []VolumeFrom `json:"volumesFrom,omitempty"`
DependsOn []ContainerDependency `json:"dependsOn,omitempty"`
Memory int `json:"memory,omitempty"`
MemoryReservation int `json:"memoryReservation,omitempty"`
CPU int `json:"cpu,omitempty"`
Essential bool `json:"essential"`
DisableNetworking bool `json:"disableNetworking,omitempty"`
Privileged bool `json:"privileged,omitempty"`
ReadonlyRootFilesystem bool `json:"readonlyRootFilesystem,omitempty"`
}
ContainerDefinition represents a container definition in a task definition.
type ContainerDependency ¶
type ContainerDependency struct {
ContainerName string `json:"containerName"`
Condition string `json:"condition"`
}
ContainerDependency specifies a start/stop dependency between containers.
type ContainerInstance ¶
type ContainerInstance struct {
RegisteredAt time.Time `json:"registeredAt"`
ContainerInstanceArn string `json:"containerInstanceArn"`
EC2InstanceID string `json:"ec2InstanceId"`
ClusterArn string `json:"clusterArn"`
Status string `json:"status"`
AgentUpdateStatus string `json:"agentUpdateStatus,omitempty"`
Version int64 `json:"version"`
RunningTasksCount int `json:"runningTasksCount"`
PendingTasksCount int `json:"pendingTasksCount"`
AgentConnected bool `json:"agentConnected"`
}
ContainerInstance represents a registered ECS container instance.
type ContainerOverride ¶
type ContainerOverride struct {
CPU *int `json:"cpu,omitempty"`
Memory *int `json:"memory,omitempty"`
Name string `json:"name"`
Command []string `json:"command,omitempty"`
Environment []KeyValuePair `json:"environment,omitempty"`
Secrets []SecretReference `json:"secrets,omitempty"`
}
ContainerOverride represents a container override for a task.
type ContainerStateChangeItem ¶
type ContainerStateChangeItem struct {
ExitCode *int `json:"exitCode,omitempty"`
ContainerName string `json:"containerName,omitempty"`
ImageDigest string `json:"imageDigest,omitempty"`
Reason string `json:"reason,omitempty"`
RuntimeID string `json:"runtimeId,omitempty"`
NetworkBindings []NetworkBinding `json:"networkBindings,omitempty"`
}
ContainerStateChangeItem reports a status transition for a single container within a SubmitTaskStateChange call.
type CreateCapacityProviderInput ¶
type CreateCapacityProviderInput struct {
Name string
AutoScalingGroupProvider *AutoScalingGroupProvider
Tags []Tag
}
CreateCapacityProviderInput holds input for CreateCapacityProvider.
type CreateClusterInput ¶
type CreateClusterInput struct {
ClusterName string
Settings []ClusterSetting
CapacityProviders []string
DefaultCapacityProviderStrategy []CapacityProviderStrategyItem
Tags []Tag
}
CreateClusterInput holds input for CreateCluster.
type CreateDaemonInput ¶
type CreateDaemonInput struct {
DeploymentConfiguration *DaemonDeploymentConfiguration
DaemonName string
ClusterArn string
DaemonTaskDefinitionArn string
PropagateTags string
CapacityProviderArns []string
Tags []Tag
EnableECSManagedTags bool
EnableExecuteCommand bool
}
CreateDaemonInput holds input for CreateDaemon.
type CreateExpressGatewayServiceInput ¶
type CreateExpressGatewayServiceInput struct {
NetworkConfiguration *ExpressGatewayServiceNetworkConfiguration
PrimaryContainer *ExpressGatewayContainer
ScalingTarget *ExpressGatewayScalingTarget
ExecutionRoleArn string
InfrastructureRoleArn string
Cluster string
ServiceName string
CPU string
Memory string
HealthCheckPath string
TaskDefinitionArn string
TaskRoleArn string
Tags []Tag
}
CreateExpressGatewayServiceInput holds input for CreateExpressGatewayService.
type CreateServiceInput ¶
type CreateServiceInput struct {
DeploymentConfiguration *DeploymentConfiguration `json:"deploymentConfiguration,omitempty"`
DeploymentController *DeploymentController `json:"deploymentController,omitempty"`
NetworkConfiguration *NetworkConfiguration `json:"networkConfiguration,omitempty"`
ServiceConnectConfiguration *ServiceConnectConfiguration `json:"serviceConnectConfiguration,omitempty"`
ServiceName string `json:"serviceName"`
Cluster string `json:"cluster,omitempty"`
TaskDefinition string `json:"taskDefinition"`
LaunchType string `json:"launchType,omitempty"`
SchedulingStrategy string `json:"schedulingStrategy,omitempty"`
PropagateTags string `json:"propagateTags,omitempty"`
Tags []Tag `json:"tags,omitempty"`
LoadBalancers []LoadBalancer `json:"loadBalancers,omitempty"`
ServiceRegistries []ServiceRegistry `json:"serviceRegistries,omitempty"`
CapacityProviderStrategy []CapacityProviderStrategyItem `json:"capacityProviderStrategy,omitempty"`
PlacementConstraints []PlacementConstraint `json:"placementConstraints,omitempty"`
PlacementStrategy []PlacementStrategy `json:"placementStrategy,omitempty"`
DesiredCount int `json:"desiredCount"`
EnableExecuteCommand bool `json:"enableExecuteCommand,omitempty"`
}
CreateServiceInput holds input for CreateService.
type CreateTaskSetInput ¶
type CreateTaskSetInput struct {
NetworkConfiguration *NetworkConfiguration
Scale *TaskSetScale
Cluster string
Service string
TaskDefinition string
ExternalID string
PlatformVersion string
LaunchType string
LoadBalancers []LoadBalancer
ServiceRegistries []ServiceRegistry
CapacityProviderStrategy []CapacityProviderStrategyItem
Tags []Tag
}
CreateTaskSetInput holds input for CreateTaskSet.
type Daemon ¶
type Daemon struct {
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
DeploymentConfiguration *DaemonDeploymentConfiguration `json:"deploymentConfiguration,omitempty"`
DeploymentArn string `json:"deploymentArn,omitempty"`
ClusterArn string `json:"clusterArn"`
DaemonTaskDefinitionArn string `json:"daemonTaskDefinitionArn"`
DaemonName string `json:"daemonName"`
CurrentDaemonRevisionArn string `json:"currentDaemonRevisionArn,omitempty"`
Status string `json:"status"`
DaemonArn string `json:"daemonArn"`
PropagateTags string `json:"propagateTags,omitempty"`
CapacityProviderArns []string `json:"capacityProviderArns,omitempty"`
Tags []Tag `json:"tags,omitempty"`
EnableECSManagedTags bool `json:"enableECSManagedTags,omitempty"`
EnableExecuteCommand bool `json:"enableExecuteCommand,omitempty"`
}
Daemon represents an Amazon ECS Managed Daemon.
type DaemonAlarmConfiguration ¶
type DaemonAlarmConfiguration struct {
AlarmNames []string `json:"alarmNames,omitempty"`
Enable bool `json:"enable,omitempty"`
}
DaemonAlarmConfiguration configures CloudWatch alarm-based rollback for a daemon deployment.
type DaemonContainerDefinition ¶
type DaemonContainerDefinition struct {
HealthCheck *HealthCheck `json:"healthCheck,omitempty"`
LogConfiguration *LogConfiguration `json:"logConfiguration,omitempty"`
RepositoryCredentials *RepositoryCredentials `json:"repositoryCredentials,omitempty"`
FirelensConfiguration *FirelensConfiguration `json:"firelensConfiguration,omitempty"`
Name string `json:"name"`
Image string `json:"image"`
WorkingDirectory string `json:"workingDirectory,omitempty"`
User string `json:"user,omitempty"`
Command []string `json:"command,omitempty"`
EntryPoint []string `json:"entryPoint,omitempty"`
Environment []KeyValuePair `json:"environment,omitempty"`
EnvironmentFiles []EnvironmentFile `json:"environmentFiles,omitempty"`
Secrets []SecretReference `json:"secrets,omitempty"`
MountPoints []MountPoint `json:"mountPoints,omitempty"`
DependsOn []ContainerDependency `json:"dependsOn,omitempty"`
CPU int `json:"cpu,omitempty"`
Memory int `json:"memory,omitempty"`
MemoryReservation int `json:"memoryReservation,omitempty"`
StartTimeout int `json:"startTimeout,omitempty"`
StopTimeout int `json:"stopTimeout,omitempty"`
Essential bool `json:"essential"`
Interactive bool `json:"interactive,omitempty"`
PseudoTerminal bool `json:"pseudoTerminal,omitempty"`
Privileged bool `json:"privileged,omitempty"`
ReadonlyRootFilesystem bool `json:"readonlyRootFilesystem,omitempty"`
}
DaemonContainerDefinition is a container definition within a daemon task definition.
type DaemonDeployment ¶
type DaemonDeployment struct {
CreatedAt time.Time `json:"createdAt"`
StartedAt *time.Time `json:"startedAt,omitempty"`
FinishedAt *time.Time `json:"finishedAt,omitempty"`
DeploymentConfiguration *DaemonDeploymentConfiguration `json:"deploymentConfiguration,omitempty"`
DaemonDeploymentArn string `json:"daemonDeploymentArn"`
DaemonArn string `json:"daemonArn"`
ClusterArn string `json:"clusterArn"`
Status string `json:"status"`
StatusReason string `json:"statusReason,omitempty"`
TargetDaemonRevisionArn string `json:"targetDaemonRevisionArn,omitempty"`
}
DaemonDeployment represents the progressive rollout of a daemon change.
type DaemonDeploymentConfiguration ¶
type DaemonDeploymentConfiguration struct {
Alarms *DaemonAlarmConfiguration `json:"alarms,omitempty"`
BakeTimeInMinutes int `json:"bakeTimeInMinutes,omitempty"`
DrainPercent float64 `json:"drainPercent,omitempty"`
}
DaemonDeploymentConfiguration controls how a daemon rolls out updates.
type DaemonRevision ¶
type DaemonRevision struct {
CreatedAt time.Time `json:"createdAt"`
ClusterArn string `json:"clusterArn,omitempty"`
DaemonArn string `json:"daemonArn"`
DaemonRevisionArn string `json:"daemonRevisionArn"`
DaemonTaskDefinitionArn string `json:"daemonTaskDefinitionArn"`
PropagateTags string `json:"propagateTags,omitempty"`
EnableECSManagedTags bool `json:"enableECSManagedTags"`
EnableExecuteCommand bool `json:"enableExecuteCommand"`
}
DaemonRevision is a snapshot of a daemon's configuration at deployment time.
type DaemonTaskDefinition ¶
type DaemonTaskDefinition struct {
RegisteredAt time.Time `json:"registeredAt"`
DeleteRequestedAt *time.Time `json:"deleteRequestedAt,omitempty"`
DaemonTaskDefinitionArn string `json:"daemonTaskDefinitionArn"`
Family string `json:"family"`
CPU string `json:"cpu,omitempty"`
Memory string `json:"memory,omitempty"`
ExecutionRoleArn string `json:"executionRoleArn,omitempty"`
TaskRoleArn string `json:"taskRoleArn,omitempty"`
RegisteredBy string `json:"registeredBy,omitempty"`
Status string `json:"status"`
ContainerDefinitions []DaemonContainerDefinition `json:"containerDefinitions"`
Volumes []DaemonVolume `json:"volumes,omitempty"`
Revision int `json:"revision"`
}
DaemonTaskDefinition is a template describing the containers that form a daemon.
type DaemonVolume ¶
type DaemonVolume struct {
Host *HostVolumeProperties `json:"host,omitempty"`
Name string `json:"name"`
}
DaemonVolume is a data volume definition for a daemon task.
type Deployment ¶
type Deployment struct {
CreatedAt *float64 `json:"createdAt,omitempty"`
UpdatedAt *float64 `json:"updatedAt,omitempty"`
ID string `json:"id"`
Status string `json:"status"`
TaskDefinition string `json:"taskDefinition"`
LaunchType string `json:"launchType,omitempty"`
PlatformVersion string `json:"platformVersion,omitempty"`
RolloutState string `json:"rolloutState,omitempty"`
RolloutStateReason string `json:"rolloutStateReason,omitempty"`
ServiceRevisionArn string `json:"serviceRevisionArn,omitempty"`
DesiredCount int `json:"desiredCount"`
PendingCount int `json:"pendingCount"`
RunningCount int `json:"runningCount"`
FailedTasks int `json:"failedTasks"`
}
Deployment represents an active or completed deployment on an ECS service.
type DeploymentAlarms ¶
type DeploymentAlarms struct {
AlarmNames []string `json:"alarmNames"`
Enable bool `json:"enable"`
Rollback bool `json:"rollback"`
}
DeploymentAlarms configures CloudWatch alarm-based rollback for a service deployment.
type DeploymentCircuitBreaker ¶
type DeploymentCircuitBreaker struct {
Enable bool `json:"enable"`
Rollback bool `json:"rollback"`
}
DeploymentCircuitBreaker configures the deployment circuit breaker for a service.
type DeploymentConfiguration ¶
type DeploymentConfiguration struct {
DeploymentCircuitBreaker *DeploymentCircuitBreaker `json:"deploymentCircuitBreaker,omitempty"`
MinimumHealthyPercent *int `json:"minimumHealthyPercent,omitempty"`
MaximumPercent *int `json:"maximumPercent,omitempty"`
}
DeploymentConfiguration holds deployment settings for a service. MinimumHealthyPercent and MaximumPercent default to the AWS values of 100 and 200.
type DeploymentController ¶
type DeploymentController struct {
Type string `json:"type"`
}
DeploymentController specifies the deployment controller type for a service.
type EFSAuthorizationConfig ¶
type EFSAuthorizationConfig struct {
AccessPointID string `json:"accessPointId,omitempty"`
IAM string `json:"iam,omitempty"`
}
EFSAuthorizationConfig holds EFS authorization settings.
type EFSVolumeConfiguration ¶
type EFSVolumeConfiguration struct {
AuthorizationConfig *EFSAuthorizationConfig `json:"authorizationConfig,omitempty"`
FileSystemID string `json:"fileSystemId"`
RootDirectory string `json:"rootDirectory,omitempty"`
TransitEncryption string `json:"transitEncryption,omitempty"`
}
EFSVolumeConfiguration holds EFS-specific volume options.
type ELBTarget ¶
ELBTarget identifies a single ELBv2 target to register or deregister. ID is the task's awsvpc ENI private IP address (ECS registers "ip" target-type targets for awsvpc-mode tasks); Port is the container port the target group forwards to, from the owning service's LoadBalancer entry.
type ELBv2TargetRegistrar ¶
type ELBv2TargetRegistrar interface {
// RegisterTargets registers targets with the given target group.
RegisterTargets(ctx context.Context, targetGroupARN string, targets []ELBTarget) error
// DeregisterTargets deregisters targets from the given target group.
DeregisterTargets(ctx context.Context, targetGroupARN string, targets []ELBTarget) error
}
ELBv2TargetRegistrar lets the ECS backend register/deregister real ELBv2 targets as tasks belonging to a service with LoadBalancers reach or leave RUNNING, so ELBv2 DescribeTargetHealth reflects ECS-managed tasks instead of Service.LoadBalancers being stored and echoed with no effect. When no registrar is configured (the default), behavior is unchanged from before this feature existed.
type EnvironmentFile ¶
type EnvironmentFile struct {
Type string `json:"type"` // always "s3"
Value string `json:"value"` // S3 ARN
}
EnvironmentFile specifies an S3 ARN containing environment variables for a container.
type EphemeralStorage ¶
type EphemeralStorage struct {
SizeInGiB int `json:"sizeInGiB"`
}
EphemeralStorage specifies the amount of ephemeral storage for a Fargate task.
type ExecuteCommandOutput ¶
type ExecuteCommandOutput struct {
Session Session `json:"session"`
ClusterArn string `json:"clusterArn"`
ContainerArn string `json:"containerArn"`
ContainerName string `json:"containerName"`
TaskArn string `json:"taskArn"`
Interactive bool `json:"interactive"`
}
ExecuteCommandOutput is the output from ExecuteCommand.
type ExpressGatewayContainer ¶ added in v1.2.0
type ExpressGatewayContainer struct {
AwsLogsConfiguration *ExpressGatewayServiceAwsLogsConfiguration `json:"awsLogsConfiguration,omitempty"`
RepositoryCredentials *ExpressGatewayRepositoryCredentials `json:"repositoryCredentials,omitempty"`
ContainerPort *int `json:"containerPort,omitempty"`
Image string `json:"image"`
Command []string `json:"command,omitempty"`
Environment []KeyValuePair `json:"environment,omitempty"`
Secrets []SecretReference `json:"secrets,omitempty"`
}
ExpressGatewayContainer is the primary container configuration for an Express service revision. Mirrors types.ExpressGatewayContainer.
type ExpressGatewayRepositoryCredentials ¶ added in v1.2.0
type ExpressGatewayRepositoryCredentials struct {
CredentialsParameter string `json:"credentialsParameter"`
}
ExpressGatewayRepositoryCredentials references the private-registry credentials for an Express service's primary container image. Mirrors types.ExpressGatewayRepositoryCredentials.
type ExpressGatewayScalingTarget ¶ added in v1.2.0
type ExpressGatewayScalingTarget struct {
AutoScalingTargetValue *int `json:"autoScalingTargetValue,omitempty"`
MaxTaskCount *int `json:"maxTaskCount,omitempty"`
MinTaskCount *int `json:"minTaskCount,omitempty"`
AutoScalingMetric string `json:"autoScalingMetric,omitempty"`
}
ExpressGatewayScalingTarget is the auto-scaling configuration for an Express service revision. Mirrors types.ExpressGatewayScalingTarget.
type ExpressGatewayService ¶
type ExpressGatewayService struct {
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
ServiceArn string `json:"serviceArn"`
ServiceName string `json:"serviceName"`
Cluster string `json:"cluster"`
Status string `json:"status"`
StatusReason string `json:"statusReason,omitempty"`
InfrastructureRoleArn string `json:"infrastructureRoleArn"`
CurrentDeployment string `json:"currentDeployment,omitempty"`
ActiveConfigurations []ExpressGatewayServiceConfiguration `json:"activeConfigurations,omitempty"`
Tags []Tag `json:"tags,omitempty"`
}
ExpressGatewayService represents an ECS express gateway service. Mirrors types.ECSExpressGatewayService. Note ExecutionRoleArn/TaskRoleArn/CPU/ Memory/etc. are NOT top-level fields on the real shape -- they live on each entry of ActiveConfigurations (see ExpressGatewayServiceConfiguration); this struct previously invented a top-level ExecutionRoleArn field that does not exist on the wire.
type ExpressGatewayServiceAwsLogsConfiguration ¶ added in v1.2.0
type ExpressGatewayServiceAwsLogsConfiguration struct {
LogGroup string `json:"logGroup"`
LogStreamPrefix string `json:"logStreamPrefix"`
}
ExpressGatewayServiceAwsLogsConfiguration is the CloudWatch Logs configuration for an Express service's primary container. Mirrors types.ExpressGatewayServiceAwsLogsConfiguration.
type ExpressGatewayServiceConfiguration ¶ added in v1.2.0
type ExpressGatewayServiceConfiguration struct {
CreatedAt time.Time `json:"createdAt"`
NetworkConfiguration *ExpressGatewayServiceNetworkConfiguration `json:"networkConfiguration,omitempty"`
PrimaryContainer *ExpressGatewayContainer `json:"primaryContainer,omitempty"`
ScalingTarget *ExpressGatewayScalingTarget `json:"scalingTarget,omitempty"`
ServiceRevisionArn string `json:"serviceRevisionArn,omitempty"`
CPU string `json:"cpu,omitempty"`
Memory string `json:"memory,omitempty"`
HealthCheckPath string `json:"healthCheckPath,omitempty"`
ExecutionRoleArn string `json:"executionRoleArn,omitempty"`
TaskRoleArn string `json:"taskRoleArn,omitempty"`
TaskDefinitionArn string `json:"taskDefinitionArn,omitempty"`
IngressPaths []IngressPathSummary `json:"ingressPaths,omitempty"`
}
ExpressGatewayServiceConfiguration is a single service-revision snapshot of an Express service's compute/network/scaling configuration. Every Create/UpdateExpressGatewayService call produces one of these, appended to (or replacing, per real AWS "one active revision" semantics -- see CreateExpressGatewayService/UpdateExpressGatewayService in express_gateway.go) ExpressGatewayService.ActiveConfigurations. Mirrors types.ExpressGatewayServiceConfiguration.
type ExpressGatewayServiceNetworkConfiguration ¶ added in v1.2.0
type ExpressGatewayServiceNetworkConfiguration struct {
SecurityGroups []string `json:"securityGroups,omitempty"`
Subnets []string `json:"subnets,omitempty"`
}
ExpressGatewayServiceNetworkConfiguration is the VPC network configuration for an Express service's tasks. Mirrors types.ExpressGatewayServiceNetworkConfiguration.
type ExpressGatewayServiceStatus ¶ added in v1.2.0
type ExpressGatewayServiceStatus struct {
StatusCode string `json:"statusCode,omitempty"`
StatusReason string `json:"statusReason,omitempty"`
}
ExpressGatewayServiceStatus is the current status of an Express service. Mirrors types.ExpressGatewayServiceStatus (StatusCode + StatusReason), which real AWS nests as an object rather than a bare status string.
type Failure ¶
type Failure struct {
Arn string `json:"arn,omitempty"`
Detail string `json:"detail,omitempty"`
Reason string `json:"reason,omitempty"`
}
Failure represents a resource-level failure returned in batch operations.
type FirelensConfiguration ¶
type FirelensConfiguration struct {
Options map[string]string `json:"options,omitempty"`
Type string `json:"type"`
}
FirelensConfiguration specifies FireLens routing for container logs.
type Handler ¶
type Handler struct {
Backend Backend
// contains filtered or unexported fields
}
Handler is the Echo HTTP handler for ECS operations.
func (*Handler) ChaosOperations ¶
ChaosOperations returns all operations that can be fault-injected.
func (*Handler) ChaosRegions ¶
ChaosRegions returns all regions this ECS instance handles.
func (*Handler) ChaosServiceName ¶
ChaosServiceName returns the lowercase AWS service name for fault rule matching.
func (*Handler) ExecuteFISAction ¶
ExecuteFISAction executes a FIS action against resolved ECS targets.
func (*Handler) ExtractOperation ¶
ExtractOperation extracts the ECS action from the request.
func (*Handler) ExtractResource ¶
ExtractResource extracts the primary resource identifier from the request.
func (*Handler) FISActions ¶
func (h *Handler) FISActions() []service.FISActionDefinition
FISActions returns the FIS action definitions that the ECS service supports.
func (*Handler) GetSupportedOperations ¶
GetSupportedOperations returns the list of supported ECS operations.
func (*Handler) Handler ¶
func (h *Handler) Handler() echo.HandlerFunc
Handler returns the Echo handler function for ECS requests.
func (*Handler) MatchPriority ¶
MatchPriority returns the routing priority for ECS.
func (*Handler) Purge ¶
Purge implements service.Purgeable by removing all ECS resources older than cutoff.
func (*Handler) Restore ¶
Restore implements Snapshottable by delegating to the backend when it supports snapshotting. Non-snapshottable backends are skipped.
func (*Handler) RouteMatcher ¶
RouteMatcher returns a function that matches ECS requests via X-Amz-Target.
type HealthCheck ¶
type HealthCheck struct {
Command []string `json:"command"`
Interval int `json:"interval,omitempty"`
Timeout int `json:"timeout,omitempty"`
Retries int `json:"retries,omitempty"`
StartPeriod int `json:"startPeriod,omitempty"`
}
HealthCheck configures the container health check.
type HostVolumeProperties ¶
type HostVolumeProperties struct {
SourcePath string `json:"sourcePath,omitempty"`
}
HostVolumeProperties holds host-bind volume path.
type InMemoryBackend ¶
type InMemoryBackend struct {
// contains filtered or unexported fields
}
InMemoryBackend stores ECS state in memory.
Field ordering is optimised for pointer-byte alignment (govet fieldalignment); keep new fields grouped with their kind rather than by logical concern.
func NewInMemoryBackend ¶
func NewInMemoryBackend(accountID, region string, runner TaskRunner) *InMemoryBackend
NewInMemoryBackend creates a new InMemoryBackend.
func (*InMemoryBackend) AddAccountSettingInternal ¶
func (b *InMemoryBackend) AddAccountSettingInternal(_ string, setting *AccountSetting)
AddAccountSettingInternal adds an account setting directly (seed helper for tests). key is unused now that the store.Table derives its own key from setting's fields (accountSettingsKeyFn); retained in the signature so existing call sites (which always pass a key consistent with accountSettingKey(setting.Name, setting.PrincipalArn)) do not need updating.
func (*InMemoryBackend) AddAttributeInternal ¶
func (b *InMemoryBackend) AddAttributeInternal(cluster string, attr *Attribute)
AddAttributeInternal adds an attribute directly (seed helper for tests).
func (*InMemoryBackend) AddCapacityProviderInternal ¶
func (b *InMemoryBackend) AddCapacityProviderInternal(cp *CapacityProvider)
AddCapacityProviderInternal adds a capacity provider directly (seed helper for tests).
func (*InMemoryBackend) AddServiceDeploymentInternal ¶
func (b *InMemoryBackend) AddServiceDeploymentInternal(sd *ServiceDeployment)
AddServiceDeploymentInternal adds a service deployment directly (seed helper for tests).
func (*InMemoryBackend) ContinueServiceDeployment ¶
func (b *InMemoryBackend) ContinueServiceDeployment( serviceDeploymentArn, hookID, action string, ) (*ServiceDeployment, error)
ContinueServiceDeployment continues or rolls back a service deployment that is paused at a lifecycle hook. Real ECS only pauses a deployment when a PAUSE-stage lifecycle hook (a Lambda-backed hook configured on the service) is present; this backend does not model lifecycle hooks, so a deployment is never actually paused. The op still validates the deployment exists and the required hookId is present before reporting that there is no such paused hook — it does not fabricate a successful continue/rollback for state that was never paused.
func (*InMemoryBackend) CountRunningTasksForService ¶
func (b *InMemoryBackend) CountRunningTasksForService(clusterName, serviceName string) int
CountRunningTasksForService counts running tasks for a service on a cluster.
func (*InMemoryBackend) CreateCapacityProvider ¶
func (b *InMemoryBackend) CreateCapacityProvider( input CreateCapacityProviderInput, ) (*CapacityProvider, error)
CreateCapacityProvider creates a new capacity provider.
func (*InMemoryBackend) CreateCluster ¶
func (b *InMemoryBackend) CreateCluster(input CreateClusterInput) (*Cluster, error)
CreateCluster creates a new ECS cluster.
func (*InMemoryBackend) CreateDaemon ¶
func (b *InMemoryBackend) CreateDaemon(input CreateDaemonInput) (*Daemon, error)
CreateDaemon creates a new daemon and its initial deployment.
func (*InMemoryBackend) CreateExpressGatewayService ¶
func (b *InMemoryBackend) CreateExpressGatewayService( input CreateExpressGatewayServiceInput, ) (*ExpressGatewayService, error)
CreateExpressGatewayService creates a new express gateway service.
func (*InMemoryBackend) CreateService ¶
func (b *InMemoryBackend) CreateService(input CreateServiceInput) (*Service, error)
CreateService creates a new ECS service.
func (*InMemoryBackend) CreateTaskSet ¶
func (b *InMemoryBackend) CreateTaskSet(input CreateTaskSetInput) (*TaskSet, error)
CreateTaskSet creates a task set within a service.
func (*InMemoryBackend) DeleteAccountSetting ¶
func (b *InMemoryBackend) DeleteAccountSetting(name, principalArn string) (*AccountSetting, error)
DeleteAccountSetting deletes an account setting for a principal.
func (*InMemoryBackend) DeleteAttributes ¶
func (b *InMemoryBackend) DeleteAttributes(cluster string, attrs []Attribute) ([]Attribute, error)
DeleteAttributes deletes custom attributes from ECS resources.
func (*InMemoryBackend) DeleteCapacityProvider ¶
func (b *InMemoryBackend) DeleteCapacityProvider(nameOrArn string) (*CapacityProvider, error)
DeleteCapacityProvider deletes a capacity provider by name or ARN.
func (*InMemoryBackend) DeleteCluster ¶
func (b *InMemoryBackend) DeleteCluster(clusterName string) (*Cluster, error)
DeleteCluster removes a cluster.
func (*InMemoryBackend) DeleteDaemon ¶
func (b *InMemoryBackend) DeleteDaemon(daemonArn string) (*Daemon, error)
DeleteDaemon deletes a daemon. The returned snapshot reflects the DELETE_IN_PROGRESS transitional status returned synchronously by real AWS.
func (*InMemoryBackend) DeleteDaemonTaskDefinition ¶
func (b *InMemoryBackend) DeleteDaemonTaskDefinition(familyOrArn string) (*DaemonTaskDefinition, error)
DeleteDaemonTaskDefinition marks a daemon task definition revision as DELETED.
func (*InMemoryBackend) DeleteExpressGatewayService ¶
func (b *InMemoryBackend) DeleteExpressGatewayService( serviceArn string, ) (*ExpressGatewayService, error)
DeleteExpressGatewayService deletes an express gateway service by ARN.
func (*InMemoryBackend) DeleteService ¶
func (b *InMemoryBackend) DeleteService(cluster, serviceName string) (*Service, error)
DeleteService removes a service from the cluster.
func (*InMemoryBackend) DeleteTaskDefinitions ¶
func (b *InMemoryBackend) DeleteTaskDefinitions( taskDefinitionArns []string, ) ([]TaskDefinition, []Failure, error)
DeleteTaskDefinitions deletes task definitions that are INACTIVE. Definitions that are not INACTIVE are reported as failures.
func (*InMemoryBackend) DeleteTaskSet ¶
func (b *InMemoryBackend) DeleteTaskSet(cluster, service, taskSet string) (*TaskSet, error)
DeleteTaskSet removes a task set.
func (*InMemoryBackend) DeregisterContainerInstance ¶
func (b *InMemoryBackend) DeregisterContainerInstance( cluster, containerInstance string, force bool, ) (*ContainerInstance, error)
DeregisterContainerInstance removes a container instance from a cluster.
func (*InMemoryBackend) DeregisterTaskDefinition ¶
func (b *InMemoryBackend) DeregisterTaskDefinition( taskDefinitionArn string, ) (*TaskDefinition, error)
DeregisterTaskDefinition marks a task definition revision as INACTIVE.
func (*InMemoryBackend) DescribeCapacityProviders ¶
func (b *InMemoryBackend) DescribeCapacityProviders( nameOrArns []string, cluster string, ) ([]CapacityProvider, []Failure, error)
DescribeCapacityProviders returns capacity providers, optionally filtered by name/ARN and/or by cluster association. Names/ARNs that don't resolve to a known or built-in capacity provider are reported in the returned Failures slice (reason MISSING), matching AWS's DescribeCapacityProviders behavior of partial success rather than failing the whole call.
When cluster is non-empty, only capacity providers associated with that cluster (via CreateCluster/UpdateCluster/PutClusterCapacityProviders) are considered, matching AWS's documented Cluster filter parameter. An unknown cluster name yields an empty result (not an error), consistent with AWS's filter semantics for this parameter.
func (*InMemoryBackend) DescribeClusters ¶
func (b *InMemoryBackend) DescribeClusters(clusterNames []string) ([]Cluster, []Failure, error)
DescribeClusters returns cluster metadata. Unknown cluster names are returned as failures, not errors, matching AWS behaviour.
func (*InMemoryBackend) DescribeContainerInstances ¶
func (b *InMemoryBackend) DescribeContainerInstances( cluster string, containerInstances []string, ) ([]ContainerInstance, []Failure, error)
DescribeContainerInstances returns container instances for a cluster.
func (*InMemoryBackend) DescribeDaemon ¶
func (b *InMemoryBackend) DescribeDaemon(daemonArn string) (*Daemon, error)
DescribeDaemon returns the full detail of a daemon.
func (*InMemoryBackend) DescribeDaemonDeployments ¶
func (b *InMemoryBackend) DescribeDaemonDeployments(arns []string) ([]DaemonDeployment, []Failure, error)
DescribeDaemonDeployments returns daemon deployments for the given ARNs, reporting a Failure for each ARN that does not exist.
func (*InMemoryBackend) DescribeDaemonRevisions ¶
func (b *InMemoryBackend) DescribeDaemonRevisions(arns []string) ([]DaemonRevision, []Failure, error)
DescribeDaemonRevisions returns daemon revisions for the given ARNs, reporting a Failure for each ARN that does not exist.
func (*InMemoryBackend) DescribeDaemonTaskDefinition ¶
func (b *InMemoryBackend) DescribeDaemonTaskDefinition(familyOrArn string) (*DaemonTaskDefinition, error)
DescribeDaemonTaskDefinition returns a daemon task definition by family, ARN, or family:revision.
func (*InMemoryBackend) DescribeExpressGatewayService ¶
func (b *InMemoryBackend) DescribeExpressGatewayService( serviceArn string, ) (*ExpressGatewayService, error)
DescribeExpressGatewayService returns an express gateway service by ARN.
func (*InMemoryBackend) DescribeServiceDeployments ¶
func (b *InMemoryBackend) DescribeServiceDeployments( serviceDeploymentArns []string, ) ([]ServiceDeployment, []Failure, error)
DescribeServiceDeployments returns service deployments by ARN.
func (*InMemoryBackend) DescribeServiceRevisions ¶
func (b *InMemoryBackend) DescribeServiceRevisions(arns []string) ([]ServiceRevision, []Failure)
DescribeServiceRevisions returns the service revisions captured by past and current deployments across all clusters that match the given ARNs. Unknown ARNs are reported as failures, matching AWS behaviour for batch describes.
func (*InMemoryBackend) DescribeServices ¶
func (b *InMemoryBackend) DescribeServices( cluster string, serviceNames []string, ) ([]Service, []Failure, error)
DescribeServices returns services for the given cluster, optionally filtered by name. Unknown service names are returned as failures, not errors, matching AWS behaviour.
func (*InMemoryBackend) DescribeTaskDefinition ¶
func (b *InMemoryBackend) DescribeTaskDefinition(familyOrArn string) (*TaskDefinition, error)
DescribeTaskDefinition returns the latest revision of a task definition by family or ARN.
func (*InMemoryBackend) DescribeTaskSets ¶
func (b *InMemoryBackend) DescribeTaskSets( cluster, service string, taskSets []string, ) ([]TaskSet, error)
DescribeTaskSets returns task sets for a service.
func (*InMemoryBackend) DescribeTasks ¶
func (b *InMemoryBackend) DescribeTasks( cluster string, taskArns []string, ) ([]Task, []Failure, error)
DescribeTasks returns tasks on a given cluster, optionally filtered by ARN. Unknown task ARNs are returned as failures, not errors, matching AWS behaviour.
func (*InMemoryBackend) DiscoverPollEndpoint ¶
func (b *InMemoryBackend) DiscoverPollEndpoint() (string, string, string)
DiscoverPollEndpoint returns the ECS agent poll, Service Connect, and telemetry endpoints for the configured region. Real ECS agents use this to discover which regional endpoint to poll for task state updates.
func (*InMemoryBackend) ExecuteCommand ¶
func (b *InMemoryBackend) ExecuteCommand( cluster, task, container, command string, interactive bool, ) (*ExecuteCommandOutput, error)
ExecuteCommand simulates an ECS Exec session.
func (*InMemoryBackend) GetRegion ¶
func (b *InMemoryBackend) GetRegion() string
GetRegion returns the AWS region this backend is configured for.
func (*InMemoryBackend) GetTaskProtection ¶
func (b *InMemoryBackend) GetTaskProtection( cluster string, taskArns []string, ) ([]TaskProtection, []Failure, error)
GetTaskProtection returns the protection state for the given tasks on a cluster.
func (*InMemoryBackend) ListAccountSettings ¶
func (b *InMemoryBackend) ListAccountSettings(name, principalArn string) ([]AccountSetting, error)
ListAccountSettings returns all account settings, optionally filtered by name and principal.
func (*InMemoryBackend) ListAttributes ¶
func (b *InMemoryBackend) ListAttributes( cluster, targetType, attributeName, targetID string, ) ([]Attribute, error)
ListAttributes returns attributes for resources in a cluster, optionally filtered by attribute name, target type, and target ID.
func (*InMemoryBackend) ListClusters ¶
func (b *InMemoryBackend) ListClusters() ([]Cluster, error)
ListClusters returns all clusters.
func (*InMemoryBackend) ListContainerInstances ¶
func (b *InMemoryBackend) ListContainerInstances(cluster, status string) ([]string, error)
ListContainerInstances returns container instance ARNs for a cluster.
func (*InMemoryBackend) ListDaemonDeployments ¶
func (b *InMemoryBackend) ListDaemonDeployments(input ListDaemonDeploymentsInput) ([]DaemonDeployment, error)
ListDaemonDeployments returns deployment summaries for a daemon, optionally filtered by status.
func (*InMemoryBackend) ListDaemonTaskDefinitions ¶
func (b *InMemoryBackend) ListDaemonTaskDefinitions( input ListDaemonTaskDefinitionsInput, ) ([]DaemonTaskDefinition, error)
ListDaemonTaskDefinitions returns daemon task definition summaries, newest first per family.
func (*InMemoryBackend) ListDaemons ¶
func (b *InMemoryBackend) ListDaemons(input ListDaemonsInput) ([]Daemon, error)
ListDaemons returns daemons, optionally filtered by cluster or capacity provider.
func (*InMemoryBackend) ListServiceDeployments ¶
func (b *InMemoryBackend) ListServiceDeployments(cluster, service string) ([]string, error)
ListServiceDeployments returns service deployment ARNs for a service in a cluster.
func (*InMemoryBackend) ListServices ¶
func (b *InMemoryBackend) ListServices( cluster, launchType, schedulingStrategy string, ) ([]string, error)
ListServices returns service ARNs for a cluster, optionally filtered by launch type and scheduling strategy.
func (*InMemoryBackend) ListServicesByNamespace ¶
func (b *InMemoryBackend) ListServicesByNamespace(cluster, namespace string) ([]string, error)
ListServicesByNamespace returns service ARNs in a cluster whose service name contains the namespace prefix.
func (*InMemoryBackend) ListTagsForResource ¶
func (b *InMemoryBackend) ListTagsForResource(resourceArn string) ([]Tag, error)
ListTagsForResource returns all tags for a resource.
func (*InMemoryBackend) ListTaskDefinitionFamilies ¶
func (b *InMemoryBackend) ListTaskDefinitionFamilies( familyPrefix, status string, ) ([]string, error)
ListTaskDefinitionFamilies returns distinct task definition family names.
func (*InMemoryBackend) ListTaskDefinitions ¶
func (b *InMemoryBackend) ListTaskDefinitions(familyPrefix string) ([]string, error)
ListTaskDefinitions returns ARNs of task definitions, optionally filtered by family prefix. ARNs are returned sorted for deterministic output.
func (*InMemoryBackend) ListTaskDefinitionsFiltered ¶
func (b *InMemoryBackend) ListTaskDefinitionsFiltered( input ListTaskDefinitionsInput, ) ([]string, error)
ListTaskDefinitionsFiltered returns task definition ARNs with status filtering.
func (*InMemoryBackend) ListTasks ¶
func (b *InMemoryBackend) ListTasks(cluster string) ([]string, error)
func (*InMemoryBackend) ListTasksFiltered ¶
func (b *InMemoryBackend) ListTasksFiltered(input ListTasksInput) ([]string, error)
func (*InMemoryBackend) Purge ¶
func (b *InMemoryBackend) Purge(_ context.Context, cutoff time.Time)
Purge removes all ECS resources created before the given cutoff time.
The expensive scan over every task-definition family/revision is performed under a read lock (phase 1) to build a deletion plan; the write lock is then taken only to apply that plan (phase 2), so it is held O(deletions) rather than O(all revisions). Deletions are re-validated in phase 2 so a resource re-created between the phases is not purged.
func (*InMemoryBackend) PutAccountSetting ¶
func (b *InMemoryBackend) PutAccountSetting( name, value, principalArn string, ) (*AccountSetting, error)
PutAccountSetting creates or updates an account setting for a specific principal.
func (*InMemoryBackend) PutAccountSettingDefault ¶
func (b *InMemoryBackend) PutAccountSettingDefault(name, value string) (*AccountSetting, error)
PutAccountSettingDefault creates or updates an account-level default setting (no principal).
func (*InMemoryBackend) PutAttributes ¶
func (b *InMemoryBackend) PutAttributes(cluster string, attrs []Attribute) ([]Attribute, error)
PutAttributes creates or updates custom attributes on ECS resources in a cluster.
func (*InMemoryBackend) PutClusterCapacityProviders ¶
func (b *InMemoryBackend) PutClusterCapacityProviders( cluster string, capacityProviders []string, defaultCapacityProviderStrategy []CapacityProviderStrategyItem, ) (*Cluster, error)
PutClusterCapacityProviders associates capacity providers with a cluster.
func (*InMemoryBackend) RegisterClusterDeleteHook ¶
func (b *InMemoryBackend) RegisterClusterDeleteHook(fn func(clusterName string))
RegisterClusterDeleteHook registers a callback invoked (outside the backend lock) with the key of each cluster removed by DeleteCluster or Purge. It lets external components — such as the Reconciler's per-cluster launch semaphores — release cluster-scoped resources and avoid unbounded growth.
func (*InMemoryBackend) RegisterContainerInstance ¶
func (b *InMemoryBackend) RegisterContainerInstance( cluster, ec2InstanceID string, ) (*ContainerInstance, error)
RegisterContainerInstance registers a container instance to a cluster.
func (*InMemoryBackend) RegisterDaemonTaskDefinition ¶
func (b *InMemoryBackend) RegisterDaemonTaskDefinition( input RegisterDaemonTaskDefinitionInput, ) (*DaemonTaskDefinition, error)
RegisterDaemonTaskDefinition registers a new daemon task definition revision.
func (*InMemoryBackend) RegisterTaskDefinition ¶
func (b *InMemoryBackend) RegisterTaskDefinition( input RegisterTaskDefinitionInput, ) (*TaskDefinition, error)
RegisterTaskDefinition registers a new task definition revision.
func (*InMemoryBackend) Reset ¶
func (b *InMemoryBackend) Reset()
Reset zeroes all backend state for test isolation.
func (*InMemoryBackend) Restore ¶
func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
Restore loads backend state from a JSON snapshot.
func (*InMemoryBackend) RunTask ¶
func (b *InMemoryBackend) RunTask(input RunTaskInput) ([]Task, error)
RunTask starts one or more tasks on the given cluster.
func (*InMemoryBackend) SFNRunTask ¶
SFNRunTask implements the Step Functions ECS RunTask service integration. It maps the SFN input map (ClusterArn, TaskDefinition, LaunchType, Overrides, etc.) to a RunTaskInput and returns the standard ECS RunTask response shape.
func (*InMemoryBackend) SetELBv2Registrar ¶
func (b *InMemoryBackend) SetELBv2Registrar(r ELBv2TargetRegistrar)
SetELBv2Registrar wires an ELBv2TargetRegistrar so subsequent task start/stop transitions register or deregister real ELBv2 targets for services with LoadBalancers configured. Passing nil restores the historical, registration-less behavior. Intended to be called once during service wiring, before the backend serves traffic.
func (*InMemoryBackend) SetStartDelay ¶
func (b *InMemoryBackend) SetStartDelay(d time.Duration)
SetStartDelay configures the per-phase delay applied to the no-runner task start lifecycle (PROVISIONING→PENDING→RUNNING). Zero (the default) keeps the immediate transition.
func (*InMemoryBackend) SetStopDelay ¶
func (b *InMemoryBackend) SetStopDelay(d time.Duration)
SetStopDelay configures the per-phase delay applied to the task stop lifecycle. A positive delay makes StopTask leave the task in DEACTIVATING and advance it through STOPPING/DEPROVISIONING/STOPPED on subsequent lifecycle steps, so waiters can observe the intermediate states. Zero (the default) restores the immediate RUNNING→STOPPED transition.
func (*InMemoryBackend) Snapshot ¶
func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
Snapshot serialises the backend state to JSON.
func (*InMemoryBackend) StartTask ¶
func (b *InMemoryBackend) StartTask(input StartTaskInput) ([]Task, error)
StartTask places tasks on specific container instances (as opposed to RunTask which auto-places).
func (*InMemoryBackend) StartTaskForService ¶
func (b *InMemoryBackend) StartTaskForService( clusterName, serviceName, taskDefinitionArn string, ) error
StartTaskForService launches a task on behalf of a service. It reads the service's PropagateTags, Tags, and EnableECSManagedTags settings so that tasks spawned by the reconciler honour the same tag propagation as tasks started directly via RunTask.
func (*InMemoryBackend) StopOldestServiceTask ¶
func (b *InMemoryBackend) StopOldestServiceTask(clusterName, serviceName string) error
StopOldestServiceTask stops the oldest running task for a service.
func (*InMemoryBackend) StopServiceDeployment ¶
func (b *InMemoryBackend) StopServiceDeployment( serviceDeploymentArn string, ) (*ServiceDeployment, error)
StopServiceDeployment stops an in-progress service deployment.
func (*InMemoryBackend) StopTask ¶
func (b *InMemoryBackend) StopTask(cluster, taskArn, reason string) (*Task, error)
StopTask stops a running task.
func (*InMemoryBackend) SubmitAttachmentStateChanges ¶
func (b *InMemoryBackend) SubmitAttachmentStateChanges(cluster string, attachments []AttachmentStateChange) error
SubmitAttachmentStateChanges records attachment status transitions reported by the ECS agent for one or more attachments within a cluster. Unknown clusters or attachment ARNs are tolerated as no-ops.
func (*InMemoryBackend) SubmitContainerStateChange ¶
func (b *InMemoryBackend) SubmitContainerStateChange(input SubmitContainerStateChangeInput) error
SubmitContainerStateChange records a single container's status transition reported by the ECS agent. Unknown clusters, tasks, or containers are tolerated as no-ops.
func (*InMemoryBackend) SubmitTaskStateChange ¶
func (b *InMemoryBackend) SubmitTaskStateChange(input SubmitTaskStateChangeInput) error
SubmitTaskStateChange records a task (and its containers'/attachments') status transition reported by the ECS agent. Unknown clusters or tasks are tolerated as no-ops, matching the tolerant, eventually-consistent contract of this agent-internal API.
func (*InMemoryBackend) TagResource ¶
func (b *InMemoryBackend) TagResource(resourceArn string, tags []Tag) error
TagResource applies key/value tags to a resource identified by its ARN.
func (*InMemoryBackend) TaggedResources ¶ added in v1.2.0
func (b *InMemoryBackend) TaggedResources() []TaggedEntry
TaggedResources returns every ECS resource ARN that currently has at least one tag applied via TagResource, spanning every ECS resource kind that shares the flat resourceTags side map (clusters, services, task definitions, container instances, task sets, capacity providers, and more).
func (*InMemoryBackend) UntagResource ¶
func (b *InMemoryBackend) UntagResource(resourceArn string, tagKeys []string) error
UntagResource removes tags with the given keys from a resource.
func (*InMemoryBackend) UpdateCapacityProvider ¶
func (b *InMemoryBackend) UpdateCapacityProvider( input UpdateCapacityProviderInput, ) (*CapacityProvider, error)
UpdateCapacityProvider updates the managed-scaling settings of an ASG-backed capacity provider. Unlike CreateCapacityProvider, the ASG the provider wraps cannot be changed here (there is no ARN field on the real UpdateCapacityProviderRequest's AutoScalingGroupProviderUpdate) -- only ManagedScaling/ManagedTerminationProtection/ManagedDraining are merged onto the existing AutoScalingGroupProvider, so its ARN is preserved.
func (*InMemoryBackend) UpdateCluster ¶
func (b *InMemoryBackend) UpdateCluster(input UpdateClusterInput) (*Cluster, error)
UpdateCluster updates an ECS cluster's settings. Capacity-provider association is not part of this operation in real AWS -- see PutClusterCapacityProviders for that.
func (*InMemoryBackend) UpdateClusterSettings ¶
func (b *InMemoryBackend) UpdateClusterSettings( cluster string, settings []ClusterSetting, ) (*Cluster, error)
UpdateClusterSettings updates the settings for an ECS cluster.
func (*InMemoryBackend) UpdateContainerAgent ¶
func (b *InMemoryBackend) UpdateContainerAgent( cluster, containerInstance string, ) (*ContainerInstance, error)
UpdateContainerAgent initiates an update of the container agent on the given instance.
func (*InMemoryBackend) UpdateContainerInstancesState ¶
func (b *InMemoryBackend) UpdateContainerInstancesState( cluster string, containerInstances []string, status string, ) ([]ContainerInstance, error)
UpdateContainerInstancesState updates the status of container instances.
func (*InMemoryBackend) UpdateDaemon ¶
func (b *InMemoryBackend) UpdateDaemon(input UpdateDaemonInput) (*Daemon, error)
UpdateDaemon updates a daemon's configuration and triggers a new deployment.
func (*InMemoryBackend) UpdateExpressGatewayService ¶
func (b *InMemoryBackend) UpdateExpressGatewayService( input UpdateExpressGatewayServiceInput, ) (*ExpressGatewayService, error)
UpdateExpressGatewayService updates an express gateway service, replacing its active configuration with a new service revision built from the supplied fields (real AWS creates a new revision and rolls out to it; this emulator does not model rollout progress, so the new revision becomes current immediately).
func (*InMemoryBackend) UpdateService ¶
func (b *InMemoryBackend) UpdateService(input UpdateServiceInput) (*Service, error)
UpdateService updates an existing ECS service.
func (*InMemoryBackend) UpdateServicePrimaryTaskSet ¶
func (b *InMemoryBackend) UpdateServicePrimaryTaskSet( cluster, service, primaryTaskSet string, ) (*TaskSet, error)
UpdateServicePrimaryTaskSet sets the primary task set for a service.
func (*InMemoryBackend) UpdateTaskProtection ¶
func (b *InMemoryBackend) UpdateTaskProtection( cluster string, taskArns []string, protectionEnabled bool, expiresInMinutes *int, ) ([]TaskProtection, []Failure, error)
UpdateTaskProtection updates task protection for tasks in a cluster.
func (*InMemoryBackend) UpdateTaskSet ¶
func (b *InMemoryBackend) UpdateTaskSet( cluster, service, taskSet string, scale TaskSetScale, ) (*TaskSet, error)
UpdateTaskSet updates the scale of a task set.
type InferenceAccelerator ¶
type InferenceAccelerator struct {
DeviceName string `json:"deviceName"`
DeviceType string `json:"deviceType"`
}
InferenceAccelerator specifies an Elastic Inference accelerator for a task definition.
type IngressPathSummary ¶ added in v1.2.0
type IngressPathSummary struct {
AccessType string `json:"accessType,omitempty"`
Endpoint string `json:"endpoint,omitempty"`
}
IngressPathSummary is an access endpoint for an Express service revision. This backend does not emulate the managed ALB/target-group infrastructure an Express service provisions, so IngressPaths is always empty -- see ECSExpressGatewayService.ActiveConfigurations in models.go and the managed-infrastructure note on ExpressGatewayServiceConfiguration. Mirrors types.IngressPathSummary.
type Janitor ¶
type Janitor struct {
Backend *InMemoryBackend
Interval time.Duration
TaskTimeout time.Duration
// contains filtered or unexported fields
}
Janitor is the ECS background worker that evicts stopped tasks older than a configurable TTL to prevent unbounded growth of the tasks map.
func NewJanitor ¶
func NewJanitor(backend *InMemoryBackend, interval time.Duration) *Janitor
NewJanitor creates a new ECS Janitor for the given backend. If interval is zero it falls back to defaultECSJanitorInterval.
func (*Janitor) SetTaskTTL ¶
SetTaskTTL overrides the default stopped-task TTL. Intended for testing.
type KeyValuePair ¶
KeyValuePair is a name/value pair.
type ListDaemonDeploymentsInput ¶
ListDaemonDeploymentsInput holds filters for ListDaemonDeployments.
type ListDaemonTaskDefinitionsInput ¶
type ListDaemonTaskDefinitionsInput struct {
Family string
FamilyPrefix string
Status string // "", "ACTIVE" (default), "DELETE_IN_PROGRESS", or "ALL"
}
ListDaemonTaskDefinitionsInput holds optional filters for ListDaemonTaskDefinitions.
type ListDaemonsInput ¶
ListDaemonsInput holds optional filters for ListDaemons.
type ListTaskDefinitionsInput ¶
type ListTaskDefinitionsInput struct {
FamilyPrefix string
// Status filters by task definition status: "ACTIVE", "INACTIVE", or
// "DELETE_IN_PROGRESS". Empty string matches only ACTIVE (AWS default).
Status string
}
ListTaskDefinitionsInput holds optional filters for ListTaskDefinitions.
type ListTasksInput ¶
type ListTasksInput struct {
Cluster string
ContainerInstance string
Family string
ServiceName string
DesiredStatus string
LaunchType string
StartedBy string
}
ListTasksInput holds optional filters for ListTasks.
type LoadBalancer ¶
type LoadBalancer struct {
TargetGroupArn string `json:"targetGroupArn,omitempty"`
LoadBalancerName string `json:"loadBalancerName,omitempty"`
ContainerName string `json:"containerName,omitempty"`
ContainerPort int `json:"containerPort,omitempty"`
}
LoadBalancer wires ECS tasks to ALB/NLB target groups.
type LogConfiguration ¶
type LogConfiguration struct {
LogDriver string `json:"logDriver"`
Options map[string]string `json:"options,omitempty"`
SecretOptions []SecretOption `json:"secretOptions,omitempty"`
}
LogConfiguration specifies the logging driver and options for a container.
type ManagedScaling ¶
type ManagedScaling struct {
Status string `json:"status,omitempty"`
TargetCapacityPercent int `json:"targetCapacityPercent,omitempty"`
MinimumScalingStepSize int `json:"minimumScalingStepSize,omitempty"`
MaximumScalingStepSize int `json:"maximumScalingStepSize,omitempty"`
InstanceWarmupPeriod int `json:"instanceWarmupPeriod,omitempty"`
TargetCapacityUtilization int `json:"targetCapacityUtilization,omitempty"`
}
ManagedScaling configures managed scaling for an ASG-backed capacity provider.
type MountPoint ¶
type MountPoint struct {
SourceVolume string `json:"sourceVolume,omitempty"`
ContainerPath string `json:"containerPath,omitempty"`
ReadOnly bool `json:"readOnly,omitempty"`
}
MountPoint maps a volume into a container.
type NetworkBinding ¶
type NetworkBinding struct {
BindIP string `json:"bindIP,omitempty"`
Protocol string `json:"protocol,omitempty"`
ContainerPort int `json:"containerPort,omitempty"`
HostPort int `json:"hostPort,omitempty"`
}
NetworkBinding maps a container port to a host port.
type NetworkConfiguration ¶
type NetworkConfiguration struct {
AwsvpcConfiguration *AwsvpcConfiguration `json:"awsvpcConfiguration,omitempty"`
}
NetworkConfiguration holds the network settings for a task or service.
type NetworkInterface ¶
type NetworkInterface struct {
AttachmentID string `json:"attachmentId,omitempty"`
PrivateIpv4Address string `json:"privateIpv4Address,omitempty"`
Ipv6Address string `json:"ipv6Address,omitempty"`
}
NetworkInterface holds the network interface details for a running container.
type PlacementConstraint ¶
type PlacementConstraint struct {
Type string `json:"type,omitempty"`
Expression string `json:"expression,omitempty"`
}
PlacementConstraint specifies a placement constraint for a task or service.
type PlacementStrategy ¶
type PlacementStrategy struct {
Type string `json:"type,omitempty"`
Field string `json:"field,omitempty"`
}
PlacementStrategy specifies a placement strategy for tasks.
type PortMapping ¶
type PortMapping struct {
Name string `json:"name,omitempty"`
Protocol string `json:"protocol,omitempty"`
AppProtocol string `json:"appProtocol,omitempty"`
ContainerPortRange string `json:"containerPortRange,omitempty"`
ContainerPort int `json:"containerPort,omitempty"`
HostPort int `json:"hostPort,omitempty"`
}
PortMapping maps a container port to a host port.
type Provider ¶
type Provider struct{}
Provider implements service.Provider for Amazon ECS.
func (*Provider) Init ¶
func (p *Provider) Init(appCtx *service.AppContext) (service.Registerable, error)
Init initializes the ECS service backend and handler.
type Reconciler ¶
type Reconciler struct {
// contains filtered or unexported fields
}
Reconciler manages ECS service desired-count reconciliation. It runs in the background, comparing DesiredCount vs running task count and starting or stopping tasks as needed.
func NewReconciler ¶
func NewReconciler(backend *InMemoryBackend) *Reconciler
NewReconciler creates a new Reconciler for the given backend.
func (*Reconciler) EvictCluster ¶
func (r *Reconciler) EvictCluster(clusterName string)
EvictCluster removes the per-cluster launch semaphore for a deleted cluster. Without this, r.sems would grow one permanent entry per cluster ever created, leaking memory as clusters are created and destroyed. It is registered as a cluster-delete hook on the backend so eviction happens promptly on DeleteCluster/Purge.
func (*Reconciler) RunOnce ¶
func (r *Reconciler) RunOnce(ctx context.Context)
RunOnce performs a single reconciliation pass. Exported for testing.
func (*Reconciler) SemCount ¶
func (r *Reconciler) SemCount() int
SemCount returns the number of live per-cluster semaphores. Intended for tests that assert the leak fix.
func (*Reconciler) Start ¶
func (r *Reconciler) Start(ctx context.Context)
Start launches the reconciliation loop. It runs until ctx is cancelled.
type RegisterDaemonTaskDefinitionInput ¶
type RegisterDaemonTaskDefinitionInput struct {
Family string
CPU string
Memory string
ExecutionRoleArn string
TaskRoleArn string
ContainerDefinitions []DaemonContainerDefinition
Volumes []DaemonVolume
Tags []Tag
}
RegisterDaemonTaskDefinitionInput holds input for RegisterDaemonTaskDefinition.
type RegisterTaskDefinitionInput ¶
type RegisterTaskDefinitionInput struct {
RuntimePlatform *RuntimePlatform `json:"runtimePlatform,omitempty"`
EphemeralStorage *EphemeralStorage `json:"ephemeralStorage,omitempty"`
Family string `json:"family"`
TaskRoleArn string `json:"taskRoleArn,omitempty"`
ExecutionRoleArn string `json:"executionRoleArn,omitempty"`
NetworkMode string `json:"networkMode,omitempty"`
CPU string `json:"cpu,omitempty"`
Memory string `json:"memory,omitempty"`
PlatformFamily string `json:"platformFamily,omitempty"`
ContainerDefinitions []ContainerDefinition `json:"containerDefinitions"`
Volumes []Volume `json:"volumes,omitempty"`
PlacementConstraints []PlacementConstraint `json:"placementConstraints,omitempty"`
RequiresCompatibilities []string `json:"requiresCompatibilities,omitempty"`
InferenceAccelerators []InferenceAccelerator `json:"inferenceAccelerators,omitempty"`
Tags []Tag `json:"tags,omitempty"`
}
RegisterTaskDefinitionInput holds input for RegisterTaskDefinition.
type RepositoryCredentials ¶
type RepositoryCredentials struct {
CredentialsParameter string `json:"credentialsParameter"`
}
RepositoryCredentials references a SecretsManager secret for private registry pulls.
type ResourceRequirement ¶
type ResourceRequirement struct {
Type string `json:"type"` // GPU or InferenceAccelerator
Value string `json:"value"` // quantity (e.g. "1")
}
ResourceRequirement specifies a GPU or InferenceAccelerator requirement for a container.
type RunTaskInput ¶
type RunTaskInput struct {
Overrides *TaskOverride `json:"overrides,omitempty"`
NetworkConfiguration *NetworkConfiguration `json:"networkConfiguration,omitempty"`
Cluster string `json:"cluster,omitempty"`
TaskDefinition string `json:"taskDefinition"`
LaunchType string `json:"launchType,omitempty"`
Group string `json:"group,omitempty"`
StartedBy string `json:"startedBy,omitempty"`
PlatformVersion string `json:"platformVersion,omitempty"`
PropagateTags string `json:"propagateTags,omitempty"`
Tags []Tag `json:"tags,omitempty"`
PlacementConstraints []PlacementConstraint `json:"placementConstraints,omitempty"`
PlacementStrategy []PlacementStrategy `json:"placementStrategy,omitempty"`
CapacityProviderStrategy []CapacityProviderStrategyItem `json:"capacityProviderStrategy,omitempty"`
Count int `json:"count,omitempty"`
EnableECSManagedTags bool `json:"enableECSManagedTags,omitempty"`
EnableExecuteCommand bool `json:"enableExecuteCommand,omitempty"`
// contains filtered or unexported fields
}
RunTaskInput holds input for RunTask.
type RuntimePlatform ¶
type RuntimePlatform struct {
CPUArchitecture string `json:"cpuArchitecture,omitempty"`
OperatingSystemFamily string `json:"operatingSystemFamily,omitempty"`
}
RuntimePlatform specifies the CPU architecture and OS family for a task definition.
type SecretOption ¶
SecretOption is a secret key/value pair for log driver authentication.
type SecretReference ¶
SecretReference resolves a SecretsManager ARN or SSM path into an env var.
type Service ¶
type Service struct {
CreatedAt time.Time `json:"createdAt"`
ServiceConnectConfiguration *ServiceConnectConfiguration `json:"serviceConnectConfiguration,omitempty"`
DeploymentConfiguration *DeploymentConfiguration `json:"deploymentConfiguration,omitempty"`
DeploymentController *DeploymentController `json:"deploymentController,omitempty"`
NetworkConfiguration *NetworkConfiguration `json:"networkConfiguration,omitempty"`
ServiceArn string `json:"serviceArn"`
ServiceName string `json:"serviceName"`
ClusterArn string `json:"clusterArn"`
TaskDefinition string `json:"taskDefinition"`
Status string `json:"status"`
LaunchType string `json:"launchType,omitempty"`
SchedulingStrategy string `json:"schedulingStrategy,omitempty"`
PropagateTags string `json:"propagateTags,omitempty"`
Tags []Tag `json:"tags,omitempty"`
LoadBalancers []LoadBalancer `json:"loadBalancers,omitempty"`
ServiceRegistries []ServiceRegistry `json:"serviceRegistries,omitempty"`
PlacementConstraints []PlacementConstraint `json:"placementConstraints,omitempty"`
PlacementStrategy []PlacementStrategy `json:"placementStrategy,omitempty"`
CapacityProviderStrategy []CapacityProviderStrategyItem `json:"capacityProviderStrategy,omitempty"`
Deployments []Deployment `json:"deployments,omitempty"`
DesiredCount int `json:"desiredCount"`
PendingCount int `json:"pendingCount"`
RunningCount int `json:"runningCount"`
EnableExecuteCommand bool `json:"enableExecuteCommand,omitempty"`
}
Service represents an ECS service.
type ServiceConnectClientAlias ¶
type ServiceConnectClientAlias struct {
DNSName string `json:"dnsName,omitempty"`
Port int `json:"port"`
}
ServiceConnectClientAlias represents an alias for a service connect client.
type ServiceConnectConfiguration ¶
type ServiceConnectConfiguration struct {
Namespace string `json:"namespace,omitempty"`
Services []ServiceConnectService `json:"services,omitempty"`
Enabled bool `json:"enabled"`
}
ServiceConnectConfiguration represents the service connect configuration for a service.
type ServiceConnectService ¶
type ServiceConnectService struct {
PortName string `json:"portName"`
DiscoveryName string `json:"discoveryName,omitempty"`
ClientAliases []ServiceConnectClientAlias `json:"clientAliases,omitempty"`
}
ServiceConnectService represents a service in a service connect configuration.
type ServiceDeployment ¶
type ServiceDeployment struct {
CreatedAt *time.Time `json:"createdAt,omitempty"`
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
ServiceDeploymentArn string `json:"serviceDeploymentArn"`
ClusterArn string `json:"clusterArn"`
ServiceArn string `json:"serviceArn"`
Status string `json:"status"`
StatusReason string `json:"statusReason,omitempty"`
}
ServiceDeployment represents an ECS service deployment.
type ServiceRegistry ¶
type ServiceRegistry struct {
RegistryArn string `json:"registryArn,omitempty"`
ContainerName string `json:"containerName,omitempty"`
Port int `json:"port,omitempty"`
ContainerPort int `json:"containerPort,omitempty"`
}
ServiceRegistry wires tasks into a CloudMap namespace for service discovery.
type ServiceRevision ¶
type ServiceRevision struct {
CreatedAt *float64 `json:"createdAt,omitempty"`
NetworkConfiguration *NetworkConfiguration `json:"networkConfiguration,omitempty"`
ServiceConnectConfiguration *ServiceConnectConfiguration `json:"serviceConnectConfiguration,omitempty"`
ClusterArn string `json:"clusterArn,omitempty"`
LaunchType string `json:"launchType,omitempty"`
PlatformVersion string `json:"platformVersion,omitempty"`
ServiceArn string `json:"serviceArn,omitempty"`
ServiceRevisionArn string `json:"serviceRevisionArn,omitempty"`
TaskDefinition string `json:"taskDefinition,omitempty"`
CapacityProviderStrategy []CapacityProviderStrategyItem `json:"capacityProviderStrategy,omitempty"`
LoadBalancers []LoadBalancer `json:"loadBalancers,omitempty"`
ServiceRegistries []ServiceRegistry `json:"serviceRegistries,omitempty"`
}
ServiceRevision describes the workload configuration captured by a single deployment of an ECS service, as returned by DescribeServiceRevisions.
type Session ¶
type Session struct {
SessionID string `json:"sessionId"`
StreamURL string `json:"streamUrl"`
TokenValue string `json:"tokenValue"`
}
Session represents an ECS Exec interactive session.
type Snapshottable ¶
type Snapshottable interface {
Snapshot(ctx context.Context) []byte
Restore(context.Context, []byte) error
}
Snapshottable is an optional interface that a Backend may implement to support snapshot/restore for persistence or test isolation.
type StartTaskInput ¶
type StartTaskInput struct {
Cluster string
TaskDefinition string
Group string
StartedBy string
ContainerInstances []string
}
StartTaskInput holds input for StartTask (place a task on a specific container instance).
type SubmitContainerStateChangeInput ¶
type SubmitContainerStateChangeInput struct {
ExitCode *int `json:"exitCode,omitempty"`
Cluster string `json:"cluster,omitempty"`
ContainerName string `json:"containerName,omitempty"`
Reason string `json:"reason,omitempty"`
RuntimeID string `json:"runtimeId,omitempty"`
Status string `json:"status,omitempty"`
Task string `json:"task,omitempty"`
NetworkBindings []NetworkBinding `json:"networkBindings,omitempty"`
}
SubmitContainerStateChangeInput holds input for SubmitContainerStateChange.
type SubmitTaskStateChangeInput ¶
type SubmitTaskStateChangeInput struct {
Cluster string `json:"cluster,omitempty"`
Reason string `json:"reason,omitempty"`
Status string `json:"status,omitempty"`
Task string `json:"task,omitempty"`
Attachments []AttachmentStateChange `json:"attachments,omitempty"`
Containers []ContainerStateChangeItem `json:"containers,omitempty"`
}
SubmitTaskStateChangeInput holds input for SubmitTaskStateChange.
type TaggedEntry ¶ added in v1.2.0
TaggedEntry pairs a resource ARN with its tag map, for cross-service tag enumeration by the Resource Groups Tagging API (see cli.go's wireTaggingECS).
type Task ¶
type Task struct {
StartedAt *time.Time `json:"startedAt,omitempty"`
StoppedAt *time.Time `json:"stoppedAt,omitempty"`
ConnectivityAt *time.Time `json:"connectivityAt,omitempty"`
Overrides *TaskOverride `json:"overrides,omitempty"`
NetworkConfiguration *NetworkConfiguration `json:"networkConfiguration,omitempty"`
TaskArn string `json:"taskArn"`
ClusterArn string `json:"clusterArn"`
TaskDefinitionArn string `json:"taskDefinitionArn"`
LastStatus string `json:"lastStatus"`
DesiredStatus string `json:"desiredStatus"`
Connectivity string `json:"connectivity,omitempty"`
StoppedReason string `json:"stoppedReason,omitempty"`
Group string `json:"group,omitempty"`
LaunchType string `json:"launchType,omitempty"`
ContainerInstanceArn string `json:"containerInstanceArn,omitempty"`
StartedBy string `json:"startedBy,omitempty"`
PlatformVersion string `json:"platformVersion,omitempty"`
PlatformFamily string `json:"platformFamily,omitempty"`
RuntimeID string `json:"runtimeId,omitempty"`
PropagateTags string `json:"propagateTags,omitempty"`
// TaskRoleArn is the effective IAM role ARN for task containers.
// Resolved from Overrides.TaskRoleArn if set, else from the task definition.
TaskRoleArn string `json:"taskRoleArn,omitempty"`
// CapacityProviderName is the capacity provider actually selected to run this
// task. Set from RunTaskInput.CapacityProviderStrategy (the first entry, as a
// documented simplification: this backend does not model weight/base-driven
// distribution across multiple providers -- see RunTask in tasks.go).
CapacityProviderName string `json:"capacityProviderName,omitempty"`
Tags []Tag `json:"tags,omitempty"`
Attachments []TaskAttachment `json:"attachments,omitempty"`
Containers []Container `json:"containers,omitempty"`
EnableExecuteCommand bool `json:"enableExecuteCommand,omitempty"`
}
Task represents an ECS task.
type TaskAttachment ¶
type TaskAttachment struct {
ID string `json:"id"`
Type string `json:"type"`
Status string `json:"status"`
Details []KeyValuePair `json:"details,omitempty"`
}
TaskAttachment represents an ENI or other attachment on a task (e.g. Fargate ENI).
type TaskDefinition ¶
type TaskDefinition struct {
RuntimePlatform *RuntimePlatform `json:"runtimePlatform,omitempty"`
EphemeralStorage *EphemeralStorage `json:"ephemeralStorage,omitempty"`
RegisteredAt time.Time `json:"registeredAt"`
TaskDefinitionArn string `json:"taskDefinitionArn"`
Family string `json:"family"`
TaskRoleArn string `json:"taskRoleArn,omitempty"`
ExecutionRoleArn string `json:"executionRoleArn,omitempty"`
NetworkMode string `json:"networkMode,omitempty"`
Status string `json:"status"`
PlatformFamily string `json:"platformFamily,omitempty"`
CPU string `json:"cpu,omitempty"`
Memory string `json:"memory,omitempty"`
ContainerDefinitions []ContainerDefinition `json:"containerDefinitions"`
Volumes []Volume `json:"volumes,omitempty"`
PlacementConstraints []PlacementConstraint `json:"placementConstraints,omitempty"`
RequiresCompatibilities []string `json:"requiresCompatibilities,omitempty"`
InferenceAccelerators []InferenceAccelerator `json:"inferenceAccelerators,omitempty"`
Revision int `json:"revision"`
}
TaskDefinition represents an ECS task definition.
type TaskOverride ¶
type TaskOverride struct {
TaskRoleArn string `json:"taskRoleArn,omitempty"`
ExecutionRoleArn string `json:"executionRoleArn,omitempty"`
CPU string `json:"cpu,omitempty"`
Memory string `json:"memory,omitempty"`
ContainerOverrides []ContainerOverride `json:"containerOverrides,omitempty"`
}
TaskOverride represents overrides for a task run.
type TaskProtection ¶
type TaskProtection struct {
ExpirationDate *time.Time `json:"expirationDate,omitempty"`
TaskArn string `json:"taskArn"`
ProtectionEnabled bool `json:"protectionEnabled"`
}
TaskProtection represents the protection state for a task.
type TaskRunner ¶
type TaskRunner interface {
RunTask(task *Task, td *TaskDefinition) error
StopTask(task *Task) error
}
TaskRunner is the interface for launching container tasks. The no-op implementation is used when no runtime is configured.
func NewDockerRunner ¶
func NewDockerRunner(ctx context.Context) (TaskRunner, error)
NewDockerRunner creates a TaskRunner backed by the local Docker daemon. It uses the standard DOCKER_HOST / DOCKER_TLS_VERIFY environment variables via client.FromEnv, so it works both locally and inside docker-in-docker.
func NewNoopRunner ¶
func NewNoopRunner() TaskRunner
NewNoopRunner returns a TaskRunner that does nothing.
type TaskSet ¶
type TaskSet struct {
NetworkConfiguration *NetworkConfiguration `json:"networkConfiguration,omitempty"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
StabilityStatusAt time.Time `json:"stabilityStatusAt"`
Status string `json:"status"`
TaskSetArn string `json:"taskSetArn"`
ID string `json:"id"`
ServiceArn string `json:"serviceArn"`
ClusterArn string `json:"clusterArn"`
TaskDefinition string `json:"taskDefinition"`
ExternalID string `json:"externalId,omitempty"`
PlatformVersion string `json:"platformVersion,omitempty"`
LaunchType string `json:"launchType,omitempty"`
StabilityStatus string `json:"stabilityStatus,omitempty"`
Scale TaskSetScale `json:"scale"`
LoadBalancers []LoadBalancer `json:"loadBalancers,omitempty"`
ServiceRegistries []ServiceRegistry `json:"serviceRegistries,omitempty"`
CapacityProviderStrategy []CapacityProviderStrategyItem `json:"capacityProviderStrategy,omitempty"`
}
TaskSet represents an ECS task set within a service.
type TaskSetScale ¶
TaskSetScale specifies a scale for a task set.
type UpdateCapacityProviderInput ¶
type UpdateCapacityProviderInput struct {
AutoScalingGroupProvider *AutoScalingGroupProviderUpdate
Name string
}
UpdateCapacityProviderInput holds input for UpdateCapacityProvider. Note this has no Status or Tags: the real UpdateCapacityProviderRequest only has name, cluster, autoScalingGroupProvider, and managedInstancesProvider.
type UpdateClusterInput ¶
type UpdateClusterInput struct {
Cluster string
Settings []ClusterSetting
}
UpdateClusterInput holds input for UpdateCluster. Note this does not include CapacityProviders/DefaultCapacityProviderStrategy: the real UpdateClusterRequest has no such fields (only cluster, settings, configuration, serviceConnectDefaults) -- capacity-provider association is exclusively managed by the separate PutClusterCapacityProviders operation.
type UpdateDaemonInput ¶
type UpdateDaemonInput struct {
DeploymentConfiguration *DaemonDeploymentConfiguration
DaemonArn string
DaemonTaskDefinitionArn string
PropagateTags string
CapacityProviderArns []string
EnableECSManagedTags bool
EnableExecuteCommand bool
}
UpdateDaemonInput holds input for UpdateDaemon.
type UpdateExpressGatewayServiceInput ¶
type UpdateExpressGatewayServiceInput struct {
NetworkConfiguration *ExpressGatewayServiceNetworkConfiguration
PrimaryContainer *ExpressGatewayContainer
ScalingTarget *ExpressGatewayScalingTarget
ServiceArn string
CPU string
Memory string
HealthCheckPath string
ExecutionRoleArn string
InfrastructureRoleArn string
TaskDefinitionArn string
TaskRoleArn string
}
UpdateExpressGatewayServiceInput holds input for UpdateExpressGatewayService. Mirrors the real UpdateExpressGatewayServiceInput shape: most fields describe the next service-revision configuration (CPU/Memory/HealthCheckPath/ NetworkConfiguration/PrimaryContainer/ScalingTarget/TaskDefinitionArn/ TaskRoleArn/ExecutionRoleArn), while InfrastructureRoleArn is the only field that mutates the service itself rather than spawning a new revision.
type UpdateServiceInput ¶
type UpdateServiceInput struct {
EnableExecuteCommand *bool `json:"enableExecuteCommand,omitempty"`
DesiredCount *int `json:"desiredCount,omitempty"`
DeploymentConfiguration *DeploymentConfiguration `json:"deploymentConfiguration,omitempty"`
NetworkConfiguration *NetworkConfiguration `json:"networkConfiguration,omitempty"`
ServiceConnectConfiguration *ServiceConnectConfiguration `json:"serviceConnectConfiguration,omitempty"`
Cluster string `json:"cluster,omitempty"`
Service string `json:"service"`
TaskDefinition string `json:"taskDefinition,omitempty"`
PropagateTags string `json:"propagateTags,omitempty"`
LoadBalancers []LoadBalancer `json:"loadBalancers,omitempty"`
CapacityProviderStrategy []CapacityProviderStrategyItem `json:"capacityProviderStrategy,omitempty"`
PlacementConstraints []PlacementConstraint `json:"placementConstraints,omitempty"`
PlacementStrategy []PlacementStrategy `json:"placementStrategy,omitempty"`
}
UpdateServiceInput holds input for UpdateService.
type Volume ¶
type Volume struct {
Host *HostVolumeProperties `json:"host,omitempty"`
EFSVolumeConfiguration *EFSVolumeConfiguration `json:"efsVolumeConfiguration,omitempty"`
Name string `json:"name"`
ConfiguredAtLaunch bool `json:"configuredAtLaunch,omitempty"`
}
Volume defines a storage volume for a task definition.
type VolumeFrom ¶
type VolumeFrom struct {
SourceContainer string `json:"sourceContainer,omitempty"`
ReadOnly bool `json:"readOnly,omitempty"`
}
VolumeFrom specifies a container whose volumes to mount.
Source Files
¶
- account_settings.go
- agent.go
- capacity_providers.go
- clusters.go
- container_instances.go
- daemon.go
- deployment.go
- docker_runner.go
- elbv2_targets.go
- errors.go
- express_gateway.go
- fis.go
- handler.go
- handler_account_settings.go
- handler_agent_ops.go
- handler_capacity_providers.go
- handler_clusters.go
- handler_container_instances.go
- handler_daemon.go
- handler_express_gateway.go
- handler_service_deployments.go
- handler_services.go
- handler_tags.go
- handler_task_definitions.go
- handler_task_sets.go
- handler_tasks.go
- interfaces.go
- janitor.go
- lifecycle.go
- models.go
- persistence.go
- provider.go
- purge.go
- reconciler.go
- service_deployments.go
- services.go
- sfn_integration.go
- store.go
- store_setup.go
- tags.go
- task_containers.go
- task_definitions.go
- task_placement.go
- task_sets.go
- taskdef_validation.go
- tasks.go