Class CfnFargateProfilePropsMixin

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.Mixin
software.amazon.awscdk.cfnpropertymixins.services.eks.CfnFargateProfilePropsMixin
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable, software.constructs.IMixin

@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)", date="2026-03-11T13:19:59.061Z") @Stability(Stable) public class CfnFargateProfilePropsMixin extends Mixin implements software.constructs.IMixin
Creates an AWS Fargate profile for your Amazon EKS cluster.

You must have at least one Fargate profile in a cluster to be able to run pods on Fargate.

The Fargate profile allows an administrator to declare which pods run on Fargate and specify which pods run on which Fargate profile. This declaration is done through the profile's selectors. Each profile can have up to five selectors that contain a namespace and labels. A namespace is required for every selector. The label field consists of multiple optional key-value pairs. Pods that match the selectors are scheduled on Fargate. If a to-be-scheduled pod matches any of the selectors in the Fargate profile, then that pod is run on Fargate.

When you create a Fargate profile, you must specify a pod execution role to use with the pods that are scheduled with the profile. This role is added to the cluster's Kubernetes Role Based Access Control (RBAC) for authorization so that the kubelet that is running on the Fargate infrastructure can register with your Amazon EKS cluster so that it can appear in your cluster as a node. The pod execution role also provides IAM permissions to the Fargate infrastructure to allow read access to Amazon ECR image repositories. For more information, see Pod Execution Role in the Amazon EKS User Guide .

Fargate profiles are immutable. However, you can create a new updated profile to replace an existing profile and then delete the original after the updated profile has finished creating.

If any Fargate profiles in a cluster are in the DELETING status, you must wait for that Fargate profile to finish deleting before you can create any other profiles in that cluster.

For more information, see AWS Fargate profile in the Amazon EKS User Guide .

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.cfnpropertymixins.services.eks.*;
 import software.amazon.awscdk.*;
 IMergeStrategy mergeStrategy;
 CfnFargateProfilePropsMixin cfnFargateProfilePropsMixin = CfnFargateProfilePropsMixin.Builder.create(CfnFargateProfileMixinProps.builder()
         .clusterName("clusterName")
         .fargateProfileName("fargateProfileName")
         .podExecutionRoleArn("podExecutionRoleArn")
         .selectors(List.of(SelectorProperty.builder()
                 .labels(List.of(LabelProperty.builder()
                         .key("key")
                         .value("value")
                         .build()))
                 .namespace("namespace")
                 .build()))
         .subnets(List.of("subnets"))
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build())
 .strategy(mergeStrategy)
 .build();
 

See Also:
  • Field Details

    • CFN_PROPERTY_KEYS

      @Stability(Stable) protected static final List<String> CFN_PROPERTY_KEYS
  • Constructor Details

    • CfnFargateProfilePropsMixin

      protected CfnFargateProfilePropsMixin(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnFargateProfilePropsMixin

      protected CfnFargateProfilePropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnFargateProfilePropsMixin

      @Stability(Stable) public CfnFargateProfilePropsMixin(@NotNull CfnFargateProfileMixinProps props, @Nullable CfnPropertyMixinOptions options)
      Create a mixin to apply properties to AWS::EKS::FargateProfile.

      Parameters:
      props - L1 properties to apply. This parameter is required.
      options - Mixin options.
    • CfnFargateProfilePropsMixin

      @Stability(Stable) public CfnFargateProfilePropsMixin(@NotNull CfnFargateProfileMixinProps props)
      Create a mixin to apply properties to AWS::EKS::FargateProfile.

      Parameters:
      props - L1 properties to apply. This parameter is required.
  • Method Details

    • applyTo

      @Stability(Stable) public void applyTo(@NotNull software.constructs.IConstruct construct)
      Apply the mixin properties to the construct.

      Specified by:
      applyTo in interface software.constructs.IMixin
      Specified by:
      applyTo in class Mixin
      Parameters:
      construct - This parameter is required.
    • supports

      @Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct)
      Check if this mixin supports the given construct.

      Specified by:
      supports in interface software.constructs.IMixin
      Overrides:
      supports in class Mixin
      Parameters:
      construct - This parameter is required.
    • getProps

      @Stability(Stable) @NotNull protected CfnFargateProfileMixinProps getProps()
    • getStrategy

      @Stability(Stable) @NotNull protected IMergeStrategy getStrategy()