Class CfnFargateProfileProps.Builder
java.lang.Object
software.amazon.awscdk.services.eks.CfnFargateProfileProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnFargateProfileProps>
- Enclosing interface:
CfnFargateProfileProps
@Stability(Stable)
public static final class CfnFargateProfileProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnFargateProfileProps>
A builder for
CfnFargateProfileProps
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.clusterName
(String clusterName) Sets the value ofCfnFargateProfileProps.getClusterName()
fargateProfileName
(String fargateProfileName) Sets the value ofCfnFargateProfileProps.getFargateProfileName()
podExecutionRoleArn
(String podExecutionRoleArn) Sets the value ofCfnFargateProfileProps.getPodExecutionRoleArn()
Sets the value ofCfnFargateProfileProps.getSelectors()
selectors
(IResolvable selectors) Sets the value ofCfnFargateProfileProps.getSelectors()
Sets the value ofCfnFargateProfileProps.getSubnets()
Sets the value ofCfnFargateProfileProps.getTags()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
clusterName
Sets the value ofCfnFargateProfileProps.getClusterName()
- Parameters:
clusterName
- The name of your cluster. This parameter is required.- Returns:
this
-
podExecutionRoleArn
@Stability(Stable) public CfnFargateProfileProps.Builder podExecutionRoleArn(String podExecutionRoleArn) Sets the value ofCfnFargateProfileProps.getPodExecutionRoleArn()
- Parameters:
podExecutionRoleArn
- The Amazon Resource Name (ARN) of thePod
execution role to use for aPod
that matches the selectors in the Fargate profile. This parameter is required. ThePod
execution role allows Fargate infrastructure to register with your cluster as a node, and it provides read access to Amazon ECR image repositories. For more information, seePod
execution role in the Amazon EKS User Guide .- Returns:
this
-
selectors
Sets the value ofCfnFargateProfileProps.getSelectors()
- Parameters:
selectors
- The selectors to match for aPod
to use this Fargate profile. This parameter is required. Each selector must have an associated Kubernetesnamespace
. Optionally, you can also specifylabels
for anamespace
. You may specify up to five selectors in a Fargate profile.- Returns:
this
-
selectors
@Stability(Stable) public CfnFargateProfileProps.Builder selectors(List<? extends Object> selectors) Sets the value ofCfnFargateProfileProps.getSelectors()
- Parameters:
selectors
- The selectors to match for aPod
to use this Fargate profile. This parameter is required. Each selector must have an associated Kubernetesnamespace
. Optionally, you can also specifylabels
for anamespace
. You may specify up to five selectors in a Fargate profile.- Returns:
this
-
fargateProfileName
@Stability(Stable) public CfnFargateProfileProps.Builder fargateProfileName(String fargateProfileName) Sets the value ofCfnFargateProfileProps.getFargateProfileName()
- Parameters:
fargateProfileName
- The name of the Fargate profile.- Returns:
this
-
subnets
Sets the value ofCfnFargateProfileProps.getSubnets()
- Parameters:
subnets
- The IDs of subnets to launch aPod
into. APod
running on Fargate isn't assigned a public IP address, so only private subnets (with no direct route to an Internet Gateway) are accepted for this parameter.- Returns:
this
-
tags
Sets the value ofCfnFargateProfileProps.getTags()
- Parameters:
tags
- Metadata that assists with categorization and organization. Each tag consists of a key and an optional value. You define both. Tags don't propagate to any other cluster or AWS resources.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnFargateProfileProps>
- Returns:
- a new instance of
CfnFargateProfileProps
- Throws:
NullPointerException
- if any required attribute was not provided
-