class UserPoolIdentityProviderApple (construct)
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Cognito.UserPoolIdentityProviderApple |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awscognito#UserPoolIdentityProviderApple |
Java | software.amazon.awscdk.services.cognito.UserPoolIdentityProviderApple |
Python | aws_cdk.aws_cognito.UserPoolIdentityProviderApple |
TypeScript (source) | aws-cdk-lib » aws_cognito » UserPoolIdentityProviderApple |
Implements
IConstruct
, IDependable
, IResource
, IUser
Represents an identity provider that integrates with Apple.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_cognito as cognito } from 'aws-cdk-lib';
declare const providerAttribute: cognito.ProviderAttribute;
declare const secretValue: cdk.SecretValue;
declare const userPool: cognito.UserPool;
const userPoolIdentityProviderApple = new cognito.UserPoolIdentityProviderApple(this, 'MyUserPoolIdentityProviderApple', {
clientId: 'clientId',
keyId: 'keyId',
teamId: 'teamId',
userPool: userPool,
// the properties below are optional
attributeMapping: {
address: providerAttribute,
birthdate: providerAttribute,
custom: {
customKey: providerAttribute,
},
email: providerAttribute,
emailVerified: providerAttribute,
familyName: providerAttribute,
fullname: providerAttribute,
gender: providerAttribute,
givenName: providerAttribute,
lastUpdateTime: providerAttribute,
locale: providerAttribute,
middleName: providerAttribute,
nickname: providerAttribute,
phoneNumber: providerAttribute,
preferredUsername: providerAttribute,
profilePage: providerAttribute,
profilePicture: providerAttribute,
timezone: providerAttribute,
website: providerAttribute,
},
privateKey: 'privateKey',
privateKeyValue: secretValue,
scopes: ['scopes'],
});
Initializer
new UserPoolIdentityProviderApple(scope: Construct, id: string, props: UserPoolIdentityProviderAppleProps)
Parameters
- scope
Construct
- id
string
- props
User
Pool Identity Provider Apple Props
Construct Props
Name | Type | Description |
---|---|---|
client | string | The client id recognized by Apple APIs. |
key | string | The keyId (of the same key, which content has to be later supplied as privateKey ) for Apple APIs to authenticate the client. |
team | string | The teamId for Apple 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. |
private | string | The privateKey content for Apple APIs to authenticate the client. |
private | Secret | The privateKey content for Apple APIs to authenticate the client. |
scopes? | string[] | The list of apple permissions to obtain for getting access to the apple profile. |
clientId
Type:
string
The client id recognized by Apple APIs.
See also: https://developer.apple.com/documentation/sign_in_with_apple/clientconfigi/3230948-clientid
keyId
Type:
string
The keyId (of the same key, which content has to be later supplied as privateKey
) for Apple APIs to authenticate the client.
teamId
Type:
string
The teamId for Apple APIs to authenticate the client.
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.
privateKey?
⚠️ Deprecated: use privateKeyValue
Type:
string
(optional, default: none)
The privateKey content for Apple APIs to authenticate the client.
privateKeyValue?
Type:
Secret
(optional, default: none)
The privateKey content for Apple APIs to authenticate the client.
scopes?
Type:
string[]
(optional, default: [ name ])
The list of apple permissions to obtain for getting access to the apple profile.
See also: https://developer.apple.com/documentation/sign_in_with_apple/clientconfigi/3230955-scope
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