Class CfnOIDCProvider

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-12T19:34:02.919Z") @Stability(Stable) public class CfnOIDCProvider extends CfnResource implements IInspectable, ITaggable
Creates or updates an IAM entity to describe an identity provider (IdP) that supports OpenID Connect (OIDC) .

The OIDC provider that you create with this operation can be used as a principal in a role's trust policy. Such a policy establishes a trust relationship between AWS and the OIDC provider.

When you create the IAM OIDC provider, you specify the following:

  • The URL of the OIDC identity provider (IdP) to trust
  • A list of client IDs (also known as audiences) that identify the application or applications that are allowed to authenticate using the OIDC provider
  • A list of tags that are attached to the specified IAM OIDC provider
  • A list of thumbprints of one or more server certificates that the IdP uses

You get all of this information from the OIDC IdP that you want to use to access AWS .

When you update the IAM OIDC provider, you specify the following:

  • The URL of the OIDC identity provider (IdP) to trust
  • A list of client IDs (also known as audiences) that replaces the existing list of client IDs associated with the OIDC IdP
  • A list of tags that replaces the existing list of tags attached to the specified IAM OIDC provider
  • A list of thumbprints that replaces the existing list of server certificates thumbprints that the IdP uses

The trust for the OIDC provider is derived from the IAM provider that this operation creates. Therefore, it is best to limit access to the CreateOpenIDConnectProvider operation to highly privileged users.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.iam.*;
 CfnOIDCProvider cfnOIDCProvider = CfnOIDCProvider.Builder.create(this, "MyCfnOIDCProvider")
         .thumbprintList(List.of("thumbprintList"))
         // the properties below are optional
         .clientIdList(List.of("clientIdList"))
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .url("url")
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnOIDCProvider

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

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

      @Stability(Stable) public CfnOIDCProvider(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnOIDCProviderProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      Returns the Amazon Resource Name (ARN) for the specified AWS::IAM::OIDCProvider resource.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getThumbprintList

      @Stability(Stable) @NotNull public List<String> getThumbprintList()
      A list of certificate thumbprints that are associated with the specified IAM OIDC provider resource object.
    • setThumbprintList

      @Stability(Stable) public void setThumbprintList(@NotNull List<String> value)
      A list of certificate thumbprints that are associated with the specified IAM OIDC provider resource object.
    • getClientIdList

      @Stability(Stable) @Nullable public List<String> getClientIdList()
      A list of client IDs (also known as audiences) that are associated with the specified IAM OIDC provider resource object.
    • setClientIdList

      @Stability(Stable) public void setClientIdList(@Nullable List<String> value)
      A list of client IDs (also known as audiences) that are associated with the specified IAM OIDC provider resource object.
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      A list of tags that are attached to the specified IAM OIDC provider.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      A list of tags that are attached to the specified IAM OIDC provider.
    • getUrl

      @Stability(Stable) @Nullable public String getUrl()
      The URL that the IAM OIDC provider resource object is associated with.
    • setUrl

      @Stability(Stable) public void setUrl(@Nullable String value)
      The URL that the IAM OIDC provider resource object is associated with.