Class FargateProfileProps.Builder
java.lang.Object
software.amazon.awscdk.services.eks.FargateProfileProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<FargateProfileProps>
- Enclosing interface:
FargateProfileProps
@Stability(Stable)
public static final class FargateProfileProps.Builder
extends Object
implements software.amazon.jsii.Builder<FargateProfileProps>
A builder for
FargateProfileProps
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofFargateProfileProps.getCluster()
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
-
cluster
Sets the value ofFargateProfileProps.getCluster()
- Parameters:
cluster
- The EKS cluster to apply the Fargate profile to. This parameter is required. [disable-awslint:ref-via-interface]- Returns:
this
-
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
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 FargateProfileProps.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<FargateProfileProps>
- Returns:
- a new instance of
FargateProfileProps
- Throws:
NullPointerException
- if any required attribute was not provided
-