Class CfnService.ServiceRegistryProperty.Builder
java.lang.Object
software.amazon.awscdk.services.ecs.CfnService.ServiceRegistryProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnService.ServiceRegistryProperty>
- Enclosing interface:
- CfnService.ServiceRegistryProperty
@Stability(Stable)
public static final class CfnService.ServiceRegistryProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnService.ServiceRegistryProperty>
A builder for
CfnService.ServiceRegistryProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.containerName
(String containerName) Sets the value ofCfnService.ServiceRegistryProperty.getContainerName()
containerPort
(Number containerPort) Sets the value ofCfnService.ServiceRegistryProperty.getContainerPort()
Sets the value ofCfnService.ServiceRegistryProperty.getPort()
registryArn
(String registryArn) Sets the value ofCfnService.ServiceRegistryProperty.getRegistryArn()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
containerName
@Stability(Stable) public CfnService.ServiceRegistryProperty.Builder containerName(String containerName) Sets the value ofCfnService.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 CfnService.ServiceRegistryProperty.Builder containerPort(Number containerPort) Sets the value ofCfnService.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 ofCfnService.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 CfnService.ServiceRegistryProperty.Builder registryArn(String registryArn) Sets the value ofCfnService.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<CfnService.ServiceRegistryProperty>
- Returns:
- a new instance of
CfnService.ServiceRegistryProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-