Skip to content
v2.277.0

SamlProviderProps Struct ​

Properties for a SAML provider.

Example ​

ts
const provider = new iam.SamlProvider(this, 'Provider', {
  metadataDocument: iam.SamlMetadataDocument.fromFile('/path/to/saml-metadata-document.xml'),
});
new iam.Role(this, 'Role', {
  assumedBy: new iam.SamlConsolePrincipal(provider),
});
python
provider = iam.SamlProvider(self, "Provider",
    metadata_document=iam.SamlMetadataDocument.from_file("/path/to/saml-metadata-document.xml")
)
iam.Role(self, "Role",
    assumed_by=iam.SamlConsolePrincipal(provider)
)
java
SamlProvider provider = SamlProvider.Builder.create(this, "Provider")
        .metadataDocument(SamlMetadataDocument.fromFile("/path/to/saml-metadata-document.xml"))
        .build();
Role.Builder.create(this, "Role")
        .assumedBy(new SamlConsolePrincipal(provider))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
var provider = new SamlProvider(this, "Provider", new SamlProviderProps {
    MetadataDocument = SamlMetadataDocument.FromFile("/path/to/saml-metadata-document.xml")
});
new Role(this, "Role", new RoleProps {
    AssumedBy = new SamlConsolePrincipal(provider)
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
provider := iam.NewSamlProvider(this, jsii.String("Provider"), &SamlProviderProps{
	MetadataDocument: iam.SamlMetadataDocument_FromFile(jsii.String("/path/to/saml-metadata-document.xml")),
})
iam.NewRole(this, jsii.String("Role"), &RoleProps{
	AssumedBy: iam.NewSamlConsolePrincipal(provider),
})

Properties ​

metadataDocumentSamlMetadataDocumentmetadata_documentSamlMetadataDocumentmetadataDocumentSamlMetadataDocumentMetadataDocumentSamlMetadataDocumentMetadataDocumentSamlMetadataDocumentrequired#
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.
nameoptionalstringnameoptionalstrnameoptionalStringNameoptionalstringNameoptional*string#
The name of the provider to create.

Default: a CloudFormation generated name

This parameter allows a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-

Length must be between 1 and 128 characters.