class UserPoolIdentityProviderAmazon (construct)
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Cognito.UserPoolIdentityProviderAmazon |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awscognito#UserPoolIdentityProviderAmazon |
Java | software.amazon.awscdk.services.cognito.UserPoolIdentityProviderAmazon |
Python | aws_cdk.aws_cognito.UserPoolIdentityProviderAmazon |
TypeScript (source) | aws-cdk-lib » aws_cognito » UserPoolIdentityProviderAmazon |
Implements
IConstruct
, IDependable
, IResource
, IUser
Represents an identity provider that integrates with Login with Amazon.
Example
const pool = new cognito.UserPool(this, 'Pool');
const provider = new cognito.UserPoolIdentityProviderAmazon(this, 'Amazon', {
userPool: pool,
clientId: 'amzn-client-id',
clientSecret: 'amzn-client-secret',
});
const client = pool.addClient('app-client', {
// ...
supportedIdentityProviders: [
cognito.UserPoolClientIdentityProvider.AMAZON,
],
});
client.node.addDependency(provider);
Initializer
new UserPoolIdentityProviderAmazon(scope: Construct, id: string, props: UserPoolIdentityProviderAmazonProps)
Parameters
- scope
Construct
- id
string
- props
User
Pool Identity Provider Amazon Props
Construct Props
Name | Type | Description |
---|---|---|
client | string | The client id recognized by Login with Amazon APIs. |
client | string | The client secret to be accompanied with clientId for Login with Amazon APIs to authenticate the client. |
user | IUser | The user pool to which this construct provides identities. |
attribute | Attribute | Mapping attributes from the identity provider to standard and custom attributes of the user pool. |
scopes? | string[] | The types of user profile data to obtain for the Amazon profile. |
clientId
Type:
string
The client id recognized by Login with Amazon APIs.
See also: https://developer.amazon.com/docs/login-with-amazon/security-profile.html#client-identifier
clientSecret
Type:
string
The client secret to be accompanied with clientId for Login with Amazon APIs to authenticate the client.
See also: https://developer.amazon.com/docs/login-with-amazon/security-profile.html#client-identifier
userPool
Type:
IUser
The user pool to which this construct provides identities.
attributeMapping?
Type:
Attribute
(optional, default: no attribute mapping)
Mapping attributes from the identity provider to standard and custom attributes of the user pool.
scopes?
Type:
string[]
(optional, default: [ profile ])
The types of user profile data to obtain for the Amazon profile.
See also: https://developer.amazon.com/docs/login-with-amazon/customer-profile.html
Properties
Name | Type | Description |
---|---|---|
env | Resource | The environment this resource belongs to. |
node | Node | The tree node. |
provider | string | The primary identifier of this identity 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:
Node
The tree node.
providerName
Type:
string
The primary identifier of this identity 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. |
protected configure |
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.
AttributeMapping()
protected configureprotected configureAttributeMapping(): any
Returns
any