Fugue.AWS.ECS.Service

Table of Contents

Module Members

new

(Function)

new Service (Constructor)

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

Example usage:

myService: ECS.Service.new {
  name: "my-service",
  cluster: myCluster,
  taskDefinition: wordpress,
  numDesired: 1,
  placementConstraints: ECS.PlacementConstraint.oneTaskPerHost,
}

Type Signature

 fun { name: String,
       cluster: Cluster,
       loadBalancer: Optional<LoadBalancer>,
       taskDefinition: TaskDefinition,
       deploymentConfiguration: Optional<DeploymentConfiguration>,
       placementConstraints: Optional<List<PlacementConstraint>>,
       placementStrategy: Optional<List<PlacementStrategy>>,
       role: Optional<Role>,
       numDesired: Int,
       launchType: Optional<LaunchType>,
       networkConfiguration: Optional<NetworkConfiguration>,
       resourceId: Optional<String> } -> Service
Argument: name

The name of the service. Must be 1-255 characters and consist of letters, numbers, underscores, and dashes. Service names are unique in a given cluster.

Type: String

Argument: cluster

The cluster to deploy the service on.

Type: Cluster

Argument: loadBalancer

Optional LoadBalancer to attach to your service.

Type: Optional<LoadBalancer>

Argument: taskDefinition

The task definition to use when launching tasks for the service. Mutable.

Type: TaskDefinition

Argument: deploymentConfiguration

Optional DeploymentConfiguration to control how ECS deploys updated instances of the service. See http://docs.aws.amazon.com/AmazonECS/latest/developerguide/update-service.html for full details on how ECS deploys updates. Default value sets maximumPercent to 200 and minimumHealthyPercent to 100.

Type: Optional<DeploymentConfiguration>

Argument: placementConstraints

Optional list of placement constraints to use when placing tasks on the cluster. Maximum of 10 placement constraints may be specified.

Type: Optional<List<PlacementConstraint>>

Argument: placementStrategy

Optional list of placement strategy rules to use when placing tasks on the cluster. Maximum of five placement strategy rules may be specified.

Type: Optional<List<PlacementStrategy>>

Argument: role

The role for the ECS service to use when making ELB API calls on behalf of the service. Required if a load balancer is provided.

Type: Optional<Role>

Argument: numDesired

The number of tasks to run for the service. Mutable.

Type: Int

Argument: launchType

The launch type on which to run your service. Default value is ECS.Ec2.

Type: Optional<LaunchType>

Argument: networkConfiguration

The network configuration for the service. This parameter is required for task definitions that use the AwsVpc network mode to receive their own Elastic Network Interface, and it is not supported for other network modes. Mutable.

Type: Optional<NetworkConfiguration>

Argument: resourceId

Resource ID of the resource to import with Fugue Import. This field is only honored on fugue run. The resource ID is the ARN. Mutable. Example: arn:aws:ecs:us-east-1:123456789012:service/sample-webapp

Type: Optional<String>

Returns:

A Fugue.Core.AWS.ECS.Service value.

Type: Service