Interface KubectlProviderAttributes

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
KubectlProviderAttributes.Jsii$Proxy

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-17T05:10:10.807Z") @Stability(Stable) public interface KubectlProviderAttributes extends software.amazon.jsii.JsiiSerializable
Kubectl Provider Attributes.

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()
         .functionArn(functionArn)
         .kubectlRoleArn("arn:aws:iam::123456789012:role/kubectl-role")
         .handlerRole(handlerRole)
         .build());
 ICluster cluster = Cluster.fromClusterAttributes(this, "Cluster", ClusterAttributes.builder()
         .clusterName("cluster")
         .kubectlProvider(kubectlProvider)
         .build());
 
  • Method Details

    • getFunctionArn

      @Stability(Stable) @NotNull String getFunctionArn()
      The custom resource provider's service token.
    • getHandlerRole

      @Stability(Stable) @NotNull IRole getHandlerRole()
      The IAM execution role of the handler.

      This role must be able to assume kubectlRoleArn

    • getKubectlRoleArn

      @Stability(Stable) @NotNull String getKubectlRoleArn()
      The IAM role to assume in order to perform kubectl operations against this cluster.
    • builder

      @Stability(Stable) static KubectlProviderAttributes.Builder builder()
      Returns:
      a KubectlProviderAttributes.Builder of KubectlProviderAttributes