Class KubectlProvider

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.services.eks_v2.KubectlProvider
All Implemented Interfaces:
IKubectlProvider, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.126.0 (build 206d44b)", date="2026-02-23T18:58:18.924Z") @Stability(Stable) public class KubectlProvider extends software.constructs.Construct implements IKubectlProvider
Implementation of Kubectl Lambda.

Example:

 IRole handlerRole = Role.fromRoleArn(this, "HandlerRole", "arn:aws:iam::123456789012:role/lambda-role");
 // get the serivceToken from the custom resource provider
 String functionArn = Function.fromFunctionName(this, "ProviderOnEventFunc", "ProviderframeworkonEvent-XXX").getFunctionArn();
 IKubectlProvider kubectlProvider = KubectlProvider.fromKubectlProviderAttributes(this, "KubectlProvider", KubectlProviderAttributes.builder()
         .serviceToken(functionArn)
         .role(handlerRole)
         .build());
 ICluster cluster = Cluster.fromClusterAttributes(this, "Cluster", ClusterAttributes.builder()
         .clusterName("cluster")
         .kubectlProvider(kubectlProvider)
         .build());
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    A fluent builder for KubectlProvider.

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode

    Nested classes/interfaces inherited from interface software.constructs.IConstruct

    software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$Proxy

    Nested classes/interfaces inherited from interface software.amazon.awscdk.services.eks_v2.IKubectlProvider

    IKubectlProvider.Jsii$Default, IKubectlProvider.Jsii$Proxy
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    KubectlProvider(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    KubectlProvider(software.amazon.jsii.JsiiObjectRef objRef)
     
     
    KubectlProvider(software.constructs.Construct scope, String id, KubectlProviderProps props)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    fromKubectlProviderAttributes(software.constructs.Construct scope, String id, KubectlProviderAttributes attrs)
    Import an existing provider.
    getKubectlProvider(software.constructs.Construct scope, ICluster cluster)
    Take existing provider on cluster.
    The IAM execution role of the handler.
    The custom resource provider's service token.

    Methods inherited from class software.constructs.Construct

    getNode, isConstruct, toString, with

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface software.constructs.IConstruct

    getNode, with

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • KubectlProvider

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

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

      @Stability(Stable) public KubectlProvider(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull KubectlProviderProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • fromKubectlProviderAttributes

      @Stability(Stable) @NotNull public static IKubectlProvider fromKubectlProviderAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull KubectlProviderAttributes attrs)
      Import an existing provider.

      Parameters:
      scope - Construct. This parameter is required.
      id - an id of resource. This parameter is required.
      attrs - attributes for the provider. This parameter is required.
    • getKubectlProvider

      @Stability(Stable) @Nullable public static IKubectlProvider getKubectlProvider(@NotNull software.constructs.Construct scope, @NotNull ICluster cluster)
      Take existing provider on cluster.

      Parameters:
      scope - Construct. This parameter is required.
      cluster - k8s cluster. This parameter is required.
    • getServiceToken

      @Stability(Stable) @NotNull public String getServiceToken()
      The custom resource provider's service token.
      Specified by:
      getServiceToken in interface IKubectlProvider
    • getRole

      @Stability(Stable) @Nullable public IRole getRole()
      The IAM execution role of the handler.
      Specified by:
      getRole in interface IKubectlProvider