Class CapacityProviderProps.Builder
java.lang.Object
software.amazon.awscdk.services.lambda.CapacityProviderProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CapacityProviderProps>
- Enclosing interface:
CapacityProviderProps
@Stability(Stable)
public static final class CapacityProviderProps.Builder
extends Object
implements software.amazon.jsii.Builder<CapacityProviderProps>
A builder for
CapacityProviderProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionarchitectures(List<? extends Architecture> architectures) Sets the value ofCapacityProviderProps.getArchitectures()build()Builds the configured instance.capacityProviderName(String capacityProviderName) Sets the value ofCapacityProviderProps.getCapacityProviderName()instanceTypeFilter(InstanceTypeFilter instanceTypeFilter) Sets the value ofCapacityProviderProps.getInstanceTypeFilter()Sets the value ofCapacityProviderProps.getKmsKey()maxVCpuCount(Number maxVCpuCount) Sets the value ofCapacityProviderProps.getMaxVCpuCount()operatorRole(IRole operatorRole) Sets the value ofCapacityProviderProps.getOperatorRole()scalingOptions(ScalingOptions scalingOptions) Sets the value ofCapacityProviderProps.getScalingOptions()securityGroups(List<? extends ISecurityGroup> securityGroups) Sets the value ofCapacityProviderProps.getSecurityGroups()Sets the value ofCapacityProviderProps.getSubnets()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
securityGroups
@Stability(Stable) public CapacityProviderProps.Builder securityGroups(List<? extends ISecurityGroup> securityGroups) Sets the value ofCapacityProviderProps.getSecurityGroups()- Parameters:
securityGroups- A list of security group IDs to associate with EC2 instances launched by the capacity provider. This parameter is required. Up to 5 security groups can be specified.- Returns:
this
-
subnets
Sets the value ofCapacityProviderProps.getSubnets()- Parameters:
subnets- A list of subnets where the capacity provider can launch EC2 instances. This parameter is required. At least one subnet must be specified, and up to 16 subnets are supported.- Returns:
this
-
architectures
@Stability(Stable) public CapacityProviderProps.Builder architectures(List<? extends Architecture> architectures) Sets the value ofCapacityProviderProps.getArchitectures()- Parameters:
architectures- The instruction set architecture required for compute instances. Only one architecture can be specified per capacity provider.- Returns:
this
-
capacityProviderName
@Stability(Stable) public CapacityProviderProps.Builder capacityProviderName(String capacityProviderName) Sets the value ofCapacityProviderProps.getCapacityProviderName()- Parameters:
capacityProviderName- The name of the capacity provider. The name must be unique within the AWS account and region.- Returns:
this
-
instanceTypeFilter
@Stability(Stable) public CapacityProviderProps.Builder instanceTypeFilter(InstanceTypeFilter instanceTypeFilter) Sets the value ofCapacityProviderProps.getInstanceTypeFilter()- Parameters:
instanceTypeFilter- Configuration for filtering instance types that the capacity provider can use.- Returns:
this
-
kmsKey
Sets the value ofCapacityProviderProps.getKmsKey()- Parameters:
kmsKey- The AWS Key Management Service (KMS) key used to encrypt data associated with the capacity provider.- Returns:
this
-
maxVCpuCount
Sets the value ofCapacityProviderProps.getMaxVCpuCount()- Parameters:
maxVCpuCount- The maximum number of vCPUs that the capacity provider can scale up to.- Returns:
this
-
operatorRole
Sets the value ofCapacityProviderProps.getOperatorRole()- Parameters:
operatorRole- The IAM role that the Lambda service assumes to manage the capacity provider.- Returns:
this
-
scalingOptions
@Stability(Stable) public CapacityProviderProps.Builder scalingOptions(ScalingOptions scalingOptions) Sets the value ofCapacityProviderProps.getScalingOptions()- Parameters:
scalingOptions- The options for scaling a capacity provider, including scaling policies.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CapacityProviderProps>- Returns:
- a new instance of
CapacityProviderProps - Throws:
NullPointerException- if any required attribute was not provided
-