Class CfnTaskSet.ServiceRegistryProperty.Builder
java.lang.Object
software.amazon.awscdk.services.ecs.CfnTaskSet.ServiceRegistryProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnTaskSet.ServiceRegistryProperty>
- Enclosing interface:
CfnTaskSet.ServiceRegistryProperty
@Stability(Stable)
public static final class CfnTaskSet.ServiceRegistryProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnTaskSet.ServiceRegistryProperty>
A builder for
CfnTaskSet.ServiceRegistryProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.containerName
(String containerName) Sets the value ofCfnTaskSet.ServiceRegistryProperty.getContainerName()
containerPort
(Number containerPort) Sets the value ofCfnTaskSet.ServiceRegistryProperty.getContainerPort()
Sets the value ofCfnTaskSet.ServiceRegistryProperty.getPort()
registryArn
(String registryArn) Sets the value ofCfnTaskSet.ServiceRegistryProperty.getRegistryArn()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
containerName
@Stability(Stable) public CfnTaskSet.ServiceRegistryProperty.Builder containerName(String containerName) Sets the value ofCfnTaskSet.ServiceRegistryProperty.getContainerName()
- Parameters:
containerName
- The container name value to be used for your service discovery service. It's already specified in the task definition. If the task definition that your service task specifies uses thebridge
orhost
network mode, you must specify acontainerName
andcontainerPort
combination from the task definition. If the task definition that your service task specifies uses theawsvpc
network mode and a type SRV DNS record is used, you must specify either acontainerName
andcontainerPort
combination or aport
value. However, you can't specify both.- Returns:
this
-
containerPort
@Stability(Stable) public CfnTaskSet.ServiceRegistryProperty.Builder containerPort(Number containerPort) Sets the value ofCfnTaskSet.ServiceRegistryProperty.getContainerPort()
- Parameters:
containerPort
- The port value to be used for your service discovery service. It's already specified in the task definition. If the task definition your service task specifies uses thebridge
orhost
network mode, you must specify acontainerName
andcontainerPort
combination from the task definition. If the task definition your service task specifies uses theawsvpc
network mode and a type SRV DNS record is used, you must specify either acontainerName
andcontainerPort
combination or aport
value. However, you can't specify both.- Returns:
this
-
port
Sets the value ofCfnTaskSet.ServiceRegistryProperty.getPort()
- Parameters:
port
- The port value used if your service discovery service specified an SRV record. This field might be used if both theawsvpc
network mode and SRV records are used.- Returns:
this
-
registryArn
@Stability(Stable) public CfnTaskSet.ServiceRegistryProperty.Builder registryArn(String registryArn) Sets the value ofCfnTaskSet.ServiceRegistryProperty.getRegistryArn()
- Parameters:
registryArn
- The Amazon Resource Name (ARN) of the service registry. The currently supported service registry is AWS Cloud Map . For more information, see CreateService .- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnTaskSet.ServiceRegistryProperty>
- Returns:
- a new instance of
CfnTaskSet.ServiceRegistryProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-