Documentation
¶
Index ¶
- Constants
- Variables
- func CLI(ctx context.Context, parse CLIParseFunc) (int, error)
- func CompareTags(oldTags, newTags []types.Tag) (added, updated, deleted []types.Tag)
- func DefaultJsonnetNativeFuncs() []*jsonnet.NativeFunction
- func Docs(_ context.Context, opt DocsOption) error
- func ExportEnvFile(file string) error
- func LogDebug(f string, v ...any)
- func LogError(f string, v ...any)
- func LogInfo(msg string, args ...any)
- func LogWarn(msg string, args ...any)
- func MarshalJSONForAPI(v any, queries ...string) ([]byte, error)
- func MustMarshalJSONStringForAPI(v any) string
- func NormalizePlatform(p *types.RuntimePlatform, isFargate bool) (arch, os string)
- func OutputJSONForAPI(w io.Writer, v any) (int, error)
- func UnmarshalJSONForStruct(src []byte, v any, path string) error
- func WriteOutput(v any) (int, error)
- type App
- func (d *App) AppSpec(ctx context.Context, opt AppSpecOption) error
- func (d *App) BuildServiceAttributes(sv *Service) *ecs.UpdateServiceInput
- func (d *App) Config() *Config
- func (d *App) Delete(ctx context.Context, opt DeleteOption) error
- func (d *App) Deploy(ctx context.Context, opt DeployOption) error
- func (d *App) DeployByCodeDeploy(ctx context.Context, in *ecs.UpdateServiceInput, taskDefinitionArn string, ...) error
- func (d *App) DeployByECS(ctx context.Context, in *ecs.UpdateServiceInput, taskDefinitionArn string, ...) error
- func (d *App) DeployExpressGatewayService(ctx context.Context, sv *Service, opt DeployOption) error
- func (d *App) DeployFunc(sv *Service) (deployFunc, error)
- func (d *App) Deregister(ctx context.Context, opt DeregisterOption) error
- func (d *App) DescribeExpressGatewayService(ctx context.Context, sv *Service) (*ExpressGatewayService, error)
- func (d *App) DescribeService(ctx context.Context) (*Service, error)
- func (d *App) DescribeServiceStatus(ctx context.Context, events int) (*Service, error)
- func (d *App) DescribeServicesInput() *ecs.DescribeServicesInput
- func (d *App) DescribeTaskDefinition(ctx context.Context, tdArn string) (*TaskDefinitionInput, error)
- func (d *App) DescribeTaskStatus(ctx context.Context, task *types.Task, ...) error
- func (d *App) DescribeTasksInput(task *types.Task) *ecs.DescribeTasksInput
- func (d *App) Diff(ctx context.Context, opt DiffOption) error
- func (d *App) DiffExpress(ctx context.Context, opt DiffOption) error
- func (d *App) Exec(ctx context.Context, opt ExecOption) error
- func (d *App) FilterCommand() string
- func (d *App) FindRollbackTarget(ctx context.Context, taskDefinitionArn string) (string, error)
- func (d *App) GetLogEvents(ctx context.Context, logGroup string, logStream string, startedAt time.Time, ...) (*string, error)
- func (d *App) GetLogEventsInput(logGroup string, logStream string, startAt int64, nextToken *string) *cloudwatchlogs.GetLogEventsInput
- func (d *App) GetLogInfo(task *types.Task, c *types.ContainerDefinition) (string, string)
- func (d *App) HasDiff(ctx context.Context, opt DiffOption) (bool, error)
- func (d *App) Init(ctx context.Context, opt InitOption) error
- func (d *App) LoadExpressDefinition(path string) (*ExpressGatewayService, error)
- func (d *App) LoadServiceDefinition(path string) (*Service, error)
- func (d *App) LoadTaskDefinition(path string) (*TaskDefinitionInput, error)
- func (d *App) LogDebug(f string, v ...any)
- func (d *App) LogError(f string, v ...any)
- func (d *App) LogInfo(msg string, args ...any)
- func (d *App) LogJSON(v any)
- func (d *App) LogWarn(msg string, args ...any)
- func (d *App) Name() string
- func (d *App) NewEcsta(ctx context.Context) (*ecsta.Ecsta, error)
- func (d *App) PluginInstance(name, funcPrefix string) any
- func (d *App) Register(ctx context.Context, opt RegisterOption) error
- func (d *App) RegisterTaskDefinition(ctx context.Context, td *TaskDefinitionInput) (*TaskDefinition, error)
- func (d *App) Render(ctx context.Context, opt RenderOption) error
- func (d *App) Revisions(ctx context.Context, opt RevisionsOption) error
- func (d *App) Rollback(ctx context.Context, opt RollbackOption) error
- func (d *App) RollbackByCodeDeploy(ctx context.Context, sv *Service, targetArn string, opt RollbackOption) (string, error)
- func (d *App) RollbackECSService(ctx context.Context, sv *Service, targetArn string, opt RollbackOption) (string, error)
- func (d *App) RollbackExpressService(ctx context.Context, sv *Service, _ string, opt RollbackOption) (string, error)
- func (d *App) RollbackFunc(sv *Service) (rollbackFunc, error)
- func (d *App) RollbackServiceTasks(ctx context.Context, sv *Service, targetArn string, opt RollbackOption) (string, error)
- func (d *App) Run(ctx context.Context, opt RunOption) error
- func (d *App) RunTask(ctx context.Context, tdArn string, ov *types.TaskOverride, opt *RunOption) (*types.Task, error)
- func (d *App) Start(ctx context.Context) (context.Context, context.CancelFunc)
- func (d *App) Status(ctx context.Context, opt StatusOption) error
- func (d *App) Tasks(ctx context.Context, opt TasksOption) error
- func (d *App) Timeout() time.Duration
- func (d *App) UpdateServiceTags(ctx context.Context, sv *Service, added, updated, deleted []types.Tag, ...) error
- func (d *App) Verify(ctx context.Context, opt VerifyOption) error
- func (d *App) Wait(ctx context.Context, opt WaitOption) error
- func (d *App) WaitForCodeDeploy(ctx context.Context, sv *Service) error
- func (d *App) WaitForCodeDeployLifecycle(targetLifecycleEvent string) waitFunc
- func (d *App) WaitFunc(sv *Service, confirm confirmFunc, until waitUntil) (waitFunc, error)
- func (d *App) WaitRunTask(ctx context.Context, task *types.Task, ...) error
- func (d *App) WaitServiceDeployCompleted(ctx context.Context, sv *Service) error
- func (d *App) WaitServiceDeployLifecycleStage(stage types.ServiceDeploymentLifecycleStage) waitFunc
- func (d *App) WaitServiceStable(ctx context.Context, sv *Service) error
- func (d *App) WaitTaskSetStable(ctx context.Context, sv *Service) error
- type AppOption
- type AppSpecOption
- type CLIOptions
- type CLIParseFunc
- type Config
- type ConfigCodeDeploy
- type ConfigIgnore
- type ConfigPlugin
- type DeleteOption
- type DeployOption
- type DeregisterOption
- type DescribeServiceStatusOutput
- type DiffOption
- type DocsOption
- type Duration
- type ErrConflictOptions
- type ErrNotFound
- type ErrPermissionDenied
- type ErrSkipVerify
- type ExecCpOption
- type ExecOption
- type ExecPortforwardOption
- type ExecRunOption
- type ExpressGatewayService
- type InitOption
- type RefreshOption
- type RegisterOption
- type RenderOption
- type RevisionsOption
- type RollbackOption
- type RunOption
- type ScaleOption
- type Service
- type ServiceForDiff
- type StatusOption
- type TaskDefinition
- type TaskDefinitionInput
- type TasksFindOption
- type TasksListOption
- type TasksLogsOption
- type TasksOption
- type TasksStopOption
- type TasksTraceOption
- type VerifyOption
- type WaitOption
Constants ¶
const ( DefaultClusterName = "default" DefaultTimeout = 10 * time.Minute )
const (
CodeDeployConsoleURLFmt = "https://%s.console.aws.amazon.com/codesuite/codedeploy/deployments/%s?region=%s"
)
const DefaultConfigFilePath = "ecspresso.yml"
const DefaultDesiredCount = -1
Variables ¶
var CreateFileMode = os.FileMode(0644)
var EventTimeFormat = sloghandler.TimeFormat
var Version = "v2.8.6"
Version is the released version of ecspresso. Managed by tagpr.
Functions ¶
func CompareTags ¶ added in v2.2.0
func DefaultJsonnetNativeFuncs ¶ added in v2.4.0
func DefaultJsonnetNativeFuncs() []*jsonnet.NativeFunction
func Docs ¶ added in v2.8.0
func Docs(_ context.Context, opt DocsOption) error
Docs shows embedded documentation.
func ExportEnvFile ¶
ExportEnvFile exports envfile to environment variables.
func NormalizePlatform ¶
func NormalizePlatform(p *types.RuntimePlatform, isFargate bool) (arch, os string)
func UnmarshalJSONForStruct ¶ added in v2.2.3
func WriteOutput ¶ added in v2.5.0
Types ¶
type App ¶
func (*App) BuildServiceAttributes ¶ added in v2.8.1
func (d *App) BuildServiceAttributes(sv *Service) *ecs.UpdateServiceInput
func (*App) DeployByCodeDeploy ¶
func (d *App) DeployByCodeDeploy(ctx context.Context, in *ecs.UpdateServiceInput, taskDefinitionArn string, count *int32, sv *Service, opt DeployOption) error
func (*App) DeployByECS ¶ added in v2.8.1
func (d *App) DeployByECS(ctx context.Context, in *ecs.UpdateServiceInput, taskDefinitionArn string, count *int32, sv *Service, opt DeployOption) error
func (*App) DeployExpressGatewayService ¶ added in v2.7.0
func (*App) DeployFunc ¶ added in v2.0.4
func (*App) Deregister ¶
func (d *App) Deregister(ctx context.Context, opt DeregisterOption) error
func (*App) DescribeExpressGatewayService ¶ added in v2.7.0
func (*App) DescribeServiceStatus ¶
func (*App) DescribeServicesInput ¶
func (d *App) DescribeServicesInput() *ecs.DescribeServicesInput
func (*App) DescribeTaskDefinition ¶
func (*App) DescribeTaskStatus ¶
func (*App) DescribeTasksInput ¶
func (d *App) DescribeTasksInput(task *types.Task) *ecs.DescribeTasksInput
func (*App) Diff ¶
func (d *App) Diff(ctx context.Context, opt DiffOption) error
Diff renders the diff between local definitions and the deployed service / task definition to opt.w (or stdout when nil). It is the CLI dispatch entry and keeps the (ctx, opt) error signature shared with the other dispatched commands.
func (*App) DiffExpress ¶ added in v2.7.0
func (d *App) DiffExpress(ctx context.Context, opt DiffOption) error
DiffExpress is the dispatch entry for the express-mode diff.
func (*App) FilterCommand ¶
func (*App) FindRollbackTarget ¶
func (*App) GetLogEvents ¶
func (*App) GetLogEventsInput ¶
func (d *App) GetLogEventsInput(logGroup string, logStream string, startAt int64, nextToken *string) *cloudwatchlogs.GetLogEventsInput
func (*App) GetLogInfo ¶
func (*App) HasDiff ¶ added in v2.8.5
HasDiff reports whether there is any difference between local definitions and what is currently deployed, without writing the diff output anywhere. Intended for library callers that want to branch on "is there anything to deploy" — e.g. terraform-provider- ecspresso skipping `ecspresso deploy` when the rendered configs already match AWS.
func (*App) LoadExpressDefinition ¶ added in v2.7.0
func (d *App) LoadExpressDefinition(path string) (*ExpressGatewayService, error)
func (*App) LoadServiceDefinition ¶
func (*App) LoadTaskDefinition ¶
func (d *App) LoadTaskDefinition(path string) (*TaskDefinitionInput, error)
func (*App) PluginInstance ¶ added in v2.8.4
PluginInstance returns the runtime instance produced by the named plugin during Setup, identified by funcPrefix (pass "" for the default prefix). The concrete type depends on the plugin: for example the "tfstate" plugin returns *tfstate.TFState, which callers can type-assert to call SetOverrides on. Returns nil if no matching plugin is configured.
func (*App) RegisterTaskDefinition ¶
func (d *App) RegisterTaskDefinition(ctx context.Context, td *TaskDefinitionInput) (*TaskDefinition, error)
func (*App) Revisions ¶ added in v2.4.0
func (d *App) Revisions(ctx context.Context, opt RevisionsOption) error
func (*App) RollbackByCodeDeploy ¶
func (*App) RollbackECSService ¶ added in v2.6.0
func (*App) RollbackExpressService ¶ added in v2.7.0
func (*App) RollbackFunc ¶ added in v2.0.4
func (*App) RollbackServiceTasks ¶ added in v2.0.4
func (*App) UpdateServiceTags ¶ added in v2.2.0
func (*App) Verify ¶
func (d *App) Verify(ctx context.Context, opt VerifyOption) error
Verify verifies service / task definitions related resources are valid.
func (*App) WaitForCodeDeploy ¶
func (*App) WaitForCodeDeployLifecycle ¶ added in v2.6.2
func (*App) WaitRunTask ¶
func (*App) WaitServiceDeployCompleted ¶ added in v2.5.0
func (*App) WaitServiceDeployLifecycleStage ¶ added in v2.8.6
func (d *App) WaitServiceDeployLifecycleStage(stage types.ServiceDeploymentLifecycleStage) waitFunc
WaitServiceDeployLifecycleStage waits until the deployment reaches the target lifecycle stage, instead of waiting for the whole deployment to finish. This allows returning before a long bakeTimeInMinutes elapses.
func (*App) WaitServiceStable ¶
type AppOption ¶ added in v2.3.0
type AppOption func(*appOptions)
func WithConfig ¶ added in v2.3.0
func WithConfigLoader ¶ added in v2.3.0
func WithLogger ¶ added in v2.3.0
type AppSpecOption ¶
type CLIOptions ¶
type CLIOptions struct {
Envfile []string `help:"environment files" env:"ECSPRESSO_ENVFILE"`
Debug bool `help:"enable debug log" env:"ECSPRESSO_DEBUG"`
ExtStr map[string]string `help:"external string values for Jsonnet" env:"ECSPRESSO_EXT_STR"`
ExtCode map[string]string `help:"external code values for Jsonnet" env:"ECSPRESSO_EXT_CODE"`
ConfigFilePath string `name:"config" help:"config file" default:"ecspresso.yml" env:"ECSPRESSO_CONFIG"`
AssumeRoleARN string `help:"the ARN of the role to assume" default:"" env:"ECSPRESSO_ASSUME_ROLE_ARN"`
Timeout *time.Duration `help:"timeout. Override in a configuration file." env:"ECSPRESSO_TIMEOUT"`
FilterCommand string `help:"filter command" env:"ECSPRESSO_FILTER_COMMAND"`
Color bool `help:"enable colorized output" env:"ECSPRESSO_COLOR" default:"true" negatable:""`
LogFormat string `help:"log format" env:"ECSPRESSO_LOG_FORMAT" default:"text" enum:"text,json"`
Appspec *AppSpecOption `cmd:"" help:"output AppSpec YAML for CodeDeploy to STDOUT"`
Delete *DeleteOption `cmd:"" help:"delete service"`
Deploy *DeployOption `cmd:"" help:"deploy service"`
Deregister *DeregisterOption `cmd:"" help:"deregister task definition"`
Diff *DiffOption `cmd:"" help:"show diff between task definition, service definition with current running service and task definition"`
Docs *DocsOption `cmd:"" help:"show documentation for ecspresso"`
Exec *ExecOption `cmd:"" help:"execute command on task"`
Init *InitOption `cmd:"" help:"create configuration files from existing ECS service"`
Refresh *RefreshOption `cmd:"" help:"refresh service. equivalent to deploy --skip-task-definition --force-new-deployment --no-update-service"`
Register *RegisterOption `cmd:"" help:"register task definition"`
Render *RenderOption `cmd:"" help:"render config, service definition or task definition file to STDOUT"`
Revisions *RevisionsOption `cmd:"" help:"show revisions of task definitions"`
Rollback *RollbackOption `cmd:"" help:"rollback service"`
Run *RunOption `cmd:"" help:"run task"`
Scale *ScaleOption `cmd:"" help:"scale service. equivalent to deploy --skip-task-definition --no-update-service"`
Status *StatusOption `cmd:"" help:"show status of service"`
Tasks *TasksOption `cmd:"" help:"list tasks that are in a service or having the same family"`
Verify *VerifyOption `cmd:"" help:"verify resources in configurations"`
Wait *WaitOption `cmd:"" help:"wait until service stable"`
Skills *skillscmd.Commands `cmd:"" help:"manage agent skills"`
Version struct{} `cmd:"" help:"show version"`
}
func ParseCLIv2 ¶
func ParseCLIv2(args []string) (string, *CLIOptions, func(), error)
func (*CLIOptions) ForSubCommand ¶
func (opts *CLIOptions) ForSubCommand(sub string) any
type CLIParseFunc ¶
type CLIParseFunc func([]string) (string, *CLIOptions, func(), error)
type Config ¶
type Config struct {
RequiredVersion string `yaml:"required_version,omitempty" json:"required_version,omitempty"`
Region string `yaml:"region" json:"region"`
Cluster string `yaml:"cluster" json:"cluster"`
Service string `yaml:"service" json:"service"`
ServiceDefinitionPath string `yaml:"service_definition,omitempty" json:"service_definition,omitempty"`
TaskDefinitionPath string `yaml:"task_definition,omitempty" json:"task_definition,omitempty"`
ExpressDefinitionPath string `yaml:"express_definition,omitempty" json:"express_definition,omitempty"`
Plugins []ConfigPlugin `yaml:"plugins,omitempty" json:"plugins,omitempty"`
AppSpec *appspec.AppSpec `yaml:"appspec,omitempty" json:"appspec,omitempty"`
FilterCommand string `yaml:"filter_command,omitempty" json:"filter_command,omitempty"`
Timeout *Duration `yaml:"timeout,omitempty" json:"timeout,omitempty"`
CodeDeploy *ConfigCodeDeploy `yaml:"codedeploy,omitempty" json:"codedeploy,omitempty"`
Ignore *ConfigIgnore `yaml:"ignore,omitempty" json:"ignore,omitempty"`
// contains filtered or unexported fields
}
Config represents a configuration.
func NewDefaultConfig ¶
func NewDefaultConfig() *Config
NewDefaultConfig creates a default configuration.
func (*Config) AssumeRole ¶ added in v2.1.0
func (*Config) OverrideByCLIOptions ¶ added in v2.3.0
func (c *Config) OverrideByCLIOptions(opt *CLIOptions)
func (*Config) ValidateVersion ¶
ValidateVersion validates a version satisfies required_version.
type ConfigCodeDeploy ¶
type ConfigCodeDeploy struct {
ApplicationName string `yaml:"application_name,omitempty" json:"application_name,omitempty"`
DeploymentGroupName string `yaml:"deployment_group_name,omitempty" json:"deployment_group_name,omitempty"`
DeploymentConfigName string `yaml:"deployment_config_name,omitempty" json:"deployment_config_name,omitempty"`
}
type ConfigIgnore ¶ added in v2.4.0
type ConfigIgnore struct {
Tags []string `yaml:"tags,omitempty" json:"tags,omitempty"`
}
func (*ConfigIgnore) Apply ¶ added in v2.4.0
func (i *ConfigIgnore) Apply(v hasTags) error
type ConfigPlugin ¶
type ConfigPlugin struct {
Name string `yaml:"name" json:"name,omitempty"`
Config map[string]any `yaml:"config" json:"config,omitempty"`
FuncPrefix string `yaml:"func_prefix,omitempty" json:"func_prefix,omitempty"`
}
func (ConfigPlugin) AppendFuncMap ¶
func (p ConfigPlugin) AppendFuncMap(c *Config, funcMap template.FuncMap) error
func (ConfigPlugin) AppendJsonnetNativeFuncs ¶ added in v2.4.0
func (p ConfigPlugin) AppendJsonnetNativeFuncs(c *Config, funcs []*jsonnet.NativeFunction) error
type DeleteOption ¶
type DeleteOption struct {
DryRun bool `help:"dry-run" default:"false"`
Force bool `help:"delete without confirmation" default:"false"`
Terminate bool `help:"delete with terminate tasks" default:"false"`
}
func (DeleteOption) DryRunString ¶
func (opt DeleteOption) DryRunString() string
type DeployOption ¶
type DeployOption struct {
DryRun bool `help:"dry run" default:"false"`
DesiredCount *int32 `name:"tasks" help:"desired count of tasks" default:"-1"`
SkipTaskDefinition bool `help:"skip register a new task definition" default:"false"`
Revision int64 `help:"revision of the task definition to run when --skip-task-definition" default:"0"`
ForceNewDeployment bool `help:"force a new deployment of the service" default:"false"`
Wait bool `help:"wait for service stable" default:"true" negatable:""`
WaitUntil string `` /* 369-byte string literal not displayed */
SuspendAutoScaling *bool `help:"suspend application auto-scaling attached with the ECS service"`
ResumeAutoScaling *bool `help:"resume application auto-scaling attached with the ECS service"`
AutoScalingMin *int32 `help:"set minimum capacity of application auto-scaling attached with the ECS service"`
AutoScalingMax *int32 `help:"set maximum capacity of application auto-scaling attached with the ECS service"`
RollbackEvents string `` /* 152-byte string literal not displayed */
UpdateService bool `help:"update service attributes by service definition" default:"true" negatable:""`
LatestTaskDefinition bool `help:"deploy with the latest task definition without registering a new task definition" default:"false"`
}
func (DeployOption) DryRunString ¶
func (opt DeployOption) DryRunString() string
func (DeployOption) ModifyAutoScalingParams ¶ added in v2.2.0
func (opt DeployOption) ModifyAutoScalingParams() *modifyAutoScalingParams
func (DeployOption) Validate ¶ added in v2.6.2
func (opt DeployOption) Validate() error
type DeregisterOption ¶
type DeregisterOption struct {
DryRun bool `help:"dry run" default:"false"`
Keeps *int `help:"number of task definitions to keep except in-use"`
Revision string `help:"revision number or 'latest'" default:""`
Force bool `help:"force deregister without confirmation" default:"false"`
Delete bool `help:"delete task definition on deregistered" default:"false"`
}
func (DeregisterOption) DryRunString ¶
func (opt DeregisterOption) DryRunString() string
type DescribeServiceStatusOutput ¶ added in v2.5.0
type DescribeServiceStatusOutput struct {
Service string
Cluster string
TaskDefinition string
Express *types.ECSExpressGatewayService
Deployments []types.Deployment
TaskSets []types.TaskSet
AutoScaling struct {
ScalableTargets []aasTypes.ScalableTarget
ScalingPolicies []aasTypes.ScalingPolicy
}
Events []types.ServiceEvent
}
func (*DescribeServiceStatusOutput) String ¶ added in v2.5.0
func (s *DescribeServiceStatusOutput) String() string
type DiffOption ¶
type DiffOption struct {
Unified bool `help:"unified diff format" default:"true" negatable:""`
Jsonnet bool `help:"render as jsonnet format" default:"false"`
External string `help:"external command to format diff" env:"ECSPRESSO_DIFF_COMMAND"`
WithService bool `help:"with service definition" default:"true" negatable:"without-service"`
// contains filtered or unexported fields
}
type DocsOption ¶ added in v2.8.0
type DocsOption struct {
Article string `help:"article name to display" default:"readme" enum:"readme"`
List bool `help:"list available articles" default:"false"`
Index bool `help:"show table of contents" default:"false"`
Search string `help:"search keyword in documents" default:""`
JSON bool `help:"output in JSON format" default:"false" name:"json"`
}
DocsOption defines CLI options for the docs subcommand.
type Duration ¶
func (*Duration) MarshalJSON ¶
func (*Duration) MarshalYAML ¶
func (*Duration) UnmarshalJSON ¶
func (*Duration) UnmarshalYAML ¶
type ErrConflictOptions ¶ added in v2.0.4
type ErrConflictOptions string
func (ErrConflictOptions) Error ¶ added in v2.0.4
func (e ErrConflictOptions) Error() string
type ErrNotFound ¶
type ErrNotFound string
func (ErrNotFound) Error ¶
func (e ErrNotFound) Error() string
type ErrPermissionDenied ¶ added in v2.6.0
type ErrPermissionDenied string
func (ErrPermissionDenied) Error ¶ added in v2.6.0
func (e ErrPermissionDenied) Error() string
type ErrSkipVerify ¶
type ErrSkipVerify string
func (ErrSkipVerify) Error ¶
func (e ErrSkipVerify) Error() string
type ExecCpOption ¶ added in v2.8.0
type ExecOption ¶
type ExecOption struct {
ID string `help:"task ID" default:""`
Container string `help:"container name" default:""`
Run *ExecRunOption `cmd:"" default:"withargs" help:"execute command on task"`
Portforward *ExecPortforwardOption `cmd:"" help:"port forwarding to a task"`
Cp *ExecCpOption `cmd:"" help:"copy files between local and task"`
}
type ExecPortforwardOption ¶ added in v2.8.0
type ExecRunOption ¶ added in v2.8.0
type ExecRunOption struct {
Command string `help:"command to execute" default:"sh"`
PortForward bool `name:"port-forward" hidden:"" default:"false"`
LocalPort int `name:"local-port" hidden:"" default:"0"`
Port int `name:"port" hidden:"" default:"0"`
Host string `name:"host" hidden:"" default:""`
L string `name:"L" short:"L" hidden:"" default:""`
}
ExecRunOption is the default subcommand for exec. Deprecated flags are kept as hidden for backward compatibility.
type ExpressGatewayService ¶ added in v2.7.0
type ExpressGatewayService struct {
*ecs.CreateExpressGatewayServiceInput
// contains filtered or unexported fields
}
func (*ExpressGatewayService) GetTags ¶ added in v2.7.0
func (e *ExpressGatewayService) GetTags() []types.Tag
func (*ExpressGatewayService) SetTags ¶ added in v2.7.0
func (e *ExpressGatewayService) SetTags(tags []types.Tag)
type InitOption ¶
type InitOption struct {
Region string `help:"AWS region" env:"AWS_REGION" default:""`
Cluster string `help:"ECS cluster name" default:"default"`
Service string `help:"ECS service name" required:"" xor:"FROM"`
TaskDefinition string `help:"ECS task definition name:revision" required:"" xor:"FROM"`
TaskDefinitionPath string `help:"path to output task definition file" default:"ecs-task-def.json"`
ServiceDefinitionPath string `help:"path to output service definition file" default:"ecs-service-def.json"`
ExpressDefinitionPath string `help:"path to output express service definition file" default:"ecs-express-def.json"`
Sort bool `help:"sort elements in task definition" default:"false" negatable:""`
ForceOverwrite bool `help:"overwrite existing files" default:"false"`
Jsonnet bool `help:"output files as jsonnet format" default:"false"`
Express *bool `help:"import express service definition" negatable:""`
}
type RefreshOption ¶
type RefreshOption struct {
DryRun bool `help:"dry run" default:"false"`
Wait bool `help:"wait for service stable" default:"true" negatable:""`
}
func (*RefreshOption) DeployOption ¶
func (o *RefreshOption) DeployOption() DeployOption
type RegisterOption ¶
type RegisterOption struct {
DryRun bool `help:"dry run" default:"false"`
Output bool `help:"output the registered task definition as JSON" default:"false"`
}
func (RegisterOption) DryRunString ¶
func (opt RegisterOption) DryRunString() string
type RenderOption ¶
type RevisionsOption ¶
type RollbackOption ¶
type RollbackOption struct {
DryRun bool `help:"dry run" default:"false"`
DeregisterTaskDefinition bool `help:"deregister the rolled-back task definition. not works with --no-wait" default:"true" negatable:""`
Wait bool `help:"wait for the service stable" default:"true" negatable:""`
WaitUntil string `` /* 134-byte string literal not displayed */
RollbackEvents string `` /* 152-byte string literal not displayed */
}
func (RollbackOption) DryRunString ¶
func (opt RollbackOption) DryRunString() string
type RunOption ¶
type RunOption struct {
DryRun bool `help:"dry run" default:"false"`
TaskDefinition string `name:"task-def" help:"task definition file for run task" default:""`
Wait bool `help:"wait for task to complete" default:"true" negatable:""`
TaskOverrideStr string `name:"overrides" help:"task override JSON string" default:""`
TaskOverrideFile string `name:"overrides-file" help:"task override JSON file path" default:""`
SkipTaskDefinition bool `help:"skip register a new task definition" default:"false"`
Count int32 `help:"number of tasks to run (max 10)" default:"1"`
WatchContainer string `help:"container name for watching exit code" default:""`
LatestTaskDefinition bool `help:"use the latest task definition without registering a new task definition" default:"false"`
PropagateTags string `help:"propagate the tags for the task (SERVICE or TASK_DEFINITION)" default:""`
Tags string `help:"tags for the task: format is KeyFoo=ValueFoo,KeyBar=ValueBar" default:""`
WaitUntil string `help:"wait until invoked tasks status reached to (running or stopped)" default:"stopped" enum:"running,stopped"`
Revision *int64 `help:"revision of the task definition to run when --skip-task-definition" default:"0"`
ClientToken *string `help:"unique token that identifies a request, useful for idempotency"`
EBSDeleteOnTermination *bool `help:"whether to delete the EBS volume when the task is stopped" default:"true" negatable:""`
}
func (RunOption) DryRunString ¶
type ScaleOption ¶
type ScaleOption struct {
DryRun bool `help:"dry run" default:"false"`
DesiredCount *int32 `name:"tasks" help:"desired count of tasks" default:"-1"`
Wait bool `help:"wait for service stable" default:"true" negatable:""`
SuspendAutoScaling *bool `help:"suspend application auto-scaling attached with the ECS service"`
ResumeAutoScaling *bool `help:"resume application auto-scaling attached with the ECS service"`
AutoScalingMin *int32 `help:"set minimum capacity of application auto-scaling attached with the ECS service"`
AutoScalingMax *int32 `help:"set maximum capacity of application auto-scaling attached with the ECS service"`
}
func (*ScaleOption) DeployOption ¶
func (o *ScaleOption) DeployOption() DeployOption
type Service ¶
type Service struct {
types.Service
ServiceConnectConfiguration *types.ServiceConnectConfiguration
VolumeConfigurations []types.ServiceVolumeConfiguration
VpcLatticeConfigurations []types.VpcLatticeConfiguration
Monitoring *types.MonitoringConfiguration
DesiredCount *int32
}
func (*Service) PrimaryDeployment ¶ added in v2.4.0
func (sv *Service) PrimaryDeployment() (types.Deployment, bool)
type ServiceForDiff ¶ added in v2.2.0
type ServiceForDiff struct {
*ecs.UpdateServiceInput
Tags []types.Tag
}
func ServiceDefinitionForDiff ¶ added in v2.2.0
func ServiceDefinitionForDiff(sv *Service) *ServiceForDiff
type StatusOption ¶
type StatusOption struct {
Events int `help:"show events num" default:"10"`
}
type TaskDefinition ¶
type TaskDefinition types.TaskDefinition
func (*TaskDefinition) Name ¶ added in v2.4.0
func (td *TaskDefinition) Name() string
type TaskDefinitionInput ¶
type TaskDefinitionInput ecs.RegisterTaskDefinitionInput
func (*TaskDefinitionInput) GetTags ¶ added in v2.4.0
func (tdi *TaskDefinitionInput) GetTags() []types.Tag
func (*TaskDefinitionInput) SetTags ¶ added in v2.4.0
func (tdi *TaskDefinitionInput) SetTags(tags []types.Tag)
type TasksFindOption ¶ added in v2.8.0
type TasksFindOption struct{}
type TasksListOption ¶ added in v2.8.0
type TasksListOption struct {
DeprecatedFind bool `name:"find" hidden:"" default:"false"`
DeprecatedStop bool `name:"stop" hidden:"" default:"false"`
DeprecatedForce bool `name:"force" hidden:"" default:"false"`
DeprecatedTrace bool `name:"trace" hidden:"" default:"false"`
}
TasksListOption is the default subcommand for tasks. Deprecated flags are kept as hidden for backward compatibility.
type TasksLogsOption ¶ added in v2.8.0
type TasksOption ¶
type TasksOption struct {
ID string `help:"task ID" default:""`
Output string `help:"output format" enum:"table,json,tsv" default:"table"`
List *TasksListOption `cmd:"" default:"withargs" help:"list tasks"`
Find *TasksFindOption `cmd:"" help:"find a task from tasks list and dump it as JSON"`
Stop *TasksStopOption `cmd:"" help:"stop a task"`
Trace *TasksTraceOption `cmd:"" help:"trace a task"`
Logs *TasksLogsOption `cmd:"" help:"show logs of a task"`
}
type TasksStopOption ¶ added in v2.8.0
type TasksStopOption struct {
Force bool `help:"stop the task without confirmation" default:"false"`
}
type TasksTraceOption ¶ added in v2.8.0
type TasksTraceOption struct{}
type VerifyOption ¶
type VerifyOption struct {
GetSecrets bool `help:"get secrets from ParameterStore or SecretsManager" default:"true" negatable:""`
PutLogs bool `help:"put logs to CloudWatchLogs" default:"true" negatable:""`
Cache bool `help:"use cache" default:"true" negatable:""`
}
VerifyOption represents options for Verify()
type WaitOption ¶
type WaitOption struct {
WaitUntil string `` /* 150-byte string literal not displayed */
}
Source Files
¶
- appspec.go
- autoscaling.go
- cli.go
- cliv2.go
- config.go
- create.go
- delete.go
- deploy.go
- deregister.go
- diff.go
- docs.go
- docs_embed.go
- duration.go
- ecspresso.go
- envfile.go
- errors.go
- exec.go
- express.go
- format.go
- init.go
- json.go
- jsonnet.go
- logger.go
- output.go
- plugin.go
- refresh.go
- register.go
- render.go
- revisions.go
- rollback.go
- run.go
- scale.go
- skills.go
- status.go
- tasks.go
- util.go
- verify.go
- version.go
- wait.go