Class CapacityProvider.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CapacityProvider>
- Enclosing class:
CapacityProvider
CapacityProvider.-
Method Summary
Modifier and TypeMethodDescriptionarchitectures(List<? extends Architecture> architectures) The instruction set architecture required for compute instances.build()capacityProviderName(String capacityProviderName) The name of the capacity provider.static CapacityProvider.BuilderinstanceTypeFilter(InstanceTypeFilter instanceTypeFilter) Configuration for filtering instance types that the capacity provider can use.The AWS Key Management Service (KMS) key used to encrypt data associated with the capacity provider.maxVCpuCount(Number maxVCpuCount) The maximum number of vCPUs that the capacity provider can scale up to.operatorRole(IRole operatorRole) The IAM role that the Lambda service assumes to manage the capacity provider.scalingOptions(ScalingOptions scalingOptions) The options for scaling a capacity provider, including scaling policies.securityGroups(List<? extends ISecurityGroup> securityGroups) A list of security group IDs to associate with EC2 instances launched by the capacity provider.A list of subnets where the capacity provider can launch EC2 instances.
-
Method Details
-
create
@Stability(Stable) public static CapacityProvider.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope- The parent construct. This parameter is required.id- The construct ID. This parameter is required.- Returns:
- a new instance of
CapacityProvider.Builder.
-
securityGroups
@Stability(Stable) public CapacityProvider.Builder securityGroups(List<? extends ISecurityGroup> securityGroups) A list of security group IDs to associate with EC2 instances launched by the capacity provider.Up to 5 security groups can be specified.
- Parameters:
securityGroups- A list of security group IDs to associate with EC2 instances launched by the capacity provider. This parameter is required.- Returns:
this
-
subnets
A list of subnets where the capacity provider can launch EC2 instances.At least one subnet must be specified, and up to 16 subnets are supported.
- Parameters:
subnets- A list of subnets where the capacity provider can launch EC2 instances. This parameter is required.- Returns:
this
-
architectures
@Stability(Stable) public CapacityProvider.Builder architectures(List<? extends Architecture> architectures) The instruction set architecture required for compute instances.Only one architecture can be specified per capacity provider.
Default: - No architecture constraints specified
- Parameters:
architectures- The instruction set architecture required for compute instances. This parameter is required.- Returns:
this
-
capacityProviderName
@Stability(Stable) public CapacityProvider.Builder capacityProviderName(String capacityProviderName) The name of the capacity provider.The name must be unique within the AWS account and region.
Default: - AWS CloudFormation generates a unique physical ID and uses that ID for the capacity provider's name.
- Parameters:
capacityProviderName- The name of the capacity provider. This parameter is required.- Returns:
this
-
instanceTypeFilter
@Stability(Stable) public CapacityProvider.Builder instanceTypeFilter(InstanceTypeFilter instanceTypeFilter) Configuration for filtering instance types that the capacity provider can use.Default: - No instance type filtering applied
- Parameters:
instanceTypeFilter- Configuration for filtering instance types that the capacity provider can use. This parameter is required.- Returns:
this
-
kmsKey
The AWS Key Management Service (KMS) key used to encrypt data associated with the capacity provider.Default: - No KMS key specified, uses an AWS-managed key instead
- Parameters:
kmsKey- The AWS Key Management Service (KMS) key used to encrypt data associated with the capacity provider. This parameter is required.- Returns:
this
-
maxVCpuCount
The maximum number of vCPUs that the capacity provider can scale up to.Default: - No maximum limit specified, service default is 400
- Parameters:
maxVCpuCount- The maximum number of vCPUs that the capacity provider can scale up to. This parameter is required.- Returns:
this
-
operatorRole
The IAM role that the Lambda service assumes to manage the capacity provider.Default: - A role will be generated containing the AWSLambdaManagedEC2ResourceOperator managed policy
- Parameters:
operatorRole- The IAM role that the Lambda service assumes to manage the capacity provider. This parameter is required.- Returns:
this
-
scalingOptions
The options for scaling a capacity provider, including scaling policies.Default: - The `Auto` option is applied by default
- Parameters:
scalingOptions- The options for scaling a capacity provider, including scaling policies. This parameter is required.- Returns:
this
-
build
- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CapacityProvider>- Returns:
- a newly built instance of
CapacityProvider.
-