Class FargateProfileOptions.Builder
java.lang.Object
software.amazon.awscdk.services.eks.FargateProfileOptions.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<FargateProfileOptions>
- Enclosing interface:
- FargateProfileOptions
@Stability(Stable)
public static final class FargateProfileOptions.Builder
extends Object
implements software.amazon.jsii.Builder<FargateProfileOptions>
A builder for
FargateProfileOptions
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.fargateProfileName
(String fargateProfileName) Sets the value ofFargateProfileOptions.getFargateProfileName()
podExecutionRole
(IRole podExecutionRole) Sets the value ofFargateProfileOptions.getPodExecutionRole()
Sets the value ofFargateProfileOptions.getSelectors()
subnetSelection
(SubnetSelection subnetSelection) Sets the value ofFargateProfileOptions.getSubnetSelection()
Sets the value ofFargateProfileOptions.getVpc()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
selectors
@Stability(Stable) public FargateProfileOptions.Builder selectors(List<? extends Selector> selectors) Sets the value ofFargateProfileOptions.getSelectors()
- Parameters:
selectors
- The selectors to match for pods to use this Fargate profile. This parameter is required. Each selector must have an associated namespace. Optionally, you can also specify labels for a namespace.At least one selector is required and you may specify up to five selectors.
- Returns:
this
-
fargateProfileName
@Stability(Stable) public FargateProfileOptions.Builder fargateProfileName(String fargateProfileName) Sets the value ofFargateProfileOptions.getFargateProfileName()
- Parameters:
fargateProfileName
- The name of the Fargate profile.- Returns:
this
-
podExecutionRole
Sets the value ofFargateProfileOptions.getPodExecutionRole()
- Parameters:
podExecutionRole
- The pod execution role to use for pods that match the selectors in the Fargate profile. The pod execution role allows Fargate infrastructure to register with your cluster as a node, and it provides read access to Amazon ECR image repositories.- Returns:
this
-
subnetSelection
@Stability(Stable) public FargateProfileOptions.Builder subnetSelection(SubnetSelection subnetSelection) Sets the value ofFargateProfileOptions.getSubnetSelection()
- Parameters:
subnetSelection
- Select which subnets to launch your pods into. At this time, pods running on Fargate are not assigned public IP addresses, so only private subnets (with no direct route to an Internet Gateway) are allowed.You must specify the VPC to customize the subnet selection
- Returns:
this
-
vpc
Sets the value ofFargateProfileOptions.getVpc()
- Parameters:
vpc
- The VPC from which to select subnets to launch your pods into. By default, all private subnets are selected. You can customize this usingsubnetSelection
.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<FargateProfileOptions>
- Returns:
- a new instance of
FargateProfileOptions
- Throws:
NullPointerException
- if any required attribute was not provided
-