Fugue.AWS.ECS.TaskDefinition

Module Members

external

(Function)

Create a reference to an externally defined TaskDefinition.

Example usage:

taskDefinition: ECS.TaskDefinition.external("arn:aws:ecs:us-east-2:0123456789:task-definition/wordpress:2")

Type Signature

 fun (String) -> TaskDefinition
Argument: arn

The ARN for the task definition revision to reference.

Type: String

Returns:

A reference to the specified TaskDefinition.

Type: TaskDefinition

new

(Function)

new TaskDefinition (Constructor)

Call this constructor to create a new Fugue.Core.AWS.ECS.TaskDefinition value.

Example usage:

example: ECS.TaskDefinition.new {
  family: "example",
  region: AWS.Us-east-2,
  containerDefinitions: [
    ECS.ContainerDefinition.new {
      name: "nginx",
      image: "nginx",
      cpu: 10,
      memory: 500,
      essential: True,
      portMappings: [
        ECS.PortMapping.tcp {
          containerPort: 80,
          hostPort: 55001,
        },
      ],
    },
  ],
}

Type Signature

 fun { family: Optional<String>,
       containerDefinitions: List<ContainerDefinition>,
       networkMode: Optional<NetworkMode>,
       volumes: Optional<List<Volume>>,
       placementConstraints: Optional<List<String>>,
       region: Region} -> TaskDefinition
Argument: family

The family name of the task definition. If not provided a unique family name will be generated.

Type: Optional<String>

Argument: containerDefinitions

List of container definitions to create.

Type: List<ContainerDefinition>

Argument: networkMode

The network mode to use for the task’s containers. Defaults to bridge.

Type: Optional<NetworkMode>

Argument: volumes

Optional list of volumes to make available to the container definitions.

Type: Optional<List<Volume>>

Argument: placementConstraints

Optional list of Cluster Query Language expressions to match when placing tasks.

Type: Optional<List<String>>

Argument: region

The region in which to create the task definition.

Type: Region

Returns:

A new Fugue.Core.AWS.ECS.TaskDefinition value.

Type: TaskDefinition

region

(Function)

Return the region for a given TaskDefinition. Works on externals.

Type Signature

 fun (TaskDefinition) -> Region
Argument: taskDefinition

The TaskDefinition whose region to return.

Type: TaskDefinition

Returns:

Region containing the TaskDefinition.

Type: Region