Skip to content
v2.278.0

UserPoolIdentityProviderAppleProps Struct ​

Properties to initialize UserPoolAppleIdentityProvider.

Example ​

ts
// 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 userPoolIdentityProviderAppleProps: cognito.UserPoolIdentityProviderAppleProps = {
  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'],
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
from aws_cdk import aws_cognito as cognito

# provider_attribute: cognito.ProviderAttribute
# secret_value: cdk.SecretValue
# user_pool: cognito.UserPool

user_pool_identity_provider_apple_props = cognito.UserPoolIdentityProviderAppleProps(
    client_id="clientId",
    key_id="keyId",
    team_id="teamId",
    user_pool=user_pool,

    # the properties below are optional
    attribute_mapping=cognito.AttributeMapping(
        address=provider_attribute,
        birthdate=provider_attribute,
        custom={
            "custom_key": provider_attribute
        },
        email=provider_attribute,
        email_verified=provider_attribute,
        family_name=provider_attribute,
        fullname=provider_attribute,
        gender=provider_attribute,
        given_name=provider_attribute,
        last_update_time=provider_attribute,
        locale=provider_attribute,
        middle_name=provider_attribute,
        nickname=provider_attribute,
        phone_number=provider_attribute,
        preferred_username=provider_attribute,
        profile_page=provider_attribute,
        profile_picture=provider_attribute,
        timezone=provider_attribute,
        website=provider_attribute
    ),
    private_key="privateKey",
    private_key_value=secret_value,
    scopes=["scopes"]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.cognito.*;

ProviderAttribute providerAttribute;
SecretValue secretValue;
UserPool userPool;

UserPoolIdentityProviderAppleProps userPoolIdentityProviderAppleProps = UserPoolIdentityProviderAppleProps.builder()
        .clientId("clientId")
        .keyId("keyId")
        .teamId("teamId")
        .userPool(userPool)

        // the properties below are optional
        .attributeMapping(AttributeMapping.builder()
                .address(providerAttribute)
                .birthdate(providerAttribute)
                .custom(Map.of(
                        "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)
                .build())
        .privateKey("privateKey")
        .privateKeyValue(secretValue)
        .scopes(List.of("scopes"))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
using Amazon.CDK.AWS.Cognito;

ProviderAttribute providerAttribute;
SecretValue secretValue;
UserPool userPool;

var userPoolIdentityProviderAppleProps = new UserPoolIdentityProviderAppleProps {
    ClientId = "clientId",
    KeyId = "keyId",
    TeamId = "teamId",
    UserPool = userPool,

    // the properties below are optional
    AttributeMapping = new AttributeMapping {
        Address = providerAttribute,
        Birthdate = providerAttribute,
        Custom = new Dictionary<string, ProviderAttribute> {
            { "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 = new [] { "scopes" }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var providerAttribute ProviderAttribute
var secretValue SecretValue
var userPool UserPool

userPoolIdentityProviderAppleProps := &UserPoolIdentityProviderAppleProps{
	ClientId: jsii.String("clientId"),
	KeyId: jsii.String("keyId"),
	TeamId: jsii.String("teamId"),
	UserPool: userPool,

	// the properties below are optional
	AttributeMapping: &AttributeMapping{
		Address: providerAttribute,
		Birthdate: providerAttribute,
		Custom: map[string]ProviderAttribute{
			"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: jsii.String("privateKey"),
	PrivateKeyValue: secretValue,
	Scopes: []*string{
		jsii.String("scopes"),
	},
}

Properties ​

attributeMappingoptionalAttributeMappingattribute_mappingoptionalAttributeMappingattributeMappingoptionalAttributeMappingAttributeMappingoptionalAttributeMappingAttributeMappingoptionalAttributeMapping #
Mapping attributes from the identity provider to standard and custom attributes of the user pool.

Default: no attribute mapping

clientIdstringclient_idstrclientIdStringClientIdstringClientId*string required #
The client id recognized by Apple APIs.
keyIdstringkey_idstrkeyIdStringKeyIdstringKeyId*string required #
The keyId (of the same key, which content has to be later supplied as `privateKey`) for Apple APIs to authenticate the client.
privateKeyoptionalstringprivate_keyoptionalstrprivateKeyoptionalStringPrivateKeyoptionalstringPrivateKeyoptional*string = none deprecated #
use privateKeyValue
privateKeyValueoptionalSecretValueprivate_key_valueoptionalSecretValueprivateKeyValueoptionalSecretValuePrivateKeyValueoptionalSecretValuePrivateKeyValueoptionalSecretValue = none #
The privateKey content for Apple APIs to authenticate the client.
scopesoptionalstring[]scopesoptionaltyping.List[str]scopesoptionalList<String>Scopesoptionalstring[]Scopesoptional*[]*string #
The list of apple permissions to obtain for getting access to the apple profile.

Default: [ name ]

teamIdstringteam_idstrteamIdStringTeamIdstringTeamId*string required #
The teamId for Apple APIs to authenticate the client.
userPoolIUserPooluser_poolIUserPooluserPoolIUserPoolUserPoolIUserPoolUserPoolIUserPool required #
The user pool to which this construct provides identities.