Class CfnSAMLProvider

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.109.0 (build c221850)", date="2025-03-19T18:01:36.362Z") @Stability(Stable) public class CfnSAMLProvider extends CfnResource implements IInspectable, ITaggable
Creates an IAM resource that describes an identity provider (IdP) that supports SAML 2.0.

The SAML provider resource that you create with this operation can be used as a principal in an IAM role's trust policy. Such a policy can enable federated users who sign in using the SAML IdP to assume the role. You can create an IAM role that supports Web-based single sign-on (SSO) to the AWS Management Console or one that supports API access to AWS .

When you create the SAML provider resource, you upload a SAML metadata document that you get from your IdP. That document includes the issuer's name, expiration information, and keys that can be used to validate the SAML authentication response (assertions) that the IdP sends. You must generate the metadata document using the identity management software that is used as your organization's IdP.

This operation requires Signature Version 4 .

For more information, see Enabling SAML 2.0 federated users to access the AWS Management Console and About SAML 2.0-based federation in the IAM 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.services.iam.*;
 CfnSAMLProvider cfnSAMLProvider = CfnSAMLProvider.Builder.create(this, "MyCfnSAMLProvider")
         .addPrivateKey("addPrivateKey")
         .assertionEncryptionMode("assertionEncryptionMode")
         .name("name")
         .privateKeyList(List.of(SAMLPrivateKeyProperty.builder()
                 .keyId("keyId")
                 .timestamp("timestamp")
                 .build()))
         .removePrivateKey("removePrivateKey")
         .samlMetadataDocument("samlMetadataDocument")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .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

    • CfnSAMLProvider

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

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

      @Stability(Stable) public CfnSAMLProvider(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable CfnSAMLProviderProps 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.
    • CfnSAMLProvider

      @Stability(Stable) public CfnSAMLProvider(@NotNull software.constructs.Construct scope, @NotNull String id)
      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.
  • 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::SAMLProvider resource.
    • getAttrSamlProviderUuid

      @Stability(Stable) @NotNull public String getAttrSamlProviderUuid()
      The unique identifier assigned to the SAML provider.
    • 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
    • getAddPrivateKey

      @Stability(Stable) @Nullable public String getAddPrivateKey()
      Specifies the new private key from your external identity provider.
    • setAddPrivateKey

      @Stability(Stable) public void setAddPrivateKey(@Nullable String value)
      Specifies the new private key from your external identity provider.
    • getAssertionEncryptionMode

      @Stability(Stable) @Nullable public String getAssertionEncryptionMode()
      Specifies the encryption setting for the SAML provider.
    • setAssertionEncryptionMode

      @Stability(Stable) public void setAssertionEncryptionMode(@Nullable String value)
      Specifies the encryption setting for the SAML provider.
    • getName

      @Stability(Stable) @Nullable public String getName()
      The name of the provider to create.
    • setName

      @Stability(Stable) public void setName(@Nullable String value)
      The name of the provider to create.
    • getPrivateKeyList

      @Stability(Stable) @Nullable public Object getPrivateKeyList()
      The private key metadata for the SAML provider.
    • setPrivateKeyList

      @Stability(Stable) public void setPrivateKeyList(@Nullable IResolvable value)
      The private key metadata for the SAML provider.
    • setPrivateKeyList

      @Stability(Stable) public void setPrivateKeyList(@Nullable List<Object> value)
      The private key metadata for the SAML provider.
    • getRemovePrivateKey

      @Stability(Stable) @Nullable public String getRemovePrivateKey()
      The Key ID of the private key to remove.
    • setRemovePrivateKey

      @Stability(Stable) public void setRemovePrivateKey(@Nullable String value)
      The Key ID of the private key to remove.
    • getSamlMetadataDocument

      @Stability(Stable) @Nullable public String getSamlMetadataDocument()
      An XML document generated by an identity provider (IdP) that supports SAML 2.0. The document includes the issuer's name, expiration information, and keys that can be used to validate the SAML authentication response (assertions) that are received from the IdP. You must generate the metadata document using the identity management software that is used as your organization's IdP.
    • setSamlMetadataDocument

      @Stability(Stable) public void setSamlMetadataDocument(@Nullable String value)
      An XML document generated by an identity provider (IdP) that supports SAML 2.0. The document includes the issuer's name, expiration information, and keys that can be used to validate the SAML authentication response (assertions) that are received from the IdP. You must generate the metadata document using the identity management software that is used as your organization's IdP.
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      A list of tags that you want to attach to the new IAM SAML provider.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      A list of tags that you want to attach to the new IAM SAML provider.