Class CfnServicePropsMixin.ServiceRegistryProperty.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.ecs.CfnServicePropsMixin.ServiceRegistryProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnServicePropsMixin.ServiceRegistryProperty>
- Enclosing interface:
CfnServicePropsMixin.ServiceRegistryProperty
@Stability(Stable)
public static final class CfnServicePropsMixin.ServiceRegistryProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnServicePropsMixin.ServiceRegistryProperty>
A builder for
CfnServicePropsMixin.ServiceRegistryProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.containerName(String containerName) Sets the value ofCfnServicePropsMixin.ServiceRegistryProperty.getContainerName()containerPort(Number containerPort) Sets the value ofCfnServicePropsMixin.ServiceRegistryProperty.getContainerPort()Sets the value ofCfnServicePropsMixin.ServiceRegistryProperty.getPort()registryArn(String registryArn) Sets the value ofCfnServicePropsMixin.ServiceRegistryProperty.getRegistryArn()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
containerName
@Stability(Stable) public CfnServicePropsMixin.ServiceRegistryProperty.Builder containerName(String containerName) Sets the value ofCfnServicePropsMixin.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 thebridgeorhostnetwork mode, you must specify acontainerNameandcontainerPortcombination from the task definition. If the task definition that your service task specifies uses theawsvpcnetwork mode and a type SRV DNS record is used, you must specify either acontainerNameandcontainerPortcombination or aportvalue. However, you can't specify both.- Returns:
this
-
containerPort
@Stability(Stable) public CfnServicePropsMixin.ServiceRegistryProperty.Builder containerPort(Number containerPort) Sets the value ofCfnServicePropsMixin.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 thebridgeorhostnetwork mode, you must specify acontainerNameandcontainerPortcombination from the task definition. If the task definition your service task specifies uses theawsvpcnetwork mode and a type SRV DNS record is used, you must specify either acontainerNameandcontainerPortcombination or aportvalue. However, you can't specify both.- Returns:
this
-
port
Sets the value ofCfnServicePropsMixin.ServiceRegistryProperty.getPort()- Parameters:
port- The port value used if your service discovery service specified an SRV record. This field might be used if both theawsvpcnetwork mode and SRV records are used.- Returns:
this
-
registryArn
@Stability(Stable) public CfnServicePropsMixin.ServiceRegistryProperty.Builder registryArn(String registryArn) Sets the value ofCfnServicePropsMixin.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:
buildin interfacesoftware.amazon.jsii.Builder<CfnServicePropsMixin.ServiceRegistryProperty>- Returns:
- a new instance of
CfnServicePropsMixin.ServiceRegistryProperty - Throws:
NullPointerException- if any required attribute was not provided
-