class SamlProvider (construct)
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.IAM.SamlProvider |
Java | software.amazon.awscdk.services.iam.SamlProvider |
Python | aws_cdk.aws_iam.SamlProvider |
TypeScript (source) | @aws-cdk/aws-iam » SamlProvider |
Implements
IConstruct
, IConstruct
, IDependable
, IResource
, ISaml
A SAML provider.
Example
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),
});
Initializer
new SamlProvider(scope: Construct, id: string, props: SamlProviderProps)
Parameters
- scope
Construct
- id
string
- props
Saml
Provider Props
Construct Props
Name | Type | Description |
---|---|---|
metadata | Saml | 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. |
name? | string | The name of the provider to create. |
metadataDocument
Type:
Saml
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.
name?
Type:
string
(optional, default: a CloudFormation generated name)
The name of the provider to create.
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.
Properties
Name | Type | Description |
---|---|---|
env | Resource | The environment this resource belongs to. |
node | Construct | The construct tree node associated with this construct. |
saml | string | The Amazon Resource Name (ARN) of the provider. |
stack | Stack | The stack in which this resource is defined. |
env
Type:
Resource
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
node
Type:
Construct
The construct tree node associated with this construct.
samlProviderArn
Type:
string
The Amazon Resource Name (ARN) of the provider.
stack
Type:
Stack
The stack in which this resource is defined.
Methods
Name | Description |
---|---|
apply | Apply the given removal policy to this resource. |
to | Returns a string representation of this construct. |
static from | Import an existing provider. |
RemovalPolicy(policy)
applypublic applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
Removal
Policy
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY
), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN
).
String()
topublic toString(): string
Returns
string
Returns a string representation of this construct.
SamlProviderArn(scope, id, samlProviderArn)
static frompublic static fromSamlProviderArn(scope: Construct, id: string, samlProviderArn: string): ISamlProvider
Parameters
- scope
Construct
- id
string
- samlProviderArn
string
Returns
Import an existing provider.