Class OidcProviderNative

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.iam.OidcProviderNative
software.amazon.awscdk.services.eks.OidcProviderNative
All Implemented Interfaces:
IOIDCProviderRef, IEnvironmentAware, IResource, IOidcProvider, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.126.0 (build 206d44b)", date="2026-02-03T13:58:22.981Z") @Stability(Stable) public class OidcProviderNative extends OidcProviderNative
IAM OIDC identity providers are entities in IAM that describe an external identity provider (IdP) service that supports the OpenID Connect (OIDC) standard, such as Google or Salesforce.

You use an IAM OIDC identity provider when you want to establish trust between an OIDC-compatible IdP and your AWS account.

This implementation uses the native CloudFormation resource and has default values for thumbprints and clientIds props that will be compatible with the eks cluster.

Example:

 // or create a new one using an existing issuer url
 String issuerUrl;
 // you can import an existing provider
 IOidcProvider provider = OidcProviderNative.fromOidcProviderArn(this, "Provider", "arn:aws:iam::123456:oidc-provider/oidc.eks.eu-west-1.amazonaws.com/id/AB123456ABC");
 OidcProviderNative provider2 = OidcProviderNative.Builder.create(this, "Provider")
         .url(issuerUrl)
         .build();
 ICluster cluster = Cluster.fromClusterAttributes(this, "MyCluster", ClusterAttributes.builder()
         .clusterName("Cluster")
         .openIdConnectProvider(provider)
         .kubectlRoleArn("arn:aws:iam::123456:role/service-role/k8sservicerole")
         .build());
 ServiceAccount serviceAccount = cluster.addServiceAccount("MyServiceAccount");
 Bucket bucket = new Bucket(this, "Bucket");
 bucket.grantReadWrite(serviceAccount);
 

See Also:
  • Field Details

    • PROPERTY_INJECTION_ID

      @Stability(Stable) public static final String PROPERTY_INJECTION_ID
      Uniquely identifies this class.
  • Constructor Details

    • OidcProviderNative

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

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

      @Stability(Stable) public OidcProviderNative(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull OidcProviderNativeProps props)
      Defines a native OpenID Connect provider.

      Parameters:
      scope - The definition scope. This parameter is required.
      id - Construct ID. This parameter is required.
      props - Initialization properties. This parameter is required.