Class FargateProfile.Builder

java.lang.Object
software.amazon.awscdk.services.eks.FargateProfile.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<FargateProfile>
Enclosing class:
FargateProfile

@Stability(Stable) public static final class FargateProfile.Builder extends Object implements software.amazon.jsii.Builder<FargateProfile>
A fluent builder for FargateProfile.
  • Method Details

    • create

      @Stability(Stable) public static FargateProfile.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of FargateProfile.Builder.
    • selectors

      @Stability(Stable) public FargateProfile.Builder selectors(List<? extends Selector> selectors)
      The selectors to match for pods to use this Fargate profile.

      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.

      Parameters:
      selectors - The selectors to match for pods to use this Fargate profile. This parameter is required.
      Returns:
      this
    • fargateProfileName

      @Stability(Stable) public FargateProfile.Builder fargateProfileName(String fargateProfileName)
      The name of the Fargate profile.

      Default: - generated

      Parameters:
      fargateProfileName - The name of the Fargate profile. This parameter is required.
      Returns:
      this
    • podExecutionRole

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

      Default: - a role will be automatically created

      Parameters:
      podExecutionRole - The pod execution role to use for pods that match the selectors in the Fargate profile. This parameter is required.
      Returns:
      this
      See Also:
    • subnetSelection

      @Stability(Stable) public FargateProfile.Builder subnetSelection(SubnetSelection 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

      Default: - all private subnets of the VPC are selected.

      Parameters:
      subnetSelection - Select which subnets to launch your pods into. This parameter is required.
      Returns:
      this
    • vpc

      @Stability(Stable) public FargateProfile.Builder vpc(IVpc 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.

      Default: - all private subnets used by the EKS cluster

      Parameters:
      vpc - The VPC from which to select subnets to launch your pods into. This parameter is required.
      Returns:
      this
    • cluster

      @Stability(Stable) public FargateProfile.Builder cluster(Cluster cluster)
      The EKS cluster to apply the Fargate profile to.

      [disable-awslint:ref-via-interface]

      Parameters:
      cluster - The EKS cluster to apply the Fargate profile to. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public FargateProfile build()
      Specified by:
      build in interface software.amazon.jsii.Builder<FargateProfile>
      Returns:
      a newly built instance of FargateProfile.