Class TargetService.Builder
- java.lang.Object
-
- io.github.cdklabs.cdk.ecs.codedeploy.TargetService.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<TargetService>
- Enclosing interface:
- TargetService
@Stability(Experimental) public static final class TargetService.Builder extends Object implements software.amazon.jsii.Builder<TargetService>
A builder forTargetService
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
containerName
@Stability(Experimental) public TargetService.Builder containerName(String containerName)
Sets the value ofTargetService.getContainerName()- Parameters:
containerName- The name of the Amazon ECS container that contains your Amazon ECS application. This parameter is required. It must be a container specified in your Amazon ECS task definition.- Returns:
this
-
containerPort
@Stability(Experimental) public TargetService.Builder containerPort(Number containerPort)
Sets the value ofTargetService.getContainerPort()- Parameters:
containerPort- The port on the container where traffic will be routed to. This parameter is required.- Returns:
this
-
taskDefinition
@Stability(Experimental) public TargetService.Builder taskDefinition(software.amazon.awscdk.services.ecs.ITaskDefinition taskDefinition)
Sets the value ofTargetService.getTaskDefinition()- Parameters:
taskDefinition- The TaskDefintion to deploy to the target services. This parameter is required.- Returns:
this
-
awsvpcConfiguration
@Stability(Experimental) public TargetService.Builder awsvpcConfiguration(AwsvpcConfiguration awsvpcConfiguration)
Sets the value ofTargetService.getAwsvpcConfiguration()- Parameters:
awsvpcConfiguration- Network configuration for ECS services that have a network type ofawsvpc.- Returns:
this
-
capacityProviderStrategy
@Stability(Experimental) public TargetService.Builder capacityProviderStrategy(List<? extends software.amazon.awscdk.services.ecs.CapacityProviderStrategy> capacityProviderStrategy)
Sets the value ofTargetService.getCapacityProviderStrategy()- Parameters:
capacityProviderStrategy- A list of Amazon ECS capacity providers to use for the deployment.- Returns:
this
-
platformVersion
@Stability(Experimental) public TargetService.Builder platformVersion(software.amazon.awscdk.services.ecs.FargatePlatformVersion platformVersion)
Sets the value ofTargetService.getPlatformVersion()- Parameters:
platformVersion- The platform version of the Fargate tasks in the deployed Amazon ECS service. see: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html- Returns:
this
-
build
@Stability(Experimental) public TargetService build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<TargetService>- Returns:
- a new instance of
TargetService - Throws:
NullPointerException- if any required attribute was not provided
-
-