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 Details

    • Builder

      public Builder()
  • Method Details

    • selectors

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

      @Stability(Stable) public FargateProfileOptions.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
    • removalPolicy

      @Stability(Stable) public FargateProfileOptions.Builder removalPolicy(RemovalPolicy removalPolicy)
      Parameters:
      removalPolicy - The removal policy applied to the custom resource that manages the Fargate profile. The removal policy controls what happens to the resource if it stops being managed by CloudFormation. This can happen in one of three situations:

      • The resource is removed from the template, so CloudFormation stops managing it
      • A change to the resource is made that requires it to be replaced, so CloudFormation stops managing it
      • The stack is deleted, so CloudFormation stops managing all resources in it
      Returns:
      this
    • subnetSelection

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