Exemplo n.º 1
0
func cliStartTaskParams(args []string) *flag.FlagSet {
	var c = cli.Get("", args)
	c.StringVar(&cliClusterName, "cluster", "default", "The short name or full Amazon Resource Name (ARN) of the cluster that hosts the tasks to list. If you do not specify a cluster, the default cluster is assumed..")
	c.StringVar(&cliContainerInstance, "container-instances", "", "Comma separated list of container instance IDs or full Amazon Resource Name (ARN) entries for the container instances on which you would like to place your task. The list of container instances to start tasks on is limited to 10.")
	c.StringVar(&cliTaskDef, "task-definition", "", "The family and revision (family:revision ) or full Amazon Resource Name (ARN) of the task definition to start. If a revision is not specified, the latest ACTIVE revision is used.")
	c.StringVar(&cliStartedby, "started-by", "", "An optional tag specified when a task is started. For example if you automatically trigger a task to run a batch process job, you could apply a unique identifier for that job to your task with the startedBy parameter. You can then identify which tasks belong to that job by filtering the results of a list-tasks call with the startedBy value. If a task is started by an Amazon ECS service, then the startedBy parameter contains the deployment ID of the service that starts it.")
	return c
}
Exemplo n.º 2
0
// Returns a `FlagSet` for `ListTasks`
func cliListTasksParams(args []string) *flag.FlagSet {
	var c = cli.Get("", args)
	c.StringVar(&cliClusterName, "cluster", "default", "The short name or full Amazon Resource Name (ARN) of the cluster that hosts the tasks to list. If you do not specify a cluster, the default cluster is assumed..")
	c.StringVar(&cliContainerInstance, "container-instance", "", "The container instance ID or full Amazon Resource Name (ARN) of the container instance with which to filter the list-tasks results. Specifying a containerInstance limits the results to tasks that belong to that container instance.")
	c.StringVar(&cliDesiredStatus, "desired-status", "RUNNING", "The task status that you want to filter the `ListTasks` results with. Specifying a `desiredStatus` of STOPPED will limit the results to tasks that are in the STOPPED status, which can be useful for debugging tasks that are not starting properly or have died or finished. The default status filter is RUNNING.")
	c.StringVar(&cliFamily, "family", "", "The name of the family with which to filter the list-tasks results. Specifying a family limits the results to tasks that belong to that family.")
	c.Int64Var(&cliMaxResults, "max-items", 100, "The maximum number of task results returned by ListTasks in paginated output. When this parameter is used, ListTasks only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another ListTasks request with the returned nextToken value. This value can be between 1 and 100. If this parameter is not used, then ListTasks returns up to 100 results and a nextToken value if applicable")
	c.StringVar(&cliServiceName, "service-name", "", "The name of the service with which to filter the list-tasks results. Specifying a serviceName limits the results to tasks that belong to that service.")
	return c
}
Exemplo n.º 3
0
func cliRegisterTaskParams(args []string) *flag.FlagSet {
	var c = cli.Get("", args)
	c.Int64Var(&cliContainerPort, "container-port", 9000, "The port number on the container that is bound to the user-specified or automatically assigned host port. If you specify a container port and not a host port, your container will automatically receive a host port in the ephemeral port range (for more information, see hostPort)")
	c.Int64Var(&cliHostPort, "host-port", 80, "The port number on the container instance to reserve for your container. You can specify a non-reserved host port for your container port mapping, or you can omit the hostPort (or set it to 0) while specifying a containerPort and your container will automatically receive a port in the ephemeral port range for your container instance operating system and Docker version.")
	c.StringVar(&cliFamily, "family", "", "The name of the family with which to filter the list-tasks results. Specifying a family limits the results to tasks that belong to that family.")
	c.StringVar(&cliMountPath, "mount-path", "", "The path on the container to mount the host volume at.")
	c.StringVar(&cliSourceVolume, "source-volume", "", "The name of the volume to mount.")
	c.BoolVar(&cliMountReadOnly, "mount-read-only", false, "If this value is true, the container has read-only access to the volume. If this value is false, then the container can write to the volume. The default value is false.")
	c.StringVar(&cliImage, "image", "", "The image used to start a container. This string is passed directly to the Docker daemon. Images in the Docker Hub registry are available by default. Other repositories are specified with repository-url/image:tag.")
	c.Int64Var(&cliCPU, "cpu", 512, "The number of cpu units reserved for the container. A container instance has 1,024 cpu units for every CPU core. This parameter specifies the minimum amount of CPU to reserve for a container, and containers share unallocated CPU units with other containers on the instance with the same ratio as their allocated amount.")
	c.Int64Var(&cliMemory, "memory", 512, "The number of MiB of memory reserved for the container. If your container attempts to exceed the memory allocated here, the container is killed.")
	c.BoolVar(&cliEssential, "essential", true, "If the essential parameter of a container is marked as true, the failure of that container will stop the task. If the essential parameter of a container is marked as false, then its failure will not affect the rest of the containers in a task. If this parameter is omitted, a container is assumed to be essential.")
	c.StringVar(&cliLinks, "links", "", "A list of links for the container. Each link entry should be in the form of `container_name:alias.`")
	c.BoolVar(&cliWithConsul, "with-consul", false, "Add consul and registrator to the container or not. Default `false`")
	c.StringVar(&cliConsulServerInstance, "consul-server-instance", "", "The container instance id of the consul server.")
	c.StringVar(&cliTargetInstance, "target-instance", "", "The target container instance id")
	return c
}
Exemplo n.º 4
0
func cliStopTaskParams(args []string) *flag.FlagSet {
	var c = cli.Get("", args)
	c.StringVar(&cliClusterName, "cluster", "default", "The short name or full Amazon Resource Name (ARN) of the cluster that hosts the tasks to list. If you do not specify a cluster, the default cluster is assumed..")
	c.StringVar(&cliTaskDef, "task", "", "The family and revision (family:revision ) or full Amazon Resource Name (ARN) of the task definition to start. If a revision is not specified, the latest ACTIVE revision is used.")
	return c
}
Exemplo n.º 5
0
func cliDescribeTasksParams(args []string) *flag.FlagSet {
	var c = cli.Get("", args)
	c.StringVar(&cliClusterName, "cluster", "default", "The short name or full Amazon Resource Name (ARN) of the cluster that hosts the tasks to list. If you do not specify a cluster, the default cluster is assumed..")
	c.StringVar(&cliTasks, "tasks", "", "Comma separated list of taskarns.")
	return c
}
Exemplo n.º 6
0
func cliListTaskDefsParams(args []string) *flag.FlagSet {
	var c = cli.Get("", args)
	c.StringVar(&cliFamily, "family", "", "The full family name with which to filter the list-task-definitions results. Specifying a family limits the listed task definitions to task definition revisions that belong to that family.")
	c.StringVar(&cliStatus, "status", "ACTIVE", "The task definition status with which to filter the list-task-definitions results. By default, only ACTIVE task definitions are listed. By setting this parameter to INACTIVE , you can view task definitions that are INACTIVE as long as an active task or service still references them. Possible values: ACTIVE, INACTIVE")
	return c
}
Exemplo n.º 7
0
func cliClusterNameParams(args []string) *flag.FlagSet {
	var c = cli.Get("", args)
	c.StringVar(&cliClusterName, "cluster", "defaut", "The name of your cluster. If you do not specify a name for your cluster, If you do not specify a cluster, the default cluster is assumed. Up to 255 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed.")
	return c
}
Exemplo n.º 8
0
func cliListClustersParams(args []string) *flag.FlagSet {
	var c = cli.Get("", args)
	c.Int64Var(&cliMaxResults, "max-items", 1, "The maximum number of cluster results returned by ListClusters in paginated output")
	return c
}