Class Ec2ServiceAttributes.Builder
java.lang.Object
software.amazon.awscdk.services.ecs.Ec2ServiceAttributes.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<Ec2ServiceAttributes>
- Enclosing interface:
- Ec2ServiceAttributes
@Stability(Stable)
public static final class Ec2ServiceAttributes.Builder
extends Object
implements software.amazon.jsii.Builder<Ec2ServiceAttributes>
A builder for
Ec2ServiceAttributes
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofEc2ServiceAttributes.getCluster()
serviceArn
(String serviceArn) Sets the value ofEc2ServiceAttributes.getServiceArn()
serviceName
(String serviceName) Sets the value ofEc2ServiceAttributes.getServiceName()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
cluster
Sets the value ofEc2ServiceAttributes.getCluster()
- Parameters:
cluster
- The cluster that hosts the service. This parameter is required.- Returns:
this
-
serviceArn
Sets the value ofEc2ServiceAttributes.getServiceArn()
- Parameters:
serviceArn
- The service ARN.- Returns:
this
-
serviceName
Sets the value ofEc2ServiceAttributes.getServiceName()
- Parameters:
serviceName
- The name of the service.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<Ec2ServiceAttributes>
- Returns:
- a new instance of
Ec2ServiceAttributes
- Throws:
NullPointerException
- if any required attribute was not provided
-