Package org.cdk8s.plus24
Class DeploymentExposeViaServiceOptions.Builder
- java.lang.Object
-
- org.cdk8s.plus24.DeploymentExposeViaServiceOptions.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<DeploymentExposeViaServiceOptions>
- Enclosing interface:
- DeploymentExposeViaServiceOptions
@Stability(Stable) public static final class DeploymentExposeViaServiceOptions.Builder extends Object implements software.amazon.jsii.Builder<DeploymentExposeViaServiceOptions>
A builder forDeploymentExposeViaServiceOptions
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DeploymentExposeViaServiceOptions
build()
Builds the configured instance.DeploymentExposeViaServiceOptions.Builder
name(String name)
Sets the value ofDeploymentExposeViaServiceOptions.getName()
DeploymentExposeViaServiceOptions.Builder
ports(List<? extends ServicePort> ports)
Sets the value ofDeploymentExposeViaServiceOptions.getPorts()
DeploymentExposeViaServiceOptions.Builder
serviceType(ServiceType serviceType)
Sets the value ofDeploymentExposeViaServiceOptions.getServiceType()
-
-
-
Method Detail
-
name
@Stability(Stable) public DeploymentExposeViaServiceOptions.Builder name(String name)
Sets the value ofDeploymentExposeViaServiceOptions.getName()
- Parameters:
name
- The name of the service to expose. If you'd like to expose the deployment multiple times, you must explicitly set a name starting from the second expose call.- Returns:
this
-
ports
@Stability(Stable) public DeploymentExposeViaServiceOptions.Builder ports(List<? extends ServicePort> ports)
Sets the value ofDeploymentExposeViaServiceOptions.getPorts()
- Parameters:
ports
- The ports that the service should bind to.- Returns:
this
-
serviceType
@Stability(Stable) public DeploymentExposeViaServiceOptions.Builder serviceType(ServiceType serviceType)
Sets the value ofDeploymentExposeViaServiceOptions.getServiceType()
- Parameters:
serviceType
- The type of the exposed service.- Returns:
this
-
build
@Stability(Stable) public DeploymentExposeViaServiceOptions build()
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<DeploymentExposeViaServiceOptions>
- Returns:
- a new instance of
DeploymentExposeViaServiceOptions
- Throws:
NullPointerException
- if any required attribute was not provided
-
-