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 Details

    • Builder

      public Builder()
  • Method Details

    • cluster

      @Stability(Stable) public FargateProfileProps.Builder cluster(Cluster cluster)
      Parameters:
      cluster - The EKS cluster to apply the Fargate profile to. This parameter is required. [disable-awslint:ref-via-interface]
      Returns:
      this
    • selectors

      @Stability(Stable) public FargateProfileProps.Builder selectors(List<? extends Selector> selectors)
      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 FargateProfileProps.Builder fargateProfileName(String fargateProfileName)
      Parameters:
      fargateProfileName - The name of the Fargate profile.
      Returns:
      this
    • podExecutionRole

      @Stability(Stable) public FargateProfileProps.Builder podExecutionRole(IRole podExecutionRole)
      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)
      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

      @Stability(Stable) public FargateProfileProps.Builder vpc(IVpc vpc)
      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 using subnetSelection.
      Returns:
      this
    • build

      @Stability(Stable) public FargateProfileProps build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<FargateProfileProps>
      Returns:
      a new instance of FargateProfileProps
      Throws:
      NullPointerException - if any required attribute was not provided