AWS SDK for PHP 3.x
  • Namespace
  • Class
Did this page help you? SUBMIT FEEDBACK!

Namespaces

  • Aws
    • AccessAnalyzer
      • Exception
    • Acm
      • Exception
    • ACMPCA
      • Exception
    • AlexaForBusiness
      • Exception
    • Amplify
      • Exception
    • AmplifyBackend
      • Exception
    • Api
      • ErrorParser
      • Parser
        • Exception
      • Serializer
    • ApiGateway
      • Exception
    • ApiGatewayManagementApi
      • Exception
    • ApiGatewayV2
      • Exception
    • AppConfig
      • Exception
    • Appflow
      • Exception
    • AppIntegrationsService
      • Exception
    • ApplicationAutoScaling
      • Exception
    • ApplicationDiscoveryService
      • Exception
    • ApplicationInsights
      • Exception
    • AppMesh
      • Exception
    • AppRegistry
      • Exception
    • Appstream
      • Exception
    • AppSync
      • Exception
    • Arn
      • Exception
    • Athena
      • Exception
    • AuditManager
      • Exception
    • AugmentedAIRuntime
      • Exception
    • AutoScaling
      • Exception
    • AutoScalingPlans
      • Exception
    • Backup
      • Exception
    • Batch
      • Exception
    • Braket
      • Exception
    • Budgets
      • Exception
    • Chime
      • Exception
    • ClientSideMonitoring
      • Exception
    • Cloud9
      • Exception
    • CloudDirectory
      • Exception
    • CloudFormation
      • Exception
    • CloudFront
      • Exception
    • CloudHsm
      • Exception
    • CloudHSMV2
      • Exception
    • CloudSearch
      • Exception
    • CloudSearchDomain
      • Exception
    • CloudTrail
      • Exception
    • CloudWatch
      • Exception
    • CloudWatchEvents
      • Exception
    • CloudWatchLogs
      • Exception
    • CodeArtifact
      • Exception
    • CodeBuild
      • Exception
    • CodeCommit
      • Exception
    • CodeDeploy
      • Exception
    • CodeGuruProfiler
      • Exception
    • CodeGuruReviewer
      • Exception
    • CodePipeline
      • Exception
    • CodeStar
      • Exception
    • CodeStarconnections
      • Exception
    • CodeStarNotifications
      • Exception
    • CognitoIdentity
      • Exception
    • CognitoIdentityProvider
      • Exception
    • CognitoSync
      • Exception
    • Comprehend
      • Exception
    • ComprehendMedical
      • Exception
    • ComputeOptimizer
      • Exception
    • ConfigService
      • Exception
    • Connect
      • Exception
    • ConnectContactLens
      • Exception
    • ConnectParticipant
      • Exception
    • CostandUsageReportService
      • Exception
    • CostExplorer
      • Exception
    • Credentials
    • Crypto
      • Cipher
      • Polyfill
    • CustomerProfiles
      • Exception
    • DatabaseMigrationService
      • Exception
    • DataExchange
      • Exception
    • DataPipeline
      • Exception
    • DataSync
      • Exception
    • DAX
      • Exception
    • Detective
      • Exception
    • DeviceFarm
      • Exception
    • DevOpsGuru
      • Exception
    • DirectConnect
      • Exception
    • DirectoryService
      • Exception
    • DLM
      • Exception
    • DocDB
      • Exception
    • DynamoDb
      • Exception
    • DynamoDbStreams
      • Exception
    • EBS
      • Exception
    • Ec2
      • Exception
    • EC2InstanceConnect
      • Exception
    • Ecr
      • Exception
    • ECRPublic
      • Exception
    • Ecs
      • Exception
    • Efs
      • Exception
    • EKS
      • Exception
    • ElastiCache
      • Exception
    • ElasticBeanstalk
      • Exception
    • ElasticInference
      • Exception
    • ElasticLoadBalancing
      • Exception
    • ElasticLoadBalancingV2
      • Exception
    • ElasticsearchService
      • Exception
    • ElasticTranscoder
      • Exception
    • Emr
      • Exception
    • EMRContainers
      • Exception
    • Endpoint
    • EndpointDiscovery
      • Exception
    • EventBridge
      • Exception
    • Exception
    • Firehose
      • Exception
    • FIS
      • Exception
    • FMS
      • Exception
    • ForecastQueryService
      • Exception
    • ForecastService
      • Exception
    • FraudDetector
      • Exception
    • FSx
      • Exception
    • GameLift
      • Exception
    • Glacier
      • Exception
    • GlobalAccelerator
      • Exception
    • Glue
      • Exception
    • GlueDataBrew
      • Exception
    • Greengrass
      • Exception
    • GreengrassV2
      • Exception
    • GroundStation
      • Exception
    • GuardDuty
      • Exception
    • Handler
      • GuzzleV5
      • GuzzleV6
    • Health
      • Exception
    • HealthLake
      • Exception
    • Honeycode
      • Exception
    • Iam
      • Exception
    • IdentityStore
      • Exception
    • imagebuilder
      • Exception
    • ImportExport
      • Exception
    • Inspector
      • Exception
    • Iot
      • Exception
    • IoT1ClickDevicesService
      • Exception
    • IoT1ClickProjects
      • Exception
    • IoTAnalytics
      • Exception
    • IotDataPlane
      • Exception
    • IoTDeviceAdvisor
      • Exception
    • IoTEvents
      • Exception
    • IoTEventsData
      • Exception
    • IoTFleetHub
      • Exception
    • IoTJobsDataPlane
      • Exception
    • IoTSecureTunneling
      • Exception
    • IoTSiteWise
      • Exception
    • IoTThingsGraph
      • Exception
    • IoTWireless
      • Exception
    • IVS
      • Exception
    • Kafka
      • Exception
    • kendra
      • Exception
    • Kinesis
      • Exception
    • KinesisAnalytics
      • Exception
    • KinesisAnalyticsV2
      • Exception
    • KinesisVideo
      • Exception
    • KinesisVideoArchivedMedia
      • Exception
    • KinesisVideoMedia
      • Exception
    • KinesisVideoSignalingChannels
      • Exception
    • Kms
      • Exception
    • LakeFormation
      • Exception
    • Lambda
      • Exception
    • LexModelBuildingService
      • Exception
    • LexModelsV2
      • Exception
    • LexRuntimeService
      • Exception
    • LexRuntimeV2
      • Exception
    • LicenseManager
      • Exception
    • Lightsail
      • Exception
    • LocationService
      • Exception
    • LookoutEquipment
      • Exception
    • LookoutforVision
      • Exception
    • LookoutMetrics
      • Exception
    • MachineLearning
      • Exception
    • Macie
      • Exception
    • Macie2
      • Exception
    • ManagedBlockchain
      • Exception
    • MarketplaceCatalog
      • Exception
    • MarketplaceCommerceAnalytics
      • Exception
    • MarketplaceEntitlementService
      • Exception
    • MarketplaceMetering
      • Exception
    • MediaConnect
      • Exception
    • MediaConvert
      • Exception
    • MediaLive
      • Exception
    • MediaPackage
      • Exception
    • MediaPackageVod
      • Exception
    • MediaStore
      • Exception
    • MediaStoreData
      • Exception
    • MediaTailor
      • Exception
    • mgn
      • Exception
    • MigrationHub
      • Exception
    • MigrationHubConfig
      • Exception
    • Mobile
      • Exception
    • MQ
      • Exception
    • MTurk
      • Exception
    • Multipart
    • MWAA
      • Exception
    • Neptune
      • Exception
    • NetworkFirewall
      • Exception
    • NetworkManager
      • Exception
    • OpsWorks
      • Exception
    • OpsWorksCM
      • Exception
    • Organizations
      • Exception
    • Outposts
      • Exception
    • Personalize
      • Exception
    • PersonalizeEvents
      • Exception
    • PersonalizeRuntime
      • Exception
    • PI
      • Exception
    • Pinpoint
      • Exception
    • PinpointEmail
      • Exception
    • PinpointSMSVoice
      • Exception
    • Polly
      • Exception
    • Pricing
      • Exception
    • PrometheusService
      • Exception
    • QLDB
      • Exception
    • QLDBSession
      • Exception
    • QuickSight
      • Exception
    • RAM
      • Exception
    • Rds
      • Exception
    • RDSDataService
      • Exception
    • Redshift
      • Exception
    • RedshiftDataAPIService
      • Exception
    • Rekognition
      • Exception
    • ResourceGroups
      • Exception
    • ResourceGroupsTaggingAPI
      • Exception
    • Retry
      • Exception
    • RoboMaker
      • Exception
    • Route53
      • Exception
    • Route53Domains
      • Exception
    • Route53Resolver
      • Exception
    • S3
      • Crypto
      • Exception
      • RegionalEndpoint
        • Exception
      • UseArnRegion
        • Exception
    • S3Control
      • Exception
    • S3Outposts
      • Exception
    • SageMaker
      • Exception
    • SagemakerEdgeManager
      • Exception
    • SageMakerFeatureStoreRuntime
      • Exception
    • SageMakerRuntime
      • Exception
    • SavingsPlans
      • Exception
    • Schemas
      • Exception
    • SecretsManager
      • Exception
    • SecurityHub
      • Exception
    • ServerlessApplicationRepository
      • Exception
    • ServiceCatalog
      • Exception
    • ServiceDiscovery
      • Exception
    • ServiceQuotas
      • Exception
    • Ses
      • Exception
    • SesV2
      • Exception
    • Sfn
      • Exception
    • Shield
      • Exception
    • Signature
    • signer
      • Exception
    • Sms
      • Exception
    • SnowBall
      • Exception
    • Sns
      • Exception
    • Sqs
      • Exception
    • Ssm
      • Exception
    • SSO
      • Exception
    • SSOAdmin
      • Exception
    • SSOOIDC
      • Exception
    • StorageGateway
      • Exception
    • Sts
      • Exception
      • RegionalEndpoints
        • Exception
    • Support
      • Exception
    • Swf
      • Exception
    • Synthetics
      • Exception
    • Textract
      • Exception
    • TimestreamQuery
      • Exception
    • TimestreamWrite
      • Exception
    • TranscribeService
      • Exception
    • Transfer
      • Exception
    • Translate
      • Exception
    • Waf
      • Exception
    • WafRegional
      • Exception
    • WAFV2
      • Exception
    • WellArchitected
      • Exception
    • WorkDocs
      • Exception
    • WorkLink
      • Exception
    • WorkMail
      • Exception
    • WorkMailMessageFlow
      • Exception
    • WorkSpaces
      • Exception
    • XRay
      • Exception
  • GuzzleHttp
    • Promise
    • Psr7
  • Psr
    • Http
      • Message

Classes

  • Aws\AbstractConfigurationProvider
  • Aws\AccessAnalyzer\AccessAnalyzerClient
  • Aws\Acm\AcmClient
  • Aws\ACMPCA\ACMPCAClient
  • Aws\AlexaForBusiness\AlexaForBusinessClient
  • Aws\Amplify\AmplifyClient
  • Aws\AmplifyBackend\AmplifyBackendClient
  • Aws\Api\AbstractModel
  • Aws\Api\ApiProvider
  • Aws\Api\DateTimeResult
  • Aws\Api\DocModel
  • Aws\Api\ErrorParser\AbstractErrorParser
  • Aws\Api\ErrorParser\JsonRpcErrorParser
  • Aws\Api\ErrorParser\RestJsonErrorParser
  • Aws\Api\ErrorParser\XmlErrorParser
  • Aws\Api\ListShape
  • Aws\Api\MapShape
  • Aws\Api\Operation
  • Aws\Api\Parser\Crc32ValidatingParser
  • Aws\Api\Parser\DecodingEventStreamIterator
  • Aws\Api\Parser\EventParsingIterator
  • Aws\Api\Parser\JsonParser
  • Aws\Api\Parser\JsonRpcParser
  • Aws\Api\Parser\QueryParser
  • Aws\Api\Parser\RestJsonParser
  • Aws\Api\Parser\RestXmlParser
  • Aws\Api\Parser\XmlParser
  • Aws\Api\Serializer\XmlBody
  • Aws\Api\Service
  • Aws\Api\Shape
  • Aws\Api\ShapeMap
  • Aws\Api\StructureShape
  • Aws\Api\TimestampShape
  • Aws\Api\Validator
  • Aws\ApiGateway\ApiGatewayClient
  • Aws\ApiGatewayManagementApi\ApiGatewayManagementApiClient
  • Aws\ApiGatewayV2\ApiGatewayV2Client
  • Aws\AppConfig\AppConfigClient
  • Aws\Appflow\AppflowClient
  • Aws\AppIntegrationsService\AppIntegrationsServiceClient
  • Aws\ApplicationAutoScaling\ApplicationAutoScalingClient
  • Aws\ApplicationDiscoveryService\ApplicationDiscoveryServiceClient
  • Aws\ApplicationInsights\ApplicationInsightsClient
  • Aws\AppMesh\AppMeshClient
  • Aws\AppRegistry\AppRegistryClient
  • Aws\Appstream\AppstreamClient
  • Aws\AppSync\AppSyncClient
  • Aws\Athena\AthenaClient
  • Aws\AuditManager\AuditManagerClient
  • Aws\AugmentedAIRuntime\AugmentedAIRuntimeClient
  • Aws\AutoScaling\AutoScalingClient
  • Aws\AutoScalingPlans\AutoScalingPlansClient
  • Aws\AwsClient
  • Aws\Backup\BackupClient
  • Aws\Batch\BatchClient
  • Aws\Braket\BraketClient
  • Aws\Budgets\BudgetsClient
  • Aws\Chime\ChimeClient
  • Aws\ClientResolver
  • Aws\ClientSideMonitoring\Configuration
  • Aws\ClientSideMonitoring\ConfigurationProvider
  • Aws\Cloud9\Cloud9Client
  • Aws\CloudDirectory\CloudDirectoryClient
  • Aws\CloudFormation\CloudFormationClient
  • Aws\CloudFront\CloudFrontClient
  • Aws\CloudFront\CookieSigner
  • Aws\CloudFront\UrlSigner
  • Aws\CloudHsm\CloudHsmClient
  • Aws\CloudHSMV2\CloudHSMV2Client
  • Aws\CloudSearch\CloudSearchClient
  • Aws\CloudSearchDomain\CloudSearchDomainClient
  • Aws\CloudTrail\CloudTrailClient
  • Aws\CloudTrail\LogFileIterator
  • Aws\CloudTrail\LogFileReader
  • Aws\CloudTrail\LogRecordIterator
  • Aws\CloudWatch\CloudWatchClient
  • Aws\CloudWatchEvents\CloudWatchEventsClient
  • Aws\CloudWatchLogs\CloudWatchLogsClient
  • Aws\CodeArtifact\CodeArtifactClient
  • Aws\CodeBuild\CodeBuildClient
  • Aws\CodeCommit\CodeCommitClient
  • Aws\CodeDeploy\CodeDeployClient
  • Aws\CodeGuruProfiler\CodeGuruProfilerClient
  • Aws\CodeGuruReviewer\CodeGuruReviewerClient
  • Aws\CodePipeline\CodePipelineClient
  • Aws\CodeStar\CodeStarClient
  • Aws\CodeStarconnections\CodeStarconnectionsClient
  • Aws\CodeStarNotifications\CodeStarNotificationsClient
  • Aws\CognitoIdentity\CognitoIdentityClient
  • Aws\CognitoIdentity\CognitoIdentityProvider
  • Aws\CognitoIdentityProvider\CognitoIdentityProviderClient
  • Aws\CognitoSync\CognitoSyncClient
  • Aws\Command
  • Aws\CommandPool
  • Aws\Comprehend\ComprehendClient
  • Aws\ComprehendMedical\ComprehendMedicalClient
  • Aws\ComputeOptimizer\ComputeOptimizerClient
  • Aws\ConfigService\ConfigServiceClient
  • Aws\Connect\ConnectClient
  • Aws\ConnectContactLens\ConnectContactLensClient
  • Aws\ConnectParticipant\ConnectParticipantClient
  • Aws\CostandUsageReportService\CostandUsageReportServiceClient
  • Aws\CostExplorer\CostExplorerClient
  • Aws\Credentials\AssumeRoleCredentialProvider
  • Aws\Credentials\AssumeRoleWithWebIdentityCredentialProvider
  • Aws\Credentials\CredentialProvider
  • Aws\Credentials\Credentials
  • Aws\Credentials\EcsCredentialProvider
  • Aws\Credentials\InstanceProfileProvider
  • Aws\Crypto\AesDecryptingStream
  • Aws\Crypto\AesEncryptingStream
  • Aws\Crypto\AesGcmDecryptingStream
  • Aws\Crypto\AesGcmEncryptingStream
  • Aws\Crypto\Cipher\Cbc
  • Aws\Crypto\KmsMaterialsProvider
  • Aws\Crypto\KmsMaterialsProviderV2
  • Aws\Crypto\MaterialsProvider
  • Aws\Crypto\MaterialsProviderV2
  • Aws\Crypto\Polyfill\AesGcm
  • Aws\Crypto\Polyfill\ByteArray
  • Aws\Crypto\Polyfill\Gmac
  • Aws\Crypto\Polyfill\Key
  • Aws\CustomerProfiles\CustomerProfilesClient
  • Aws\DatabaseMigrationService\DatabaseMigrationServiceClient
  • Aws\DataExchange\DataExchangeClient
  • Aws\DataPipeline\DataPipelineClient
  • Aws\DataSync\DataSyncClient
  • Aws\DAX\DAXClient
  • Aws\Detective\DetectiveClient
  • Aws\DeviceFarm\DeviceFarmClient
  • Aws\DevOpsGuru\DevOpsGuruClient
  • Aws\DirectConnect\DirectConnectClient
  • Aws\DirectoryService\DirectoryServiceClient
  • Aws\DLM\DLMClient
  • Aws\DocDB\DocDBClient
  • Aws\DoctrineCacheAdapter
  • Aws\DynamoDb\BinaryValue
  • Aws\DynamoDb\DynamoDbClient
  • Aws\DynamoDb\LockingSessionConnection
  • Aws\DynamoDb\Marshaler
  • Aws\DynamoDb\NumberValue
  • Aws\DynamoDb\SessionHandler
  • Aws\DynamoDb\SetValue
  • Aws\DynamoDb\StandardSessionConnection
  • Aws\DynamoDb\WriteRequestBatch
  • Aws\DynamoDbStreams\DynamoDbStreamsClient
  • Aws\EBS\EBSClient
  • Aws\Ec2\Ec2Client
  • Aws\EC2InstanceConnect\EC2InstanceConnectClient
  • Aws\Ecr\EcrClient
  • Aws\ECRPublic\ECRPublicClient
  • Aws\Ecs\EcsClient
  • Aws\Efs\EfsClient
  • Aws\EKS\EKSClient
  • Aws\ElastiCache\ElastiCacheClient
  • Aws\ElasticBeanstalk\ElasticBeanstalkClient
  • Aws\ElasticInference\ElasticInferenceClient
  • Aws\ElasticLoadBalancing\ElasticLoadBalancingClient
  • Aws\ElasticLoadBalancingV2\ElasticLoadBalancingV2Client
  • Aws\ElasticsearchService\ElasticsearchServiceClient
  • Aws\ElasticTranscoder\ElasticTranscoderClient
  • Aws\Emr\EmrClient
  • Aws\EMRContainers\EMRContainersClient
  • Aws\Endpoint\EndpointProvider
  • Aws\Endpoint\Partition
  • Aws\Endpoint\PartitionEndpointProvider
  • Aws\Endpoint\PatternEndpointProvider
  • Aws\EndpointDiscovery\Configuration
  • Aws\EndpointDiscovery\ConfigurationProvider
  • Aws\EndpointDiscovery\EndpointDiscoveryMiddleware
  • Aws\EndpointDiscovery\EndpointList
  • Aws\EventBridge\EventBridgeClient
  • Aws\Firehose\FirehoseClient
  • Aws\FIS\FISClient
  • Aws\FMS\FMSClient
  • Aws\ForecastQueryService\ForecastQueryServiceClient
  • Aws\ForecastService\ForecastServiceClient
  • Aws\FraudDetector\FraudDetectorClient
  • Aws\FSx\FSxClient
  • Aws\GameLift\GameLiftClient
  • Aws\Glacier\GlacierClient
  • Aws\Glacier\MultipartUploader
  • Aws\Glacier\TreeHash
  • Aws\GlobalAccelerator\GlobalAcceleratorClient
  • Aws\Glue\GlueClient
  • Aws\GlueDataBrew\GlueDataBrewClient
  • Aws\Greengrass\GreengrassClient
  • Aws\GreengrassV2\GreengrassV2Client
  • Aws\GroundStation\GroundStationClient
  • Aws\GuardDuty\GuardDutyClient
  • Aws\Handler\GuzzleV5\GuzzleHandler
  • Aws\Handler\GuzzleV5\GuzzleStream
  • Aws\Handler\GuzzleV5\PsrStream
  • Aws\Handler\GuzzleV6\GuzzleHandler
  • Aws\HandlerList
  • Aws\HashingStream
  • Aws\Health\HealthClient
  • Aws\HealthLake\HealthLakeClient
  • Aws\History
  • Aws\Honeycode\HoneycodeClient
  • Aws\Iam\IamClient
  • Aws\IdempotencyTokenMiddleware
  • Aws\IdentityStore\IdentityStoreClient
  • Aws\imagebuilder\imagebuilderClient
  • Aws\ImportExport\ImportExportClient
  • Aws\Inspector\InspectorClient
  • Aws\IoT1ClickDevicesService\IoT1ClickDevicesServiceClient
  • Aws\IoT1ClickProjects\IoT1ClickProjectsClient
  • Aws\Iot\IotClient
  • Aws\IoTAnalytics\IoTAnalyticsClient
  • Aws\IotDataPlane\IotDataPlaneClient
  • Aws\IoTDeviceAdvisor\IoTDeviceAdvisorClient
  • Aws\IoTEvents\IoTEventsClient
  • Aws\IoTEventsData\IoTEventsDataClient
  • Aws\IoTFleetHub\IoTFleetHubClient
  • Aws\IoTJobsDataPlane\IoTJobsDataPlaneClient
  • Aws\IoTSecureTunneling\IoTSecureTunnelingClient
  • Aws\IoTSiteWise\IoTSiteWiseClient
  • Aws\IoTThingsGraph\IoTThingsGraphClient
  • Aws\IoTWireless\IoTWirelessClient
  • Aws\IVS\IVSClient
  • Aws\JsonCompiler
  • Aws\Kafka\KafkaClient
  • Aws\kendra\kendraClient
  • Aws\Kinesis\KinesisClient
  • Aws\KinesisAnalytics\KinesisAnalyticsClient
  • Aws\KinesisAnalyticsV2\KinesisAnalyticsV2Client
  • Aws\KinesisVideo\KinesisVideoClient
  • Aws\KinesisVideoArchivedMedia\KinesisVideoArchivedMediaClient
  • Aws\KinesisVideoMedia\KinesisVideoMediaClient
  • Aws\KinesisVideoSignalingChannels\KinesisVideoSignalingChannelsClient
  • Aws\Kms\KmsClient
  • Aws\LakeFormation\LakeFormationClient
  • Aws\Lambda\LambdaClient
  • Aws\LexModelBuildingService\LexModelBuildingServiceClient
  • Aws\LexModelsV2\LexModelsV2Client
  • Aws\LexRuntimeService\LexRuntimeServiceClient
  • Aws\LexRuntimeV2\LexRuntimeV2Client
  • Aws\LicenseManager\LicenseManagerClient
  • Aws\Lightsail\LightsailClient
  • Aws\LocationService\LocationServiceClient
  • Aws\LookoutEquipment\LookoutEquipmentClient
  • Aws\LookoutforVision\LookoutforVisionClient
  • Aws\LookoutMetrics\LookoutMetricsClient
  • Aws\LruArrayCache
  • Aws\MachineLearning\MachineLearningClient
  • Aws\Macie2\Macie2Client
  • Aws\Macie\MacieClient
  • Aws\ManagedBlockchain\ManagedBlockchainClient
  • Aws\MarketplaceCatalog\MarketplaceCatalogClient
  • Aws\MarketplaceCommerceAnalytics\MarketplaceCommerceAnalyticsClient
  • Aws\MarketplaceEntitlementService\MarketplaceEntitlementServiceClient
  • Aws\MarketplaceMetering\MarketplaceMeteringClient
  • Aws\MediaConnect\MediaConnectClient
  • Aws\MediaConvert\MediaConvertClient
  • Aws\MediaLive\MediaLiveClient
  • Aws\MediaPackage\MediaPackageClient
  • Aws\MediaPackageVod\MediaPackageVodClient
  • Aws\MediaStore\MediaStoreClient
  • Aws\MediaStoreData\MediaStoreDataClient
  • Aws\MediaTailor\MediaTailorClient
  • Aws\mgn\mgnClient
  • Aws\Middleware
  • Aws\MigrationHub\MigrationHubClient
  • Aws\MigrationHubConfig\MigrationHubConfigClient
  • Aws\Mobile\MobileClient
  • Aws\MockHandler
  • Aws\MQ\MQClient
  • Aws\MTurk\MTurkClient
  • Aws\Multipart\UploadState
  • Aws\MultiRegionClient
  • Aws\MWAA\MWAAClient
  • Aws\Neptune\NeptuneClient
  • Aws\NetworkFirewall\NetworkFirewallClient
  • Aws\NetworkManager\NetworkManagerClient
  • Aws\OpsWorks\OpsWorksClient
  • Aws\OpsWorksCM\OpsWorksCMClient
  • Aws\Organizations\OrganizationsClient
  • Aws\Outposts\OutpostsClient
  • Aws\Personalize\PersonalizeClient
  • Aws\PersonalizeEvents\PersonalizeEventsClient
  • Aws\PersonalizeRuntime\PersonalizeRuntimeClient
  • Aws\PhpHash
  • Aws\PI\PIClient
  • Aws\Pinpoint\PinpointClient
  • Aws\PinpointEmail\PinpointEmailClient
  • Aws\PinpointSMSVoice\PinpointSMSVoiceClient
  • Aws\Polly\PollyClient
  • Aws\PresignUrlMiddleware
  • Aws\Pricing\PricingClient
  • Aws\PrometheusService\PrometheusServiceClient
  • Aws\Psr16CacheAdapter
  • Aws\PsrCacheAdapter
  • Aws\QLDB\QLDBClient
  • Aws\QLDBSession\QLDBSessionClient
  • Aws\QuickSight\QuickSightClient
  • Aws\RAM\RAMClient
  • Aws\Rds\AuthTokenGenerator
  • Aws\Rds\RdsClient
  • Aws\RDSDataService\RDSDataServiceClient
  • Aws\Redshift\RedshiftClient
  • Aws\RedshiftDataAPIService\RedshiftDataAPIServiceClient
  • Aws\Rekognition\RekognitionClient
  • Aws\ResourceGroups\ResourceGroupsClient
  • Aws\ResourceGroupsTaggingAPI\ResourceGroupsTaggingAPIClient
  • Aws\Result
  • Aws\ResultPaginator
  • Aws\Retry\Configuration
  • Aws\Retry\ConfigurationProvider
  • Aws\RoboMaker\RoboMakerClient
  • Aws\Route53\Route53Client
  • Aws\Route53Domains\Route53DomainsClient
  • Aws\Route53Resolver\Route53ResolverClient
  • Aws\S3\BatchDelete
  • Aws\S3\Crypto\HeadersMetadataStrategy
  • Aws\S3\Crypto\InstructionFileMetadataStrategy
  • Aws\S3\Crypto\S3EncryptionClient
  • Aws\S3\Crypto\S3EncryptionClientV2
  • Aws\S3\Crypto\S3EncryptionMultipartUploader
  • Aws\S3\Crypto\S3EncryptionMultipartUploaderV2
  • Aws\S3\GetBucketLocationParser
  • Aws\S3\MultipartUploader
  • Aws\S3\ObjectCopier
  • Aws\S3\ObjectUploader
  • Aws\S3\PostObject
  • Aws\S3\PostObjectV4
  • Aws\S3\RegionalEndpoint\Configuration
  • Aws\S3\RegionalEndpoint\ConfigurationProvider
  • Aws\S3\S3Client
  • Aws\S3\S3MultiRegionClient
  • Aws\S3\S3UriParser
  • Aws\S3\StreamWrapper
  • Aws\S3\Transfer
  • Aws\S3\UseArnRegion\Configuration
  • Aws\S3\UseArnRegion\ConfigurationProvider
  • Aws\S3Control\S3ControlClient
  • Aws\S3Outposts\S3OutpostsClient
  • Aws\SageMaker\SageMakerClient
  • Aws\SagemakerEdgeManager\SagemakerEdgeManagerClient
  • Aws\SageMakerFeatureStoreRuntime\SageMakerFeatureStoreRuntimeClient
  • Aws\SageMakerRuntime\SageMakerRuntimeClient
  • Aws\SavingsPlans\SavingsPlansClient
  • Aws\Schemas\SchemasClient
  • Aws\Sdk
  • Aws\SecretsManager\SecretsManagerClient
  • Aws\SecurityHub\SecurityHubClient
  • Aws\ServerlessApplicationRepository\ServerlessApplicationRepositoryClient
  • Aws\ServiceCatalog\ServiceCatalogClient
  • Aws\ServiceDiscovery\ServiceDiscoveryClient
  • Aws\ServiceQuotas\ServiceQuotasClient
  • Aws\Ses\SesClient
  • Aws\SesV2\SesV2Client
  • Aws\Sfn\SfnClient
  • Aws\Shield\ShieldClient
  • Aws\Signature\AnonymousSignature
  • Aws\Signature\S3SignatureV4
  • Aws\Signature\SignatureProvider
  • Aws\Signature\SignatureV4
  • Aws\signer\signerClient
  • Aws\Sms\SmsClient
  • Aws\SnowBall\SnowBallClient
  • Aws\Sns\Message
  • Aws\Sns\MessageValidator
  • Aws\Sns\SnsClient
  • Aws\Sqs\SqsClient
  • Aws\Ssm\SsmClient
  • Aws\SSO\SSOClient
  • Aws\SSOAdmin\SSOAdminClient
  • Aws\SSOOIDC\SSOOIDCClient
  • Aws\StorageGateway\StorageGatewayClient
  • Aws\Sts\RegionalEndpoints\Configuration
  • Aws\Sts\RegionalEndpoints\ConfigurationProvider
  • Aws\Sts\StsClient
  • Aws\Support\SupportClient
  • Aws\Swf\SwfClient
  • Aws\Synthetics\SyntheticsClient
  • Aws\Textract\TextractClient
  • Aws\TimestreamQuery\TimestreamQueryClient
  • Aws\TimestreamWrite\TimestreamWriteClient
  • Aws\TraceMiddleware
  • Aws\TranscribeService\TranscribeServiceClient
  • Aws\Transfer\TransferClient
  • Aws\Translate\TranslateClient
  • Aws\Waf\WafClient
  • Aws\WafRegional\WafRegionalClient
  • Aws\WAFV2\WAFV2Client
  • Aws\Waiter
  • Aws\WellArchitected\WellArchitectedClient
  • Aws\WorkDocs\WorkDocsClient
  • Aws\WorkLink\WorkLinkClient
  • Aws\WorkMail\WorkMailClient
  • Aws\WorkMailMessageFlow\WorkMailMessageFlowClient
  • Aws\WorkSpaces\WorkSpacesClient
  • Aws\WrappedHttpHandler
  • Aws\XRay\XRayClient

Interfaces

  • Aws\AwsClientInterface
  • Aws\CacheInterface
  • Aws\ClientSideMonitoring\ConfigurationInterface
  • Aws\CommandInterface
  • Aws\ConfigurationProviderInterface
  • Aws\Credentials\CredentialsInterface
  • Aws\Crypto\AesStreamInterface
  • Aws\Crypto\AesStreamInterfaceV2
  • Aws\Crypto\Cipher\CipherMethod
  • Aws\Crypto\MaterialsProviderInterface
  • Aws\Crypto\MaterialsProviderInterfaceV2
  • Aws\Crypto\MetadataStrategyInterface
  • Aws\DynamoDb\SessionConnectionInterface
  • Aws\Endpoint\PartitionInterface
  • Aws\EndpointDiscovery\ConfigurationInterface
  • Aws\HashInterface
  • Aws\MonitoringEventsInterface
  • Aws\ResponseContainerInterface
  • Aws\ResultInterface
  • Aws\Retry\ConfigurationInterface
  • Aws\S3\RegionalEndpoint\ConfigurationInterface
  • Aws\S3\S3ClientInterface
  • Aws\S3\UseArnRegion\ConfigurationInterface
  • Aws\Signature\SignatureInterface
  • Aws\Sts\RegionalEndpoints\ConfigurationInterface

Traits

  • Aws\Api\ErrorParser\JsonParserTrait
  • Aws\Api\Parser\MetadataParserTrait
  • Aws\Api\Parser\PayloadParserTrait
  • Aws\AwsClientTrait
  • Aws\Crypto\Cipher\CipherBuilderTrait
  • Aws\Crypto\DecryptionTrait
  • Aws\Crypto\DecryptionTraitV2
  • Aws\Crypto\EncryptionTrait
  • Aws\Crypto\EncryptionTraitV2
  • Aws\Crypto\Polyfill\NeedsTrait
  • Aws\DynamoDb\SessionConnectionConfigTrait
  • Aws\HasDataTrait
  • Aws\HasMonitoringEventsTrait
  • Aws\Retry\RetryHelperTrait
  • Aws\S3\Crypto\CryptoParamsTrait
  • Aws\S3\Crypto\CryptoParamsTraitV2
  • Aws\S3\Crypto\UserAgentTrait
  • Aws\S3\MultipartUploadingTrait
  • Aws\S3\S3ClientTrait
  • Aws\Signature\SignatureTrait

Exceptions

  • Aws\AccessAnalyzer\Exception\AccessAnalyzerException
  • Aws\Acm\Exception\AcmException
  • Aws\ACMPCA\Exception\ACMPCAException
  • Aws\AlexaForBusiness\Exception\AlexaForBusinessException
  • Aws\Amplify\Exception\AmplifyException
  • Aws\AmplifyBackend\Exception\AmplifyBackendException
  • Aws\Api\Parser\Exception\ParserException
  • Aws\ApiGateway\Exception\ApiGatewayException
  • Aws\ApiGatewayManagementApi\Exception\ApiGatewayManagementApiException
  • Aws\ApiGatewayV2\Exception\ApiGatewayV2Exception
  • Aws\AppConfig\Exception\AppConfigException
  • Aws\Appflow\Exception\AppflowException
  • Aws\AppIntegrationsService\Exception\AppIntegrationsServiceException
  • Aws\ApplicationAutoScaling\Exception\ApplicationAutoScalingException
  • Aws\ApplicationDiscoveryService\Exception\ApplicationDiscoveryServiceException
  • Aws\ApplicationInsights\Exception\ApplicationInsightsException
  • Aws\AppMesh\Exception\AppMeshException
  • Aws\AppRegistry\Exception\AppRegistryException
  • Aws\Appstream\Exception\AppstreamException
  • Aws\AppSync\Exception\AppSyncException
  • Aws\Arn\Exception\InvalidArnException
  • Aws\Athena\Exception\AthenaException
  • Aws\AuditManager\Exception\AuditManagerException
  • Aws\AugmentedAIRuntime\Exception\AugmentedAIRuntimeException
  • Aws\AutoScaling\Exception\AutoScalingException
  • Aws\AutoScalingPlans\Exception\AutoScalingPlansException
  • Aws\Backup\Exception\BackupException
  • Aws\Batch\Exception\BatchException
  • Aws\Braket\Exception\BraketException
  • Aws\Budgets\Exception\BudgetsException
  • Aws\Chime\Exception\ChimeException
  • Aws\ClientSideMonitoring\Exception\ConfigurationException
  • Aws\Cloud9\Exception\Cloud9Exception
  • Aws\CloudDirectory\Exception\CloudDirectoryException
  • Aws\CloudFormation\Exception\CloudFormationException
  • Aws\CloudFront\Exception\CloudFrontException
  • Aws\CloudHsm\Exception\CloudHsmException
  • Aws\CloudHSMV2\Exception\CloudHSMV2Exception
  • Aws\CloudSearch\Exception\CloudSearchException
  • Aws\CloudSearchDomain\Exception\CloudSearchDomainException
  • Aws\CloudTrail\Exception\CloudTrailException
  • Aws\CloudWatch\Exception\CloudWatchException
  • Aws\CloudWatchEvents\Exception\CloudWatchEventsException
  • Aws\CloudWatchLogs\Exception\CloudWatchLogsException
  • Aws\CodeArtifact\Exception\CodeArtifactException
  • Aws\CodeBuild\Exception\CodeBuildException
  • Aws\CodeCommit\Exception\CodeCommitException
  • Aws\CodeDeploy\Exception\CodeDeployException
  • Aws\CodeGuruProfiler\Exception\CodeGuruProfilerException
  • Aws\CodeGuruReviewer\Exception\CodeGuruReviewerException
  • Aws\CodePipeline\Exception\CodePipelineException
  • Aws\CodeStar\Exception\CodeStarException
  • Aws\CodeStarconnections\Exception\CodeStarconnectionsException
  • Aws\CodeStarNotifications\Exception\CodeStarNotificationsException
  • Aws\CognitoIdentity\Exception\CognitoIdentityException
  • Aws\CognitoIdentityProvider\Exception\CognitoIdentityProviderException
  • Aws\CognitoSync\Exception\CognitoSyncException
  • Aws\Comprehend\Exception\ComprehendException
  • Aws\ComprehendMedical\Exception\ComprehendMedicalException
  • Aws\ComputeOptimizer\Exception\ComputeOptimizerException
  • Aws\ConfigService\Exception\ConfigServiceException
  • Aws\Connect\Exception\ConnectException
  • Aws\ConnectContactLens\Exception\ConnectContactLensException
  • Aws\ConnectParticipant\Exception\ConnectParticipantException
  • Aws\CostandUsageReportService\Exception\CostandUsageReportServiceException
  • Aws\CostExplorer\Exception\CostExplorerException
  • Aws\CustomerProfiles\Exception\CustomerProfilesException
  • Aws\DatabaseMigrationService\Exception\DatabaseMigrationServiceException
  • Aws\DataExchange\Exception\DataExchangeException
  • Aws\DataPipeline\Exception\DataPipelineException
  • Aws\DataSync\Exception\DataSyncException
  • Aws\DAX\Exception\DAXException
  • Aws\Detective\Exception\DetectiveException
  • Aws\DeviceFarm\Exception\DeviceFarmException
  • Aws\DevOpsGuru\Exception\DevOpsGuruException
  • Aws\DirectConnect\Exception\DirectConnectException
  • Aws\DirectoryService\Exception\DirectoryServiceException
  • Aws\DLM\Exception\DLMException
  • Aws\DocDB\Exception\DocDBException
  • Aws\DynamoDb\Exception\DynamoDbException
  • Aws\DynamoDbStreams\Exception\DynamoDbStreamsException
  • Aws\EBS\Exception\EBSException
  • Aws\Ec2\Exception\Ec2Exception
  • Aws\EC2InstanceConnect\Exception\EC2InstanceConnectException
  • Aws\Ecr\Exception\EcrException
  • Aws\ECRPublic\Exception\ECRPublicException
  • Aws\Ecs\Exception\EcsException
  • Aws\Efs\Exception\EfsException
  • Aws\EKS\Exception\EKSException
  • Aws\ElastiCache\Exception\ElastiCacheException
  • Aws\ElasticBeanstalk\Exception\ElasticBeanstalkException
  • Aws\ElasticInference\Exception\ElasticInferenceException
  • Aws\ElasticLoadBalancing\Exception\ElasticLoadBalancingException
  • Aws\ElasticLoadBalancingV2\Exception\ElasticLoadBalancingV2Exception
  • Aws\ElasticsearchService\Exception\ElasticsearchServiceException
  • Aws\ElasticTranscoder\Exception\ElasticTranscoderException
  • Aws\Emr\Exception\EmrException
  • Aws\EMRContainers\Exception\EMRContainersException
  • Aws\EndpointDiscovery\Exception\ConfigurationException
  • Aws\EventBridge\Exception\EventBridgeException
  • Aws\Exception\AwsException
  • Aws\Exception\CouldNotCreateChecksumException
  • Aws\Exception\CredentialsException
  • Aws\Exception\CryptoException
  • Aws\Exception\CryptoPolyfillException
  • Aws\Exception\EventStreamDataException
  • Aws\Exception\IncalculablePayloadException
  • Aws\Exception\InvalidJsonException
  • Aws\Exception\InvalidRegionException
  • Aws\Exception\MultipartUploadException
  • Aws\Exception\UnresolvedApiException
  • Aws\Exception\UnresolvedEndpointException
  • Aws\Exception\UnresolvedSignatureException
  • Aws\Firehose\Exception\FirehoseException
  • Aws\FIS\Exception\FISException
  • Aws\FMS\Exception\FMSException
  • Aws\ForecastQueryService\Exception\ForecastQueryServiceException
  • Aws\ForecastService\Exception\ForecastServiceException
  • Aws\FraudDetector\Exception\FraudDetectorException
  • Aws\FSx\Exception\FSxException
  • Aws\GameLift\Exception\GameLiftException
  • Aws\Glacier\Exception\GlacierException
  • Aws\GlobalAccelerator\Exception\GlobalAcceleratorException
  • Aws\Glue\Exception\GlueException
  • Aws\GlueDataBrew\Exception\GlueDataBrewException
  • Aws\Greengrass\Exception\GreengrassException
  • Aws\GreengrassV2\Exception\GreengrassV2Exception
  • Aws\GroundStation\Exception\GroundStationException
  • Aws\GuardDuty\Exception\GuardDutyException
  • Aws\Health\Exception\HealthException
  • Aws\HealthLake\Exception\HealthLakeException
  • Aws\Honeycode\Exception\HoneycodeException
  • Aws\Iam\Exception\IamException
  • Aws\IdentityStore\Exception\IdentityStoreException
  • Aws\imagebuilder\Exception\imagebuilderException
  • Aws\ImportExport\Exception\ImportExportException
  • Aws\Inspector\Exception\InspectorException
  • Aws\IoT1ClickDevicesService\Exception\IoT1ClickDevicesServiceException
  • Aws\IoT1ClickProjects\Exception\IoT1ClickProjectsException
  • Aws\Iot\Exception\IotException
  • Aws\IoTAnalytics\Exception\IoTAnalyticsException
  • Aws\IotDataPlane\Exception\IotDataPlaneException
  • Aws\IoTDeviceAdvisor\Exception\IoTDeviceAdvisorException
  • Aws\IoTEvents\Exception\IoTEventsException
  • Aws\IoTEventsData\Exception\IoTEventsDataException
  • Aws\IoTFleetHub\Exception\IoTFleetHubException
  • Aws\IoTJobsDataPlane\Exception\IoTJobsDataPlaneException
  • Aws\IoTSecureTunneling\Exception\IoTSecureTunnelingException
  • Aws\IoTSiteWise\Exception\IoTSiteWiseException
  • Aws\IoTThingsGraph\Exception\IoTThingsGraphException
  • Aws\IoTWireless\Exception\IoTWirelessException
  • Aws\IVS\Exception\IVSException
  • Aws\Kafka\Exception\KafkaException
  • Aws\kendra\Exception\kendraException
  • Aws\Kinesis\Exception\KinesisException
  • Aws\KinesisAnalytics\Exception\KinesisAnalyticsException
  • Aws\KinesisAnalyticsV2\Exception\KinesisAnalyticsV2Exception
  • Aws\KinesisVideo\Exception\KinesisVideoException
  • Aws\KinesisVideoArchivedMedia\Exception\KinesisVideoArchivedMediaException
  • Aws\KinesisVideoMedia\Exception\KinesisVideoMediaException
  • Aws\KinesisVideoSignalingChannels\Exception\KinesisVideoSignalingChannelsException
  • Aws\Kms\Exception\KmsException
  • Aws\LakeFormation\Exception\LakeFormationException
  • Aws\Lambda\Exception\LambdaException
  • Aws\LexModelBuildingService\Exception\LexModelBuildingServiceException
  • Aws\LexModelsV2\Exception\LexModelsV2Exception
  • Aws\LexRuntimeService\Exception\LexRuntimeServiceException
  • Aws\LexRuntimeV2\Exception\LexRuntimeV2Exception
  • Aws\LicenseManager\Exception\LicenseManagerException
  • Aws\Lightsail\Exception\LightsailException
  • Aws\LocationService\Exception\LocationServiceException
  • Aws\LookoutEquipment\Exception\LookoutEquipmentException
  • Aws\LookoutforVision\Exception\LookoutforVisionException
  • Aws\LookoutMetrics\Exception\LookoutMetricsException
  • Aws\MachineLearning\Exception\MachineLearningException
  • Aws\Macie2\Exception\Macie2Exception
  • Aws\Macie\Exception\MacieException
  • Aws\ManagedBlockchain\Exception\ManagedBlockchainException
  • Aws\MarketplaceCatalog\Exception\MarketplaceCatalogException
  • Aws\MarketplaceCommerceAnalytics\Exception\MarketplaceCommerceAnalyticsException
  • Aws\MarketplaceEntitlementService\Exception\MarketplaceEntitlementServiceException
  • Aws\MarketplaceMetering\Exception\MarketplaceMeteringException
  • Aws\MediaConnect\Exception\MediaConnectException
  • Aws\MediaConvert\Exception\MediaConvertException
  • Aws\MediaLive\Exception\MediaLiveException
  • Aws\MediaPackage\Exception\MediaPackageException
  • Aws\MediaPackageVod\Exception\MediaPackageVodException
  • Aws\MediaStore\Exception\MediaStoreException
  • Aws\MediaStoreData\Exception\MediaStoreDataException
  • Aws\MediaTailor\Exception\MediaTailorException
  • Aws\mgn\Exception\mgnException
  • Aws\MigrationHub\Exception\MigrationHubException
  • Aws\MigrationHubConfig\Exception\MigrationHubConfigException
  • Aws\Mobile\Exception\MobileException
  • Aws\MQ\Exception\MQException
  • Aws\MTurk\Exception\MTurkException
  • Aws\MWAA\Exception\MWAAException
  • Aws\Neptune\Exception\NeptuneException
  • Aws\NetworkFirewall\Exception\NetworkFirewallException
  • Aws\NetworkManager\Exception\NetworkManagerException
  • Aws\OpsWorks\Exception\OpsWorksException
  • Aws\OpsWorksCM\Exception\OpsWorksCMException
  • Aws\Organizations\Exception\OrganizationsException
  • Aws\Outposts\Exception\OutpostsException
  • Aws\Personalize\Exception\PersonalizeException
  • Aws\PersonalizeEvents\Exception\PersonalizeEventsException
  • Aws\PersonalizeRuntime\Exception\PersonalizeRuntimeException
  • Aws\PI\Exception\PIException
  • Aws\Pinpoint\Exception\PinpointException
  • Aws\PinpointEmail\Exception\PinpointEmailException
  • Aws\PinpointSMSVoice\Exception\PinpointSMSVoiceException
  • Aws\Polly\Exception\PollyException
  • Aws\Pricing\Exception\PricingException
  • Aws\PrometheusService\Exception\PrometheusServiceException
  • Aws\QLDB\Exception\QLDBException
  • Aws\QLDBSession\Exception\QLDBSessionException
  • Aws\QuickSight\Exception\QuickSightException
  • Aws\RAM\Exception\RAMException
  • Aws\Rds\Exception\RdsException
  • Aws\RDSDataService\Exception\RDSDataServiceException
  • Aws\Redshift\Exception\RedshiftException
  • Aws\RedshiftDataAPIService\Exception\RedshiftDataAPIServiceException
  • Aws\Rekognition\Exception\RekognitionException
  • Aws\ResourceGroups\Exception\ResourceGroupsException
  • Aws\ResourceGroupsTaggingAPI\Exception\ResourceGroupsTaggingAPIException
  • Aws\Retry\Exception\ConfigurationException
  • Aws\RoboMaker\Exception\RoboMakerException
  • Aws\Route53\Exception\Route53Exception
  • Aws\Route53Domains\Exception\Route53DomainsException
  • Aws\Route53Resolver\Exception\Route53ResolverException
  • Aws\S3\Exception\DeleteMultipleObjectsException
  • Aws\S3\Exception\PermanentRedirectException
  • Aws\S3\Exception\S3Exception
  • Aws\S3\Exception\S3MultipartUploadException
  • Aws\S3\RegionalEndpoint\Exception\ConfigurationException
  • Aws\S3\UseArnRegion\Exception\ConfigurationException
  • Aws\S3Control\Exception\S3ControlException
  • Aws\S3Outposts\Exception\S3OutpostsException
  • Aws\SageMaker\Exception\SageMakerException
  • Aws\SagemakerEdgeManager\Exception\SagemakerEdgeManagerException
  • Aws\SageMakerFeatureStoreRuntime\Exception\SageMakerFeatureStoreRuntimeException
  • Aws\SageMakerRuntime\Exception\SageMakerRuntimeException
  • Aws\SavingsPlans\Exception\SavingsPlansException
  • Aws\Schemas\Exception\SchemasException
  • Aws\SecretsManager\Exception\SecretsManagerException
  • Aws\SecurityHub\Exception\SecurityHubException
  • Aws\ServerlessApplicationRepository\Exception\ServerlessApplicationRepositoryException
  • Aws\ServiceCatalog\Exception\ServiceCatalogException
  • Aws\ServiceDiscovery\Exception\ServiceDiscoveryException
  • Aws\ServiceQuotas\Exception\ServiceQuotasException
  • Aws\Ses\Exception\SesException
  • Aws\SesV2\Exception\SesV2Exception
  • Aws\Sfn\Exception\SfnException
  • Aws\Shield\Exception\ShieldException
  • Aws\signer\Exception\signerException
  • Aws\Sms\Exception\SmsException
  • Aws\SnowBall\Exception\SnowBallException
  • Aws\Sns\Exception\InvalidSnsMessageException
  • Aws\Sns\Exception\SnsException
  • Aws\Sqs\Exception\SqsException
  • Aws\Ssm\Exception\SsmException
  • Aws\SSO\Exception\SSOException
  • Aws\SSOAdmin\Exception\SSOAdminException
  • Aws\SSOOIDC\Exception\SSOOIDCException
  • Aws\StorageGateway\Exception\StorageGatewayException
  • Aws\Sts\Exception\StsException
  • Aws\Sts\RegionalEndpoints\Exception\ConfigurationException
  • Aws\Support\Exception\SupportException
  • Aws\Swf\Exception\SwfException
  • Aws\Synthetics\Exception\SyntheticsException
  • Aws\Textract\Exception\TextractException
  • Aws\TimestreamQuery\Exception\TimestreamQueryException
  • Aws\TimestreamWrite\Exception\TimestreamWriteException
  • Aws\TranscribeService\Exception\TranscribeServiceException
  • Aws\Transfer\Exception\TransferException
  • Aws\Translate\Exception\TranslateException
  • Aws\Waf\Exception\WafException
  • Aws\WafRegional\Exception\WafRegionalException
  • Aws\WAFV2\Exception\WAFV2Exception
  • Aws\WellArchitected\Exception\WellArchitectedException
  • Aws\WorkDocs\Exception\WorkDocsException
  • Aws\WorkLink\Exception\WorkLinkException
  • Aws\WorkMail\Exception\WorkMailException
  • Aws\WorkMailMessageFlow\Exception\WorkMailMessageFlowException
  • Aws\WorkSpaces\Exception\WorkSpacesException
  • Aws\XRay\Exception\XRayException

Functions

  • Aws\boolean_value
  • Aws\clear_compiled_json
  • Aws\constantly
  • Aws\default_http_handler
  • Aws\default_user_agent
  • Aws\describe_type
  • Aws\dir_iterator
  • Aws\filter
  • Aws\flatmap
  • Aws\guzzle_major_version
  • Aws\is_valid_epoch
  • Aws\is_valid_hostlabel
  • Aws\is_valid_hostname
  • Aws\load_compiled_json
  • Aws\manifest
  • Aws\map
  • Aws\or_chain
  • Aws\parse_ini_file
  • Aws\partition
  • Aws\recursive_dir_iterator
  • Aws\serialize

Amazon Cognito Identity Provider 2016-04-18

Client: Aws\CognitoIdentityProvider\CognitoIdentityProviderClient
Service ID: cognito-idp
Version: 2016-04-18

This page describes the parameters and results for the operations of the Amazon Cognito Identity Provider (2016-04-18), and shows how to use the Aws\CognitoIdentityProvider\CognitoIdentityProviderClient object to call the described operations. This documentation is specific to the 2016-04-18 API version of the service.

Operation Summary

Each of the following operations can be created from a client using $client->getCommand('CommandName'), where "CommandName" is the name of one of the following operations. Note: a command is a value that encapsulates an operation and the parameters used to create an HTTP request.

You can also create and send a command immediately using the magic methods available on a client object: $client->commandName(/* parameters */). You can send the command asynchronously (returning a promise) by appending the word "Async" to the operation name: $client->commandNameAsync(/* parameters */).

  • AddCustomAttributes ( array $params = [] )

    Adds additional user attributes to the user pool schema.

  • AdminAddUserToGroup ( array $params = [] )

    Adds the specified user to the specified group.

  • AdminConfirmSignUp ( array $params = [] )

    Confirms user registration as an admin without using a confirmation code.

  • AdminCreateUser ( array $params = [] )

    Creates a new user in the specified user pool.

  • AdminDeleteUser ( array $params = [] )

    Deletes a user as an administrator.

  • AdminDeleteUserAttributes ( array $params = [] )

    Deletes the user attributes in a user pool as an administrator.

  • AdminDisableProviderForUser ( array $params = [] )

    Disables the user from signing in with the specified external (SAML or social) identity provider.

  • AdminDisableUser ( array $params = [] )

    Disables the specified user.

  • AdminEnableUser ( array $params = [] )

    Enables the specified user as an administrator.

  • AdminForgetDevice ( array $params = [] )

    Forgets the device, as an administrator.

  • AdminGetDevice ( array $params = [] )

    Gets the device, as an administrator.

  • AdminGetUser ( array $params = [] )

    Gets the specified user by user name in a user pool as an administrator.

  • AdminInitiateAuth ( array $params = [] )

    Initiates the authentication flow, as an administrator.

  • AdminLinkProviderForUser ( array $params = [] )

    Links an existing user account in a user pool (DestinationUser) to an identity from an external identity provider (SourceUser) based on a specified attribute name and value from the external identity provider.

  • AdminListDevices ( array $params = [] )

    Lists devices, as an administrator.

  • AdminListGroupsForUser ( array $params = [] )

    Lists the groups that the user belongs to.

  • AdminListUserAuthEvents ( array $params = [] )

    Lists a history of user activity and any risks detected as part of Amazon Cognito advanced security.

  • AdminRemoveUserFromGroup ( array $params = [] )

    Removes the specified user from the specified group.

  • AdminResetUserPassword ( array $params = [] )

    Resets the specified user's password in a user pool as an administrator.

  • AdminRespondToAuthChallenge ( array $params = [] )

    Responds to an authentication challenge, as an administrator.

  • AdminSetUserMFAPreference ( array $params = [] )

    Sets the user's multi-factor authentication (MFA) preference, including which MFA options are enabled and if any are preferred.

  • AdminSetUserPassword ( array $params = [] )

    Sets the specified user's password in a user pool as an administrator.

  • AdminSetUserSettings ( array $params = [] )

    This action is no longer supported.

  • AdminUpdateAuthEventFeedback ( array $params = [] )

    Provides feedback for an authentication event as to whether it was from a valid user.

  • AdminUpdateDeviceStatus ( array $params = [] )

    Updates the device status as an administrator.

  • AdminUpdateUserAttributes ( array $params = [] )

    Updates the specified user's attributes, including developer attributes, as an administrator.

  • AdminUserGlobalSignOut ( array $params = [] )

    Signs out users from all devices, as an administrator.

  • AssociateSoftwareToken ( array $params = [] )

    Returns a unique generated shared secret key code for the user account.

  • ChangePassword ( array $params = [] )

    Changes the password for a specified user in a user pool.

  • ConfirmDevice ( array $params = [] )

    Confirms tracking of the device.

  • ConfirmForgotPassword ( array $params = [] )

    Allows a user to enter a confirmation code to reset a forgotten password.

  • ConfirmSignUp ( array $params = [] )

    Confirms registration of a user and handles the existing alias from a previous user.

  • CreateGroup ( array $params = [] )

    Creates a new group in the specified user pool.

  • CreateIdentityProvider ( array $params = [] )

    Creates an identity provider for a user pool.

  • CreateResourceServer ( array $params = [] )

    Creates a new OAuth2.

  • CreateUserImportJob ( array $params = [] )

    Creates the user import job.

  • CreateUserPool ( array $params = [] )

    Creates a new Amazon Cognito user pool and sets the password policy for the pool.

  • CreateUserPoolClient ( array $params = [] )

    Creates the user pool client.

  • CreateUserPoolDomain ( array $params = [] )

    Creates a new domain for a user pool.

  • DeleteGroup ( array $params = [] )

    Deletes a group.

  • DeleteIdentityProvider ( array $params = [] )

    Deletes an identity provider for a user pool.

  • DeleteResourceServer ( array $params = [] )

    Deletes a resource server.

  • DeleteUser ( array $params = [] )

    Allows a user to delete himself or herself.

  • DeleteUserAttributes ( array $params = [] )

    Deletes the attributes for a user.

  • DeleteUserPool ( array $params = [] )

    Deletes the specified Amazon Cognito user pool.

  • DeleteUserPoolClient ( array $params = [] )

    Allows the developer to delete the user pool client.

  • DeleteUserPoolDomain ( array $params = [] )

    Deletes a domain for a user pool.

  • DescribeIdentityProvider ( array $params = [] )

    Gets information about a specific identity provider.

  • DescribeResourceServer ( array $params = [] )

    Describes a resource server.

  • DescribeRiskConfiguration ( array $params = [] )

    Describes the risk configuration.

  • DescribeUserImportJob ( array $params = [] )

    Describes the user import job.

  • DescribeUserPool ( array $params = [] )

    Returns the configuration information and metadata of the specified user pool.

  • DescribeUserPoolClient ( array $params = [] )

    Client method for returning the configuration information and metadata of the specified user pool app client.

  • DescribeUserPoolDomain ( array $params = [] )

    Gets information about a domain.

  • ForgetDevice ( array $params = [] )

    Forgets the specified device.

  • ForgotPassword ( array $params = [] )

    Calling this API causes a message to be sent to the end user with a confirmation code that is required to change the user's password.

  • GetCSVHeader ( array $params = [] )

    Gets the header information for the .

  • GetDevice ( array $params = [] )

    Gets the device.

  • GetGroup ( array $params = [] )

    Gets a group.

  • GetIdentityProviderByIdentifier ( array $params = [] )

    Gets the specified identity provider.

  • GetSigningCertificate ( array $params = [] )

    This method takes a user pool ID, and returns the signing certificate.

  • GetUICustomization ( array $params = [] )

    Gets the UI Customization information for a particular app client's app UI, if there is something set.

  • GetUser ( array $params = [] )

    Gets the user attributes and metadata for a user.

  • GetUserAttributeVerificationCode ( array $params = [] )

    Gets the user attribute verification code for the specified attribute name.

  • GetUserPoolMfaConfig ( array $params = [] )

    Gets the user pool multi-factor authentication (MFA) configuration.

  • GlobalSignOut ( array $params = [] )

    Signs out users from all devices.

  • InitiateAuth ( array $params = [] )

    Initiates the authentication flow.

  • ListDevices ( array $params = [] )

    Lists the devices.

  • ListGroups ( array $params = [] )

    Lists the groups associated with a user pool.

  • ListIdentityProviders ( array $params = [] )

    Lists information about all identity providers for a user pool.

  • ListResourceServers ( array $params = [] )

    Lists the resource servers for a user pool.

  • ListTagsForResource ( array $params = [] )

    Lists the tags that are assigned to an Amazon Cognito user pool.

  • ListUserImportJobs ( array $params = [] )

    Lists the user import jobs.

  • ListUserPoolClients ( array $params = [] )

    Lists the clients that have been created for the specified user pool.

  • ListUserPools ( array $params = [] )

    Lists the user pools associated with an AWS account.

  • ListUsers ( array $params = [] )

    Lists the users in the Amazon Cognito user pool.

  • ListUsersInGroup ( array $params = [] )

    Lists the users in the specified group.

  • ResendConfirmationCode ( array $params = [] )

    Resends the confirmation (for confirmation of registration) to a specific user in the user pool.

  • RespondToAuthChallenge ( array $params = [] )

    Responds to the authentication challenge.

  • SetRiskConfiguration ( array $params = [] )

    Configures actions on detected risks.

  • SetUICustomization ( array $params = [] )

    Sets the UI customization information for a user pool's built-in app UI.

  • SetUserMFAPreference ( array $params = [] )

    Set the user's multi-factor authentication (MFA) method preference, including which MFA factors are enabled and if any are preferred.

  • SetUserPoolMfaConfig ( array $params = [] )

    Set the user pool multi-factor authentication (MFA) configuration.

  • SetUserSettings ( array $params = [] )

    This action is no longer supported.

  • SignUp ( array $params = [] )

    Registers the user in the specified user pool and creates a user name, password, and user attributes.

  • StartUserImportJob ( array $params = [] )

    Starts the user import.

  • StopUserImportJob ( array $params = [] )

    Stops the user import job.

  • TagResource ( array $params = [] )

    Assigns a set of tags to an Amazon Cognito user pool.

  • UntagResource ( array $params = [] )

    Removes the specified tags from an Amazon Cognito user pool.

  • UpdateAuthEventFeedback ( array $params = [] )

    Provides the feedback for an authentication event whether it was from a valid user or not.

  • UpdateDeviceStatus ( array $params = [] )

    Updates the device status.

  • UpdateGroup ( array $params = [] )

    Updates the specified group with the specified attributes.

  • UpdateIdentityProvider ( array $params = [] )

    Updates identity provider information for a user pool.

  • UpdateResourceServer ( array $params = [] )

    Updates the name and scopes of resource server.

  • UpdateUserAttributes ( array $params = [] )

    Allows a user to update a specific attribute (one at a time).

  • UpdateUserPool ( array $params = [] )

    Updates the specified user pool with the specified attributes.

  • UpdateUserPoolClient ( array $params = [] )

    Updates the specified user pool app client with the specified attributes.

  • UpdateUserPoolDomain ( array $params = [] )

    Updates the Secure Sockets Layer (SSL) certificate for the custom domain for your user pool.

  • VerifySoftwareToken ( array $params = [] )

    Use this API to register a user's entered TOTP code and mark the user's software token MFA status as "verified" if successful.

  • VerifyUserAttribute ( array $params = [] )

    Verifies the specified user attributes in the user pool.

Paginators

Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:

  • AdminListGroupsForUser
  • AdminListUserAuthEvents
  • ListGroups
  • ListIdentityProviders
  • ListResourceServers
  • ListUserPoolClients
  • ListUserPools
  • ListUsers
  • ListUsersInGroup

Operations

AddCustomAttributes

$result = $client->addCustomAttributes([/* ... */]);
$promise = $client->addCustomAttributesAsync([/* ... */]);

Adds additional user attributes to the user pool schema.

Parameter Syntax

$result = $client->addCustomAttributes([
    'CustomAttributes' => [ // REQUIRED
        [
            'AttributeDataType' => 'String|Number|DateTime|Boolean',
            'DeveloperOnlyAttribute' => true || false,
            'Mutable' => true || false,
            'Name' => '<string>',
            'NumberAttributeConstraints' => [
                'MaxValue' => '<string>',
                'MinValue' => '<string>',
            ],
            'Required' => true || false,
            'StringAttributeConstraints' => [
                'MaxLength' => '<string>',
                'MinLength' => '<string>',
            ],
        ],
        // ...
    ],
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
CustomAttributes
  • Required: Yes
  • Type: Array of SchemaAttributeType structures

An array of custom attributes, such as Mutable and Name.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool where you want to add custom attributes.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • UserImportInProgressException:

    This exception is thrown when you are trying to modify a user pool while a user import job is in progress for that pool.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

AdminAddUserToGroup

$result = $client->adminAddUserToGroup([/* ... */]);
$promise = $client->adminAddUserToGroupAsync([/* ... */]);

Adds the specified user to the specified group.

Calling this action requires developer credentials.

Parameter Syntax

$result = $client->adminAddUserToGroup([
    'GroupName' => '<string>', // REQUIRED
    'UserPoolId' => '<string>', // REQUIRED
    'Username' => '<string>', // REQUIRED
]);

Parameter Details

Members
GroupName
  • Required: Yes
  • Type: string

The group name.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool.

Username
  • Required: Yes
  • Type: string

The username for the user.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

AdminConfirmSignUp

$result = $client->adminConfirmSignUp([/* ... */]);
$promise = $client->adminConfirmSignUpAsync([/* ... */]);

Confirms user registration as an admin without using a confirmation code. Works on any user.

Calling this action requires developer credentials.

Parameter Syntax

$result = $client->adminConfirmSignUp([
    'ClientMetadata' => ['<string>', ...],
    'UserPoolId' => '<string>', // REQUIRED
    'Username' => '<string>', // REQUIRED
]);

Parameter Details

Members
ClientMetadata
  • Type: Associative array of custom strings keys (StringType) to strings

A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.

If your user pool configuration includes triggers, the AdminConfirmSignUp API action invokes the AWS Lambda function that is specified for the post confirmation trigger. When Amazon Cognito invokes this function, it passes a JSON payload, which the function receives as input. In this payload, the clientMetadata attribute provides the data that you assigned to the ClientMetadata parameter in your AdminConfirmSignUp request. In your function code in AWS Lambda, you can process the ClientMetadata value to enhance your workflow for your specific needs.

For more information, see Customizing User Pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

Take the following limitations into consideration when you use the ClientMetadata parameter:

  • Amazon Cognito does not store the ClientMetadata value. This data is available only to AWS Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration does not include triggers, the ClientMetadata parameter serves no purpose.

  • Amazon Cognito does not validate the ClientMetadata value.

  • Amazon Cognito does not encrypt the the ClientMetadata value, so don't use it to provide sensitive information.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for which you want to confirm user registration.

Username
  • Required: Yes
  • Type: string

The user name for which you want to confirm user registration.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • UnexpectedLambdaException:

    This exception is thrown when the Amazon Cognito service encounters an unexpected exception with the AWS Lambda service.

  • UserLambdaValidationException:

    This exception is thrown when the Amazon Cognito service encounters a user validation exception with the AWS Lambda service.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • TooManyFailedAttemptsException:

    This exception is thrown when the user has made too many failed attempts for a given action (e.g., sign in).

  • InvalidLambdaResponseException:

    This exception is thrown when the Amazon Cognito service encounters an invalid AWS Lambda response.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • LimitExceededException:

    This exception is thrown when a user exceeds the limit for a requested AWS resource.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

AdminCreateUser

$result = $client->adminCreateUser([/* ... */]);
$promise = $client->adminCreateUserAsync([/* ... */]);

Creates a new user in the specified user pool.

If MessageAction is not set, the default is to send a welcome message via email or phone (SMS).

This message is based on a template that you configured in your call to create or update a user pool. This template includes your custom sign-up instructions and placeholders for user name and temporary password.

Alternatively, you can call AdminCreateUser with “SUPPRESS” for the MessageAction parameter, and Amazon Cognito will not send any email.

In either case, the user will be in the FORCE_CHANGE_PASSWORD state until they sign in and change their password.

AdminCreateUser requires developer credentials.

Parameter Syntax

$result = $client->adminCreateUser([
    'ClientMetadata' => ['<string>', ...],
    'DesiredDeliveryMediums' => ['<string>', ...],
    'ForceAliasCreation' => true || false,
    'MessageAction' => 'RESEND|SUPPRESS',
    'TemporaryPassword' => '<string>',
    'UserAttributes' => [
        [
            'Name' => '<string>', // REQUIRED
            'Value' => '<string>',
        ],
        // ...
    ],
    'UserPoolId' => '<string>', // REQUIRED
    'Username' => '<string>', // REQUIRED
    'ValidationData' => [
        [
            'Name' => '<string>', // REQUIRED
            'Value' => '<string>',
        ],
        // ...
    ],
]);

Parameter Details

Members
ClientMetadata
  • Type: Associative array of custom strings keys (StringType) to strings

A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.

You create custom workflows by assigning AWS Lambda functions to user pool triggers. When you use the AdminCreateUser API action, Amazon Cognito invokes the function that is assigned to the pre sign-up trigger. When Amazon Cognito invokes this function, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your AdminCreateUser request. In your function code in AWS Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs.

For more information, see Customizing User Pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

Take the following limitations into consideration when you use the ClientMetadata parameter:

  • Amazon Cognito does not store the ClientMetadata value. This data is available only to AWS Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration does not include triggers, the ClientMetadata parameter serves no purpose.

  • Amazon Cognito does not validate the ClientMetadata value.

  • Amazon Cognito does not encrypt the the ClientMetadata value, so don't use it to provide sensitive information.

DesiredDeliveryMediums
  • Type: Array of strings

Specify "EMAIL" if email will be used to send the welcome message. Specify "SMS" if the phone number will be used. The default value is "SMS". More than one value can be specified.

ForceAliasCreation
  • Type: boolean

This parameter is only used if the phone_number_verified or email_verified attribute is set to True. Otherwise, it is ignored.

If this parameter is set to True and the phone number or email address specified in the UserAttributes parameter already exists as an alias with a different user, the API call will migrate the alias from the previous user to the newly created user. The previous user will no longer be able to log in using that alias.

If this parameter is set to False, the API throws an AliasExistsException error if the alias already exists. The default value is False.

MessageAction
  • Type: string

Set to "RESEND" to resend the invitation message to a user that already exists and reset the expiration limit on the user's account. Set to "SUPPRESS" to suppress sending the message. Only one value can be specified.

TemporaryPassword
  • Type: string

The user's temporary password. This password must conform to the password policy that you specified when you created the user pool.

The temporary password is valid only once. To complete the Admin Create User flow, the user must enter the temporary password in the sign-in page along with a new password to be used in all future sign-ins.

This parameter is not required. If you do not specify a value, Amazon Cognito generates one for you.

The temporary password can only be used until the user account expiration limit that you specified when you created the user pool. To reset the account after that time limit, you must call AdminCreateUser again, specifying "RESEND" for the MessageAction parameter.

UserAttributes
  • Type: Array of AttributeType structures

An array of name-value pairs that contain user attributes and attribute values to be set for the user to be created. You can create a user without specifying any attributes other than Username. However, any attributes that you specify as required (when creating a user pool or in the Attributes tab of the console) must be supplied either by you (in your call to AdminCreateUser) or by the user (when he or she signs up in response to your welcome message).

For custom attributes, you must prepend the custom: prefix to the attribute name.

To send a message inviting the user to sign up, you must specify the user's email address or phone number. This can be done in your call to AdminCreateUser or in the Users tab of the Amazon Cognito console for managing your user pools.

In your call to AdminCreateUser, you can set the email_verified attribute to True, and you can set the phone_number_verified attribute to True. (You can also do this by calling AdminUpdateUserAttributes.)

  • email: The email address of the user to whom the message that contains the code and username will be sent. Required if the email_verified attribute is set to True, or if "EMAIL" is specified in the DesiredDeliveryMediums parameter.

  • phone_number: The phone number of the user to whom the message that contains the code and username will be sent. Required if the phone_number_verified attribute is set to True, or if "SMS" is specified in the DesiredDeliveryMediums parameter.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool where the user will be created.

Username
  • Required: Yes
  • Type: string

The username for the user. Must be unique within the user pool. Must be a UTF-8 string between 1 and 128 characters. After the user is created, the username cannot be changed.

ValidationData
  • Type: Array of AttributeType structures

The user's validation data. This is an array of name-value pairs that contain user attributes and attribute values that you can use for custom validation, such as restricting the types of user accounts that can be registered. For example, you might choose to allow or disallow user sign-up based on the user's domain.

To configure custom validation, you must create a Pre Sign-up Lambda trigger for the user pool as described in the Amazon Cognito Developer Guide. The Lambda trigger receives the validation data and uses it in the validation process.

The user's validation data is not persisted.

Result Syntax

[
    'User' => [
        'Attributes' => [
            [
                'Name' => '<string>',
                'Value' => '<string>',
            ],
            // ...
        ],
        'Enabled' => true || false,
        'MFAOptions' => [
            [
                'AttributeName' => '<string>',
                'DeliveryMedium' => 'SMS|EMAIL',
            ],
            // ...
        ],
        'UserCreateDate' => <DateTime>,
        'UserLastModifiedDate' => <DateTime>,
        'UserStatus' => 'UNCONFIRMED|CONFIRMED|ARCHIVED|COMPROMISED|UNKNOWN|RESET_REQUIRED|FORCE_CHANGE_PASSWORD',
        'Username' => '<string>',
    ],
]

Result Details

Members
User
  • Type: UserType structure

The newly created user.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • UsernameExistsException:

    This exception is thrown when Amazon Cognito encounters a user name that already exists in the user pool.

  • InvalidPasswordException:

    This exception is thrown when the Amazon Cognito service encounters an invalid password.

  • CodeDeliveryFailureException:

    This exception is thrown when a verification code fails to deliver successfully.

  • UnexpectedLambdaException:

    This exception is thrown when the Amazon Cognito service encounters an unexpected exception with the AWS Lambda service.

  • UserLambdaValidationException:

    This exception is thrown when the Amazon Cognito service encounters a user validation exception with the AWS Lambda service.

  • InvalidLambdaResponseException:

    This exception is thrown when the Amazon Cognito service encounters an invalid AWS Lambda response.

  • PreconditionNotMetException:

    This exception is thrown when a precondition is not met.

  • InvalidSmsRoleAccessPolicyException:

    This exception is returned when the role provided for SMS configuration does not have permission to publish using Amazon SNS.

  • InvalidSmsRoleTrustRelationshipException:

    This exception is thrown when the trust relationship is invalid for the role provided for SMS configuration. This can happen if you do not trust cognito-idp.amazonaws.com or the external ID provided in the role does not match what is provided in the SMS configuration for the user pool.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • UnsupportedUserStateException:

    The request failed because the user is in an unsupported state.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

AdminDeleteUser

$result = $client->adminDeleteUser([/* ... */]);
$promise = $client->adminDeleteUserAsync([/* ... */]);

Deletes a user as an administrator. Works on any user.

Calling this action requires developer credentials.

Parameter Syntax

$result = $client->adminDeleteUser([
    'UserPoolId' => '<string>', // REQUIRED
    'Username' => '<string>', // REQUIRED
]);

Parameter Details

Members
UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool where you want to delete the user.

Username
  • Required: Yes
  • Type: string

The user name of the user you wish to delete.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

AdminDeleteUserAttributes

$result = $client->adminDeleteUserAttributes([/* ... */]);
$promise = $client->adminDeleteUserAttributesAsync([/* ... */]);

Deletes the user attributes in a user pool as an administrator. Works on any user.

Calling this action requires developer credentials.

Parameter Syntax

$result = $client->adminDeleteUserAttributes([
    'UserAttributeNames' => ['<string>', ...], // REQUIRED
    'UserPoolId' => '<string>', // REQUIRED
    'Username' => '<string>', // REQUIRED
]);

Parameter Details

Members
UserAttributeNames
  • Required: Yes
  • Type: Array of strings

An array of strings representing the user attribute names you wish to delete.

For custom attributes, you must prepend the custom: prefix to the attribute name.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool where you want to delete user attributes.

Username
  • Required: Yes
  • Type: string

The user name of the user from which you would like to delete attributes.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

AdminDisableProviderForUser

$result = $client->adminDisableProviderForUser([/* ... */]);
$promise = $client->adminDisableProviderForUserAsync([/* ... */]);

Disables the user from signing in with the specified external (SAML or social) identity provider. If the user to disable is a Cognito User Pools native username + password user, they are not permitted to use their password to sign-in. If the user to disable is a linked external IdP user, any link between that user and an existing user is removed. The next time the external user (no longer attached to the previously linked DestinationUser) signs in, they must create a new user account. See AdminLinkProviderForUser.

This action is enabled only for admin access and requires developer credentials.

The ProviderName must match the value specified when creating an IdP for the pool.

To disable a native username + password user, the ProviderName value must be Cognito and the ProviderAttributeName must be Cognito_Subject, with the ProviderAttributeValue being the name that is used in the user pool for the user.

The ProviderAttributeName must always be Cognito_Subject for social identity providers. The ProviderAttributeValue must always be the exact subject that was used when the user was originally linked as a source user.

For de-linking a SAML identity, there are two scenarios. If the linked identity has not yet been used to sign-in, the ProviderAttributeName and ProviderAttributeValue must be the same values that were used for the SourceUser when the identities were originally linked using AdminLinkProviderForUser call. (If the linking was done with ProviderAttributeName set to Cognito_Subject, the same applies here). However, if the user has already signed in, the ProviderAttributeName must be Cognito_Subject and ProviderAttributeValue must be the subject of the SAML assertion.

Parameter Syntax

$result = $client->adminDisableProviderForUser([
    'User' => [ // REQUIRED
        'ProviderAttributeName' => '<string>',
        'ProviderAttributeValue' => '<string>',
        'ProviderName' => '<string>',
    ],
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
User
  • Required: Yes
  • Type: ProviderUserIdentifierType structure

The user to be disabled.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • AliasExistsException:

    This exception is thrown when a user tries to confirm the account with an email or phone number that has already been supplied as an alias from a different account. This exception tells user that an account with this email or phone already exists.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

AdminDisableUser

$result = $client->adminDisableUser([/* ... */]);
$promise = $client->adminDisableUserAsync([/* ... */]);

Disables the specified user.

Calling this action requires developer credentials.

Parameter Syntax

$result = $client->adminDisableUser([
    'UserPoolId' => '<string>', // REQUIRED
    'Username' => '<string>', // REQUIRED
]);

Parameter Details

Members
UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool where you want to disable the user.

Username
  • Required: Yes
  • Type: string

The user name of the user you wish to disable.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

AdminEnableUser

$result = $client->adminEnableUser([/* ... */]);
$promise = $client->adminEnableUserAsync([/* ... */]);

Enables the specified user as an administrator. Works on any user.

Calling this action requires developer credentials.

Parameter Syntax

$result = $client->adminEnableUser([
    'UserPoolId' => '<string>', // REQUIRED
    'Username' => '<string>', // REQUIRED
]);

Parameter Details

Members
UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool where you want to enable the user.

Username
  • Required: Yes
  • Type: string

The user name of the user you wish to enable.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

AdminForgetDevice

$result = $client->adminForgetDevice([/* ... */]);
$promise = $client->adminForgetDeviceAsync([/* ... */]);

Forgets the device, as an administrator.

Calling this action requires developer credentials.

Parameter Syntax

$result = $client->adminForgetDevice([
    'DeviceKey' => '<string>', // REQUIRED
    'UserPoolId' => '<string>', // REQUIRED
    'Username' => '<string>', // REQUIRED
]);

Parameter Details

Members
DeviceKey
  • Required: Yes
  • Type: string

The device key.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID.

Username
  • Required: Yes
  • Type: string

The user name.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • InvalidUserPoolConfigurationException:

    This exception is thrown when the user pool configuration is invalid.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

AdminGetDevice

$result = $client->adminGetDevice([/* ... */]);
$promise = $client->adminGetDeviceAsync([/* ... */]);

Gets the device, as an administrator.

Calling this action requires developer credentials.

Parameter Syntax

$result = $client->adminGetDevice([
    'DeviceKey' => '<string>', // REQUIRED
    'UserPoolId' => '<string>', // REQUIRED
    'Username' => '<string>', // REQUIRED
]);

Parameter Details

Members
DeviceKey
  • Required: Yes
  • Type: string

The device key.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID.

Username
  • Required: Yes
  • Type: string

The user name.

Result Syntax

[
    'Device' => [
        'DeviceAttributes' => [
            [
                'Name' => '<string>',
                'Value' => '<string>',
            ],
            // ...
        ],
        'DeviceCreateDate' => <DateTime>,
        'DeviceKey' => '<string>',
        'DeviceLastAuthenticatedDate' => <DateTime>,
        'DeviceLastModifiedDate' => <DateTime>,
    ],
]

Result Details

Members
Device
  • Required: Yes
  • Type: DeviceType structure

The device.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • InvalidUserPoolConfigurationException:

    This exception is thrown when the user pool configuration is invalid.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

AdminGetUser

$result = $client->adminGetUser([/* ... */]);
$promise = $client->adminGetUserAsync([/* ... */]);

Gets the specified user by user name in a user pool as an administrator. Works on any user.

Calling this action requires developer credentials.

Parameter Syntax

$result = $client->adminGetUser([
    'UserPoolId' => '<string>', // REQUIRED
    'Username' => '<string>', // REQUIRED
]);

Parameter Details

Members
UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool where you want to get information about the user.

Username
  • Required: Yes
  • Type: string

The user name of the user you wish to retrieve.

Result Syntax

[
    'Enabled' => true || false,
    'MFAOptions' => [
        [
            'AttributeName' => '<string>',
            'DeliveryMedium' => 'SMS|EMAIL',
        ],
        // ...
    ],
    'PreferredMfaSetting' => '<string>',
    'UserAttributes' => [
        [
            'Name' => '<string>',
            'Value' => '<string>',
        ],
        // ...
    ],
    'UserCreateDate' => <DateTime>,
    'UserLastModifiedDate' => <DateTime>,
    'UserMFASettingList' => ['<string>', ...],
    'UserStatus' => 'UNCONFIRMED|CONFIRMED|ARCHIVED|COMPROMISED|UNKNOWN|RESET_REQUIRED|FORCE_CHANGE_PASSWORD',
    'Username' => '<string>',
]

Result Details

Members
Enabled
  • Type: boolean

Indicates that the status is enabled.

MFAOptions
  • Type: Array of MFAOptionType structures

This response parameter is no longer supported. It provides information only about SMS MFA configurations. It doesn't provide information about TOTP software token MFA configurations. To look up information about either type of MFA configuration, use UserMFASettingList instead.

PreferredMfaSetting
  • Type: string

The user's preferred MFA setting.

UserAttributes
  • Type: Array of AttributeType structures

An array of name-value pairs representing user attributes.

UserCreateDate
  • Type: timestamp (string|DateTime or anything parsable by strtotime)

The date the user was created.

UserLastModifiedDate
  • Type: timestamp (string|DateTime or anything parsable by strtotime)

The date the user was last modified.

UserMFASettingList
  • Type: Array of strings

The MFA options that are enabled for the user. The possible values in this list are SMS_MFA and SOFTWARE_TOKEN_MFA.

UserStatus
  • Type: string

The user status. Can be one of the following:

  • UNCONFIRMED - User has been created but not confirmed.

  • CONFIRMED - User has been confirmed.

  • ARCHIVED - User is no longer active.

  • COMPROMISED - User is disabled due to a potential security threat.

  • UNKNOWN - User status is not known.

  • RESET_REQUIRED - User is confirmed, but the user must request a code and reset his or her password before he or she can sign in.

  • FORCE_CHANGE_PASSWORD - The user is confirmed and the user can sign in using a temporary password, but on first sign-in, the user must change his or her password to a new value before doing anything else.

Username
  • Required: Yes
  • Type: string

The user name of the user about whom you are receiving information.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

AdminInitiateAuth

$result = $client->adminInitiateAuth([/* ... */]);
$promise = $client->adminInitiateAuthAsync([/* ... */]);

Initiates the authentication flow, as an administrator.

Calling this action requires developer credentials.

Parameter Syntax

$result = $client->adminInitiateAuth([
    'AnalyticsMetadata' => [
        'AnalyticsEndpointId' => '<string>',
    ],
    'AuthFlow' => 'USER_SRP_AUTH|REFRESH_TOKEN_AUTH|REFRESH_TOKEN|CUSTOM_AUTH|ADMIN_NO_SRP_AUTH|USER_PASSWORD_AUTH|ADMIN_USER_PASSWORD_AUTH', // REQUIRED
    'AuthParameters' => ['<string>', ...],
    'ClientId' => '<string>', // REQUIRED
    'ClientMetadata' => ['<string>', ...],
    'ContextData' => [
        'EncodedData' => '<string>',
        'HttpHeaders' => [ // REQUIRED
            [
                'headerName' => '<string>',
                'headerValue' => '<string>',
            ],
            // ...
        ],
        'IpAddress' => '<string>', // REQUIRED
        'ServerName' => '<string>', // REQUIRED
        'ServerPath' => '<string>', // REQUIRED
    ],
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
AnalyticsMetadata
  • Type: AnalyticsMetadataType structure

The analytics metadata for collecting Amazon Pinpoint metrics for AdminInitiateAuth calls.

AuthFlow
  • Required: Yes
  • Type: string

The authentication flow for this call to execute. The API action will depend on this value. For example:

  • REFRESH_TOKEN_AUTH will take in a valid refresh token and return new tokens.

  • USER_SRP_AUTH will take in USERNAME and SRP_A and return the SRP variables to be used for next challenge execution.

  • USER_PASSWORD_AUTH will take in USERNAME and PASSWORD and return the next challenge or tokens.

Valid values include:

  • USER_SRP_AUTH: Authentication flow for the Secure Remote Password (SRP) protocol.

  • REFRESH_TOKEN_AUTH/REFRESH_TOKEN: Authentication flow for refreshing the access token and ID token by supplying a valid refresh token.

  • CUSTOM_AUTH: Custom authentication flow.

  • ADMIN_NO_SRP_AUTH: Non-SRP authentication flow; you can pass in the USERNAME and PASSWORD directly if the flow is enabled for calling the app client.

  • USER_PASSWORD_AUTH: Non-SRP authentication flow; USERNAME and PASSWORD are passed directly. If a user migration Lambda trigger is set, this flow will invoke the user migration Lambda if the USERNAME is not found in the user pool.

  • ADMIN_USER_PASSWORD_AUTH: Admin-based user password authentication. This replaces the ADMIN_NO_SRP_AUTH authentication flow. In this flow, Cognito receives the password in the request instead of using the SRP process to verify passwords.

AuthParameters
  • Type: Associative array of custom strings keys (StringType) to strings

The authentication parameters. These are inputs corresponding to the AuthFlow that you are invoking. The required values depend on the value of AuthFlow:

  • For USER_SRP_AUTH: USERNAME (required), SRP_A (required), SECRET_HASH (required if the app client is configured with a client secret), DEVICE_KEY.

  • For REFRESH_TOKEN_AUTH/REFRESH_TOKEN: REFRESH_TOKEN (required), SECRET_HASH (required if the app client is configured with a client secret), DEVICE_KEY.

  • For ADMIN_NO_SRP_AUTH: USERNAME (required), SECRET_HASH (if app client is configured with client secret), PASSWORD (required), DEVICE_KEY.

  • For CUSTOM_AUTH: USERNAME (required), SECRET_HASH (if app client is configured with client secret), DEVICE_KEY. To start the authentication flow with password verification, include ChallengeName: SRP_A and SRP_A: (The SRP_A Value).

ClientId
  • Required: Yes
  • Type: string

The app client ID.

ClientMetadata
  • Type: Associative array of custom strings keys (StringType) to strings

A map of custom key-value pairs that you can provide as input for certain custom workflows that this action triggers.

You create custom workflows by assigning AWS Lambda functions to user pool triggers. When you use the AdminInitiateAuth API action, Amazon Cognito invokes the AWS Lambda functions that are specified for various triggers. The ClientMetadata value is passed as input to the functions for only the following triggers:

  • Pre signup

  • Pre authentication

  • User migration

When Amazon Cognito invokes the functions for these triggers, it passes a JSON payload, which the function receives as input. This payload contains a validationData attribute, which provides the data that you assigned to the ClientMetadata parameter in your AdminInitiateAuth request. In your function code in AWS Lambda, you can process the validationData value to enhance your workflow for your specific needs.

When you use the AdminInitiateAuth API action, Amazon Cognito also invokes the functions for the following triggers, but it does not provide the ClientMetadata value as input:

  • Post authentication

  • Custom message

  • Pre token generation

  • Create auth challenge

  • Define auth challenge

  • Verify auth challenge

For more information, see Customizing User Pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

Take the following limitations into consideration when you use the ClientMetadata parameter:

  • Amazon Cognito does not store the ClientMetadata value. This data is available only to AWS Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration does not include triggers, the ClientMetadata parameter serves no purpose.

  • Amazon Cognito does not validate the ClientMetadata value.

  • Amazon Cognito does not encrypt the the ClientMetadata value, so don't use it to provide sensitive information.

ContextData
  • Type: ContextDataType structure

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

UserPoolId
  • Required: Yes
  • Type: string

The ID of the Amazon Cognito user pool.

Result Syntax

[
    'AuthenticationResult' => [
        'AccessToken' => '<string>',
        'ExpiresIn' => <integer>,
        'IdToken' => '<string>',
        'NewDeviceMetadata' => [
            'DeviceGroupKey' => '<string>',
            'DeviceKey' => '<string>',
        ],
        'RefreshToken' => '<string>',
        'TokenType' => '<string>',
    ],
    'ChallengeName' => 'SMS_MFA|SOFTWARE_TOKEN_MFA|SELECT_MFA_TYPE|MFA_SETUP|PASSWORD_VERIFIER|CUSTOM_CHALLENGE|DEVICE_SRP_AUTH|DEVICE_PASSWORD_VERIFIER|ADMIN_NO_SRP_AUTH|NEW_PASSWORD_REQUIRED',
    'ChallengeParameters' => ['<string>', ...],
    'Session' => '<string>',
]

Result Details

Members
AuthenticationResult
  • Type: AuthenticationResultType structure

The result of the authentication response. This is only returned if the caller does not need to pass another challenge. If the caller does need to pass another challenge before it gets tokens, ChallengeName, ChallengeParameters, and Session are returned.

ChallengeName
  • Type: string

The name of the challenge which you are responding to with this call. This is returned to you in the AdminInitiateAuth response if you need to pass another challenge.

  • MFA_SETUP: If MFA is required, users who do not have at least one of the MFA methods set up are presented with an MFA_SETUP challenge. The user must set up at least one MFA type to continue to authenticate.

  • SELECT_MFA_TYPE: Selects the MFA type. Valid MFA options are SMS_MFA for text SMS MFA, and SOFTWARE_TOKEN_MFA for TOTP software token MFA.

  • SMS_MFA: Next challenge is to supply an SMS_MFA_CODE, delivered via SMS.

  • PASSWORD_VERIFIER: Next challenge is to supply PASSWORD_CLAIM_SIGNATURE, PASSWORD_CLAIM_SECRET_BLOCK, and TIMESTAMP after the client-side SRP calculations.

  • CUSTOM_CHALLENGE: This is returned if your custom authentication flow determines that the user should pass another challenge before tokens are issued.

  • DEVICE_SRP_AUTH: If device tracking was enabled on your user pool and the previous challenges were passed, this challenge is returned so that Amazon Cognito can start tracking this device.

  • DEVICE_PASSWORD_VERIFIER: Similar to PASSWORD_VERIFIER, but for devices only.

  • ADMIN_NO_SRP_AUTH: This is returned if you need to authenticate with USERNAME and PASSWORD directly. An app client must be enabled to use this flow.

  • NEW_PASSWORD_REQUIRED: For users which are required to change their passwords after successful first login. This challenge should be passed with NEW_PASSWORD and any other required attributes.

ChallengeParameters
  • Type: Associative array of custom strings keys (StringType) to strings

The challenge parameters. These are returned to you in the AdminInitiateAuth response if you need to pass another challenge. The responses in this parameter should be used to compute inputs to the next call (AdminRespondToAuthChallenge).

All challenges require USERNAME and SECRET_HASH (if applicable).

The value of the USER_ID_FOR_SRP attribute will be the user's actual username, not an alias (such as email address or phone number), even if you specified an alias in your call to AdminInitiateAuth. This is because, in the AdminRespondToAuthChallenge API ChallengeResponses, the USERNAME attribute cannot be an alias.

Session
  • Type: string

The session which should be passed both ways in challenge-response calls to the service. If AdminInitiateAuth or AdminRespondToAuthChallenge API call determines that the caller needs to go through another challenge, they return a session with other challenge parameters. This session should be passed as it is to the next AdminRespondToAuthChallenge API call.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

  • UnexpectedLambdaException:

    This exception is thrown when the Amazon Cognito service encounters an unexpected exception with the AWS Lambda service.

  • InvalidUserPoolConfigurationException:

    This exception is thrown when the user pool configuration is invalid.

  • UserLambdaValidationException:

    This exception is thrown when the Amazon Cognito service encounters a user validation exception with the AWS Lambda service.

  • InvalidLambdaResponseException:

    This exception is thrown when the Amazon Cognito service encounters an invalid AWS Lambda response.

  • MFAMethodNotFoundException:

    This exception is thrown when Amazon Cognito cannot find a multi-factor authentication (MFA) method.

  • InvalidSmsRoleAccessPolicyException:

    This exception is returned when the role provided for SMS configuration does not have permission to publish using Amazon SNS.

  • InvalidSmsRoleTrustRelationshipException:

    This exception is thrown when the trust relationship is invalid for the role provided for SMS configuration. This can happen if you do not trust cognito-idp.amazonaws.com or the external ID provided in the role does not match what is provided in the SMS configuration for the user pool.

  • PasswordResetRequiredException:

    This exception is thrown when a password reset is required.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • UserNotConfirmedException:

    This exception is thrown when a user is not confirmed successfully.

AdminLinkProviderForUser

$result = $client->adminLinkProviderForUser([/* ... */]);
$promise = $client->adminLinkProviderForUserAsync([/* ... */]);

Links an existing user account in a user pool (DestinationUser) to an identity from an external identity provider (SourceUser) based on a specified attribute name and value from the external identity provider. This allows you to create a link from the existing user account to an external federated user identity that has not yet been used to sign in, so that the federated user identity can be used to sign in as the existing user account.

For example, if there is an existing user with a username and password, this API links that user to a federated user identity, so that when the federated user identity is used, the user signs in as the existing user account.

The maximum number of federated identities linked to a user is 5.

Because this API allows a user with an external federated identity to sign in as an existing user in the user pool, it is critical that it only be used with external identity providers and provider attributes that have been trusted by the application owner.

This action is enabled only for admin access and requires developer credentials.

Parameter Syntax

$result = $client->adminLinkProviderForUser([
    'DestinationUser' => [ // REQUIRED
        'ProviderAttributeName' => '<string>',
        'ProviderAttributeValue' => '<string>',
        'ProviderName' => '<string>',
    ],
    'SourceUser' => [ // REQUIRED
        'ProviderAttributeName' => '<string>',
        'ProviderAttributeValue' => '<string>',
        'ProviderName' => '<string>',
    ],
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
DestinationUser
  • Required: Yes
  • Type: ProviderUserIdentifierType structure

The existing user in the user pool to be linked to the external identity provider user account. Can be a native (Username + Password) Cognito User Pools user or a federated user (for example, a SAML or Facebook user). If the user doesn't exist, an exception is thrown. This is the user that is returned when the new user (with the linked identity provider attribute) signs in.

For a native username + password user, the ProviderAttributeValue for the DestinationUser should be the username in the user pool. For a federated user, it should be the provider-specific user_id.

The ProviderAttributeName of the DestinationUser is ignored.

The ProviderName should be set to Cognito for users in Cognito user pools.

SourceUser
  • Required: Yes
  • Type: ProviderUserIdentifierType structure

An external identity provider account for a user who does not currently exist yet in the user pool. This user must be a federated user (for example, a SAML or Facebook user), not another native user.

If the SourceUser is a federated social identity provider user (Facebook, Google, or Login with Amazon), you must set the ProviderAttributeName to Cognito_Subject. For social identity providers, the ProviderName will be Facebook, Google, or LoginWithAmazon, and Cognito will automatically parse the Facebook, Google, and Login with Amazon tokens for id, sub, and user_id, respectively. The ProviderAttributeValue for the user must be the same value as the id, sub, or user_id value found in the social identity provider token.

For SAML, the ProviderAttributeName can be any value that matches a claim in the SAML assertion. If you wish to link SAML users based on the subject of the SAML assertion, you should map the subject to a claim through the SAML identity provider and submit that claim name as the ProviderAttributeName. If you set ProviderAttributeName to Cognito_Subject, Cognito will automatically parse the default unique identifier found in the subject from the SAML token.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • AliasExistsException:

    This exception is thrown when a user tries to confirm the account with an email or phone number that has already been supplied as an alias from a different account. This exception tells user that an account with this email or phone already exists.

  • LimitExceededException:

    This exception is thrown when a user exceeds the limit for a requested AWS resource.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

AdminListDevices

$result = $client->adminListDevices([/* ... */]);
$promise = $client->adminListDevicesAsync([/* ... */]);

Lists devices, as an administrator.

Calling this action requires developer credentials.

Parameter Syntax

$result = $client->adminListDevices([
    'Limit' => <integer>,
    'PaginationToken' => '<string>',
    'UserPoolId' => '<string>', // REQUIRED
    'Username' => '<string>', // REQUIRED
]);

Parameter Details

Members
Limit
  • Type: int

The limit of the devices request.

PaginationToken
  • Type: string

The pagination token.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID.

Username
  • Required: Yes
  • Type: string

The user name.

Result Syntax

[
    'Devices' => [
        [
            'DeviceAttributes' => [
                [
                    'Name' => '<string>',
                    'Value' => '<string>',
                ],
                // ...
            ],
            'DeviceCreateDate' => <DateTime>,
            'DeviceKey' => '<string>',
            'DeviceLastAuthenticatedDate' => <DateTime>,
            'DeviceLastModifiedDate' => <DateTime>,
        ],
        // ...
    ],
    'PaginationToken' => '<string>',
]

Result Details

Members
Devices
  • Type: Array of DeviceType structures

The devices in the list of devices response.

PaginationToken
  • Type: string

The pagination token.

Errors

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidUserPoolConfigurationException:

    This exception is thrown when the user pool configuration is invalid.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

AdminListGroupsForUser

$result = $client->adminListGroupsForUser([/* ... */]);
$promise = $client->adminListGroupsForUserAsync([/* ... */]);

Lists the groups that the user belongs to.

Calling this action requires developer credentials.

Parameter Syntax

$result = $client->adminListGroupsForUser([
    'Limit' => <integer>,
    'NextToken' => '<string>',
    'UserPoolId' => '<string>', // REQUIRED
    'Username' => '<string>', // REQUIRED
]);

Parameter Details

Members
Limit
  • Type: int

The limit of the request to list groups.

NextToken
  • Type: string

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool.

Username
  • Required: Yes
  • Type: string

The username for the user.

Result Syntax

[
    'Groups' => [
        [
            'CreationDate' => <DateTime>,
            'Description' => '<string>',
            'GroupName' => '<string>',
            'LastModifiedDate' => <DateTime>,
            'Precedence' => <integer>,
            'RoleArn' => '<string>',
            'UserPoolId' => '<string>',
        ],
        // ...
    ],
    'NextToken' => '<string>',
]

Result Details

Members
Groups
  • Type: Array of GroupType structures

The groups that the user belongs to.

NextToken
  • Type: string

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

Errors

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

AdminListUserAuthEvents

$result = $client->adminListUserAuthEvents([/* ... */]);
$promise = $client->adminListUserAuthEventsAsync([/* ... */]);

Lists a history of user activity and any risks detected as part of Amazon Cognito advanced security.

Parameter Syntax

$result = $client->adminListUserAuthEvents([
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
    'UserPoolId' => '<string>', // REQUIRED
    'Username' => '<string>', // REQUIRED
]);

Parameter Details

Members
MaxResults
  • Type: int

The maximum number of authentication events to return.

NextToken
  • Type: string

A pagination token.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID.

Username
  • Required: Yes
  • Type: string

The user pool username or an alias.

Result Syntax

[
    'AuthEvents' => [
        [
            'ChallengeResponses' => [
                [
                    'ChallengeName' => 'Password|Mfa',
                    'ChallengeResponse' => 'Success|Failure',
                ],
                // ...
            ],
            'CreationDate' => <DateTime>,
            'EventContextData' => [
                'City' => '<string>',
                'Country' => '<string>',
                'DeviceName' => '<string>',
                'IpAddress' => '<string>',
                'Timezone' => '<string>',
            ],
            'EventFeedback' => [
                'FeedbackDate' => <DateTime>,
                'FeedbackValue' => 'Valid|Invalid',
                'Provider' => '<string>',
            ],
            'EventId' => '<string>',
            'EventResponse' => 'Success|Failure',
            'EventRisk' => [
                'CompromisedCredentialsDetected' => true || false,
                'RiskDecision' => 'NoRisk|AccountTakeover|Block',
                'RiskLevel' => 'Low|Medium|High',
            ],
            'EventType' => 'SignIn|SignUp|ForgotPassword',
        ],
        // ...
    ],
    'NextToken' => '<string>',
]

Result Details

Members
AuthEvents
  • Type: Array of AuthEventType structures

The response object. It includes the EventID, EventType, CreationDate, EventRisk, and EventResponse.

NextToken
  • Type: string

A pagination token.

Errors

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • UserPoolAddOnNotEnabledException:

    This exception is thrown when user pool add-ons are not enabled.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

AdminRemoveUserFromGroup

$result = $client->adminRemoveUserFromGroup([/* ... */]);
$promise = $client->adminRemoveUserFromGroupAsync([/* ... */]);

Removes the specified user from the specified group.

Calling this action requires developer credentials.

Parameter Syntax

$result = $client->adminRemoveUserFromGroup([
    'GroupName' => '<string>', // REQUIRED
    'UserPoolId' => '<string>', // REQUIRED
    'Username' => '<string>', // REQUIRED
]);

Parameter Details

Members
GroupName
  • Required: Yes
  • Type: string

The group name.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool.

Username
  • Required: Yes
  • Type: string

The username for the user.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

AdminResetUserPassword

$result = $client->adminResetUserPassword([/* ... */]);
$promise = $client->adminResetUserPasswordAsync([/* ... */]);

Resets the specified user's password in a user pool as an administrator. Works on any user.

When a developer calls this API, the current password is invalidated, so it must be changed. If a user tries to sign in after the API is called, the app will get a PasswordResetRequiredException exception back and should direct the user down the flow to reset the password, which is the same as the forgot password flow. In addition, if the user pool has phone verification selected and a verified phone number exists for the user, or if email verification is selected and a verified email exists for the user, calling this API will also result in sending a message to the end user with the code to change their password.

Calling this action requires developer credentials.

Parameter Syntax

$result = $client->adminResetUserPassword([
    'ClientMetadata' => ['<string>', ...],
    'UserPoolId' => '<string>', // REQUIRED
    'Username' => '<string>', // REQUIRED
]);

Parameter Details

Members
ClientMetadata
  • Type: Associative array of custom strings keys (StringType) to strings

A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.

You create custom workflows by assigning AWS Lambda functions to user pool triggers. When you use the AdminResetUserPassword API action, Amazon Cognito invokes the function that is assigned to the custom message trigger. When Amazon Cognito invokes this function, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your AdminResetUserPassword request. In your function code in AWS Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs.

For more information, see Customizing User Pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

Take the following limitations into consideration when you use the ClientMetadata parameter:

  • Amazon Cognito does not store the ClientMetadata value. This data is available only to AWS Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration does not include triggers, the ClientMetadata parameter serves no purpose.

  • Amazon Cognito does not validate the ClientMetadata value.

  • Amazon Cognito does not encrypt the the ClientMetadata value, so don't use it to provide sensitive information.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool where you want to reset the user's password.

Username
  • Required: Yes
  • Type: string

The user name of the user whose password you wish to reset.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • UnexpectedLambdaException:

    This exception is thrown when the Amazon Cognito service encounters an unexpected exception with the AWS Lambda service.

  • UserLambdaValidationException:

    This exception is thrown when the Amazon Cognito service encounters a user validation exception with the AWS Lambda service.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • InvalidLambdaResponseException:

    This exception is thrown when the Amazon Cognito service encounters an invalid AWS Lambda response.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • LimitExceededException:

    This exception is thrown when a user exceeds the limit for a requested AWS resource.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • InvalidSmsRoleAccessPolicyException:

    This exception is returned when the role provided for SMS configuration does not have permission to publish using Amazon SNS.

  • InvalidEmailRoleAccessPolicyException:

    This exception is thrown when Amazon Cognito is not allowed to use your email identity. HTTP status code: 400.

  • InvalidSmsRoleTrustRelationshipException:

    This exception is thrown when the trust relationship is invalid for the role provided for SMS configuration. This can happen if you do not trust cognito-idp.amazonaws.com or the external ID provided in the role does not match what is provided in the SMS configuration for the user pool.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

AdminRespondToAuthChallenge

$result = $client->adminRespondToAuthChallenge([/* ... */]);
$promise = $client->adminRespondToAuthChallengeAsync([/* ... */]);

Responds to an authentication challenge, as an administrator.

Calling this action requires developer credentials.

Parameter Syntax

$result = $client->adminRespondToAuthChallenge([
    'AnalyticsMetadata' => [
        'AnalyticsEndpointId' => '<string>',
    ],
    'ChallengeName' => 'SMS_MFA|SOFTWARE_TOKEN_MFA|SELECT_MFA_TYPE|MFA_SETUP|PASSWORD_VERIFIER|CUSTOM_CHALLENGE|DEVICE_SRP_AUTH|DEVICE_PASSWORD_VERIFIER|ADMIN_NO_SRP_AUTH|NEW_PASSWORD_REQUIRED', // REQUIRED
    'ChallengeResponses' => ['<string>', ...],
    'ClientId' => '<string>', // REQUIRED
    'ClientMetadata' => ['<string>', ...],
    'ContextData' => [
        'EncodedData' => '<string>',
        'HttpHeaders' => [ // REQUIRED
            [
                'headerName' => '<string>',
                'headerValue' => '<string>',
            ],
            // ...
        ],
        'IpAddress' => '<string>', // REQUIRED
        'ServerName' => '<string>', // REQUIRED
        'ServerPath' => '<string>', // REQUIRED
    ],
    'Session' => '<string>',
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
AnalyticsMetadata
  • Type: AnalyticsMetadataType structure

The analytics metadata for collecting Amazon Pinpoint metrics for AdminRespondToAuthChallenge calls.

ChallengeName
  • Required: Yes
  • Type: string

The challenge name. For more information, see AdminInitiateAuth.

ChallengeResponses
  • Type: Associative array of custom strings keys (StringType) to strings

The challenge responses. These are inputs corresponding to the value of ChallengeName, for example:

  • SMS_MFA: SMS_MFA_CODE, USERNAME, SECRET_HASH (if app client is configured with client secret).

  • PASSWORD_VERIFIER: PASSWORD_CLAIM_SIGNATURE, PASSWORD_CLAIM_SECRET_BLOCK, TIMESTAMP, USERNAME, SECRET_HASH (if app client is configured with client secret).

  • ADMIN_NO_SRP_AUTH: PASSWORD, USERNAME, SECRET_HASH (if app client is configured with client secret).

  • NEW_PASSWORD_REQUIRED: NEW_PASSWORD, any other required attributes, USERNAME, SECRET_HASH (if app client is configured with client secret).

The value of the USERNAME attribute must be the user's actual username, not an alias (such as email address or phone number). To make this easier, the AdminInitiateAuth response includes the actual username value in the USERNAMEUSER_ID_FOR_SRP attribute, even if you specified an alias in your call to AdminInitiateAuth.

ClientId
  • Required: Yes
  • Type: string

The app client ID.

ClientMetadata
  • Type: Associative array of custom strings keys (StringType) to strings

A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.

You create custom workflows by assigning AWS Lambda functions to user pool triggers. When you use the AdminRespondToAuthChallenge API action, Amazon Cognito invokes any functions that are assigned to the following triggers: pre sign-up, custom message, post authentication, user migration, pre token generation, define auth challenge, create auth challenge, and verify auth challenge response. When Amazon Cognito invokes any of these functions, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your AdminRespondToAuthChallenge request. In your function code in AWS Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs.

For more information, see Customizing User Pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

Take the following limitations into consideration when you use the ClientMetadata parameter:

  • Amazon Cognito does not store the ClientMetadata value. This data is available only to AWS Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration does not include triggers, the ClientMetadata parameter serves no purpose.

  • Amazon Cognito does not validate the ClientMetadata value.

  • Amazon Cognito does not encrypt the the ClientMetadata value, so don't use it to provide sensitive information.

ContextData
  • Type: ContextDataType structure

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

Session
  • Type: string

The session which should be passed both ways in challenge-response calls to the service. If InitiateAuth or RespondToAuthChallenge API call determines that the caller needs to go through another challenge, they return a session with other challenge parameters. This session should be passed as it is to the next RespondToAuthChallenge API call.

UserPoolId
  • Required: Yes
  • Type: string

The ID of the Amazon Cognito user pool.

Result Syntax

[
    'AuthenticationResult' => [
        'AccessToken' => '<string>',
        'ExpiresIn' => <integer>,
        'IdToken' => '<string>',
        'NewDeviceMetadata' => [
            'DeviceGroupKey' => '<string>',
            'DeviceKey' => '<string>',
        ],
        'RefreshToken' => '<string>',
        'TokenType' => '<string>',
    ],
    'ChallengeName' => 'SMS_MFA|SOFTWARE_TOKEN_MFA|SELECT_MFA_TYPE|MFA_SETUP|PASSWORD_VERIFIER|CUSTOM_CHALLENGE|DEVICE_SRP_AUTH|DEVICE_PASSWORD_VERIFIER|ADMIN_NO_SRP_AUTH|NEW_PASSWORD_REQUIRED',
    'ChallengeParameters' => ['<string>', ...],
    'Session' => '<string>',
]

Result Details

Members
AuthenticationResult
  • Type: AuthenticationResultType structure

The result returned by the server in response to the authentication request.

ChallengeName
  • Type: string

The name of the challenge. For more information, see AdminInitiateAuth.

ChallengeParameters
  • Type: Associative array of custom strings keys (StringType) to strings

The challenge parameters. For more information, see AdminInitiateAuth.

Session
  • Type: string

The session which should be passed both ways in challenge-response calls to the service. If the caller needs to go through another challenge, they return a session with other challenge parameters. This session should be passed as it is to the next RespondToAuthChallenge API call.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • CodeMismatchException:

    This exception is thrown if the provided code does not match what the server was expecting.

  • ExpiredCodeException:

    This exception is thrown if a code has expired.

  • UnexpectedLambdaException:

    This exception is thrown when the Amazon Cognito service encounters an unexpected exception with the AWS Lambda service.

  • InvalidPasswordException:

    This exception is thrown when the Amazon Cognito service encounters an invalid password.

  • UserLambdaValidationException:

    This exception is thrown when the Amazon Cognito service encounters a user validation exception with the AWS Lambda service.

  • InvalidLambdaResponseException:

    This exception is thrown when the Amazon Cognito service encounters an invalid AWS Lambda response.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • InvalidUserPoolConfigurationException:

    This exception is thrown when the user pool configuration is invalid.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

  • MFAMethodNotFoundException:

    This exception is thrown when Amazon Cognito cannot find a multi-factor authentication (MFA) method.

  • InvalidSmsRoleAccessPolicyException:

    This exception is returned when the role provided for SMS configuration does not have permission to publish using Amazon SNS.

  • InvalidSmsRoleTrustRelationshipException:

    This exception is thrown when the trust relationship is invalid for the role provided for SMS configuration. This can happen if you do not trust cognito-idp.amazonaws.com or the external ID provided in the role does not match what is provided in the SMS configuration for the user pool.

  • AliasExistsException:

    This exception is thrown when a user tries to confirm the account with an email or phone number that has already been supplied as an alias from a different account. This exception tells user that an account with this email or phone already exists.

  • PasswordResetRequiredException:

    This exception is thrown when a password reset is required.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • UserNotConfirmedException:

    This exception is thrown when a user is not confirmed successfully.

  • SoftwareTokenMFANotFoundException:

    This exception is thrown when the software token TOTP multi-factor authentication (MFA) is not enabled for the user pool.

AdminSetUserMFAPreference

$result = $client->adminSetUserMFAPreference([/* ... */]);
$promise = $client->adminSetUserMFAPreferenceAsync([/* ... */]);

Sets the user's multi-factor authentication (MFA) preference, including which MFA options are enabled and if any are preferred. Only one factor can be set as preferred. The preferred MFA factor will be used to authenticate a user if multiple factors are enabled. If multiple options are enabled and no preference is set, a challenge to choose an MFA option will be returned during sign in.

Parameter Syntax

$result = $client->adminSetUserMFAPreference([
    'SMSMfaSettings' => [
        'Enabled' => true || false,
        'PreferredMfa' => true || false,
    ],
    'SoftwareTokenMfaSettings' => [
        'Enabled' => true || false,
        'PreferredMfa' => true || false,
    ],
    'UserPoolId' => '<string>', // REQUIRED
    'Username' => '<string>', // REQUIRED
]);

Parameter Details

Members
SMSMfaSettings
  • Type: SMSMfaSettingsType structure

The SMS text message MFA settings.

SoftwareTokenMfaSettings
  • Type: SoftwareTokenMfaSettingsType structure

The time-based one-time password software token MFA settings.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID.

Username
  • Required: Yes
  • Type: string

The user pool username or alias.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • PasswordResetRequiredException:

    This exception is thrown when a password reset is required.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • UserNotConfirmedException:

    This exception is thrown when a user is not confirmed successfully.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

AdminSetUserPassword

$result = $client->adminSetUserPassword([/* ... */]);
$promise = $client->adminSetUserPasswordAsync([/* ... */]);

Sets the specified user's password in a user pool as an administrator. Works on any user.

The password can be temporary or permanent. If it is temporary, the user status will be placed into the FORCE_CHANGE_PASSWORD state. When the user next tries to sign in, the InitiateAuth/AdminInitiateAuth response will contain the NEW_PASSWORD_REQUIRED challenge. If the user does not sign in before it expires, the user will not be able to sign in and their password will need to be reset by an administrator.

Once the user has set a new password, or the password is permanent, the user status will be set to Confirmed.

Parameter Syntax

$result = $client->adminSetUserPassword([
    'Password' => '<string>', // REQUIRED
    'Permanent' => true || false,
    'UserPoolId' => '<string>', // REQUIRED
    'Username' => '<string>', // REQUIRED
]);

Parameter Details

Members
Password
  • Required: Yes
  • Type: string

The password for the user.

Permanent
  • Type: boolean

True if the password is permanent, False if it is temporary.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool where you want to set the user's password.

Username
  • Required: Yes
  • Type: string

The user name of the user whose password you wish to set.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • InvalidPasswordException:

    This exception is thrown when the Amazon Cognito service encounters an invalid password.

AdminSetUserSettings

$result = $client->adminSetUserSettings([/* ... */]);
$promise = $client->adminSetUserSettingsAsync([/* ... */]);

This action is no longer supported. You can use it to configure only SMS MFA. You can't use it to configure TOTP software token MFA. To configure either type of MFA, use AdminSetUserMFAPreference instead.

Parameter Syntax

$result = $client->adminSetUserSettings([
    'MFAOptions' => [ // REQUIRED
        [
            'AttributeName' => '<string>',
            'DeliveryMedium' => 'SMS|EMAIL',
        ],
        // ...
    ],
    'UserPoolId' => '<string>', // REQUIRED
    'Username' => '<string>', // REQUIRED
]);

Parameter Details

Members
MFAOptions
  • Required: Yes
  • Type: Array of MFAOptionType structures

You can use this parameter only to set an SMS configuration that uses SMS for delivery.

UserPoolId
  • Required: Yes
  • Type: string

The ID of the user pool that contains the user that you are setting options for.

Username
  • Required: Yes
  • Type: string

The user name of the user that you are setting options for.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

AdminUpdateAuthEventFeedback

$result = $client->adminUpdateAuthEventFeedback([/* ... */]);
$promise = $client->adminUpdateAuthEventFeedbackAsync([/* ... */]);

Provides feedback for an authentication event as to whether it was from a valid user. This feedback is used for improving the risk evaluation decision for the user pool as part of Amazon Cognito advanced security.

Parameter Syntax

$result = $client->adminUpdateAuthEventFeedback([
    'EventId' => '<string>', // REQUIRED
    'FeedbackValue' => 'Valid|Invalid', // REQUIRED
    'UserPoolId' => '<string>', // REQUIRED
    'Username' => '<string>', // REQUIRED
]);

Parameter Details

Members
EventId
  • Required: Yes
  • Type: string

The authentication event ID.

FeedbackValue
  • Required: Yes
  • Type: string

The authentication event feedback value.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID.

Username
  • Required: Yes
  • Type: string

The user pool username.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • UserPoolAddOnNotEnabledException:

    This exception is thrown when user pool add-ons are not enabled.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

AdminUpdateDeviceStatus

$result = $client->adminUpdateDeviceStatus([/* ... */]);
$promise = $client->adminUpdateDeviceStatusAsync([/* ... */]);

Updates the device status as an administrator.

Calling this action requires developer credentials.

Parameter Syntax

$result = $client->adminUpdateDeviceStatus([
    'DeviceKey' => '<string>', // REQUIRED
    'DeviceRememberedStatus' => 'remembered|not_remembered',
    'UserPoolId' => '<string>', // REQUIRED
    'Username' => '<string>', // REQUIRED
]);

Parameter Details

Members
DeviceKey
  • Required: Yes
  • Type: string

The device key.

DeviceRememberedStatus
  • Type: string

The status indicating whether a device has been remembered or not.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID.

Username
  • Required: Yes
  • Type: string

The user name.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidUserPoolConfigurationException:

    This exception is thrown when the user pool configuration is invalid.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

AdminUpdateUserAttributes

$result = $client->adminUpdateUserAttributes([/* ... */]);
$promise = $client->adminUpdateUserAttributesAsync([/* ... */]);

Updates the specified user's attributes, including developer attributes, as an administrator. Works on any user.

For custom attributes, you must prepend the custom: prefix to the attribute name.

In addition to updating user attributes, this API can also be used to mark phone and email as verified.

Calling this action requires developer credentials.

Parameter Syntax

$result = $client->adminUpdateUserAttributes([
    'ClientMetadata' => ['<string>', ...],
    'UserAttributes' => [ // REQUIRED
        [
            'Name' => '<string>', // REQUIRED
            'Value' => '<string>',
        ],
        // ...
    ],
    'UserPoolId' => '<string>', // REQUIRED
    'Username' => '<string>', // REQUIRED
]);

Parameter Details

Members
ClientMetadata
  • Type: Associative array of custom strings keys (StringType) to strings

A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.

You create custom workflows by assigning AWS Lambda functions to user pool triggers. When you use the AdminUpdateUserAttributes API action, Amazon Cognito invokes the function that is assigned to the custom message trigger. When Amazon Cognito invokes this function, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your AdminUpdateUserAttributes request. In your function code in AWS Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs.

For more information, see Customizing User Pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

Take the following limitations into consideration when you use the ClientMetadata parameter:

  • Amazon Cognito does not store the ClientMetadata value. This data is available only to AWS Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration does not include triggers, the ClientMetadata parameter serves no purpose.

  • Amazon Cognito does not validate the ClientMetadata value.

  • Amazon Cognito does not encrypt the the ClientMetadata value, so don't use it to provide sensitive information.

UserAttributes
  • Required: Yes
  • Type: Array of AttributeType structures

An array of name-value pairs representing user attributes.

For custom attributes, you must prepend the custom: prefix to the attribute name.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool where you want to update user attributes.

Username
  • Required: Yes
  • Type: string

The user name of the user for whom you want to update user attributes.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • UnexpectedLambdaException:

    This exception is thrown when the Amazon Cognito service encounters an unexpected exception with the AWS Lambda service.

  • UserLambdaValidationException:

    This exception is thrown when the Amazon Cognito service encounters a user validation exception with the AWS Lambda service.

  • InvalidLambdaResponseException:

    This exception is thrown when the Amazon Cognito service encounters an invalid AWS Lambda response.

  • AliasExistsException:

    This exception is thrown when a user tries to confirm the account with an email or phone number that has already been supplied as an alias from a different account. This exception tells user that an account with this email or phone already exists.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

  • InvalidSmsRoleAccessPolicyException:

    This exception is returned when the role provided for SMS configuration does not have permission to publish using Amazon SNS.

  • InvalidEmailRoleAccessPolicyException:

    This exception is thrown when Amazon Cognito is not allowed to use your email identity. HTTP status code: 400.

  • InvalidSmsRoleTrustRelationshipException:

    This exception is thrown when the trust relationship is invalid for the role provided for SMS configuration. This can happen if you do not trust cognito-idp.amazonaws.com or the external ID provided in the role does not match what is provided in the SMS configuration for the user pool.

AdminUserGlobalSignOut

$result = $client->adminUserGlobalSignOut([/* ... */]);
$promise = $client->adminUserGlobalSignOutAsync([/* ... */]);

Signs out users from all devices, as an administrator. It also invalidates all refresh tokens issued to a user. The user's current access and Id tokens remain valid until their expiry. Access and Id tokens expire one hour after they are issued.

Calling this action requires developer credentials.

Parameter Syntax

$result = $client->adminUserGlobalSignOut([
    'UserPoolId' => '<string>', // REQUIRED
    'Username' => '<string>', // REQUIRED
]);

Parameter Details

Members
UserPoolId
  • Required: Yes
  • Type: string

The user pool ID.

Username
  • Required: Yes
  • Type: string

The user name.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

AssociateSoftwareToken

$result = $client->associateSoftwareToken([/* ... */]);
$promise = $client->associateSoftwareTokenAsync([/* ... */]);

Returns a unique generated shared secret key code for the user account. The request takes an access token or a session string, but not both.

Parameter Syntax

$result = $client->associateSoftwareToken([
    'AccessToken' => '<string>',
    'Session' => '<string>',
]);

Parameter Details

Members
AccessToken
  • Type: string

The access token.

Session
  • Type: string

The session which should be passed both ways in challenge-response calls to the service. This allows authentication of the user as part of the MFA setup process.

Result Syntax

[
    'SecretCode' => '<string>',
    'Session' => '<string>',
]

Result Details

Members
SecretCode
  • Type: string

A unique generated shared secret code that is used in the TOTP algorithm to generate a one time code.

Session
  • Type: string

The session which should be passed both ways in challenge-response calls to the service. This allows authentication of the user as part of the MFA setup process.

Errors

  • ConcurrentModificationException:

    This exception is thrown if two or more modifications are happening concurrently.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

  • SoftwareTokenMFANotFoundException:

    This exception is thrown when the software token TOTP multi-factor authentication (MFA) is not enabled for the user pool.

ChangePassword

$result = $client->changePassword([/* ... */]);
$promise = $client->changePasswordAsync([/* ... */]);

Changes the password for a specified user in a user pool.

Parameter Syntax

$result = $client->changePassword([
    'AccessToken' => '<string>', // REQUIRED
    'PreviousPassword' => '<string>', // REQUIRED
    'ProposedPassword' => '<string>', // REQUIRED
]);

Parameter Details

Members
AccessToken
  • Required: Yes
  • Type: string

The access token.

PreviousPassword
  • Required: Yes
  • Type: string

The old password.

ProposedPassword
  • Required: Yes
  • Type: string

The new password.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • InvalidPasswordException:

    This exception is thrown when the Amazon Cognito service encounters an invalid password.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • LimitExceededException:

    This exception is thrown when a user exceeds the limit for a requested AWS resource.

  • PasswordResetRequiredException:

    This exception is thrown when a password reset is required.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • UserNotConfirmedException:

    This exception is thrown when a user is not confirmed successfully.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

ConfirmDevice

$result = $client->confirmDevice([/* ... */]);
$promise = $client->confirmDeviceAsync([/* ... */]);

Confirms tracking of the device. This API call is the call that begins device tracking.

Parameter Syntax

$result = $client->confirmDevice([
    'AccessToken' => '<string>', // REQUIRED
    'DeviceKey' => '<string>', // REQUIRED
    'DeviceName' => '<string>',
    'DeviceSecretVerifierConfig' => [
        'PasswordVerifier' => '<string>',
        'Salt' => '<string>',
    ],
]);

Parameter Details

Members
AccessToken
  • Required: Yes
  • Type: string

The access token.

DeviceKey
  • Required: Yes
  • Type: string

The device key.

DeviceName
  • Type: string

The device name.

DeviceSecretVerifierConfig
  • Type: DeviceSecretVerifierConfigType structure

The configuration of the device secret verifier.

Result Syntax

[
    'UserConfirmationNecessary' => true || false,
]

Result Details

Members
UserConfirmationNecessary
  • Type: boolean

Indicates whether the user confirmation is necessary to confirm the device response.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • InvalidPasswordException:

    This exception is thrown when the Amazon Cognito service encounters an invalid password.

  • InvalidLambdaResponseException:

    This exception is thrown when the Amazon Cognito service encounters an invalid AWS Lambda response.

  • UsernameExistsException:

    This exception is thrown when Amazon Cognito encounters a user name that already exists in the user pool.

  • InvalidUserPoolConfigurationException:

    This exception is thrown when the user pool configuration is invalid.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • PasswordResetRequiredException:

    This exception is thrown when a password reset is required.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • UserNotConfirmedException:

    This exception is thrown when a user is not confirmed successfully.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

ConfirmForgotPassword

$result = $client->confirmForgotPassword([/* ... */]);
$promise = $client->confirmForgotPasswordAsync([/* ... */]);

Allows a user to enter a confirmation code to reset a forgotten password.

Parameter Syntax

$result = $client->confirmForgotPassword([
    'AnalyticsMetadata' => [
        'AnalyticsEndpointId' => '<string>',
    ],
    'ClientId' => '<string>', // REQUIRED
    'ClientMetadata' => ['<string>', ...],
    'ConfirmationCode' => '<string>', // REQUIRED
    'Password' => '<string>', // REQUIRED
    'SecretHash' => '<string>',
    'UserContextData' => [
        'EncodedData' => '<string>',
    ],
    'Username' => '<string>', // REQUIRED
]);

Parameter Details

Members
AnalyticsMetadata
  • Type: AnalyticsMetadataType structure

The Amazon Pinpoint analytics metadata for collecting metrics for ConfirmForgotPassword calls.

ClientId
  • Required: Yes
  • Type: string

The app client ID of the app associated with the user pool.

ClientMetadata
  • Type: Associative array of custom strings keys (StringType) to strings

A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.

You create custom workflows by assigning AWS Lambda functions to user pool triggers. When you use the ConfirmForgotPassword API action, Amazon Cognito invokes the function that is assigned to the post confirmation trigger. When Amazon Cognito invokes this function, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your ConfirmForgotPassword request. In your function code in AWS Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs.

For more information, see Customizing User Pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

Take the following limitations into consideration when you use the ClientMetadata parameter:

  • Amazon Cognito does not store the ClientMetadata value. This data is available only to AWS Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration does not include triggers, the ClientMetadata parameter serves no purpose.

  • Amazon Cognito does not validate the ClientMetadata value.

  • Amazon Cognito does not encrypt the the ClientMetadata value, so don't use it to provide sensitive information.

ConfirmationCode
  • Required: Yes
  • Type: string

The confirmation code sent by a user's request to retrieve a forgotten password. For more information, see ForgotPassword.

Password
  • Required: Yes
  • Type: string

The password sent by a user's request to retrieve a forgotten password.

SecretHash
  • Type: string

A keyed-hash message authentication code (HMAC) calculated using the secret key of a user pool client and username plus the client ID in the message.

UserContextData
  • Type: UserContextDataType structure

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

Username
  • Required: Yes
  • Type: string

The user name of the user for whom you want to enter a code to retrieve a forgotten password.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • UnexpectedLambdaException:

    This exception is thrown when the Amazon Cognito service encounters an unexpected exception with the AWS Lambda service.

  • UserLambdaValidationException:

    This exception is thrown when the Amazon Cognito service encounters a user validation exception with the AWS Lambda service.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • InvalidPasswordException:

    This exception is thrown when the Amazon Cognito service encounters an invalid password.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • CodeMismatchException:

    This exception is thrown if the provided code does not match what the server was expecting.

  • ExpiredCodeException:

    This exception is thrown if a code has expired.

  • TooManyFailedAttemptsException:

    This exception is thrown when the user has made too many failed attempts for a given action (e.g., sign in).

  • InvalidLambdaResponseException:

    This exception is thrown when the Amazon Cognito service encounters an invalid AWS Lambda response.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • LimitExceededException:

    This exception is thrown when a user exceeds the limit for a requested AWS resource.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • UserNotConfirmedException:

    This exception is thrown when a user is not confirmed successfully.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

ConfirmSignUp

$result = $client->confirmSignUp([/* ... */]);
$promise = $client->confirmSignUpAsync([/* ... */]);

Confirms registration of a user and handles the existing alias from a previous user.

Parameter Syntax

$result = $client->confirmSignUp([
    'AnalyticsMetadata' => [
        'AnalyticsEndpointId' => '<string>',
    ],
    'ClientId' => '<string>', // REQUIRED
    'ClientMetadata' => ['<string>', ...],
    'ConfirmationCode' => '<string>', // REQUIRED
    'ForceAliasCreation' => true || false,
    'SecretHash' => '<string>',
    'UserContextData' => [
        'EncodedData' => '<string>',
    ],
    'Username' => '<string>', // REQUIRED
]);

Parameter Details

Members
AnalyticsMetadata
  • Type: AnalyticsMetadataType structure

The Amazon Pinpoint analytics metadata for collecting metrics for ConfirmSignUp calls.

ClientId
  • Required: Yes
  • Type: string

The ID of the app client associated with the user pool.

ClientMetadata
  • Type: Associative array of custom strings keys (StringType) to strings

A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.

You create custom workflows by assigning AWS Lambda functions to user pool triggers. When you use the ConfirmSignUp API action, Amazon Cognito invokes the function that is assigned to the post confirmation trigger. When Amazon Cognito invokes this function, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your ConfirmSignUp request. In your function code in AWS Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs.

For more information, see Customizing User Pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

Take the following limitations into consideration when you use the ClientMetadata parameter:

  • Amazon Cognito does not store the ClientMetadata value. This data is available only to AWS Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration does not include triggers, the ClientMetadata parameter serves no purpose.

  • Amazon Cognito does not validate the ClientMetadata value.

  • Amazon Cognito does not encrypt the the ClientMetadata value, so don't use it to provide sensitive information.

ConfirmationCode
  • Required: Yes
  • Type: string

The confirmation code sent by a user's request to confirm registration.

ForceAliasCreation
  • Type: boolean

Boolean to be specified to force user confirmation irrespective of existing alias. By default set to False. If this parameter is set to True and the phone number/email used for sign up confirmation already exists as an alias with a different user, the API call will migrate the alias from the previous user to the newly created user being confirmed. If set to False, the API will throw an AliasExistsException error.

SecretHash
  • Type: string

A keyed-hash message authentication code (HMAC) calculated using the secret key of a user pool client and username plus the client ID in the message.

UserContextData
  • Type: UserContextDataType structure

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

Username
  • Required: Yes
  • Type: string

The user name of the user whose registration you wish to confirm.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • UnexpectedLambdaException:

    This exception is thrown when the Amazon Cognito service encounters an unexpected exception with the AWS Lambda service.

  • UserLambdaValidationException:

    This exception is thrown when the Amazon Cognito service encounters a user validation exception with the AWS Lambda service.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • TooManyFailedAttemptsException:

    This exception is thrown when the user has made too many failed attempts for a given action (e.g., sign in).

  • CodeMismatchException:

    This exception is thrown if the provided code does not match what the server was expecting.

  • ExpiredCodeException:

    This exception is thrown if a code has expired.

  • InvalidLambdaResponseException:

    This exception is thrown when the Amazon Cognito service encounters an invalid AWS Lambda response.

  • AliasExistsException:

    This exception is thrown when a user tries to confirm the account with an email or phone number that has already been supplied as an alias from a different account. This exception tells user that an account with this email or phone already exists.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • LimitExceededException:

    This exception is thrown when a user exceeds the limit for a requested AWS resource.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

CreateGroup

$result = $client->createGroup([/* ... */]);
$promise = $client->createGroupAsync([/* ... */]);

Creates a new group in the specified user pool.

Calling this action requires developer credentials.

Parameter Syntax

$result = $client->createGroup([
    'Description' => '<string>',
    'GroupName' => '<string>', // REQUIRED
    'Precedence' => <integer>,
    'RoleArn' => '<string>',
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
Description
  • Type: string

A string containing the description of the group.

GroupName
  • Required: Yes
  • Type: string

The name of the group. Must be unique.

Precedence
  • Type: int

A nonnegative integer value that specifies the precedence of this group relative to the other groups that a user can belong to in the user pool. Zero is the highest precedence value. Groups with lower Precedence values take precedence over groups with higher or null Precedence values. If a user belongs to two or more groups, it is the group with the lowest precedence value whose role ARN will be used in the cognito:roles and cognito:preferred_role claims in the user's tokens.

Two groups can have the same Precedence value. If this happens, neither group takes precedence over the other. If two groups with the same Precedence have the same role ARN, that role is used in the cognito:preferred_role claim in tokens for users in each group. If the two groups have different role ARNs, the cognito:preferred_role claim is not set in users' tokens.

The default Precedence value is null.

RoleArn
  • Type: string

The role ARN for the group.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool.

Result Syntax

[
    'Group' => [
        'CreationDate' => <DateTime>,
        'Description' => '<string>',
        'GroupName' => '<string>',
        'LastModifiedDate' => <DateTime>,
        'Precedence' => <integer>,
        'RoleArn' => '<string>',
        'UserPoolId' => '<string>',
    ],
]

Result Details

Members
Group
  • Type: GroupType structure

The group object for the group.

Errors

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • GroupExistsException:

    This exception is thrown when Amazon Cognito encounters a group that already exists in the user pool.

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • LimitExceededException:

    This exception is thrown when a user exceeds the limit for a requested AWS resource.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

CreateIdentityProvider

$result = $client->createIdentityProvider([/* ... */]);
$promise = $client->createIdentityProviderAsync([/* ... */]);

Creates an identity provider for a user pool.

Parameter Syntax

$result = $client->createIdentityProvider([
    'AttributeMapping' => ['<string>', ...],
    'IdpIdentifiers' => ['<string>', ...],
    'ProviderDetails' => ['<string>', ...], // REQUIRED
    'ProviderName' => '<string>', // REQUIRED
    'ProviderType' => 'SAML|Facebook|Google|LoginWithAmazon|SignInWithApple|OIDC', // REQUIRED
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
AttributeMapping
  • Type: Associative array of custom strings keys (AttributeMappingKeyType) to strings

A mapping of identity provider attributes to standard and custom user pool attributes.

IdpIdentifiers
  • Type: Array of strings

A list of identity provider identifiers.

ProviderDetails
  • Required: Yes
  • Type: Associative array of custom strings keys (StringType) to strings

The identity provider details. The following list describes the provider detail keys for each identity provider type.

  • For Google and Login with Amazon:

    • client_id

    • client_secret

    • authorize_scopes

  • For Facebook:

    • client_id

    • client_secret

    • authorize_scopes

    • api_version

  • For Sign in with Apple:

    • client_id

    • team_id

    • key_id

    • private_key

    • authorize_scopes

  • For OIDC providers:

    • client_id

    • client_secret

    • attributes_request_method

    • oidc_issuer

    • authorize_scopes

    • authorize_url if not available from discovery URL specified by oidc_issuer key

    • token_url if not available from discovery URL specified by oidc_issuer key

    • attributes_url if not available from discovery URL specified by oidc_issuer key

    • jwks_uri if not available from discovery URL specified by oidc_issuer key

  • For SAML providers:

    • MetadataFile OR MetadataURL

    • IDPSignout optional

ProviderName
  • Required: Yes
  • Type: string

The identity provider name.

ProviderType
  • Required: Yes
  • Type: string

The identity provider type.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID.

Result Syntax

[
    'IdentityProvider' => [
        'AttributeMapping' => ['<string>', ...],
        'CreationDate' => <DateTime>,
        'IdpIdentifiers' => ['<string>', ...],
        'LastModifiedDate' => <DateTime>,
        'ProviderDetails' => ['<string>', ...],
        'ProviderName' => '<string>',
        'ProviderType' => 'SAML|Facebook|Google|LoginWithAmazon|SignInWithApple|OIDC',
        'UserPoolId' => '<string>',
    ],
]

Result Details

Members
IdentityProvider
  • Required: Yes
  • Type: IdentityProviderType structure

The newly created identity provider object.

Errors

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • DuplicateProviderException:

    This exception is thrown when the provider is already supported by the user pool.

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • LimitExceededException:

    This exception is thrown when a user exceeds the limit for a requested AWS resource.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

CreateResourceServer

$result = $client->createResourceServer([/* ... */]);
$promise = $client->createResourceServerAsync([/* ... */]);

Creates a new OAuth2.0 resource server and defines custom scopes in it.

Parameter Syntax

$result = $client->createResourceServer([
    'Identifier' => '<string>', // REQUIRED
    'Name' => '<string>', // REQUIRED
    'Scopes' => [
        [
            'ScopeDescription' => '<string>', // REQUIRED
            'ScopeName' => '<string>', // REQUIRED
        ],
        // ...
    ],
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
Identifier
  • Required: Yes
  • Type: string

A unique resource server identifier for the resource server. This could be an HTTPS endpoint where the resource server is located. For example, https://my-weather-api.example.com.

Name
  • Required: Yes
  • Type: string

A friendly name for the resource server.

Scopes
  • Type: Array of ResourceServerScopeType structures

A list of scopes. Each scope is map, where the keys are name and description.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool.

Result Syntax

[
    'ResourceServer' => [
        'Identifier' => '<string>',
        'Name' => '<string>',
        'Scopes' => [
            [
                'ScopeDescription' => '<string>',
                'ScopeName' => '<string>',
            ],
            // ...
        ],
        'UserPoolId' => '<string>',
    ],
]

Result Details

Members
ResourceServer
  • Required: Yes
  • Type: ResourceServerType structure

The newly created resource server.

Errors

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • LimitExceededException:

    This exception is thrown when a user exceeds the limit for a requested AWS resource.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

CreateUserImportJob

$result = $client->createUserImportJob([/* ... */]);
$promise = $client->createUserImportJobAsync([/* ... */]);

Creates the user import job.

Parameter Syntax

$result = $client->createUserImportJob([
    'CloudWatchLogsRoleArn' => '<string>', // REQUIRED
    'JobName' => '<string>', // REQUIRED
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
CloudWatchLogsRoleArn
  • Required: Yes
  • Type: string

The role ARN for the Amazon CloudWatch Logging role for the user import job.

JobName
  • Required: Yes
  • Type: string

The job name for the user import job.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool that the users are being imported into.

Result Syntax

[
    'UserImportJob' => [
        'CloudWatchLogsRoleArn' => '<string>',
        'CompletionDate' => <DateTime>,
        'CompletionMessage' => '<string>',
        'CreationDate' => <DateTime>,
        'FailedUsers' => <integer>,
        'ImportedUsers' => <integer>,
        'JobId' => '<string>',
        'JobName' => '<string>',
        'PreSignedUrl' => '<string>',
        'SkippedUsers' => <integer>,
        'StartDate' => <DateTime>,
        'Status' => 'Created|Pending|InProgress|Stopping|Expired|Stopped|Failed|Succeeded',
        'UserPoolId' => '<string>',
    ],
]

Result Details

Members
UserImportJob
  • Type: UserImportJobType structure

The job object that represents the user import job.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • PreconditionNotMetException:

    This exception is thrown when a precondition is not met.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • LimitExceededException:

    This exception is thrown when a user exceeds the limit for a requested AWS resource.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

CreateUserPool

$result = $client->createUserPool([/* ... */]);
$promise = $client->createUserPoolAsync([/* ... */]);

Creates a new Amazon Cognito user pool and sets the password policy for the pool.

Parameter Syntax

$result = $client->createUserPool([
    'AccountRecoverySetting' => [
        'RecoveryMechanisms' => [
            [
                'Name' => 'verified_email|verified_phone_number|admin_only', // REQUIRED
                'Priority' => <integer>, // REQUIRED
            ],
            // ...
        ],
    ],
    'AdminCreateUserConfig' => [
        'AllowAdminCreateUserOnly' => true || false,
        'InviteMessageTemplate' => [
            'EmailMessage' => '<string>',
            'EmailSubject' => '<string>',
            'SMSMessage' => '<string>',
        ],
        'UnusedAccountValidityDays' => <integer>,
    ],
    'AliasAttributes' => ['<string>', ...],
    'AutoVerifiedAttributes' => ['<string>', ...],
    'DeviceConfiguration' => [
        'ChallengeRequiredOnNewDevice' => true || false,
        'DeviceOnlyRememberedOnUserPrompt' => true || false,
    ],
    'EmailConfiguration' => [
        'ConfigurationSet' => '<string>',
        'EmailSendingAccount' => 'COGNITO_DEFAULT|DEVELOPER',
        'From' => '<string>',
        'ReplyToEmailAddress' => '<string>',
        'SourceArn' => '<string>',
    ],
    'EmailVerificationMessage' => '<string>',
    'EmailVerificationSubject' => '<string>',
    'LambdaConfig' => [
        'CreateAuthChallenge' => '<string>',
        'CustomEmailSender' => [
            'LambdaArn' => '<string>', // REQUIRED
            'LambdaVersion' => 'V1_0', // REQUIRED
        ],
        'CustomMessage' => '<string>',
        'CustomSMSSender' => [
            'LambdaArn' => '<string>', // REQUIRED
            'LambdaVersion' => 'V1_0', // REQUIRED
        ],
        'DefineAuthChallenge' => '<string>',
        'KMSKeyID' => '<string>',
        'PostAuthentication' => '<string>',
        'PostConfirmation' => '<string>',
        'PreAuthentication' => '<string>',
        'PreSignUp' => '<string>',
        'PreTokenGeneration' => '<string>',
        'UserMigration' => '<string>',
        'VerifyAuthChallengeResponse' => '<string>',
    ],
    'MfaConfiguration' => 'OFF|ON|OPTIONAL',
    'Policies' => [
        'PasswordPolicy' => [
            'MinimumLength' => <integer>,
            'RequireLowercase' => true || false,
            'RequireNumbers' => true || false,
            'RequireSymbols' => true || false,
            'RequireUppercase' => true || false,
            'TemporaryPasswordValidityDays' => <integer>,
        ],
    ],
    'PoolName' => '<string>', // REQUIRED
    'Schema' => [
        [
            'AttributeDataType' => 'String|Number|DateTime|Boolean',
            'DeveloperOnlyAttribute' => true || false,
            'Mutable' => true || false,
            'Name' => '<string>',
            'NumberAttributeConstraints' => [
                'MaxValue' => '<string>',
                'MinValue' => '<string>',
            ],
            'Required' => true || false,
            'StringAttributeConstraints' => [
                'MaxLength' => '<string>',
                'MinLength' => '<string>',
            ],
        ],
        // ...
    ],
    'SmsAuthenticationMessage' => '<string>',
    'SmsConfiguration' => [
        'ExternalId' => '<string>',
        'SnsCallerArn' => '<string>', // REQUIRED
    ],
    'SmsVerificationMessage' => '<string>',
    'UserPoolAddOns' => [
        'AdvancedSecurityMode' => 'OFF|AUDIT|ENFORCED', // REQUIRED
    ],
    'UserPoolTags' => ['<string>', ...],
    'UsernameAttributes' => ['<string>', ...],
    'UsernameConfiguration' => [
        'CaseSensitive' => true || false, // REQUIRED
    ],
    'VerificationMessageTemplate' => [
        'DefaultEmailOption' => 'CONFIRM_WITH_LINK|CONFIRM_WITH_CODE',
        'EmailMessage' => '<string>',
        'EmailMessageByLink' => '<string>',
        'EmailSubject' => '<string>',
        'EmailSubjectByLink' => '<string>',
        'SmsMessage' => '<string>',
    ],
]);

Parameter Details

Members
AccountRecoverySetting
  • Type: AccountRecoverySettingType structure

Use this setting to define which verified available method a user can use to recover their password when they call ForgotPassword. It allows you to define a preferred method when a user has more than one method available. With this setting, SMS does not qualify for a valid password recovery mechanism if the user also has SMS MFA enabled. In the absence of this setting, Cognito uses the legacy behavior to determine the recovery method where SMS is preferred over email.

AdminCreateUserConfig
  • Type: AdminCreateUserConfigType structure

The configuration for AdminCreateUser requests.

AliasAttributes
  • Type: Array of strings

Attributes supported as an alias for this user pool. Possible values: phone_number, email, or preferred_username.

AutoVerifiedAttributes
  • Type: Array of strings

The attributes to be auto-verified. Possible values: email, phone_number.

DeviceConfiguration
  • Type: DeviceConfigurationType structure

The device configuration.

EmailConfiguration
  • Type: EmailConfigurationType structure

The email configuration.

EmailVerificationMessage
  • Type: string

A string representing the email verification message. EmailVerificationMessage is allowed only if EmailSendingAccount is DEVELOPER.

EmailVerificationSubject
  • Type: string

A string representing the email verification subject. EmailVerificationSubject is allowed only if EmailSendingAccount is DEVELOPER.

LambdaConfig
  • Type: LambdaConfigType structure

The Lambda trigger configuration information for the new user pool.

In a push model, event sources (such as Amazon S3 and custom applications) need permission to invoke a function. So you will need to make an extra call to add permission for these event sources to invoke your Lambda function.

For more information on using the Lambda API to add permission, see AddPermission .

For adding permission using the AWS CLI, see add-permission .

MfaConfiguration
  • Type: string

Specifies MFA configuration details.

Policies
  • Type: UserPoolPolicyType structure

The policies associated with the new user pool.

PoolName
  • Required: Yes
  • Type: string

A string used to name the user pool.

Schema
  • Type: Array of SchemaAttributeType structures

An array of schema attributes for the new user pool. These attributes can be standard or custom attributes.

SmsAuthenticationMessage
  • Type: string

A string representing the SMS authentication message.

SmsConfiguration
  • Type: SmsConfigurationType structure

The SMS configuration.

SmsVerificationMessage
  • Type: string

A string representing the SMS verification message.

UserPoolAddOns
  • Type: UserPoolAddOnsType structure

Used to enable advanced security risk detection. Set the key AdvancedSecurityMode to the value "AUDIT".

UserPoolTags
  • Type: Associative array of custom strings keys (TagKeysType) to strings

The tag keys and values to assign to the user pool. A tag is a label that you can use to categorize and manage user pools in different ways, such as by purpose, owner, environment, or other criteria.

UsernameAttributes
  • Type: Array of strings

Specifies whether email addresses or phone numbers can be specified as usernames when a user signs up.

UsernameConfiguration
  • Type: UsernameConfigurationType structure

You can choose to set case sensitivity on the username input for the selected sign-in option. For example, when this is set to False, users will be able to sign in using either "username" or "Username". This configuration is immutable once it has been set. For more information, see UsernameConfigurationType.

VerificationMessageTemplate
  • Type: VerificationMessageTemplateType structure

The template for the verification message that the user sees when the app requests permission to access the user's information.

Result Syntax

[
    'UserPool' => [
        'AccountRecoverySetting' => [
            'RecoveryMechanisms' => [
                [
                    'Name' => 'verified_email|verified_phone_number|admin_only',
                    'Priority' => <integer>,
                ],
                // ...
            ],
        ],
        'AdminCreateUserConfig' => [
            'AllowAdminCreateUserOnly' => true || false,
            'InviteMessageTemplate' => [
                'EmailMessage' => '<string>',
                'EmailSubject' => '<string>',
                'SMSMessage' => '<string>',
            ],
            'UnusedAccountValidityDays' => <integer>,
        ],
        'AliasAttributes' => ['<string>', ...],
        'Arn' => '<string>',
        'AutoVerifiedAttributes' => ['<string>', ...],
        'CreationDate' => <DateTime>,
        'CustomDomain' => '<string>',
        'DeviceConfiguration' => [
            'ChallengeRequiredOnNewDevice' => true || false,
            'DeviceOnlyRememberedOnUserPrompt' => true || false,
        ],
        'Domain' => '<string>',
        'EmailConfiguration' => [
            'ConfigurationSet' => '<string>',
            'EmailSendingAccount' => 'COGNITO_DEFAULT|DEVELOPER',
            'From' => '<string>',
            'ReplyToEmailAddress' => '<string>',
            'SourceArn' => '<string>',
        ],
        'EmailConfigurationFailure' => '<string>',
        'EmailVerificationMessage' => '<string>',
        'EmailVerificationSubject' => '<string>',
        'EstimatedNumberOfUsers' => <integer>,
        'Id' => '<string>',
        'LambdaConfig' => [
            'CreateAuthChallenge' => '<string>',
            'CustomEmailSender' => [
                'LambdaArn' => '<string>',
                'LambdaVersion' => 'V1_0',
            ],
            'CustomMessage' => '<string>',
            'CustomSMSSender' => [
                'LambdaArn' => '<string>',
                'LambdaVersion' => 'V1_0',
            ],
            'DefineAuthChallenge' => '<string>',
            'KMSKeyID' => '<string>',
            'PostAuthentication' => '<string>',
            'PostConfirmation' => '<string>',
            'PreAuthentication' => '<string>',
            'PreSignUp' => '<string>',
            'PreTokenGeneration' => '<string>',
            'UserMigration' => '<string>',
            'VerifyAuthChallengeResponse' => '<string>',
        ],
        'LastModifiedDate' => <DateTime>,
        'MfaConfiguration' => 'OFF|ON|OPTIONAL',
        'Name' => '<string>',
        'Policies' => [
            'PasswordPolicy' => [
                'MinimumLength' => <integer>,
                'RequireLowercase' => true || false,
                'RequireNumbers' => true || false,
                'RequireSymbols' => true || false,
                'RequireUppercase' => true || false,
                'TemporaryPasswordValidityDays' => <integer>,
            ],
        ],
        'SchemaAttributes' => [
            [
                'AttributeDataType' => 'String|Number|DateTime|Boolean',
                'DeveloperOnlyAttribute' => true || false,
                'Mutable' => true || false,
                'Name' => '<string>',
                'NumberAttributeConstraints' => [
                    'MaxValue' => '<string>',
                    'MinValue' => '<string>',
                ],
                'Required' => true || false,
                'StringAttributeConstraints' => [
                    'MaxLength' => '<string>',
                    'MinLength' => '<string>',
                ],
            ],
            // ...
        ],
        'SmsAuthenticationMessage' => '<string>',
        'SmsConfiguration' => [
            'ExternalId' => '<string>',
            'SnsCallerArn' => '<string>',
        ],
        'SmsConfigurationFailure' => '<string>',
        'SmsVerificationMessage' => '<string>',
        'Status' => 'Enabled|Disabled',
        'UserPoolAddOns' => [
            'AdvancedSecurityMode' => 'OFF|AUDIT|ENFORCED',
        ],
        'UserPoolTags' => ['<string>', ...],
        'UsernameAttributes' => ['<string>', ...],
        'UsernameConfiguration' => [
            'CaseSensitive' => true || false,
        ],
        'VerificationMessageTemplate' => [
            'DefaultEmailOption' => 'CONFIRM_WITH_LINK|CONFIRM_WITH_CODE',
            'EmailMessage' => '<string>',
            'EmailMessageByLink' => '<string>',
            'EmailSubject' => '<string>',
            'EmailSubjectByLink' => '<string>',
            'SmsMessage' => '<string>',
        ],
    ],
]

Result Details

Members
UserPool
  • Type: UserPoolType structure

A container for the user pool details.

Errors

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • LimitExceededException:

    This exception is thrown when a user exceeds the limit for a requested AWS resource.

  • InvalidSmsRoleAccessPolicyException:

    This exception is returned when the role provided for SMS configuration does not have permission to publish using Amazon SNS.

  • InvalidSmsRoleTrustRelationshipException:

    This exception is thrown when the trust relationship is invalid for the role provided for SMS configuration. This can happen if you do not trust cognito-idp.amazonaws.com or the external ID provided in the role does not match what is provided in the SMS configuration for the user pool.

  • InvalidEmailRoleAccessPolicyException:

    This exception is thrown when Amazon Cognito is not allowed to use your email identity. HTTP status code: 400.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • UserPoolTaggingException:

    This exception is thrown when a user pool tag cannot be set or updated.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

CreateUserPoolClient

$result = $client->createUserPoolClient([/* ... */]);
$promise = $client->createUserPoolClientAsync([/* ... */]);

Creates the user pool client.

Parameter Syntax

$result = $client->createUserPoolClient([
    'AccessTokenValidity' => <integer>,
    'AllowedOAuthFlows' => ['<string>', ...],
    'AllowedOAuthFlowsUserPoolClient' => true || false,
    'AllowedOAuthScopes' => ['<string>', ...],
    'AnalyticsConfiguration' => [
        'ApplicationArn' => '<string>',
        'ApplicationId' => '<string>',
        'ExternalId' => '<string>',
        'RoleArn' => '<string>',
        'UserDataShared' => true || false,
    ],
    'CallbackURLs' => ['<string>', ...],
    'ClientName' => '<string>', // REQUIRED
    'DefaultRedirectURI' => '<string>',
    'ExplicitAuthFlows' => ['<string>', ...],
    'GenerateSecret' => true || false,
    'IdTokenValidity' => <integer>,
    'LogoutURLs' => ['<string>', ...],
    'PreventUserExistenceErrors' => 'LEGACY|ENABLED',
    'ReadAttributes' => ['<string>', ...],
    'RefreshTokenValidity' => <integer>,
    'SupportedIdentityProviders' => ['<string>', ...],
    'TokenValidityUnits' => [
        'AccessToken' => 'seconds|minutes|hours|days',
        'IdToken' => 'seconds|minutes|hours|days',
        'RefreshToken' => 'seconds|minutes|hours|days',
    ],
    'UserPoolId' => '<string>', // REQUIRED
    'WriteAttributes' => ['<string>', ...],
]);

Parameter Details

Members
AccessTokenValidity
  • Type: int

The time limit, between 5 minutes and 1 day, after which the access token is no longer valid and cannot be used. This value will be overridden if you have entered a value in TokenValidityUnits.

AllowedOAuthFlows
  • Type: Array of strings

The allowed OAuth flows.

Set to code to initiate a code grant flow, which provides an authorization code as the response. This code can be exchanged for access tokens with the token endpoint.

Set to implicit to specify that the client should get the access token (and, optionally, ID token, based on scopes) directly.

Set to client_credentials to specify that the client should get the access token (and, optionally, ID token, based on scopes) from the token endpoint using a combination of client and client_secret.

AllowedOAuthFlowsUserPoolClient
  • Type: boolean

Set to true if the client is allowed to follow the OAuth protocol when interacting with Cognito user pools.

AllowedOAuthScopes
  • Type: Array of strings

The allowed OAuth scopes. Possible values provided by OAuth are: phone, email, openid, and profile. Possible values provided by AWS are: aws.cognito.signin.user.admin. Custom scopes created in Resource Servers are also supported.

AnalyticsConfiguration
  • Type: AnalyticsConfigurationType structure

The Amazon Pinpoint analytics configuration for collecting metrics for this user pool.

In regions where Pinpoint is not available, Cognito User Pools only supports sending events to Amazon Pinpoint projects in us-east-1. In regions where Pinpoint is available, Cognito User Pools will support sending events to Amazon Pinpoint projects within that same region.

CallbackURLs
  • Type: Array of strings

A list of allowed redirect (callback) URLs for the identity providers.

A redirect URI must:

  • Be an absolute URI.

  • Be registered with the authorization server.

  • Not include a fragment component.

See OAuth 2.0 - Redirection Endpoint.

Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes only.

App callback URLs such as myapp://example are also supported.

ClientName
  • Required: Yes
  • Type: string

The client name for the user pool client you would like to create.

DefaultRedirectURI
  • Type: string

The default redirect URI. Must be in the CallbackURLs list.

A redirect URI must:

  • Be an absolute URI.

  • Be registered with the authorization server.

  • Not include a fragment component.

See OAuth 2.0 - Redirection Endpoint.

Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes only.

App callback URLs such as myapp://example are also supported.

ExplicitAuthFlows
  • Type: Array of strings

The authentication flows that are supported by the user pool clients. Flow names without the ALLOW_ prefix are deprecated in favor of new names with the ALLOW_ prefix. Note that values with ALLOW_ prefix cannot be used along with values without ALLOW_ prefix.

Valid values include:

  • ALLOW_ADMIN_USER_PASSWORD_AUTH: Enable admin based user password authentication flow ADMIN_USER_PASSWORD_AUTH. This setting replaces the ADMIN_NO_SRP_AUTH setting. With this authentication flow, Cognito receives the password in the request instead of using the SRP (Secure Remote Password protocol) protocol to verify passwords.

  • ALLOW_CUSTOM_AUTH: Enable Lambda trigger based authentication.

  • ALLOW_USER_PASSWORD_AUTH: Enable user password-based authentication. In this flow, Cognito receives the password in the request instead of using the SRP protocol to verify passwords.

  • ALLOW_USER_SRP_AUTH: Enable SRP based authentication.

  • ALLOW_REFRESH_TOKEN_AUTH: Enable authflow to refresh tokens.

GenerateSecret
  • Type: boolean

Boolean to specify whether you want to generate a secret for the user pool client being created.

IdTokenValidity
  • Type: int

The time limit, between 5 minutes and 1 day, after which the ID token is no longer valid and cannot be used. This value will be overridden if you have entered a value in TokenValidityUnits.

LogoutURLs
  • Type: Array of strings

A list of allowed logout URLs for the identity providers.

PreventUserExistenceErrors
  • Type: string

Use this setting to choose which errors and responses are returned by Cognito APIs during authentication, account confirmation, and password recovery when the user does not exist in the user pool. When set to ENABLED and the user does not exist, authentication returns an error indicating either the username or password was incorrect, and account confirmation and password recovery return a response indicating a code was sent to a simulated destination. When set to LEGACY, those APIs will return a UserNotFoundException exception if the user does not exist in the user pool.

Valid values include:

  • ENABLED - This prevents user existence-related errors.

  • LEGACY - This represents the old behavior of Cognito where user existence related errors are not prevented.

After February 15th 2020, the value of PreventUserExistenceErrors will default to ENABLED for newly created user pool clients if no value is provided.

ReadAttributes
  • Type: Array of strings

The read attributes.

RefreshTokenValidity
  • Type: int

The time limit, in days, after which the refresh token is no longer valid and cannot be used.

SupportedIdentityProviders
  • Type: Array of strings

A list of provider names for the identity providers that are supported on this client. The following are supported: COGNITO, Facebook, Google and LoginWithAmazon.

TokenValidityUnits
  • Type: TokenValidityUnitsType structure

The units in which the validity times are represented in. Default for RefreshToken is days, and default for ID and access tokens are hours.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool where you want to create a user pool client.

WriteAttributes
  • Type: Array of strings

The user pool attributes that the app client can write to.

If your app client allows users to sign in through an identity provider, this array must include all attributes that are mapped to identity provider attributes. Amazon Cognito updates mapped attributes when users sign in to your application through an identity provider. If your app client lacks write access to a mapped attribute, Amazon Cognito throws an error when it attempts to update the attribute. For more information, see Specifying Identity Provider Attribute Mappings for Your User Pool.

Result Syntax

[
    'UserPoolClient' => [
        'AccessTokenValidity' => <integer>,
        'AllowedOAuthFlows' => ['<string>', ...],
        'AllowedOAuthFlowsUserPoolClient' => true || false,
        'AllowedOAuthScopes' => ['<string>', ...],
        'AnalyticsConfiguration' => [
            'ApplicationArn' => '<string>',
            'ApplicationId' => '<string>',
            'ExternalId' => '<string>',
            'RoleArn' => '<string>',
            'UserDataShared' => true || false,
        ],
        'CallbackURLs' => ['<string>', ...],
        'ClientId' => '<string>',
        'ClientName' => '<string>',
        'ClientSecret' => '<string>',
        'CreationDate' => <DateTime>,
        'DefaultRedirectURI' => '<string>',
        'ExplicitAuthFlows' => ['<string>', ...],
        'IdTokenValidity' => <integer>,
        'LastModifiedDate' => <DateTime>,
        'LogoutURLs' => ['<string>', ...],
        'PreventUserExistenceErrors' => 'LEGACY|ENABLED',
        'ReadAttributes' => ['<string>', ...],
        'RefreshTokenValidity' => <integer>,
        'SupportedIdentityProviders' => ['<string>', ...],
        'TokenValidityUnits' => [
            'AccessToken' => 'seconds|minutes|hours|days',
            'IdToken' => 'seconds|minutes|hours|days',
            'RefreshToken' => 'seconds|minutes|hours|days',
        ],
        'UserPoolId' => '<string>',
        'WriteAttributes' => ['<string>', ...],
    ],
]

Result Details

Members
UserPoolClient
  • Type: UserPoolClientType structure

The user pool client that was just created.

Errors

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • LimitExceededException:

    This exception is thrown when a user exceeds the limit for a requested AWS resource.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • ScopeDoesNotExistException:

    This exception is thrown when the specified scope does not exist.

  • InvalidOAuthFlowException:

    This exception is thrown when the specified OAuth flow is invalid.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

CreateUserPoolDomain

$result = $client->createUserPoolDomain([/* ... */]);
$promise = $client->createUserPoolDomainAsync([/* ... */]);

Creates a new domain for a user pool.

Parameter Syntax

$result = $client->createUserPoolDomain([
    'CustomDomainConfig' => [
        'CertificateArn' => '<string>', // REQUIRED
    ],
    'Domain' => '<string>', // REQUIRED
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
CustomDomainConfig
  • Type: CustomDomainConfigType structure

The configuration for a custom domain that hosts the sign-up and sign-in webpages for your application.

Provide this parameter only if you want to use a custom domain for your user pool. Otherwise, you can exclude this parameter and use the Amazon Cognito hosted domain instead.

For more information about the hosted domain and custom domains, see Configuring a User Pool Domain.

Domain
  • Required: Yes
  • Type: string

The domain string.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID.

Result Syntax

[
    'CloudFrontDomain' => '<string>',
]

Result Details

Members
CloudFrontDomain
  • Type: string

The Amazon CloudFront endpoint that you use as the target of the alias that you set up with your Domain Name Service (DNS) provider.

Errors

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • LimitExceededException:

    This exception is thrown when a user exceeds the limit for a requested AWS resource.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

DeleteGroup

$result = $client->deleteGroup([/* ... */]);
$promise = $client->deleteGroupAsync([/* ... */]);

Deletes a group. Currently only groups with no members can be deleted.

Calling this action requires developer credentials.

Parameter Syntax

$result = $client->deleteGroup([
    'GroupName' => '<string>', // REQUIRED
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
GroupName
  • Required: Yes
  • Type: string

The name of the group.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

DeleteIdentityProvider

$result = $client->deleteIdentityProvider([/* ... */]);
$promise = $client->deleteIdentityProviderAsync([/* ... */]);

Deletes an identity provider for a user pool.

Parameter Syntax

$result = $client->deleteIdentityProvider([
    'ProviderName' => '<string>', // REQUIRED
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
ProviderName
  • Required: Yes
  • Type: string

The identity provider name.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • UnsupportedIdentityProviderException:

    This exception is thrown when the specified identifier is not supported.

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

DeleteResourceServer

$result = $client->deleteResourceServer([/* ... */]);
$promise = $client->deleteResourceServerAsync([/* ... */]);

Deletes a resource server.

Parameter Syntax

$result = $client->deleteResourceServer([
    'Identifier' => '<string>', // REQUIRED
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
Identifier
  • Required: Yes
  • Type: string

The identifier for the resource server.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool that hosts the resource server.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

DeleteUser

$result = $client->deleteUser([/* ... */]);
$promise = $client->deleteUserAsync([/* ... */]);

Allows a user to delete himself or herself.

Parameter Syntax

$result = $client->deleteUser([
    'AccessToken' => '<string>', // REQUIRED
]);

Parameter Details

Members
AccessToken
  • Required: Yes
  • Type: string

The access token from a request to delete a user.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • PasswordResetRequiredException:

    This exception is thrown when a password reset is required.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • UserNotConfirmedException:

    This exception is thrown when a user is not confirmed successfully.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

DeleteUserAttributes

$result = $client->deleteUserAttributes([/* ... */]);
$promise = $client->deleteUserAttributesAsync([/* ... */]);

Deletes the attributes for a user.

Parameter Syntax

$result = $client->deleteUserAttributes([
    'AccessToken' => '<string>', // REQUIRED
    'UserAttributeNames' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
AccessToken
  • Required: Yes
  • Type: string

The access token used in the request to delete user attributes.

UserAttributeNames
  • Required: Yes
  • Type: Array of strings

An array of strings representing the user attribute names you wish to delete.

For custom attributes, you must prepend the custom: prefix to the attribute name.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • PasswordResetRequiredException:

    This exception is thrown when a password reset is required.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • UserNotConfirmedException:

    This exception is thrown when a user is not confirmed successfully.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

DeleteUserPool

$result = $client->deleteUserPool([/* ... */]);
$promise = $client->deleteUserPoolAsync([/* ... */]);

Deletes the specified Amazon Cognito user pool.

Parameter Syntax

$result = $client->deleteUserPool([
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool you want to delete.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • UserImportInProgressException:

    This exception is thrown when you are trying to modify a user pool while a user import job is in progress for that pool.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

DeleteUserPoolClient

$result = $client->deleteUserPoolClient([/* ... */]);
$promise = $client->deleteUserPoolClientAsync([/* ... */]);

Allows the developer to delete the user pool client.

Parameter Syntax

$result = $client->deleteUserPoolClient([
    'ClientId' => '<string>', // REQUIRED
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
ClientId
  • Required: Yes
  • Type: string

The app client ID of the app associated with the user pool.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool where you want to delete the client.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

DeleteUserPoolDomain

$result = $client->deleteUserPoolDomain([/* ... */]);
$promise = $client->deleteUserPoolDomainAsync([/* ... */]);

Deletes a domain for a user pool.

Parameter Syntax

$result = $client->deleteUserPoolDomain([
    'Domain' => '<string>', // REQUIRED
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
Domain
  • Required: Yes
  • Type: string

The domain string.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

DescribeIdentityProvider

$result = $client->describeIdentityProvider([/* ... */]);
$promise = $client->describeIdentityProviderAsync([/* ... */]);

Gets information about a specific identity provider.

Parameter Syntax

$result = $client->describeIdentityProvider([
    'ProviderName' => '<string>', // REQUIRED
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
ProviderName
  • Required: Yes
  • Type: string

The identity provider name.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID.

Result Syntax

[
    'IdentityProvider' => [
        'AttributeMapping' => ['<string>', ...],
        'CreationDate' => <DateTime>,
        'IdpIdentifiers' => ['<string>', ...],
        'LastModifiedDate' => <DateTime>,
        'ProviderDetails' => ['<string>', ...],
        'ProviderName' => '<string>',
        'ProviderType' => 'SAML|Facebook|Google|LoginWithAmazon|SignInWithApple|OIDC',
        'UserPoolId' => '<string>',
    ],
]

Result Details

Members
IdentityProvider
  • Required: Yes
  • Type: IdentityProviderType structure

The identity provider that was deleted.

Errors

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

DescribeResourceServer

$result = $client->describeResourceServer([/* ... */]);
$promise = $client->describeResourceServerAsync([/* ... */]);

Describes a resource server.

Parameter Syntax

$result = $client->describeResourceServer([
    'Identifier' => '<string>', // REQUIRED
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
Identifier
  • Required: Yes
  • Type: string

The identifier for the resource server

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool that hosts the resource server.

Result Syntax

[
    'ResourceServer' => [
        'Identifier' => '<string>',
        'Name' => '<string>',
        'Scopes' => [
            [
                'ScopeDescription' => '<string>',
                'ScopeName' => '<string>',
            ],
            // ...
        ],
        'UserPoolId' => '<string>',
    ],
]

Result Details

Members
ResourceServer
  • Required: Yes
  • Type: ResourceServerType structure

The resource server.

Errors

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

DescribeRiskConfiguration

$result = $client->describeRiskConfiguration([/* ... */]);
$promise = $client->describeRiskConfigurationAsync([/* ... */]);

Describes the risk configuration.

Parameter Syntax

$result = $client->describeRiskConfiguration([
    'ClientId' => '<string>',
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
ClientId
  • Type: string

The app client ID.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID.

Result Syntax

[
    'RiskConfiguration' => [
        'AccountTakeoverRiskConfiguration' => [
            'Actions' => [
                'HighAction' => [
                    'EventAction' => 'BLOCK|MFA_IF_CONFIGURED|MFA_REQUIRED|NO_ACTION',
                    'Notify' => true || false,
                ],
                'LowAction' => [
                    'EventAction' => 'BLOCK|MFA_IF_CONFIGURED|MFA_REQUIRED|NO_ACTION',
                    'Notify' => true || false,
                ],
                'MediumAction' => [
                    'EventAction' => 'BLOCK|MFA_IF_CONFIGURED|MFA_REQUIRED|NO_ACTION',
                    'Notify' => true || false,
                ],
            ],
            'NotifyConfiguration' => [
                'BlockEmail' => [
                    'HtmlBody' => '<string>',
                    'Subject' => '<string>',
                    'TextBody' => '<string>',
                ],
                'From' => '<string>',
                'MfaEmail' => [
                    'HtmlBody' => '<string>',
                    'Subject' => '<string>',
                    'TextBody' => '<string>',
                ],
                'NoActionEmail' => [
                    'HtmlBody' => '<string>',
                    'Subject' => '<string>',
                    'TextBody' => '<string>',
                ],
                'ReplyTo' => '<string>',
                'SourceArn' => '<string>',
            ],
        ],
        'ClientId' => '<string>',
        'CompromisedCredentialsRiskConfiguration' => [
            'Actions' => [
                'EventAction' => 'BLOCK|NO_ACTION',
            ],
            'EventFilter' => ['<string>', ...],
        ],
        'LastModifiedDate' => <DateTime>,
        'RiskExceptionConfiguration' => [
            'BlockedIPRangeList' => ['<string>', ...],
            'SkippedIPRangeList' => ['<string>', ...],
        ],
        'UserPoolId' => '<string>',
    ],
]

Result Details

Members
RiskConfiguration
  • Required: Yes
  • Type: RiskConfigurationType structure

The risk configuration.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • UserPoolAddOnNotEnabledException:

    This exception is thrown when user pool add-ons are not enabled.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

DescribeUserImportJob

$result = $client->describeUserImportJob([/* ... */]);
$promise = $client->describeUserImportJobAsync([/* ... */]);

Describes the user import job.

Parameter Syntax

$result = $client->describeUserImportJob([
    'JobId' => '<string>', // REQUIRED
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
JobId
  • Required: Yes
  • Type: string

The job ID for the user import job.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool that the users are being imported into.

Result Syntax

[
    'UserImportJob' => [
        'CloudWatchLogsRoleArn' => '<string>',
        'CompletionDate' => <DateTime>,
        'CompletionMessage' => '<string>',
        'CreationDate' => <DateTime>,
        'FailedUsers' => <integer>,
        'ImportedUsers' => <integer>,
        'JobId' => '<string>',
        'JobName' => '<string>',
        'PreSignedUrl' => '<string>',
        'SkippedUsers' => <integer>,
        'StartDate' => <DateTime>,
        'Status' => 'Created|Pending|InProgress|Stopping|Expired|Stopped|Failed|Succeeded',
        'UserPoolId' => '<string>',
    ],
]

Result Details

Members
UserImportJob
  • Type: UserImportJobType structure

The job object that represents the user import job.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

DescribeUserPool

$result = $client->describeUserPool([/* ... */]);
$promise = $client->describeUserPoolAsync([/* ... */]);

Returns the configuration information and metadata of the specified user pool.

Parameter Syntax

$result = $client->describeUserPool([
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool you want to describe.

Result Syntax

[
    'UserPool' => [
        'AccountRecoverySetting' => [
            'RecoveryMechanisms' => [
                [
                    'Name' => 'verified_email|verified_phone_number|admin_only',
                    'Priority' => <integer>,
                ],
                // ...
            ],
        ],
        'AdminCreateUserConfig' => [
            'AllowAdminCreateUserOnly' => true || false,
            'InviteMessageTemplate' => [
                'EmailMessage' => '<string>',
                'EmailSubject' => '<string>',
                'SMSMessage' => '<string>',
            ],
            'UnusedAccountValidityDays' => <integer>,
        ],
        'AliasAttributes' => ['<string>', ...],
        'Arn' => '<string>',
        'AutoVerifiedAttributes' => ['<string>', ...],
        'CreationDate' => <DateTime>,
        'CustomDomain' => '<string>',
        'DeviceConfiguration' => [
            'ChallengeRequiredOnNewDevice' => true || false,
            'DeviceOnlyRememberedOnUserPrompt' => true || false,
        ],
        'Domain' => '<string>',
        'EmailConfiguration' => [
            'ConfigurationSet' => '<string>',
            'EmailSendingAccount' => 'COGNITO_DEFAULT|DEVELOPER',
            'From' => '<string>',
            'ReplyToEmailAddress' => '<string>',
            'SourceArn' => '<string>',
        ],
        'EmailConfigurationFailure' => '<string>',
        'EmailVerificationMessage' => '<string>',
        'EmailVerificationSubject' => '<string>',
        'EstimatedNumberOfUsers' => <integer>,
        'Id' => '<string>',
        'LambdaConfig' => [
            'CreateAuthChallenge' => '<string>',
            'CustomEmailSender' => [
                'LambdaArn' => '<string>',
                'LambdaVersion' => 'V1_0',
            ],
            'CustomMessage' => '<string>',
            'CustomSMSSender' => [
                'LambdaArn' => '<string>',
                'LambdaVersion' => 'V1_0',
            ],
            'DefineAuthChallenge' => '<string>',
            'KMSKeyID' => '<string>',
            'PostAuthentication' => '<string>',
            'PostConfirmation' => '<string>',
            'PreAuthentication' => '<string>',
            'PreSignUp' => '<string>',
            'PreTokenGeneration' => '<string>',
            'UserMigration' => '<string>',
            'VerifyAuthChallengeResponse' => '<string>',
        ],
        'LastModifiedDate' => <DateTime>,
        'MfaConfiguration' => 'OFF|ON|OPTIONAL',
        'Name' => '<string>',
        'Policies' => [
            'PasswordPolicy' => [
                'MinimumLength' => <integer>,
                'RequireLowercase' => true || false,
                'RequireNumbers' => true || false,
                'RequireSymbols' => true || false,
                'RequireUppercase' => true || false,
                'TemporaryPasswordValidityDays' => <integer>,
            ],
        ],
        'SchemaAttributes' => [
            [
                'AttributeDataType' => 'String|Number|DateTime|Boolean',
                'DeveloperOnlyAttribute' => true || false,
                'Mutable' => true || false,
                'Name' => '<string>',
                'NumberAttributeConstraints' => [
                    'MaxValue' => '<string>',
                    'MinValue' => '<string>',
                ],
                'Required' => true || false,
                'StringAttributeConstraints' => [
                    'MaxLength' => '<string>',
                    'MinLength' => '<string>',
                ],
            ],
            // ...
        ],
        'SmsAuthenticationMessage' => '<string>',
        'SmsConfiguration' => [
            'ExternalId' => '<string>',
            'SnsCallerArn' => '<string>',
        ],
        'SmsConfigurationFailure' => '<string>',
        'SmsVerificationMessage' => '<string>',
        'Status' => 'Enabled|Disabled',
        'UserPoolAddOns' => [
            'AdvancedSecurityMode' => 'OFF|AUDIT|ENFORCED',
        ],
        'UserPoolTags' => ['<string>', ...],
        'UsernameAttributes' => ['<string>', ...],
        'UsernameConfiguration' => [
            'CaseSensitive' => true || false,
        ],
        'VerificationMessageTemplate' => [
            'DefaultEmailOption' => 'CONFIRM_WITH_LINK|CONFIRM_WITH_CODE',
            'EmailMessage' => '<string>',
            'EmailMessageByLink' => '<string>',
            'EmailSubject' => '<string>',
            'EmailSubjectByLink' => '<string>',
            'SmsMessage' => '<string>',
        ],
    ],
]

Result Details

Members
UserPool
  • Type: UserPoolType structure

The container of metadata returned by the server to describe the pool.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • UserPoolTaggingException:

    This exception is thrown when a user pool tag cannot be set or updated.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

DescribeUserPoolClient

$result = $client->describeUserPoolClient([/* ... */]);
$promise = $client->describeUserPoolClientAsync([/* ... */]);

Client method for returning the configuration information and metadata of the specified user pool app client.

Parameter Syntax

$result = $client->describeUserPoolClient([
    'ClientId' => '<string>', // REQUIRED
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
ClientId
  • Required: Yes
  • Type: string

The app client ID of the app associated with the user pool.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool you want to describe.

Result Syntax

[
    'UserPoolClient' => [
        'AccessTokenValidity' => <integer>,
        'AllowedOAuthFlows' => ['<string>', ...],
        'AllowedOAuthFlowsUserPoolClient' => true || false,
        'AllowedOAuthScopes' => ['<string>', ...],
        'AnalyticsConfiguration' => [
            'ApplicationArn' => '<string>',
            'ApplicationId' => '<string>',
            'ExternalId' => '<string>',
            'RoleArn' => '<string>',
            'UserDataShared' => true || false,
        ],
        'CallbackURLs' => ['<string>', ...],
        'ClientId' => '<string>',
        'ClientName' => '<string>',
        'ClientSecret' => '<string>',
        'CreationDate' => <DateTime>,
        'DefaultRedirectURI' => '<string>',
        'ExplicitAuthFlows' => ['<string>', ...],
        'IdTokenValidity' => <integer>,
        'LastModifiedDate' => <DateTime>,
        'LogoutURLs' => ['<string>', ...],
        'PreventUserExistenceErrors' => 'LEGACY|ENABLED',
        'ReadAttributes' => ['<string>', ...],
        'RefreshTokenValidity' => <integer>,
        'SupportedIdentityProviders' => ['<string>', ...],
        'TokenValidityUnits' => [
            'AccessToken' => 'seconds|minutes|hours|days',
            'IdToken' => 'seconds|minutes|hours|days',
            'RefreshToken' => 'seconds|minutes|hours|days',
        ],
        'UserPoolId' => '<string>',
        'WriteAttributes' => ['<string>', ...],
    ],
]

Result Details

Members
UserPoolClient
  • Type: UserPoolClientType structure

The user pool client from a server response to describe the user pool client.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

DescribeUserPoolDomain

$result = $client->describeUserPoolDomain([/* ... */]);
$promise = $client->describeUserPoolDomainAsync([/* ... */]);

Gets information about a domain.

Parameter Syntax

$result = $client->describeUserPoolDomain([
    'Domain' => '<string>', // REQUIRED
]);

Parameter Details

Members
Domain
  • Required: Yes
  • Type: string

The domain string.

Result Syntax

[
    'DomainDescription' => [
        'AWSAccountId' => '<string>',
        'CloudFrontDistribution' => '<string>',
        'CustomDomainConfig' => [
            'CertificateArn' => '<string>',
        ],
        'Domain' => '<string>',
        'S3Bucket' => '<string>',
        'Status' => 'CREATING|DELETING|UPDATING|ACTIVE|FAILED',
        'UserPoolId' => '<string>',
        'Version' => '<string>',
    ],
]

Result Details

Members
DomainDescription
  • Type: DomainDescriptionType structure

A domain description object containing information about the domain.

Errors

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

ForgetDevice

$result = $client->forgetDevice([/* ... */]);
$promise = $client->forgetDeviceAsync([/* ... */]);

Forgets the specified device.

Parameter Syntax

$result = $client->forgetDevice([
    'AccessToken' => '<string>',
    'DeviceKey' => '<string>', // REQUIRED
]);

Parameter Details

Members
AccessToken
  • Type: string

The access token for the forgotten device request.

DeviceKey
  • Required: Yes
  • Type: string

The device key.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • InvalidUserPoolConfigurationException:

    This exception is thrown when the user pool configuration is invalid.

  • PasswordResetRequiredException:

    This exception is thrown when a password reset is required.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • UserNotConfirmedException:

    This exception is thrown when a user is not confirmed successfully.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

ForgotPassword

$result = $client->forgotPassword([/* ... */]);
$promise = $client->forgotPasswordAsync([/* ... */]);

Calling this API causes a message to be sent to the end user with a confirmation code that is required to change the user's password. For the Username parameter, you can use the username or user alias. The method used to send the confirmation code is sent according to the specified AccountRecoverySetting. For more information, see Recovering User Accounts in the Amazon Cognito Developer Guide. If neither a verified phone number nor a verified email exists, an InvalidParameterException is thrown. To use the confirmation code for resetting the password, call ConfirmForgotPassword.

Parameter Syntax

$result = $client->forgotPassword([
    'AnalyticsMetadata' => [
        'AnalyticsEndpointId' => '<string>',
    ],
    'ClientId' => '<string>', // REQUIRED
    'ClientMetadata' => ['<string>', ...],
    'SecretHash' => '<string>',
    'UserContextData' => [
        'EncodedData' => '<string>',
    ],
    'Username' => '<string>', // REQUIRED
]);

Parameter Details

Members
AnalyticsMetadata
  • Type: AnalyticsMetadataType structure

The Amazon Pinpoint analytics metadata for collecting metrics for ForgotPassword calls.

ClientId
  • Required: Yes
  • Type: string

The ID of the client associated with the user pool.

ClientMetadata
  • Type: Associative array of custom strings keys (StringType) to strings

A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.

You create custom workflows by assigning AWS Lambda functions to user pool triggers. When you use the ForgotPassword API action, Amazon Cognito invokes any functions that are assigned to the following triggers: pre sign-up, custom message, and user migration. When Amazon Cognito invokes any of these functions, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your ForgotPassword request. In your function code in AWS Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs.

For more information, see Customizing User Pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

Take the following limitations into consideration when you use the ClientMetadata parameter:

  • Amazon Cognito does not store the ClientMetadata value. This data is available only to AWS Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration does not include triggers, the ClientMetadata parameter serves no purpose.

  • Amazon Cognito does not validate the ClientMetadata value.

  • Amazon Cognito does not encrypt the the ClientMetadata value, so don't use it to provide sensitive information.

SecretHash
  • Type: string

A keyed-hash message authentication code (HMAC) calculated using the secret key of a user pool client and username plus the client ID in the message.

UserContextData
  • Type: UserContextDataType structure

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

Username
  • Required: Yes
  • Type: string

The user name of the user for whom you want to enter a code to reset a forgotten password.

Result Syntax

[
    'CodeDeliveryDetails' => [
        'AttributeName' => '<string>',
        'DeliveryMedium' => 'SMS|EMAIL',
        'Destination' => '<string>',
    ],
]

Result Details

Members
CodeDeliveryDetails
  • Type: CodeDeliveryDetailsType structure

The code delivery details returned by the server in response to the request to reset a password.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • UnexpectedLambdaException:

    This exception is thrown when the Amazon Cognito service encounters an unexpected exception with the AWS Lambda service.

  • UserLambdaValidationException:

    This exception is thrown when the Amazon Cognito service encounters a user validation exception with the AWS Lambda service.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • InvalidLambdaResponseException:

    This exception is thrown when the Amazon Cognito service encounters an invalid AWS Lambda response.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • LimitExceededException:

    This exception is thrown when a user exceeds the limit for a requested AWS resource.

  • InvalidSmsRoleAccessPolicyException:

    This exception is returned when the role provided for SMS configuration does not have permission to publish using Amazon SNS.

  • InvalidSmsRoleTrustRelationshipException:

    This exception is thrown when the trust relationship is invalid for the role provided for SMS configuration. This can happen if you do not trust cognito-idp.amazonaws.com or the external ID provided in the role does not match what is provided in the SMS configuration for the user pool.

  • InvalidEmailRoleAccessPolicyException:

    This exception is thrown when Amazon Cognito is not allowed to use your email identity. HTTP status code: 400.

  • CodeDeliveryFailureException:

    This exception is thrown when a verification code fails to deliver successfully.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • UserNotConfirmedException:

    This exception is thrown when a user is not confirmed successfully.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

GetCSVHeader

$result = $client->getCSVHeader([/* ... */]);
$promise = $client->getCSVHeaderAsync([/* ... */]);

Gets the header information for the .csv file to be used as input for the user import job.

Parameter Syntax

$result = $client->getCSVHeader([
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool that the users are to be imported into.

Result Syntax

[
    'CSVHeader' => ['<string>', ...],
    'UserPoolId' => '<string>',
]

Result Details

Members
CSVHeader
  • Type: Array of strings

The header information for the .csv file for the user import job.

UserPoolId
  • Type: string

The user pool ID for the user pool that the users are to be imported into.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

GetDevice

$result = $client->getDevice([/* ... */]);
$promise = $client->getDeviceAsync([/* ... */]);

Gets the device.

Parameter Syntax

$result = $client->getDevice([
    'AccessToken' => '<string>',
    'DeviceKey' => '<string>', // REQUIRED
]);

Parameter Details

Members
AccessToken
  • Type: string

The access token.

DeviceKey
  • Required: Yes
  • Type: string

The device key.

Result Syntax

[
    'Device' => [
        'DeviceAttributes' => [
            [
                'Name' => '<string>',
                'Value' => '<string>',
            ],
            // ...
        ],
        'DeviceCreateDate' => <DateTime>,
        'DeviceKey' => '<string>',
        'DeviceLastAuthenticatedDate' => <DateTime>,
        'DeviceLastModifiedDate' => <DateTime>,
    ],
]

Result Details

Members
Device
  • Required: Yes
  • Type: DeviceType structure

The device.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • InvalidUserPoolConfigurationException:

    This exception is thrown when the user pool configuration is invalid.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • PasswordResetRequiredException:

    This exception is thrown when a password reset is required.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • UserNotConfirmedException:

    This exception is thrown when a user is not confirmed successfully.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

GetGroup

$result = $client->getGroup([/* ... */]);
$promise = $client->getGroupAsync([/* ... */]);

Gets a group.

Calling this action requires developer credentials.

Parameter Syntax

$result = $client->getGroup([
    'GroupName' => '<string>', // REQUIRED
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
GroupName
  • Required: Yes
  • Type: string

The name of the group.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool.

Result Syntax

[
    'Group' => [
        'CreationDate' => <DateTime>,
        'Description' => '<string>',
        'GroupName' => '<string>',
        'LastModifiedDate' => <DateTime>,
        'Precedence' => <integer>,
        'RoleArn' => '<string>',
        'UserPoolId' => '<string>',
    ],
]

Result Details

Members
Group
  • Type: GroupType structure

The group object for the group.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

GetIdentityProviderByIdentifier

$result = $client->getIdentityProviderByIdentifier([/* ... */]);
$promise = $client->getIdentityProviderByIdentifierAsync([/* ... */]);

Gets the specified identity provider.

Parameter Syntax

$result = $client->getIdentityProviderByIdentifier([
    'IdpIdentifier' => '<string>', // REQUIRED
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
IdpIdentifier
  • Required: Yes
  • Type: string

The identity provider ID.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID.

Result Syntax

[
    'IdentityProvider' => [
        'AttributeMapping' => ['<string>', ...],
        'CreationDate' => <DateTime>,
        'IdpIdentifiers' => ['<string>', ...],
        'LastModifiedDate' => <DateTime>,
        'ProviderDetails' => ['<string>', ...],
        'ProviderName' => '<string>',
        'ProviderType' => 'SAML|Facebook|Google|LoginWithAmazon|SignInWithApple|OIDC',
        'UserPoolId' => '<string>',
    ],
]

Result Details

Members
IdentityProvider
  • Required: Yes
  • Type: IdentityProviderType structure

The identity provider object.

Errors

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

GetSigningCertificate

$result = $client->getSigningCertificate([/* ... */]);
$promise = $client->getSigningCertificateAsync([/* ... */]);

This method takes a user pool ID, and returns the signing certificate.

Parameter Syntax

$result = $client->getSigningCertificate([
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
UserPoolId
  • Required: Yes
  • Type: string

The user pool ID.

Result Syntax

[
    'Certificate' => '<string>',
]

Result Details

Members
Certificate
  • Type: string

The signing certificate.

Errors

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

GetUICustomization

$result = $client->getUICustomization([/* ... */]);
$promise = $client->getUICustomizationAsync([/* ... */]);

Gets the UI Customization information for a particular app client's app UI, if there is something set. If nothing is set for the particular client, but there is an existing pool level customization (app clientId will be ALL), then that is returned. If nothing is present, then an empty shape is returned.

Parameter Syntax

$result = $client->getUICustomization([
    'ClientId' => '<string>',
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
ClientId
  • Type: string

The client ID for the client app.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool.

Result Syntax

[
    'UICustomization' => [
        'CSS' => '<string>',
        'CSSVersion' => '<string>',
        'ClientId' => '<string>',
        'CreationDate' => <DateTime>,
        'ImageUrl' => '<string>',
        'LastModifiedDate' => <DateTime>,
        'UserPoolId' => '<string>',
    ],
]

Result Details

Members
UICustomization
  • Required: Yes
  • Type: UICustomizationType structure

The UI customization information.

Errors

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

GetUser

$result = $client->getUser([/* ... */]);
$promise = $client->getUserAsync([/* ... */]);

Gets the user attributes and metadata for a user.

Parameter Syntax

$result = $client->getUser([
    'AccessToken' => '<string>', // REQUIRED
]);

Parameter Details

Members
AccessToken
  • Required: Yes
  • Type: string

The access token returned by the server response to get information about the user.

Result Syntax

[
    'MFAOptions' => [
        [
            'AttributeName' => '<string>',
            'DeliveryMedium' => 'SMS|EMAIL',
        ],
        // ...
    ],
    'PreferredMfaSetting' => '<string>',
    'UserAttributes' => [
        [
            'Name' => '<string>',
            'Value' => '<string>',
        ],
        // ...
    ],
    'UserMFASettingList' => ['<string>', ...],
    'Username' => '<string>',
]

Result Details

Members
MFAOptions
  • Type: Array of MFAOptionType structures

This response parameter is no longer supported. It provides information only about SMS MFA configurations. It doesn't provide information about TOTP software token MFA configurations. To look up information about either type of MFA configuration, use UserMFASettingList instead.

PreferredMfaSetting
  • Type: string

The user's preferred MFA setting.

UserAttributes
  • Required: Yes
  • Type: Array of AttributeType structures

An array of name-value pairs representing user attributes.

For custom attributes, you must prepend the custom: prefix to the attribute name.

UserMFASettingList
  • Type: Array of strings

The MFA options that are enabled for the user. The possible values in this list are SMS_MFA and SOFTWARE_TOKEN_MFA.

Username
  • Required: Yes
  • Type: string

The user name of the user you wish to retrieve from the get user request.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • PasswordResetRequiredException:

    This exception is thrown when a password reset is required.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • UserNotConfirmedException:

    This exception is thrown when a user is not confirmed successfully.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

GetUserAttributeVerificationCode

$result = $client->getUserAttributeVerificationCode([/* ... */]);
$promise = $client->getUserAttributeVerificationCodeAsync([/* ... */]);

Gets the user attribute verification code for the specified attribute name.

Parameter Syntax

$result = $client->getUserAttributeVerificationCode([
    'AccessToken' => '<string>', // REQUIRED
    'AttributeName' => '<string>', // REQUIRED
    'ClientMetadata' => ['<string>', ...],
]);

Parameter Details

Members
AccessToken
  • Required: Yes
  • Type: string

The access token returned by the server response to get the user attribute verification code.

AttributeName
  • Required: Yes
  • Type: string

The attribute name returned by the server response to get the user attribute verification code.

ClientMetadata
  • Type: Associative array of custom strings keys (StringType) to strings

A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.

You create custom workflows by assigning AWS Lambda functions to user pool triggers. When you use the GetUserAttributeVerificationCode API action, Amazon Cognito invokes the function that is assigned to the custom message trigger. When Amazon Cognito invokes this function, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your GetUserAttributeVerificationCode request. In your function code in AWS Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs.

For more information, see Customizing User Pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

Take the following limitations into consideration when you use the ClientMetadata parameter:

  • Amazon Cognito does not store the ClientMetadata value. This data is available only to AWS Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration does not include triggers, the ClientMetadata parameter serves no purpose.

  • Amazon Cognito does not validate the ClientMetadata value.

  • Amazon Cognito does not encrypt the the ClientMetadata value, so don't use it to provide sensitive information.

Result Syntax

[
    'CodeDeliveryDetails' => [
        'AttributeName' => '<string>',
        'DeliveryMedium' => 'SMS|EMAIL',
        'Destination' => '<string>',
    ],
]

Result Details

Members
CodeDeliveryDetails
  • Type: CodeDeliveryDetailsType structure

The code delivery details returned by the server in response to the request to get the user attribute verification code.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • UnexpectedLambdaException:

    This exception is thrown when the Amazon Cognito service encounters an unexpected exception with the AWS Lambda service.

  • UserLambdaValidationException:

    This exception is thrown when the Amazon Cognito service encounters a user validation exception with the AWS Lambda service.

  • InvalidLambdaResponseException:

    This exception is thrown when the Amazon Cognito service encounters an invalid AWS Lambda response.

  • InvalidSmsRoleAccessPolicyException:

    This exception is returned when the role provided for SMS configuration does not have permission to publish using Amazon SNS.

  • InvalidSmsRoleTrustRelationshipException:

    This exception is thrown when the trust relationship is invalid for the role provided for SMS configuration. This can happen if you do not trust cognito-idp.amazonaws.com or the external ID provided in the role does not match what is provided in the SMS configuration for the user pool.

  • InvalidEmailRoleAccessPolicyException:

    This exception is thrown when Amazon Cognito is not allowed to use your email identity. HTTP status code: 400.

  • CodeDeliveryFailureException:

    This exception is thrown when a verification code fails to deliver successfully.

  • LimitExceededException:

    This exception is thrown when a user exceeds the limit for a requested AWS resource.

  • PasswordResetRequiredException:

    This exception is thrown when a password reset is required.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • UserNotConfirmedException:

    This exception is thrown when a user is not confirmed successfully.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

GetUserPoolMfaConfig

$result = $client->getUserPoolMfaConfig([/* ... */]);
$promise = $client->getUserPoolMfaConfigAsync([/* ... */]);

Gets the user pool multi-factor authentication (MFA) configuration.

Parameter Syntax

$result = $client->getUserPoolMfaConfig([
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
UserPoolId
  • Required: Yes
  • Type: string

The user pool ID.

Result Syntax

[
    'MfaConfiguration' => 'OFF|ON|OPTIONAL',
    'SmsMfaConfiguration' => [
        'SmsAuthenticationMessage' => '<string>',
        'SmsConfiguration' => [
            'ExternalId' => '<string>',
            'SnsCallerArn' => '<string>',
        ],
    ],
    'SoftwareTokenMfaConfiguration' => [
        'Enabled' => true || false,
    ],
]

Result Details

Members
MfaConfiguration
  • Type: string

The multi-factor (MFA) configuration. Valid values include:

  • OFF MFA will not be used for any users.

  • ON MFA is required for all users to sign in.

  • OPTIONAL MFA will be required only for individual users who have an MFA factor enabled.

SmsMfaConfiguration
  • Type: SmsMfaConfigType structure

The SMS text message multi-factor (MFA) configuration.

SoftwareTokenMfaConfiguration
  • Type: SoftwareTokenMfaConfigType structure

The software token multi-factor (MFA) configuration.

Errors

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

GlobalSignOut

$result = $client->globalSignOut([/* ... */]);
$promise = $client->globalSignOutAsync([/* ... */]);

Signs out users from all devices. It also invalidates all refresh tokens issued to a user. The user's current access and Id tokens remain valid until their expiry. Access and Id tokens expire one hour after they are issued.

Parameter Syntax

$result = $client->globalSignOut([
    'AccessToken' => '<string>', // REQUIRED
]);

Parameter Details

Members
AccessToken
  • Required: Yes
  • Type: string

The access token.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • PasswordResetRequiredException:

    This exception is thrown when a password reset is required.

  • UserNotConfirmedException:

    This exception is thrown when a user is not confirmed successfully.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

InitiateAuth

$result = $client->initiateAuth([/* ... */]);
$promise = $client->initiateAuthAsync([/* ... */]);

Initiates the authentication flow.

Parameter Syntax

$result = $client->initiateAuth([
    'AnalyticsMetadata' => [
        'AnalyticsEndpointId' => '<string>',
    ],
    'AuthFlow' => 'USER_SRP_AUTH|REFRESH_TOKEN_AUTH|REFRESH_TOKEN|CUSTOM_AUTH|ADMIN_NO_SRP_AUTH|USER_PASSWORD_AUTH|ADMIN_USER_PASSWORD_AUTH', // REQUIRED
    'AuthParameters' => ['<string>', ...],
    'ClientId' => '<string>', // REQUIRED
    'ClientMetadata' => ['<string>', ...],
    'UserContextData' => [
        'EncodedData' => '<string>',
    ],
]);

Parameter Details

Members
AnalyticsMetadata
  • Type: AnalyticsMetadataType structure

The Amazon Pinpoint analytics metadata for collecting metrics for InitiateAuth calls.

AuthFlow
  • Required: Yes
  • Type: string

The authentication flow for this call to execute. The API action will depend on this value. For example:

  • REFRESH_TOKEN_AUTH will take in a valid refresh token and return new tokens.

  • USER_SRP_AUTH will take in USERNAME and SRP_A and return the SRP variables to be used for next challenge execution.

  • USER_PASSWORD_AUTH will take in USERNAME and PASSWORD and return the next challenge or tokens.

Valid values include:

  • USER_SRP_AUTH: Authentication flow for the Secure Remote Password (SRP) protocol.

  • REFRESH_TOKEN_AUTH/REFRESH_TOKEN: Authentication flow for refreshing the access token and ID token by supplying a valid refresh token.

  • CUSTOM_AUTH: Custom authentication flow.

  • USER_PASSWORD_AUTH: Non-SRP authentication flow; USERNAME and PASSWORD are passed directly. If a user migration Lambda trigger is set, this flow will invoke the user migration Lambda if the USERNAME is not found in the user pool.

  • ADMIN_USER_PASSWORD_AUTH: Admin-based user password authentication. This replaces the ADMIN_NO_SRP_AUTH authentication flow. In this flow, Cognito receives the password in the request instead of using the SRP process to verify passwords.

ADMIN_NO_SRP_AUTH is not a valid value.

AuthParameters
  • Type: Associative array of custom strings keys (StringType) to strings

The authentication parameters. These are inputs corresponding to the AuthFlow that you are invoking. The required values depend on the value of AuthFlow:

  • For USER_SRP_AUTH: USERNAME (required), SRP_A (required), SECRET_HASH (required if the app client is configured with a client secret), DEVICE_KEY.

  • For REFRESH_TOKEN_AUTH/REFRESH_TOKEN: REFRESH_TOKEN (required), SECRET_HASH (required if the app client is configured with a client secret), DEVICE_KEY.

  • For CUSTOM_AUTH: USERNAME (required), SECRET_HASH (if app client is configured with client secret), DEVICE_KEY. To start the authentication flow with password verification, include ChallengeName: SRP_A and SRP_A: (The SRP_A Value).

ClientId
  • Required: Yes
  • Type: string

The app client ID.

ClientMetadata
  • Type: Associative array of custom strings keys (StringType) to strings

A map of custom key-value pairs that you can provide as input for certain custom workflows that this action triggers.

You create custom workflows by assigning AWS Lambda functions to user pool triggers. When you use the InitiateAuth API action, Amazon Cognito invokes the AWS Lambda functions that are specified for various triggers. The ClientMetadata value is passed as input to the functions for only the following triggers:

  • Pre signup

  • Pre authentication

  • User migration

When Amazon Cognito invokes the functions for these triggers, it passes a JSON payload, which the function receives as input. This payload contains a validationData attribute, which provides the data that you assigned to the ClientMetadata parameter in your InitiateAuth request. In your function code in AWS Lambda, you can process the validationData value to enhance your workflow for your specific needs.

When you use the InitiateAuth API action, Amazon Cognito also invokes the functions for the following triggers, but it does not provide the ClientMetadata value as input:

  • Post authentication

  • Custom message

  • Pre token generation

  • Create auth challenge

  • Define auth challenge

  • Verify auth challenge

For more information, see Customizing User Pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

Take the following limitations into consideration when you use the ClientMetadata parameter:

  • Amazon Cognito does not store the ClientMetadata value. This data is available only to AWS Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration does not include triggers, the ClientMetadata parameter serves no purpose.

  • Amazon Cognito does not validate the ClientMetadata value.

  • Amazon Cognito does not encrypt the the ClientMetadata value, so don't use it to provide sensitive information.

UserContextData
  • Type: UserContextDataType structure

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

Result Syntax

[
    'AuthenticationResult' => [
        'AccessToken' => '<string>',
        'ExpiresIn' => <integer>,
        'IdToken' => '<string>',
        'NewDeviceMetadata' => [
            'DeviceGroupKey' => '<string>',
            'DeviceKey' => '<string>',
        ],
        'RefreshToken' => '<string>',
        'TokenType' => '<string>',
    ],
    'ChallengeName' => 'SMS_MFA|SOFTWARE_TOKEN_MFA|SELECT_MFA_TYPE|MFA_SETUP|PASSWORD_VERIFIER|CUSTOM_CHALLENGE|DEVICE_SRP_AUTH|DEVICE_PASSWORD_VERIFIER|ADMIN_NO_SRP_AUTH|NEW_PASSWORD_REQUIRED',
    'ChallengeParameters' => ['<string>', ...],
    'Session' => '<string>',
]

Result Details

Members
AuthenticationResult
  • Type: AuthenticationResultType structure

The result of the authentication response. This is only returned if the caller does not need to pass another challenge. If the caller does need to pass another challenge before it gets tokens, ChallengeName, ChallengeParameters, and Session are returned.

ChallengeName
  • Type: string

The name of the challenge which you are responding to with this call. This is returned to you in the AdminInitiateAuth response if you need to pass another challenge.

Valid values include the following. Note that all of these challenges require USERNAME and SECRET_HASH (if applicable) in the parameters.

  • SMS_MFA: Next challenge is to supply an SMS_MFA_CODE, delivered via SMS.

  • PASSWORD_VERIFIER: Next challenge is to supply PASSWORD_CLAIM_SIGNATURE, PASSWORD_CLAIM_SECRET_BLOCK, and TIMESTAMP after the client-side SRP calculations.

  • CUSTOM_CHALLENGE: This is returned if your custom authentication flow determines that the user should pass another challenge before tokens are issued.

  • DEVICE_SRP_AUTH: If device tracking was enabled on your user pool and the previous challenges were passed, this challenge is returned so that Amazon Cognito can start tracking this device.

  • DEVICE_PASSWORD_VERIFIER: Similar to PASSWORD_VERIFIER, but for devices only.

  • NEW_PASSWORD_REQUIRED: For users which are required to change their passwords after successful first login. This challenge should be passed with NEW_PASSWORD and any other required attributes.

ChallengeParameters
  • Type: Associative array of custom strings keys (StringType) to strings

The challenge parameters. These are returned to you in the InitiateAuth response if you need to pass another challenge. The responses in this parameter should be used to compute inputs to the next call (RespondToAuthChallenge).

All challenges require USERNAME and SECRET_HASH (if applicable).

Session
  • Type: string

The session which should be passed both ways in challenge-response calls to the service. If the caller needs to go through another challenge, they return a session with other challenge parameters. This session should be passed as it is to the next RespondToAuthChallenge API call.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • UnexpectedLambdaException:

    This exception is thrown when the Amazon Cognito service encounters an unexpected exception with the AWS Lambda service.

  • InvalidUserPoolConfigurationException:

    This exception is thrown when the user pool configuration is invalid.

  • UserLambdaValidationException:

    This exception is thrown when the Amazon Cognito service encounters a user validation exception with the AWS Lambda service.

  • InvalidLambdaResponseException:

    This exception is thrown when the Amazon Cognito service encounters an invalid AWS Lambda response.

  • PasswordResetRequiredException:

    This exception is thrown when a password reset is required.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • UserNotConfirmedException:

    This exception is thrown when a user is not confirmed successfully.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

  • InvalidSmsRoleAccessPolicyException:

    This exception is returned when the role provided for SMS configuration does not have permission to publish using Amazon SNS.

  • InvalidSmsRoleTrustRelationshipException:

    This exception is thrown when the trust relationship is invalid for the role provided for SMS configuration. This can happen if you do not trust cognito-idp.amazonaws.com or the external ID provided in the role does not match what is provided in the SMS configuration for the user pool.

ListDevices

$result = $client->listDevices([/* ... */]);
$promise = $client->listDevicesAsync([/* ... */]);

Lists the devices.

Parameter Syntax

$result = $client->listDevices([
    'AccessToken' => '<string>', // REQUIRED
    'Limit' => <integer>,
    'PaginationToken' => '<string>',
]);

Parameter Details

Members
AccessToken
  • Required: Yes
  • Type: string

The access tokens for the request to list devices.

Limit
  • Type: int

The limit of the device request.

PaginationToken
  • Type: string

The pagination token for the list request.

Result Syntax

[
    'Devices' => [
        [
            'DeviceAttributes' => [
                [
                    'Name' => '<string>',
                    'Value' => '<string>',
                ],
                // ...
            ],
            'DeviceCreateDate' => <DateTime>,
            'DeviceKey' => '<string>',
            'DeviceLastAuthenticatedDate' => <DateTime>,
            'DeviceLastModifiedDate' => <DateTime>,
        ],
        // ...
    ],
    'PaginationToken' => '<string>',
]

Result Details

Members
Devices
  • Type: Array of DeviceType structures

The devices returned in the list devices response.

PaginationToken
  • Type: string

The pagination token for the list device response.

Errors

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • InvalidUserPoolConfigurationException:

    This exception is thrown when the user pool configuration is invalid.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • PasswordResetRequiredException:

    This exception is thrown when a password reset is required.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • UserNotConfirmedException:

    This exception is thrown when a user is not confirmed successfully.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

ListGroups

$result = $client->listGroups([/* ... */]);
$promise = $client->listGroupsAsync([/* ... */]);

Lists the groups associated with a user pool.

Calling this action requires developer credentials.

Parameter Syntax

$result = $client->listGroups([
    'Limit' => <integer>,
    'NextToken' => '<string>',
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
Limit
  • Type: int

The limit of the request to list groups.

NextToken
  • Type: string

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool.

Result Syntax

[
    'Groups' => [
        [
            'CreationDate' => <DateTime>,
            'Description' => '<string>',
            'GroupName' => '<string>',
            'LastModifiedDate' => <DateTime>,
            'Precedence' => <integer>,
            'RoleArn' => '<string>',
            'UserPoolId' => '<string>',
        ],
        // ...
    ],
    'NextToken' => '<string>',
]

Result Details

Members
Groups
  • Type: Array of GroupType structures

The group objects for the groups.

NextToken
  • Type: string

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

Errors

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

ListIdentityProviders

$result = $client->listIdentityProviders([/* ... */]);
$promise = $client->listIdentityProvidersAsync([/* ... */]);

Lists information about all identity providers for a user pool.

Parameter Syntax

$result = $client->listIdentityProviders([
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
MaxResults
  • Type: int

The maximum number of identity providers to return.

NextToken
  • Type: string

A pagination token.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID.

Result Syntax

[
    'NextToken' => '<string>',
    'Providers' => [
        [
            'CreationDate' => <DateTime>,
            'LastModifiedDate' => <DateTime>,
            'ProviderName' => '<string>',
            'ProviderType' => 'SAML|Facebook|Google|LoginWithAmazon|SignInWithApple|OIDC',
        ],
        // ...
    ],
]

Result Details

Members
NextToken
  • Type: string

A pagination token.

Providers
  • Required: Yes
  • Type: Array of ProviderDescription structures

A list of identity provider objects.

Errors

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

ListResourceServers

$result = $client->listResourceServers([/* ... */]);
$promise = $client->listResourceServersAsync([/* ... */]);

Lists the resource servers for a user pool.

Parameter Syntax

$result = $client->listResourceServers([
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
MaxResults
  • Type: int

The maximum number of resource servers to return.

NextToken
  • Type: string

A pagination token.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool.

Result Syntax

[
    'NextToken' => '<string>',
    'ResourceServers' => [
        [
            'Identifier' => '<string>',
            'Name' => '<string>',
            'Scopes' => [
                [
                    'ScopeDescription' => '<string>',
                    'ScopeName' => '<string>',
                ],
                // ...
            ],
            'UserPoolId' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
NextToken
  • Type: string

A pagination token.

ResourceServers
  • Required: Yes
  • Type: Array of ResourceServerType structures

The resource servers.

Errors

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

ListTagsForResource

$result = $client->listTagsForResource([/* ... */]);
$promise = $client->listTagsForResourceAsync([/* ... */]);

Lists the tags that are assigned to an Amazon Cognito user pool.

A tag is a label that you can apply to user pools to categorize and manage them in different ways, such as by purpose, owner, environment, or other criteria.

You can use this action up to 10 times per second, per account.

Parameter Syntax

$result = $client->listTagsForResource([
    'ResourceArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
ResourceArn
  • Required: Yes
  • Type: string

The Amazon Resource Name (ARN) of the user pool that the tags are assigned to.

Result Syntax

[
    'Tags' => ['<string>', ...],
]

Result Details

Members
Tags
  • Type: Associative array of custom strings keys (TagKeysType) to strings

The tags that are assigned to the user pool.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

ListUserImportJobs

$result = $client->listUserImportJobs([/* ... */]);
$promise = $client->listUserImportJobsAsync([/* ... */]);

Lists the user import jobs.

Parameter Syntax

$result = $client->listUserImportJobs([
    'MaxResults' => <integer>, // REQUIRED
    'PaginationToken' => '<string>',
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
MaxResults
  • Required: Yes
  • Type: int

The maximum number of import jobs you want the request to return.

PaginationToken
  • Type: string

An identifier that was returned from the previous call to ListUserImportJobs, which can be used to return the next set of import jobs in the list.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool that the users are being imported into.

Result Syntax

[
    'PaginationToken' => '<string>',
    'UserImportJobs' => [
        [
            'CloudWatchLogsRoleArn' => '<string>',
            'CompletionDate' => <DateTime>,
            'CompletionMessage' => '<string>',
            'CreationDate' => <DateTime>,
            'FailedUsers' => <integer>,
            'ImportedUsers' => <integer>,
            'JobId' => '<string>',
            'JobName' => '<string>',
            'PreSignedUrl' => '<string>',
            'SkippedUsers' => <integer>,
            'StartDate' => <DateTime>,
            'Status' => 'Created|Pending|InProgress|Stopping|Expired|Stopped|Failed|Succeeded',
            'UserPoolId' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
PaginationToken
  • Type: string

An identifier that can be used to return the next set of user import jobs in the list.

UserImportJobs
  • Type: Array of UserImportJobType structures

The user import jobs.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

ListUserPoolClients

$result = $client->listUserPoolClients([/* ... */]);
$promise = $client->listUserPoolClientsAsync([/* ... */]);

Lists the clients that have been created for the specified user pool.

Parameter Syntax

$result = $client->listUserPoolClients([
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
MaxResults
  • Type: int

The maximum number of results you want the request to return when listing the user pool clients.

NextToken
  • Type: string

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool where you want to list user pool clients.

Result Syntax

[
    'NextToken' => '<string>',
    'UserPoolClients' => [
        [
            'ClientId' => '<string>',
            'ClientName' => '<string>',
            'UserPoolId' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
NextToken
  • Type: string

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

UserPoolClients
  • Type: Array of UserPoolClientDescription structures

The user pool clients in the response that lists user pool clients.

Errors

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

ListUserPools

$result = $client->listUserPools([/* ... */]);
$promise = $client->listUserPoolsAsync([/* ... */]);

Lists the user pools associated with an AWS account.

Parameter Syntax

$result = $client->listUserPools([
    'MaxResults' => <integer>, // REQUIRED
    'NextToken' => '<string>',
]);

Parameter Details

Members
MaxResults
  • Required: Yes
  • Type: int

The maximum number of results you want the request to return when listing the user pools.

NextToken
  • Type: string

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

Result Syntax

[
    'NextToken' => '<string>',
    'UserPools' => [
        [
            'CreationDate' => <DateTime>,
            'Id' => '<string>',
            'LambdaConfig' => [
                'CreateAuthChallenge' => '<string>',
                'CustomEmailSender' => [
                    'LambdaArn' => '<string>',
                    'LambdaVersion' => 'V1_0',
                ],
                'CustomMessage' => '<string>',
                'CustomSMSSender' => [
                    'LambdaArn' => '<string>',
                    'LambdaVersion' => 'V1_0',
                ],
                'DefineAuthChallenge' => '<string>',
                'KMSKeyID' => '<string>',
                'PostAuthentication' => '<string>',
                'PostConfirmation' => '<string>',
                'PreAuthentication' => '<string>',
                'PreSignUp' => '<string>',
                'PreTokenGeneration' => '<string>',
                'UserMigration' => '<string>',
                'VerifyAuthChallengeResponse' => '<string>',
            ],
            'LastModifiedDate' => <DateTime>,
            'Name' => '<string>',
            'Status' => 'Enabled|Disabled',
        ],
        // ...
    ],
]

Result Details

Members
NextToken
  • Type: string

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

UserPools
  • Type: Array of UserPoolDescriptionType structures

The user pools from the response to list users.

Errors

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

ListUsers

$result = $client->listUsers([/* ... */]);
$promise = $client->listUsersAsync([/* ... */]);

Lists the users in the Amazon Cognito user pool.

Parameter Syntax

$result = $client->listUsers([
    'AttributesToGet' => ['<string>', ...],
    'Filter' => '<string>',
    'Limit' => <integer>,
    'PaginationToken' => '<string>',
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
AttributesToGet
  • Type: Array of strings

An array of strings, where each string is the name of a user attribute to be returned for each user in the search results. If the array is null, all attributes are returned.

Filter
  • Type: string

A filter string of the form "AttributeName Filter-Type "AttributeValue"". Quotation marks within the filter string must be escaped using the backslash (\) character. For example, "family_name = \"Reddy\"".

  • AttributeName: The name of the attribute to search for. You can only search for one attribute at a time.

  • Filter-Type: For an exact match, use =, for example, "given_name = \"Jon\"". For a prefix ("starts with") match, use ^=, for example, "given_name ^= \"Jon\"".

  • AttributeValue: The attribute value that must be matched for each user.

If the filter string is empty, ListUsers returns all users in the user pool.

You can only search for the following standard attributes:

  • username (case-sensitive)

  • email

  • phone_number

  • name

  • given_name

  • family_name

  • preferred_username

  • cognito:user_status (called Status in the Console) (case-insensitive)

  • status (called Enabled in the Console) (case-sensitive)

  • sub

Custom attributes are not searchable.

For more information, see Searching for Users Using the ListUsers API and Examples of Using the ListUsers API in the Amazon Cognito Developer Guide.

Limit
  • Type: int

Maximum number of users to be returned.

PaginationToken
  • Type: string

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool on which the search should be performed.

Result Syntax

[
    'PaginationToken' => '<string>',
    'Users' => [
        [
            'Attributes' => [
                [
                    'Name' => '<string>',
                    'Value' => '<string>',
                ],
                // ...
            ],
            'Enabled' => true || false,
            'MFAOptions' => [
                [
                    'AttributeName' => '<string>',
                    'DeliveryMedium' => 'SMS|EMAIL',
                ],
                // ...
            ],
            'UserCreateDate' => <DateTime>,
            'UserLastModifiedDate' => <DateTime>,
            'UserStatus' => 'UNCONFIRMED|CONFIRMED|ARCHIVED|COMPROMISED|UNKNOWN|RESET_REQUIRED|FORCE_CHANGE_PASSWORD',
            'Username' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
PaginationToken
  • Type: string

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

Users
  • Type: Array of UserType structures

The users returned in the request to list users.

Errors

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

ListUsersInGroup

$result = $client->listUsersInGroup([/* ... */]);
$promise = $client->listUsersInGroupAsync([/* ... */]);

Lists the users in the specified group.

Calling this action requires developer credentials.

Parameter Syntax

$result = $client->listUsersInGroup([
    'GroupName' => '<string>', // REQUIRED
    'Limit' => <integer>,
    'NextToken' => '<string>',
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
GroupName
  • Required: Yes
  • Type: string

The name of the group.

Limit
  • Type: int

The limit of the request to list users.

NextToken
  • Type: string

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool.

Result Syntax

[
    'NextToken' => '<string>',
    'Users' => [
        [
            'Attributes' => [
                [
                    'Name' => '<string>',
                    'Value' => '<string>',
                ],
                // ...
            ],
            'Enabled' => true || false,
            'MFAOptions' => [
                [
                    'AttributeName' => '<string>',
                    'DeliveryMedium' => 'SMS|EMAIL',
                ],
                // ...
            ],
            'UserCreateDate' => <DateTime>,
            'UserLastModifiedDate' => <DateTime>,
            'UserStatus' => 'UNCONFIRMED|CONFIRMED|ARCHIVED|COMPROMISED|UNKNOWN|RESET_REQUIRED|FORCE_CHANGE_PASSWORD',
            'Username' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
NextToken
  • Type: string

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

Users
  • Type: Array of UserType structures

The users returned in the request to list users.

Errors

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

ResendConfirmationCode

$result = $client->resendConfirmationCode([/* ... */]);
$promise = $client->resendConfirmationCodeAsync([/* ... */]);

Resends the confirmation (for confirmation of registration) to a specific user in the user pool.

Parameter Syntax

$result = $client->resendConfirmationCode([
    'AnalyticsMetadata' => [
        'AnalyticsEndpointId' => '<string>',
    ],
    'ClientId' => '<string>', // REQUIRED
    'ClientMetadata' => ['<string>', ...],
    'SecretHash' => '<string>',
    'UserContextData' => [
        'EncodedData' => '<string>',
    ],
    'Username' => '<string>', // REQUIRED
]);

Parameter Details

Members
AnalyticsMetadata
  • Type: AnalyticsMetadataType structure

The Amazon Pinpoint analytics metadata for collecting metrics for ResendConfirmationCode calls.

ClientId
  • Required: Yes
  • Type: string

The ID of the client associated with the user pool.

ClientMetadata
  • Type: Associative array of custom strings keys (StringType) to strings

A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.

You create custom workflows by assigning AWS Lambda functions to user pool triggers. When you use the ResendConfirmationCode API action, Amazon Cognito invokes the function that is assigned to the custom message trigger. When Amazon Cognito invokes this function, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your ResendConfirmationCode request. In your function code in AWS Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs.

For more information, see Customizing User Pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

Take the following limitations into consideration when you use the ClientMetadata parameter:

  • Amazon Cognito does not store the ClientMetadata value. This data is available only to AWS Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration does not include triggers, the ClientMetadata parameter serves no purpose.

  • Amazon Cognito does not validate the ClientMetadata value.

  • Amazon Cognito does not encrypt the the ClientMetadata value, so don't use it to provide sensitive information.

SecretHash
  • Type: string

A keyed-hash message authentication code (HMAC) calculated using the secret key of a user pool client and username plus the client ID in the message.

UserContextData
  • Type: UserContextDataType structure

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

Username
  • Required: Yes
  • Type: string

The user name of the user to whom you wish to resend a confirmation code.

Result Syntax

[
    'CodeDeliveryDetails' => [
        'AttributeName' => '<string>',
        'DeliveryMedium' => 'SMS|EMAIL',
        'Destination' => '<string>',
    ],
]

Result Details

Members
CodeDeliveryDetails
  • Type: CodeDeliveryDetailsType structure

The code delivery details returned by the server in response to the request to resend the confirmation code.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • UnexpectedLambdaException:

    This exception is thrown when the Amazon Cognito service encounters an unexpected exception with the AWS Lambda service.

  • UserLambdaValidationException:

    This exception is thrown when the Amazon Cognito service encounters a user validation exception with the AWS Lambda service.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • InvalidLambdaResponseException:

    This exception is thrown when the Amazon Cognito service encounters an invalid AWS Lambda response.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • LimitExceededException:

    This exception is thrown when a user exceeds the limit for a requested AWS resource.

  • InvalidSmsRoleAccessPolicyException:

    This exception is returned when the role provided for SMS configuration does not have permission to publish using Amazon SNS.

  • InvalidSmsRoleTrustRelationshipException:

    This exception is thrown when the trust relationship is invalid for the role provided for SMS configuration. This can happen if you do not trust cognito-idp.amazonaws.com or the external ID provided in the role does not match what is provided in the SMS configuration for the user pool.

  • InvalidEmailRoleAccessPolicyException:

    This exception is thrown when Amazon Cognito is not allowed to use your email identity. HTTP status code: 400.

  • CodeDeliveryFailureException:

    This exception is thrown when a verification code fails to deliver successfully.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

RespondToAuthChallenge

$result = $client->respondToAuthChallenge([/* ... */]);
$promise = $client->respondToAuthChallengeAsync([/* ... */]);

Responds to the authentication challenge.

Parameter Syntax

$result = $client->respondToAuthChallenge([
    'AnalyticsMetadata' => [
        'AnalyticsEndpointId' => '<string>',
    ],
    'ChallengeName' => 'SMS_MFA|SOFTWARE_TOKEN_MFA|SELECT_MFA_TYPE|MFA_SETUP|PASSWORD_VERIFIER|CUSTOM_CHALLENGE|DEVICE_SRP_AUTH|DEVICE_PASSWORD_VERIFIER|ADMIN_NO_SRP_AUTH|NEW_PASSWORD_REQUIRED', // REQUIRED
    'ChallengeResponses' => ['<string>', ...],
    'ClientId' => '<string>', // REQUIRED
    'ClientMetadata' => ['<string>', ...],
    'Session' => '<string>',
    'UserContextData' => [
        'EncodedData' => '<string>',
    ],
]);

Parameter Details

Members
AnalyticsMetadata
  • Type: AnalyticsMetadataType structure

The Amazon Pinpoint analytics metadata for collecting metrics for RespondToAuthChallenge calls.

ChallengeName
  • Required: Yes
  • Type: string

The challenge name. For more information, see InitiateAuth.

ADMIN_NO_SRP_AUTH is not a valid value.

ChallengeResponses
  • Type: Associative array of custom strings keys (StringType) to strings

The challenge responses. These are inputs corresponding to the value of ChallengeName, for example:

SECRET_HASH (if app client is configured with client secret) applies to all inputs below (including SOFTWARE_TOKEN_MFA).

  • SMS_MFA: SMS_MFA_CODE, USERNAME.

  • PASSWORD_VERIFIER: PASSWORD_CLAIM_SIGNATURE, PASSWORD_CLAIM_SECRET_BLOCK, TIMESTAMP, USERNAME.

  • NEW_PASSWORD_REQUIRED: NEW_PASSWORD, any other required attributes, USERNAME.

  • SOFTWARE_TOKEN_MFA: USERNAME and SOFTWARE_TOKEN_MFA_CODE are required attributes.

  • DEVICE_SRP_AUTH requires USERNAME, DEVICE_KEY, SRP_A (and SECRET_HASH).

  • DEVICE_PASSWORD_VERIFIER requires everything that PASSWORD_VERIFIER requires plus DEVICE_KEY.

ClientId
  • Required: Yes
  • Type: string

The app client ID.

ClientMetadata
  • Type: Associative array of custom strings keys (StringType) to strings

A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.

You create custom workflows by assigning AWS Lambda functions to user pool triggers. When you use the RespondToAuthChallenge API action, Amazon Cognito invokes any functions that are assigned to the following triggers: post authentication, pre token generation, define auth challenge, create auth challenge, and verify auth challenge. When Amazon Cognito invokes any of these functions, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your RespondToAuthChallenge request. In your function code in AWS Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs.

For more information, see Customizing User Pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

Take the following limitations into consideration when you use the ClientMetadata parameter:

  • Amazon Cognito does not store the ClientMetadata value. This data is available only to AWS Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration does not include triggers, the ClientMetadata parameter serves no purpose.

  • Amazon Cognito does not validate the ClientMetadata value.

  • Amazon Cognito does not encrypt the the ClientMetadata value, so don't use it to provide sensitive information.

Session
  • Type: string

The session which should be passed both ways in challenge-response calls to the service. If InitiateAuth or RespondToAuthChallenge API call determines that the caller needs to go through another challenge, they return a session with other challenge parameters. This session should be passed as it is to the next RespondToAuthChallenge API call.

UserContextData
  • Type: UserContextDataType structure

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

Result Syntax

[
    'AuthenticationResult' => [
        'AccessToken' => '<string>',
        'ExpiresIn' => <integer>,
        'IdToken' => '<string>',
        'NewDeviceMetadata' => [
            'DeviceGroupKey' => '<string>',
            'DeviceKey' => '<string>',
        ],
        'RefreshToken' => '<string>',
        'TokenType' => '<string>',
    ],
    'ChallengeName' => 'SMS_MFA|SOFTWARE_TOKEN_MFA|SELECT_MFA_TYPE|MFA_SETUP|PASSWORD_VERIFIER|CUSTOM_CHALLENGE|DEVICE_SRP_AUTH|DEVICE_PASSWORD_VERIFIER|ADMIN_NO_SRP_AUTH|NEW_PASSWORD_REQUIRED',
    'ChallengeParameters' => ['<string>', ...],
    'Session' => '<string>',
]

Result Details

Members
AuthenticationResult
  • Type: AuthenticationResultType structure

The result returned by the server in response to the request to respond to the authentication challenge.

ChallengeName
  • Type: string

The challenge name. For more information, see InitiateAuth.

ChallengeParameters
  • Type: Associative array of custom strings keys (StringType) to strings

The challenge parameters. For more information, see InitiateAuth.

Session
  • Type: string

The session which should be passed both ways in challenge-response calls to the service. If the caller needs to go through another challenge, they return a session with other challenge parameters. This session should be passed as it is to the next RespondToAuthChallenge API call.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • CodeMismatchException:

    This exception is thrown if the provided code does not match what the server was expecting.

  • ExpiredCodeException:

    This exception is thrown if a code has expired.

  • UnexpectedLambdaException:

    This exception is thrown when the Amazon Cognito service encounters an unexpected exception with the AWS Lambda service.

  • UserLambdaValidationException:

    This exception is thrown when the Amazon Cognito service encounters a user validation exception with the AWS Lambda service.

  • InvalidPasswordException:

    This exception is thrown when the Amazon Cognito service encounters an invalid password.

  • InvalidLambdaResponseException:

    This exception is thrown when the Amazon Cognito service encounters an invalid AWS Lambda response.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • InvalidUserPoolConfigurationException:

    This exception is thrown when the user pool configuration is invalid.

  • MFAMethodNotFoundException:

    This exception is thrown when Amazon Cognito cannot find a multi-factor authentication (MFA) method.

  • PasswordResetRequiredException:

    This exception is thrown when a password reset is required.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • UserNotConfirmedException:

    This exception is thrown when a user is not confirmed successfully.

  • InvalidSmsRoleAccessPolicyException:

    This exception is returned when the role provided for SMS configuration does not have permission to publish using Amazon SNS.

  • InvalidSmsRoleTrustRelationshipException:

    This exception is thrown when the trust relationship is invalid for the role provided for SMS configuration. This can happen if you do not trust cognito-idp.amazonaws.com or the external ID provided in the role does not match what is provided in the SMS configuration for the user pool.

  • AliasExistsException:

    This exception is thrown when a user tries to confirm the account with an email or phone number that has already been supplied as an alias from a different account. This exception tells user that an account with this email or phone already exists.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

  • SoftwareTokenMFANotFoundException:

    This exception is thrown when the software token TOTP multi-factor authentication (MFA) is not enabled for the user pool.

SetRiskConfiguration

$result = $client->setRiskConfiguration([/* ... */]);
$promise = $client->setRiskConfigurationAsync([/* ... */]);

Configures actions on detected risks. To delete the risk configuration for UserPoolId or ClientId, pass null values for all four configuration types.

To enable Amazon Cognito advanced security features, update the user pool to include the UserPoolAddOns keyAdvancedSecurityMode.

Parameter Syntax

$result = $client->setRiskConfiguration([
    'AccountTakeoverRiskConfiguration' => [
        'Actions' => [ // REQUIRED
            'HighAction' => [
                'EventAction' => 'BLOCK|MFA_IF_CONFIGURED|MFA_REQUIRED|NO_ACTION', // REQUIRED
                'Notify' => true || false, // REQUIRED
            ],
            'LowAction' => [
                'EventAction' => 'BLOCK|MFA_IF_CONFIGURED|MFA_REQUIRED|NO_ACTION', // REQUIRED
                'Notify' => true || false, // REQUIRED
            ],
            'MediumAction' => [
                'EventAction' => 'BLOCK|MFA_IF_CONFIGURED|MFA_REQUIRED|NO_ACTION', // REQUIRED
                'Notify' => true || false, // REQUIRED
            ],
        ],
        'NotifyConfiguration' => [
            'BlockEmail' => [
                'HtmlBody' => '<string>',
                'Subject' => '<string>', // REQUIRED
                'TextBody' => '<string>',
            ],
            'From' => '<string>',
            'MfaEmail' => [
                'HtmlBody' => '<string>',
                'Subject' => '<string>', // REQUIRED
                'TextBody' => '<string>',
            ],
            'NoActionEmail' => [
                'HtmlBody' => '<string>',
                'Subject' => '<string>', // REQUIRED
                'TextBody' => '<string>',
            ],
            'ReplyTo' => '<string>',
            'SourceArn' => '<string>', // REQUIRED
        ],
    ],
    'ClientId' => '<string>',
    'CompromisedCredentialsRiskConfiguration' => [
        'Actions' => [ // REQUIRED
            'EventAction' => 'BLOCK|NO_ACTION', // REQUIRED
        ],
        'EventFilter' => ['<string>', ...],
    ],
    'RiskExceptionConfiguration' => [
        'BlockedIPRangeList' => ['<string>', ...],
        'SkippedIPRangeList' => ['<string>', ...],
    ],
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
AccountTakeoverRiskConfiguration
  • Type: AccountTakeoverRiskConfigurationType structure

The account takeover risk configuration.

ClientId
  • Type: string

The app client ID. If ClientId is null, then the risk configuration is mapped to userPoolId. When the client ID is null, the same risk configuration is applied to all the clients in the userPool.

Otherwise, ClientId is mapped to the client. When the client ID is not null, the user pool configuration is overridden and the risk configuration for the client is used instead.

CompromisedCredentialsRiskConfiguration
  • Type: CompromisedCredentialsRiskConfigurationType structure

The compromised credentials risk configuration.

RiskExceptionConfiguration
  • Type: RiskExceptionConfigurationType structure

The configuration to override the risk decision.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID.

Result Syntax

[
    'RiskConfiguration' => [
        'AccountTakeoverRiskConfiguration' => [
            'Actions' => [
                'HighAction' => [
                    'EventAction' => 'BLOCK|MFA_IF_CONFIGURED|MFA_REQUIRED|NO_ACTION',
                    'Notify' => true || false,
                ],
                'LowAction' => [
                    'EventAction' => 'BLOCK|MFA_IF_CONFIGURED|MFA_REQUIRED|NO_ACTION',
                    'Notify' => true || false,
                ],
                'MediumAction' => [
                    'EventAction' => 'BLOCK|MFA_IF_CONFIGURED|MFA_REQUIRED|NO_ACTION',
                    'Notify' => true || false,
                ],
            ],
            'NotifyConfiguration' => [
                'BlockEmail' => [
                    'HtmlBody' => '<string>',
                    'Subject' => '<string>',
                    'TextBody' => '<string>',
                ],
                'From' => '<string>',
                'MfaEmail' => [
                    'HtmlBody' => '<string>',
                    'Subject' => '<string>',
                    'TextBody' => '<string>',
                ],
                'NoActionEmail' => [
                    'HtmlBody' => '<string>',
                    'Subject' => '<string>',
                    'TextBody' => '<string>',
                ],
                'ReplyTo' => '<string>',
                'SourceArn' => '<string>',
            ],
        ],
        'ClientId' => '<string>',
        'CompromisedCredentialsRiskConfiguration' => [
            'Actions' => [
                'EventAction' => 'BLOCK|NO_ACTION',
            ],
            'EventFilter' => ['<string>', ...],
        ],
        'LastModifiedDate' => <DateTime>,
        'RiskExceptionConfiguration' => [
            'BlockedIPRangeList' => ['<string>', ...],
            'SkippedIPRangeList' => ['<string>', ...],
        ],
        'UserPoolId' => '<string>',
    ],
]

Result Details

Members
RiskConfiguration
  • Required: Yes
  • Type: RiskConfigurationType structure

The risk configuration.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • UserPoolAddOnNotEnabledException:

    This exception is thrown when user pool add-ons are not enabled.

  • CodeDeliveryFailureException:

    This exception is thrown when a verification code fails to deliver successfully.

  • InvalidEmailRoleAccessPolicyException:

    This exception is thrown when Amazon Cognito is not allowed to use your email identity. HTTP status code: 400.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

SetUICustomization

$result = $client->setUICustomization([/* ... */]);
$promise = $client->setUICustomizationAsync([/* ... */]);

Sets the UI customization information for a user pool's built-in app UI.

You can specify app UI customization settings for a single client (with a specific clientId) or for all clients (by setting the clientId to ALL). If you specify ALL, the default configuration will be used for every client that has no UI customization set previously. If you specify UI customization settings for a particular client, it will no longer fall back to the ALL configuration.

To use this API, your user pool must have a domain associated with it. Otherwise, there is no place to host the app's pages, and the service will throw an error.

Parameter Syntax

$result = $client->setUICustomization([
    'CSS' => '<string>',
    'ClientId' => '<string>',
    'ImageFile' => <string || resource || Psr\Http\Message\StreamInterface>,
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
CSS
  • Type: string

The CSS values in the UI customization.

ClientId
  • Type: string

The client ID for the client app.

ImageFile
  • Type: blob (string|resource|Psr\Http\Message\StreamInterface)

The uploaded logo image for the UI customization.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool.

Result Syntax

[
    'UICustomization' => [
        'CSS' => '<string>',
        'CSSVersion' => '<string>',
        'ClientId' => '<string>',
        'CreationDate' => <DateTime>,
        'ImageUrl' => '<string>',
        'LastModifiedDate' => <DateTime>,
        'UserPoolId' => '<string>',
    ],
]

Result Details

Members
UICustomization
  • Required: Yes
  • Type: UICustomizationType structure

The UI customization information.

Errors

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

SetUserMFAPreference

$result = $client->setUserMFAPreference([/* ... */]);
$promise = $client->setUserMFAPreferenceAsync([/* ... */]);

Set the user's multi-factor authentication (MFA) method preference, including which MFA factors are enabled and if any are preferred. Only one factor can be set as preferred. The preferred MFA factor will be used to authenticate a user if multiple factors are enabled. If multiple options are enabled and no preference is set, a challenge to choose an MFA option will be returned during sign in. If an MFA type is enabled for a user, the user will be prompted for MFA during all sign in attempts, unless device tracking is turned on and the device has been trusted. If you would like MFA to be applied selectively based on the assessed risk level of sign in attempts, disable MFA for users and turn on Adaptive Authentication for the user pool.

Parameter Syntax

$result = $client->setUserMFAPreference([
    'AccessToken' => '<string>', // REQUIRED
    'SMSMfaSettings' => [
        'Enabled' => true || false,
        'PreferredMfa' => true || false,
    ],
    'SoftwareTokenMfaSettings' => [
        'Enabled' => true || false,
        'PreferredMfa' => true || false,
    ],
]);

Parameter Details

Members
AccessToken
  • Required: Yes
  • Type: string

The access token for the user.

SMSMfaSettings
  • Type: SMSMfaSettingsType structure

The SMS text message multi-factor authentication (MFA) settings.

SoftwareTokenMfaSettings
  • Type: SoftwareTokenMfaSettingsType structure

The time-based one-time password software token MFA settings.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • PasswordResetRequiredException:

    This exception is thrown when a password reset is required.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • UserNotConfirmedException:

    This exception is thrown when a user is not confirmed successfully.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

SetUserPoolMfaConfig

$result = $client->setUserPoolMfaConfig([/* ... */]);
$promise = $client->setUserPoolMfaConfigAsync([/* ... */]);

Set the user pool multi-factor authentication (MFA) configuration.

Parameter Syntax

$result = $client->setUserPoolMfaConfig([
    'MfaConfiguration' => 'OFF|ON|OPTIONAL',
    'SmsMfaConfiguration' => [
        'SmsAuthenticationMessage' => '<string>',
        'SmsConfiguration' => [
            'ExternalId' => '<string>',
            'SnsCallerArn' => '<string>', // REQUIRED
        ],
    ],
    'SoftwareTokenMfaConfiguration' => [
        'Enabled' => true || false,
    ],
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
MfaConfiguration
  • Type: string

The MFA configuration. Valid values include:

  • OFF MFA will not be used for any users.

  • ON MFA is required for all users to sign in.

  • OPTIONAL MFA will be required only for individual users who have an MFA factor enabled.

SmsMfaConfiguration
  • Type: SmsMfaConfigType structure

The SMS text message MFA configuration.

SoftwareTokenMfaConfiguration
  • Type: SoftwareTokenMfaConfigType structure

The software token MFA configuration.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID.

Result Syntax

[
    'MfaConfiguration' => 'OFF|ON|OPTIONAL',
    'SmsMfaConfiguration' => [
        'SmsAuthenticationMessage' => '<string>',
        'SmsConfiguration' => [
            'ExternalId' => '<string>',
            'SnsCallerArn' => '<string>',
        ],
    ],
    'SoftwareTokenMfaConfiguration' => [
        'Enabled' => true || false,
    ],
]

Result Details

Members
MfaConfiguration
  • Type: string

The MFA configuration. Valid values include:

  • OFF MFA will not be used for any users.

  • ON MFA is required for all users to sign in.

  • OPTIONAL MFA will be required only for individual users who have an MFA factor enabled.

SmsMfaConfiguration
  • Type: SmsMfaConfigType structure

The SMS text message MFA configuration.

SoftwareTokenMfaConfiguration
  • Type: SoftwareTokenMfaConfigType structure

The software token MFA configuration.

Errors

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidSmsRoleAccessPolicyException:

    This exception is returned when the role provided for SMS configuration does not have permission to publish using Amazon SNS.

  • InvalidSmsRoleTrustRelationshipException:

    This exception is thrown when the trust relationship is invalid for the role provided for SMS configuration. This can happen if you do not trust cognito-idp.amazonaws.com or the external ID provided in the role does not match what is provided in the SMS configuration for the user pool.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

SetUserSettings

$result = $client->setUserSettings([/* ... */]);
$promise = $client->setUserSettingsAsync([/* ... */]);

This action is no longer supported. You can use it to configure only SMS MFA. You can't use it to configure TOTP software token MFA. To configure either type of MFA, use SetUserMFAPreference instead.

Parameter Syntax

$result = $client->setUserSettings([
    'AccessToken' => '<string>', // REQUIRED
    'MFAOptions' => [ // REQUIRED
        [
            'AttributeName' => '<string>',
            'DeliveryMedium' => 'SMS|EMAIL',
        ],
        // ...
    ],
]);

Parameter Details

Members
AccessToken
  • Required: Yes
  • Type: string

The access token for the set user settings request.

MFAOptions
  • Required: Yes
  • Type: Array of MFAOptionType structures

You can use this parameter only to set an SMS configuration that uses SMS for delivery.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • PasswordResetRequiredException:

    This exception is thrown when a password reset is required.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • UserNotConfirmedException:

    This exception is thrown when a user is not confirmed successfully.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

SignUp

$result = $client->signUp([/* ... */]);
$promise = $client->signUpAsync([/* ... */]);

Registers the user in the specified user pool and creates a user name, password, and user attributes.

Parameter Syntax

$result = $client->signUp([
    'AnalyticsMetadata' => [
        'AnalyticsEndpointId' => '<string>',
    ],
    'ClientId' => '<string>', // REQUIRED
    'ClientMetadata' => ['<string>', ...],
    'Password' => '<string>', // REQUIRED
    'SecretHash' => '<string>',
    'UserAttributes' => [
        [
            'Name' => '<string>', // REQUIRED
            'Value' => '<string>',
        ],
        // ...
    ],
    'UserContextData' => [
        'EncodedData' => '<string>',
    ],
    'Username' => '<string>', // REQUIRED
    'ValidationData' => [
        [
            'Name' => '<string>', // REQUIRED
            'Value' => '<string>',
        ],
        // ...
    ],
]);

Parameter Details

Members
AnalyticsMetadata
  • Type: AnalyticsMetadataType structure

The Amazon Pinpoint analytics metadata for collecting metrics for SignUp calls.

ClientId
  • Required: Yes
  • Type: string

The ID of the client associated with the user pool.

ClientMetadata
  • Type: Associative array of custom strings keys (StringType) to strings

A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.

You create custom workflows by assigning AWS Lambda functions to user pool triggers. When you use the SignUp API action, Amazon Cognito invokes any functions that are assigned to the following triggers: pre sign-up, custom message, and post confirmation. When Amazon Cognito invokes any of these functions, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your SignUp request. In your function code in AWS Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs.

For more information, see Customizing User Pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

Take the following limitations into consideration when you use the ClientMetadata parameter:

  • Amazon Cognito does not store the ClientMetadata value. This data is available only to AWS Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration does not include triggers, the ClientMetadata parameter serves no purpose.

  • Amazon Cognito does not validate the ClientMetadata value.

  • Amazon Cognito does not encrypt the the ClientMetadata value, so don't use it to provide sensitive information.

Password
  • Required: Yes
  • Type: string

The password of the user you wish to register.

SecretHash
  • Type: string

A keyed-hash message authentication code (HMAC) calculated using the secret key of a user pool client and username plus the client ID in the message.

UserAttributes
  • Type: Array of AttributeType structures

An array of name-value pairs representing user attributes.

For custom attributes, you must prepend the custom: prefix to the attribute name.

UserContextData
  • Type: UserContextDataType structure

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

Username
  • Required: Yes
  • Type: string

The user name of the user you wish to register.

ValidationData
  • Type: Array of AttributeType structures

The validation data in the request to register a user.

Result Syntax

[
    'CodeDeliveryDetails' => [
        'AttributeName' => '<string>',
        'DeliveryMedium' => 'SMS|EMAIL',
        'Destination' => '<string>',
    ],
    'UserConfirmed' => true || false,
    'UserSub' => '<string>',
]

Result Details

Members
CodeDeliveryDetails
  • Type: CodeDeliveryDetailsType structure

The code delivery details returned by the server response to the user registration request.

UserConfirmed
  • Required: Yes
  • Type: boolean

A response from the server indicating that a user registration has been confirmed.

UserSub
  • Required: Yes
  • Type: string

The UUID of the authenticated user. This is not the same as username.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • UnexpectedLambdaException:

    This exception is thrown when the Amazon Cognito service encounters an unexpected exception with the AWS Lambda service.

  • UserLambdaValidationException:

    This exception is thrown when the Amazon Cognito service encounters a user validation exception with the AWS Lambda service.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • InvalidPasswordException:

    This exception is thrown when the Amazon Cognito service encounters an invalid password.

  • InvalidLambdaResponseException:

    This exception is thrown when the Amazon Cognito service encounters an invalid AWS Lambda response.

  • UsernameExistsException:

    This exception is thrown when Amazon Cognito encounters a user name that already exists in the user pool.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

  • InvalidSmsRoleAccessPolicyException:

    This exception is returned when the role provided for SMS configuration does not have permission to publish using Amazon SNS.

  • InvalidSmsRoleTrustRelationshipException:

    This exception is thrown when the trust relationship is invalid for the role provided for SMS configuration. This can happen if you do not trust cognito-idp.amazonaws.com or the external ID provided in the role does not match what is provided in the SMS configuration for the user pool.

  • InvalidEmailRoleAccessPolicyException:

    This exception is thrown when Amazon Cognito is not allowed to use your email identity. HTTP status code: 400.

  • CodeDeliveryFailureException:

    This exception is thrown when a verification code fails to deliver successfully.

StartUserImportJob

$result = $client->startUserImportJob([/* ... */]);
$promise = $client->startUserImportJobAsync([/* ... */]);

Starts the user import.

Parameter Syntax

$result = $client->startUserImportJob([
    'JobId' => '<string>', // REQUIRED
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
JobId
  • Required: Yes
  • Type: string

The job ID for the user import job.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool that the users are being imported into.

Result Syntax

[
    'UserImportJob' => [
        'CloudWatchLogsRoleArn' => '<string>',
        'CompletionDate' => <DateTime>,
        'CompletionMessage' => '<string>',
        'CreationDate' => <DateTime>,
        'FailedUsers' => <integer>,
        'ImportedUsers' => <integer>,
        'JobId' => '<string>',
        'JobName' => '<string>',
        'PreSignedUrl' => '<string>',
        'SkippedUsers' => <integer>,
        'StartDate' => <DateTime>,
        'Status' => 'Created|Pending|InProgress|Stopping|Expired|Stopped|Failed|Succeeded',
        'UserPoolId' => '<string>',
    ],
]

Result Details

Members
UserImportJob
  • Type: UserImportJobType structure

The job object that represents the user import job.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

  • PreconditionNotMetException:

    This exception is thrown when a precondition is not met.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

StopUserImportJob

$result = $client->stopUserImportJob([/* ... */]);
$promise = $client->stopUserImportJobAsync([/* ... */]);

Stops the user import job.

Parameter Syntax

$result = $client->stopUserImportJob([
    'JobId' => '<string>', // REQUIRED
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
JobId
  • Required: Yes
  • Type: string

The job ID for the user import job.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool that the users are being imported into.

Result Syntax

[
    'UserImportJob' => [
        'CloudWatchLogsRoleArn' => '<string>',
        'CompletionDate' => <DateTime>,
        'CompletionMessage' => '<string>',
        'CreationDate' => <DateTime>,
        'FailedUsers' => <integer>,
        'ImportedUsers' => <integer>,
        'JobId' => '<string>',
        'JobName' => '<string>',
        'PreSignedUrl' => '<string>',
        'SkippedUsers' => <integer>,
        'StartDate' => <DateTime>,
        'Status' => 'Created|Pending|InProgress|Stopping|Expired|Stopped|Failed|Succeeded',
        'UserPoolId' => '<string>',
    ],
]

Result Details

Members
UserImportJob
  • Type: UserImportJobType structure

The job object that represents the user import job.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

  • PreconditionNotMetException:

    This exception is thrown when a precondition is not met.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

TagResource

$result = $client->tagResource([/* ... */]);
$promise = $client->tagResourceAsync([/* ... */]);

Assigns a set of tags to an Amazon Cognito user pool. A tag is a label that you can use to categorize and manage user pools in different ways, such as by purpose, owner, environment, or other criteria.

Each tag consists of a key and value, both of which you define. A key is a general category for more specific values. For example, if you have two versions of a user pool, one for testing and another for production, you might assign an Environment tag key to both user pools. The value of this key might be Test for one user pool and Production for the other.

Tags are useful for cost tracking and access control. You can activate your tags so that they appear on the Billing and Cost Management console, where you can track the costs associated with your user pools. In an IAM policy, you can constrain permissions for user pools based on specific tags or tag values.

You can use this action up to 5 times per second, per account. A user pool can have as many as 50 tags.

Parameter Syntax

$result = $client->tagResource([
    'ResourceArn' => '<string>', // REQUIRED
    'Tags' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
ResourceArn
  • Required: Yes
  • Type: string

The Amazon Resource Name (ARN) of the user pool to assign the tags to.

Tags
  • Required: Yes
  • Type: Associative array of custom strings keys (TagKeysType) to strings

The tags to assign to the user pool.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

UntagResource

$result = $client->untagResource([/* ... */]);
$promise = $client->untagResourceAsync([/* ... */]);

Removes the specified tags from an Amazon Cognito user pool. You can use this action up to 5 times per second, per account

Parameter Syntax

$result = $client->untagResource([
    'ResourceArn' => '<string>', // REQUIRED
    'TagKeys' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
ResourceArn
  • Required: Yes
  • Type: string

The Amazon Resource Name (ARN) of the user pool that the tags are assigned to.

TagKeys
  • Required: Yes
  • Type: Array of strings

The keys of the tags to remove from the user pool.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

UpdateAuthEventFeedback

$result = $client->updateAuthEventFeedback([/* ... */]);
$promise = $client->updateAuthEventFeedbackAsync([/* ... */]);

Provides the feedback for an authentication event whether it was from a valid user or not. This feedback is used for improving the risk evaluation decision for the user pool as part of Amazon Cognito advanced security.

Parameter Syntax

$result = $client->updateAuthEventFeedback([
    'EventId' => '<string>', // REQUIRED
    'FeedbackToken' => '<string>', // REQUIRED
    'FeedbackValue' => 'Valid|Invalid', // REQUIRED
    'UserPoolId' => '<string>', // REQUIRED
    'Username' => '<string>', // REQUIRED
]);

Parameter Details

Members
EventId
  • Required: Yes
  • Type: string

The event ID.

FeedbackToken
  • Required: Yes
  • Type: string

The feedback token.

FeedbackValue
  • Required: Yes
  • Type: string

The authentication event feedback value.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID.

Username
  • Required: Yes
  • Type: string

The user pool username.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • UserPoolAddOnNotEnabledException:

    This exception is thrown when user pool add-ons are not enabled.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

UpdateDeviceStatus

$result = $client->updateDeviceStatus([/* ... */]);
$promise = $client->updateDeviceStatusAsync([/* ... */]);

Updates the device status.

Parameter Syntax

$result = $client->updateDeviceStatus([
    'AccessToken' => '<string>', // REQUIRED
    'DeviceKey' => '<string>', // REQUIRED
    'DeviceRememberedStatus' => 'remembered|not_remembered',
]);

Parameter Details

Members
AccessToken
  • Required: Yes
  • Type: string

The access token.

DeviceKey
  • Required: Yes
  • Type: string

The device key.

DeviceRememberedStatus
  • Type: string

The status of whether a device is remembered.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • InvalidUserPoolConfigurationException:

    This exception is thrown when the user pool configuration is invalid.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • PasswordResetRequiredException:

    This exception is thrown when a password reset is required.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • UserNotConfirmedException:

    This exception is thrown when a user is not confirmed successfully.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

UpdateGroup

$result = $client->updateGroup([/* ... */]);
$promise = $client->updateGroupAsync([/* ... */]);

Updates the specified group with the specified attributes.

Calling this action requires developer credentials.

If you don't provide a value for an attribute, it will be set to the default value.

Parameter Syntax

$result = $client->updateGroup([
    'Description' => '<string>',
    'GroupName' => '<string>', // REQUIRED
    'Precedence' => <integer>,
    'RoleArn' => '<string>',
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
Description
  • Type: string

A string containing the new description of the group.

GroupName
  • Required: Yes
  • Type: string

The name of the group.

Precedence
  • Type: int

The new precedence value for the group. For more information about this parameter, see CreateGroup.

RoleArn
  • Type: string

The new role ARN for the group. This is used for setting the cognito:roles and cognito:preferred_role claims in the token.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool.

Result Syntax

[
    'Group' => [
        'CreationDate' => <DateTime>,
        'Description' => '<string>',
        'GroupName' => '<string>',
        'LastModifiedDate' => <DateTime>,
        'Precedence' => <integer>,
        'RoleArn' => '<string>',
        'UserPoolId' => '<string>',
    ],
]

Result Details

Members
Group
  • Type: GroupType structure

The group object for the group.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

UpdateIdentityProvider

$result = $client->updateIdentityProvider([/* ... */]);
$promise = $client->updateIdentityProviderAsync([/* ... */]);

Updates identity provider information for a user pool.

Parameter Syntax

$result = $client->updateIdentityProvider([
    'AttributeMapping' => ['<string>', ...],
    'IdpIdentifiers' => ['<string>', ...],
    'ProviderDetails' => ['<string>', ...],
    'ProviderName' => '<string>', // REQUIRED
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
AttributeMapping
  • Type: Associative array of custom strings keys (AttributeMappingKeyType) to strings

The identity provider attribute mapping to be changed.

IdpIdentifiers
  • Type: Array of strings

A list of identity provider identifiers.

ProviderDetails
  • Type: Associative array of custom strings keys (StringType) to strings

The identity provider details to be updated, such as MetadataURL and MetadataFile.

ProviderName
  • Required: Yes
  • Type: string

The identity provider name.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID.

Result Syntax

[
    'IdentityProvider' => [
        'AttributeMapping' => ['<string>', ...],
        'CreationDate' => <DateTime>,
        'IdpIdentifiers' => ['<string>', ...],
        'LastModifiedDate' => <DateTime>,
        'ProviderDetails' => ['<string>', ...],
        'ProviderName' => '<string>',
        'ProviderType' => 'SAML|Facebook|Google|LoginWithAmazon|SignInWithApple|OIDC',
        'UserPoolId' => '<string>',
    ],
]

Result Details

Members
IdentityProvider
  • Required: Yes
  • Type: IdentityProviderType structure

The identity provider object.

Errors

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • UnsupportedIdentityProviderException:

    This exception is thrown when the specified identifier is not supported.

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

UpdateResourceServer

$result = $client->updateResourceServer([/* ... */]);
$promise = $client->updateResourceServerAsync([/* ... */]);

Updates the name and scopes of resource server. All other fields are read-only.

If you don't provide a value for an attribute, it will be set to the default value.

Parameter Syntax

$result = $client->updateResourceServer([
    'Identifier' => '<string>', // REQUIRED
    'Name' => '<string>', // REQUIRED
    'Scopes' => [
        [
            'ScopeDescription' => '<string>', // REQUIRED
            'ScopeName' => '<string>', // REQUIRED
        ],
        // ...
    ],
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
Identifier
  • Required: Yes
  • Type: string

The identifier for the resource server.

Name
  • Required: Yes
  • Type: string

The name of the resource server.

Scopes
  • Type: Array of ResourceServerScopeType structures

The scope values to be set for the resource server.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool.

Result Syntax

[
    'ResourceServer' => [
        'Identifier' => '<string>',
        'Name' => '<string>',
        'Scopes' => [
            [
                'ScopeDescription' => '<string>',
                'ScopeName' => '<string>',
            ],
            // ...
        ],
        'UserPoolId' => '<string>',
    ],
]

Result Details

Members
ResourceServer
  • Required: Yes
  • Type: ResourceServerType structure

The resource server.

Errors

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

UpdateUserAttributes

$result = $client->updateUserAttributes([/* ... */]);
$promise = $client->updateUserAttributesAsync([/* ... */]);

Allows a user to update a specific attribute (one at a time).

Parameter Syntax

$result = $client->updateUserAttributes([
    'AccessToken' => '<string>', // REQUIRED
    'ClientMetadata' => ['<string>', ...],
    'UserAttributes' => [ // REQUIRED
        [
            'Name' => '<string>', // REQUIRED
            'Value' => '<string>',
        ],
        // ...
    ],
]);

Parameter Details

Members
AccessToken
  • Required: Yes
  • Type: string

The access token for the request to update user attributes.

ClientMetadata
  • Type: Associative array of custom strings keys (StringType) to strings

A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.

You create custom workflows by assigning AWS Lambda functions to user pool triggers. When you use the UpdateUserAttributes API action, Amazon Cognito invokes the function that is assigned to the custom message trigger. When Amazon Cognito invokes this function, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your UpdateUserAttributes request. In your function code in AWS Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs.

For more information, see Customizing User Pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

Take the following limitations into consideration when you use the ClientMetadata parameter:

  • Amazon Cognito does not store the ClientMetadata value. This data is available only to AWS Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration does not include triggers, the ClientMetadata parameter serves no purpose.

  • Amazon Cognito does not validate the ClientMetadata value.

  • Amazon Cognito does not encrypt the the ClientMetadata value, so don't use it to provide sensitive information.

UserAttributes
  • Required: Yes
  • Type: Array of AttributeType structures

An array of name-value pairs representing user attributes.

For custom attributes, you must prepend the custom: prefix to the attribute name.

Result Syntax

[
    'CodeDeliveryDetailsList' => [
        [
            'AttributeName' => '<string>',
            'DeliveryMedium' => 'SMS|EMAIL',
            'Destination' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
CodeDeliveryDetailsList
  • Type: Array of CodeDeliveryDetailsType structures

The code delivery details list from the server for the request to update user attributes.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • CodeMismatchException:

    This exception is thrown if the provided code does not match what the server was expecting.

  • ExpiredCodeException:

    This exception is thrown if a code has expired.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • UnexpectedLambdaException:

    This exception is thrown when the Amazon Cognito service encounters an unexpected exception with the AWS Lambda service.

  • UserLambdaValidationException:

    This exception is thrown when the Amazon Cognito service encounters a user validation exception with the AWS Lambda service.

  • InvalidLambdaResponseException:

    This exception is thrown when the Amazon Cognito service encounters an invalid AWS Lambda response.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • AliasExistsException:

    This exception is thrown when a user tries to confirm the account with an email or phone number that has already been supplied as an alias from a different account. This exception tells user that an account with this email or phone already exists.

  • InvalidSmsRoleAccessPolicyException:

    This exception is returned when the role provided for SMS configuration does not have permission to publish using Amazon SNS.

  • InvalidSmsRoleTrustRelationshipException:

    This exception is thrown when the trust relationship is invalid for the role provided for SMS configuration. This can happen if you do not trust cognito-idp.amazonaws.com or the external ID provided in the role does not match what is provided in the SMS configuration for the user pool.

  • InvalidEmailRoleAccessPolicyException:

    This exception is thrown when Amazon Cognito is not allowed to use your email identity. HTTP status code: 400.

  • CodeDeliveryFailureException:

    This exception is thrown when a verification code fails to deliver successfully.

  • PasswordResetRequiredException:

    This exception is thrown when a password reset is required.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • UserNotConfirmedException:

    This exception is thrown when a user is not confirmed successfully.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

UpdateUserPool

$result = $client->updateUserPool([/* ... */]);
$promise = $client->updateUserPoolAsync([/* ... */]);

Updates the specified user pool with the specified attributes. You can get a list of the current user pool settings using DescribeUserPool.

If you don't provide a value for an attribute, it will be set to the default value.

Parameter Syntax

$result = $client->updateUserPool([
    'AccountRecoverySetting' => [
        'RecoveryMechanisms' => [
            [
                'Name' => 'verified_email|verified_phone_number|admin_only', // REQUIRED
                'Priority' => <integer>, // REQUIRED
            ],
            // ...
        ],
    ],
    'AdminCreateUserConfig' => [
        'AllowAdminCreateUserOnly' => true || false,
        'InviteMessageTemplate' => [
            'EmailMessage' => '<string>',
            'EmailSubject' => '<string>',
            'SMSMessage' => '<string>',
        ],
        'UnusedAccountValidityDays' => <integer>,
    ],
    'AutoVerifiedAttributes' => ['<string>', ...],
    'DeviceConfiguration' => [
        'ChallengeRequiredOnNewDevice' => true || false,
        'DeviceOnlyRememberedOnUserPrompt' => true || false,
    ],
    'EmailConfiguration' => [
        'ConfigurationSet' => '<string>',
        'EmailSendingAccount' => 'COGNITO_DEFAULT|DEVELOPER',
        'From' => '<string>',
        'ReplyToEmailAddress' => '<string>',
        'SourceArn' => '<string>',
    ],
    'EmailVerificationMessage' => '<string>',
    'EmailVerificationSubject' => '<string>',
    'LambdaConfig' => [
        'CreateAuthChallenge' => '<string>',
        'CustomEmailSender' => [
            'LambdaArn' => '<string>', // REQUIRED
            'LambdaVersion' => 'V1_0', // REQUIRED
        ],
        'CustomMessage' => '<string>',
        'CustomSMSSender' => [
            'LambdaArn' => '<string>', // REQUIRED
            'LambdaVersion' => 'V1_0', // REQUIRED
        ],
        'DefineAuthChallenge' => '<string>',
        'KMSKeyID' => '<string>',
        'PostAuthentication' => '<string>',
        'PostConfirmation' => '<string>',
        'PreAuthentication' => '<string>',
        'PreSignUp' => '<string>',
        'PreTokenGeneration' => '<string>',
        'UserMigration' => '<string>',
        'VerifyAuthChallengeResponse' => '<string>',
    ],
    'MfaConfiguration' => 'OFF|ON|OPTIONAL',
    'Policies' => [
        'PasswordPolicy' => [
            'MinimumLength' => <integer>,
            'RequireLowercase' => true || false,
            'RequireNumbers' => true || false,
            'RequireSymbols' => true || false,
            'RequireUppercase' => true || false,
            'TemporaryPasswordValidityDays' => <integer>,
        ],
    ],
    'SmsAuthenticationMessage' => '<string>',
    'SmsConfiguration' => [
        'ExternalId' => '<string>',
        'SnsCallerArn' => '<string>', // REQUIRED
    ],
    'SmsVerificationMessage' => '<string>',
    'UserPoolAddOns' => [
        'AdvancedSecurityMode' => 'OFF|AUDIT|ENFORCED', // REQUIRED
    ],
    'UserPoolId' => '<string>', // REQUIRED
    'UserPoolTags' => ['<string>', ...],
    'VerificationMessageTemplate' => [
        'DefaultEmailOption' => 'CONFIRM_WITH_LINK|CONFIRM_WITH_CODE',
        'EmailMessage' => '<string>',
        'EmailMessageByLink' => '<string>',
        'EmailSubject' => '<string>',
        'EmailSubjectByLink' => '<string>',
        'SmsMessage' => '<string>',
    ],
]);

Parameter Details

Members
AccountRecoverySetting
  • Type: AccountRecoverySettingType structure

Use this setting to define which verified available method a user can use to recover their password when they call ForgotPassword. It allows you to define a preferred method when a user has more than one method available. With this setting, SMS does not qualify for a valid password recovery mechanism if the user also has SMS MFA enabled. In the absence of this setting, Cognito uses the legacy behavior to determine the recovery method where SMS is preferred over email.

AdminCreateUserConfig
  • Type: AdminCreateUserConfigType structure

The configuration for AdminCreateUser requests.

AutoVerifiedAttributes
  • Type: Array of strings

The attributes that are automatically verified when the Amazon Cognito service makes a request to update user pools.

DeviceConfiguration
  • Type: DeviceConfigurationType structure

Device configuration.

EmailConfiguration
  • Type: EmailConfigurationType structure

Email configuration.

EmailVerificationMessage
  • Type: string

The contents of the email verification message.

EmailVerificationSubject
  • Type: string

The subject of the email verification message.

LambdaConfig
  • Type: LambdaConfigType structure

The AWS Lambda configuration information from the request to update the user pool.

MfaConfiguration
  • Type: string

Can be one of the following values:

  • OFF - MFA tokens are not required and cannot be specified during user registration.

  • ON - MFA tokens are required for all user registrations. You can only specify required when you are initially creating a user pool.

  • OPTIONAL - Users have the option when registering to create an MFA token.

Policies
  • Type: UserPoolPolicyType structure

A container with the policies you wish to update in a user pool.

SmsAuthenticationMessage
  • Type: string

The contents of the SMS authentication message.

SmsConfiguration
  • Type: SmsConfigurationType structure

SMS configuration.

SmsVerificationMessage
  • Type: string

A container with information about the SMS verification message.

UserPoolAddOns
  • Type: UserPoolAddOnsType structure

Used to enable advanced security risk detection. Set the key AdvancedSecurityMode to the value "AUDIT".

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool you want to update.

UserPoolTags
  • Type: Associative array of custom strings keys (TagKeysType) to strings

The tag keys and values to assign to the user pool. A tag is a label that you can use to categorize and manage user pools in different ways, such as by purpose, owner, environment, or other criteria.

VerificationMessageTemplate
  • Type: VerificationMessageTemplateType structure

The template for verification messages.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • ConcurrentModificationException:

    This exception is thrown if two or more modifications are happening concurrently.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • UserImportInProgressException:

    This exception is thrown when you are trying to modify a user pool while a user import job is in progress for that pool.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

  • InvalidSmsRoleAccessPolicyException:

    This exception is returned when the role provided for SMS configuration does not have permission to publish using Amazon SNS.

  • InvalidSmsRoleTrustRelationshipException:

    This exception is thrown when the trust relationship is invalid for the role provided for SMS configuration. This can happen if you do not trust cognito-idp.amazonaws.com or the external ID provided in the role does not match what is provided in the SMS configuration for the user pool.

  • UserPoolTaggingException:

    This exception is thrown when a user pool tag cannot be set or updated.

  • InvalidEmailRoleAccessPolicyException:

    This exception is thrown when Amazon Cognito is not allowed to use your email identity. HTTP status code: 400.

UpdateUserPoolClient

$result = $client->updateUserPoolClient([/* ... */]);
$promise = $client->updateUserPoolClientAsync([/* ... */]);

Updates the specified user pool app client with the specified attributes. You can get a list of the current user pool app client settings using DescribeUserPoolClient.

If you don't provide a value for an attribute, it will be set to the default value.

Parameter Syntax

$result = $client->updateUserPoolClient([
    'AccessTokenValidity' => <integer>,
    'AllowedOAuthFlows' => ['<string>', ...],
    'AllowedOAuthFlowsUserPoolClient' => true || false,
    'AllowedOAuthScopes' => ['<string>', ...],
    'AnalyticsConfiguration' => [
        'ApplicationArn' => '<string>',
        'ApplicationId' => '<string>',
        'ExternalId' => '<string>',
        'RoleArn' => '<string>',
        'UserDataShared' => true || false,
    ],
    'CallbackURLs' => ['<string>', ...],
    'ClientId' => '<string>', // REQUIRED
    'ClientName' => '<string>',
    'DefaultRedirectURI' => '<string>',
    'ExplicitAuthFlows' => ['<string>', ...],
    'IdTokenValidity' => <integer>,
    'LogoutURLs' => ['<string>', ...],
    'PreventUserExistenceErrors' => 'LEGACY|ENABLED',
    'ReadAttributes' => ['<string>', ...],
    'RefreshTokenValidity' => <integer>,
    'SupportedIdentityProviders' => ['<string>', ...],
    'TokenValidityUnits' => [
        'AccessToken' => 'seconds|minutes|hours|days',
        'IdToken' => 'seconds|minutes|hours|days',
        'RefreshToken' => 'seconds|minutes|hours|days',
    ],
    'UserPoolId' => '<string>', // REQUIRED
    'WriteAttributes' => ['<string>', ...],
]);

Parameter Details

Members
AccessTokenValidity
  • Type: int

The time limit, after which the access token is no longer valid and cannot be used.

AllowedOAuthFlows
  • Type: Array of strings

The allowed OAuth flows.

Set to code to initiate a code grant flow, which provides an authorization code as the response. This code can be exchanged for access tokens with the token endpoint.

Set to implicit to specify that the client should get the access token (and, optionally, ID token, based on scopes) directly.

Set to client_credentials to specify that the client should get the access token (and, optionally, ID token, based on scopes) from the token endpoint using a combination of client and client_secret.

AllowedOAuthFlowsUserPoolClient
  • Type: boolean

Set to true if the client is allowed to follow the OAuth protocol when interacting with Cognito user pools.

AllowedOAuthScopes
  • Type: Array of strings

The allowed OAuth scopes. Possible values provided by OAuth are: phone, email, openid, and profile. Possible values provided by AWS are: aws.cognito.signin.user.admin. Custom scopes created in Resource Servers are also supported.

AnalyticsConfiguration
  • Type: AnalyticsConfigurationType structure

The Amazon Pinpoint analytics configuration for collecting metrics for this user pool.

In regions where Pinpoint is not available, Cognito User Pools only supports sending events to Amazon Pinpoint projects in us-east-1. In regions where Pinpoint is available, Cognito User Pools will support sending events to Amazon Pinpoint projects within that same region.

CallbackURLs
  • Type: Array of strings

A list of allowed redirect (callback) URLs for the identity providers.

A redirect URI must:

  • Be an absolute URI.

  • Be registered with the authorization server.

  • Not include a fragment component.

See OAuth 2.0 - Redirection Endpoint.

Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes only.

App callback URLs such as myapp://example are also supported.

ClientId
  • Required: Yes
  • Type: string

The ID of the client associated with the user pool.

ClientName
  • Type: string

The client name from the update user pool client request.

DefaultRedirectURI
  • Type: string

The default redirect URI. Must be in the CallbackURLs list.

A redirect URI must:

  • Be an absolute URI.

  • Be registered with the authorization server.

  • Not include a fragment component.

See OAuth 2.0 - Redirection Endpoint.

Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes only.

App callback URLs such as myapp://example are also supported.

ExplicitAuthFlows
  • Type: Array of strings

The authentication flows that are supported by the user pool clients. Flow names without the ALLOW_ prefix are deprecated in favor of new names with the ALLOW_ prefix. Note that values with ALLOW_ prefix cannot be used along with values without ALLOW_ prefix.

Valid values include:

  • ALLOW_ADMIN_USER_PASSWORD_AUTH: Enable admin based user password authentication flow ADMIN_USER_PASSWORD_AUTH. This setting replaces the ADMIN_NO_SRP_AUTH setting. With this authentication flow, Cognito receives the password in the request instead of using the SRP (Secure Remote Password protocol) protocol to verify passwords.

  • ALLOW_CUSTOM_AUTH: Enable Lambda trigger based authentication.

  • ALLOW_USER_PASSWORD_AUTH: Enable user password-based authentication. In this flow, Cognito receives the password in the request instead of using the SRP protocol to verify passwords.

  • ALLOW_USER_SRP_AUTH: Enable SRP based authentication.

  • ALLOW_REFRESH_TOKEN_AUTH: Enable authflow to refresh tokens.

IdTokenValidity
  • Type: int

The time limit, after which the ID token is no longer valid and cannot be used.

LogoutURLs
  • Type: Array of strings

A list of allowed logout URLs for the identity providers.

PreventUserExistenceErrors
  • Type: string

Use this setting to choose which errors and responses are returned by Cognito APIs during authentication, account confirmation, and password recovery when the user does not exist in the user pool. When set to ENABLED and the user does not exist, authentication returns an error indicating either the username or password was incorrect, and account confirmation and password recovery return a response indicating a code was sent to a simulated destination. When set to LEGACY, those APIs will return a UserNotFoundException exception if the user does not exist in the user pool.

Valid values include:

  • ENABLED - This prevents user existence-related errors.

  • LEGACY - This represents the old behavior of Cognito where user existence related errors are not prevented.

After February 15th 2020, the value of PreventUserExistenceErrors will default to ENABLED for newly created user pool clients if no value is provided.

ReadAttributes
  • Type: Array of strings

The read-only attributes of the user pool.

RefreshTokenValidity
  • Type: int

The time limit, in days, after which the refresh token is no longer valid and cannot be used.

SupportedIdentityProviders
  • Type: Array of strings

A list of provider names for the identity providers that are supported on this client.

TokenValidityUnits
  • Type: TokenValidityUnitsType structure

The units in which the validity times are represented in. Default for RefreshToken is days, and default for ID and access tokens are hours.

UserPoolId
  • Required: Yes
  • Type: string

The user pool ID for the user pool where you want to update the user pool client.

WriteAttributes
  • Type: Array of strings

The writeable attributes of the user pool.

Result Syntax

[
    'UserPoolClient' => [
        'AccessTokenValidity' => <integer>,
        'AllowedOAuthFlows' => ['<string>', ...],
        'AllowedOAuthFlowsUserPoolClient' => true || false,
        'AllowedOAuthScopes' => ['<string>', ...],
        'AnalyticsConfiguration' => [
            'ApplicationArn' => '<string>',
            'ApplicationId' => '<string>',
            'ExternalId' => '<string>',
            'RoleArn' => '<string>',
            'UserDataShared' => true || false,
        ],
        'CallbackURLs' => ['<string>', ...],
        'ClientId' => '<string>',
        'ClientName' => '<string>',
        'ClientSecret' => '<string>',
        'CreationDate' => <DateTime>,
        'DefaultRedirectURI' => '<string>',
        'ExplicitAuthFlows' => ['<string>', ...],
        'IdTokenValidity' => <integer>,
        'LastModifiedDate' => <DateTime>,
        'LogoutURLs' => ['<string>', ...],
        'PreventUserExistenceErrors' => 'LEGACY|ENABLED',
        'ReadAttributes' => ['<string>', ...],
        'RefreshTokenValidity' => <integer>,
        'SupportedIdentityProviders' => ['<string>', ...],
        'TokenValidityUnits' => [
            'AccessToken' => 'seconds|minutes|hours|days',
            'IdToken' => 'seconds|minutes|hours|days',
            'RefreshToken' => 'seconds|minutes|hours|days',
        ],
        'UserPoolId' => '<string>',
        'WriteAttributes' => ['<string>', ...],
    ],
]

Result Details

Members
UserPoolClient
  • Type: UserPoolClientType structure

The user pool client value from the response from the server when an update user pool client request is made.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • ConcurrentModificationException:

    This exception is thrown if two or more modifications are happening concurrently.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • ScopeDoesNotExistException:

    This exception is thrown when the specified scope does not exist.

  • InvalidOAuthFlowException:

    This exception is thrown when the specified OAuth flow is invalid.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

UpdateUserPoolDomain

$result = $client->updateUserPoolDomain([/* ... */]);
$promise = $client->updateUserPoolDomainAsync([/* ... */]);

Updates the Secure Sockets Layer (SSL) certificate for the custom domain for your user pool.

You can use this operation to provide the Amazon Resource Name (ARN) of a new certificate to Amazon Cognito. You cannot use it to change the domain for a user pool.

A custom domain is used to host the Amazon Cognito hosted UI, which provides sign-up and sign-in pages for your application. When you set up a custom domain, you provide a certificate that you manage with AWS Certificate Manager (ACM). When necessary, you can use this operation to change the certificate that you applied to your custom domain.

Usually, this is unnecessary following routine certificate renewal with ACM. When you renew your existing certificate in ACM, the ARN for your certificate remains the same, and your custom domain uses the new certificate automatically.

However, if you replace your existing certificate with a new one, ACM gives the new certificate a new ARN. To apply the new certificate to your custom domain, you must provide this ARN to Amazon Cognito.

When you add your new certificate in ACM, you must choose US East (N. Virginia) as the AWS Region.

After you submit your request, Amazon Cognito requires up to 1 hour to distribute your new certificate to your custom domain.

For more information about adding a custom domain to your user pool, see Using Your Own Domain for the Hosted UI.

Parameter Syntax

$result = $client->updateUserPoolDomain([
    'CustomDomainConfig' => [ // REQUIRED
        'CertificateArn' => '<string>', // REQUIRED
    ],
    'Domain' => '<string>', // REQUIRED
    'UserPoolId' => '<string>', // REQUIRED
]);

Parameter Details

Members
CustomDomainConfig
  • Required: Yes
  • Type: CustomDomainConfigType structure

The configuration for a custom domain that hosts the sign-up and sign-in pages for your application. Use this object to specify an SSL certificate that is managed by ACM.

Domain
  • Required: Yes
  • Type: string

The domain name for the custom domain that hosts the sign-up and sign-in pages for your application. For example: auth.example.com.

This string can include only lowercase letters, numbers, and hyphens. Do not use a hyphen for the first or last character. Use periods to separate subdomain names.

UserPoolId
  • Required: Yes
  • Type: string

The ID of the user pool that is associated with the custom domain that you are updating the certificate for.

Result Syntax

[
    'CloudFrontDomain' => '<string>',
]

Result Details

Members
CloudFrontDomain
  • Type: string

The Amazon CloudFront endpoint that Amazon Cognito set up when you added the custom domain to your user pool.

Errors

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

VerifySoftwareToken

$result = $client->verifySoftwareToken([/* ... */]);
$promise = $client->verifySoftwareTokenAsync([/* ... */]);

Use this API to register a user's entered TOTP code and mark the user's software token MFA status as "verified" if successful. The request takes an access token or a session string, but not both.

Parameter Syntax

$result = $client->verifySoftwareToken([
    'AccessToken' => '<string>',
    'FriendlyDeviceName' => '<string>',
    'Session' => '<string>',
    'UserCode' => '<string>', // REQUIRED
]);

Parameter Details

Members
AccessToken
  • Type: string

The access token.

FriendlyDeviceName
  • Type: string

The friendly device name.

Session
  • Type: string

The session which should be passed both ways in challenge-response calls to the service.

UserCode
  • Required: Yes
  • Type: string

The one time password computed using the secret code returned by AssociateSoftwareToken".

Result Syntax

[
    'Session' => '<string>',
    'Status' => 'SUCCESS|ERROR',
]

Result Details

Members
Session
  • Type: string

The session which should be passed both ways in challenge-response calls to the service.

Status
  • Type: string

The status of the verify software token.

Errors

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidUserPoolConfigurationException:

    This exception is thrown when the user pool configuration is invalid.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • PasswordResetRequiredException:

    This exception is thrown when a password reset is required.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • UserNotConfirmedException:

    This exception is thrown when a user is not confirmed successfully.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

  • EnableSoftwareTokenMFAException:

    This exception is thrown when there is a code mismatch and the service fails to configure the software token TOTP multi-factor authentication (MFA).

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • SoftwareTokenMFANotFoundException:

    This exception is thrown when the software token TOTP multi-factor authentication (MFA) is not enabled for the user pool.

  • CodeMismatchException:

    This exception is thrown if the provided code does not match what the server was expecting.

VerifyUserAttribute

$result = $client->verifyUserAttribute([/* ... */]);
$promise = $client->verifyUserAttributeAsync([/* ... */]);

Verifies the specified user attributes in the user pool.

Parameter Syntax

$result = $client->verifyUserAttribute([
    'AccessToken' => '<string>', // REQUIRED
    'AttributeName' => '<string>', // REQUIRED
    'Code' => '<string>', // REQUIRED
]);

Parameter Details

Members
AccessToken
  • Required: Yes
  • Type: string

Represents the access token of the request to verify user attributes.

AttributeName
  • Required: Yes
  • Type: string

The attribute name in the request to verify user attributes.

Code
  • Required: Yes
  • Type: string

The verification code in the request to verify user attributes.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

  • ResourceNotFoundException:

    This exception is thrown when the Amazon Cognito service cannot find the requested resource.

  • InvalidParameterException:

    This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

  • CodeMismatchException:

    This exception is thrown if the provided code does not match what the server was expecting.

  • ExpiredCodeException:

    This exception is thrown if a code has expired.

  • NotAuthorizedException:

    This exception is thrown when a user is not authorized.

  • TooManyRequestsException:

    This exception is thrown when the user has made too many requests for a given operation.

  • LimitExceededException:

    This exception is thrown when a user exceeds the limit for a requested AWS resource.

  • PasswordResetRequiredException:

    This exception is thrown when a password reset is required.

  • UserNotFoundException:

    This exception is thrown when a user is not found.

  • UserNotConfirmedException:

    This exception is thrown when a user is not confirmed successfully.

  • InternalErrorException:

    This exception is thrown when Amazon Cognito encounters an internal error.

Shapes

AccountRecoverySettingType

Description

The data type for AccountRecoverySetting.

Members
RecoveryMechanisms
  • Type: Array of RecoveryOptionType structures

The list of RecoveryOptionTypes.

AccountTakeoverActionType

Description

Account takeover action type.

Members
EventAction
  • Required: Yes
  • Type: string

The event action.

  • BLOCK Choosing this action will block the request.

  • MFA_IF_CONFIGURED Throw MFA challenge if user has configured it, else allow the request.

  • MFA_REQUIRED Throw MFA challenge if user has configured it, else block the request.

  • NO_ACTION Allow the user sign-in.

Notify
  • Required: Yes
  • Type: boolean

Flag specifying whether to send a notification.

AccountTakeoverActionsType

Description

Account takeover actions type.

Members
HighAction
  • Type: AccountTakeoverActionType structure

Action to take for a high risk.

LowAction
  • Type: AccountTakeoverActionType structure

Action to take for a low risk.

MediumAction
  • Type: AccountTakeoverActionType structure

Action to take for a medium risk.

AccountTakeoverRiskConfigurationType

Description

Configuration for mitigation actions and notification for different levels of risk detected for a potential account takeover.

Members
Actions
  • Required: Yes
  • Type: AccountTakeoverActionsType structure

Account takeover risk configuration actions

NotifyConfiguration
  • Type: NotifyConfigurationType structure

The notify configuration used to construct email notifications.

AdminCreateUserConfigType

Description

The configuration for creating a new user profile.

Members
AllowAdminCreateUserOnly
  • Type: boolean

Set to True if only the administrator is allowed to create user profiles. Set to False if users can sign themselves up via an app.

InviteMessageTemplate
  • Type: MessageTemplateType structure

The message template to be used for the welcome message to new users.

See also Customizing User Invitation Messages.

UnusedAccountValidityDays
  • Type: int

The user account expiration limit, in days, after which the account is no longer usable. To reset the account after that time limit, you must call AdminCreateUser again, specifying "RESEND" for the MessageAction parameter. The default value for this parameter is 7.

If you set a value for TemporaryPasswordValidityDays in PasswordPolicy, that value will be used and UnusedAccountValidityDays will be deprecated for that user pool.

AliasExistsException

Description

This exception is thrown when a user tries to confirm the account with an email or phone number that has already been supplied as an alias from a different account. This exception tells user that an account with this email or phone already exists.

Members
message
  • Type: string

The message sent to the user when an alias exists.

AnalyticsConfigurationType

Description

The Amazon Pinpoint analytics configuration for collecting metrics for a user pool.

In regions where Pinpoint is not available, Cognito User Pools only supports sending events to Amazon Pinpoint projects in us-east-1. In regions where Pinpoint is available, Cognito User Pools will support sending events to Amazon Pinpoint projects within that same region.

Members
ApplicationArn
  • Type: string

The Amazon Resource Name (ARN) of an Amazon Pinpoint project. You can use the Amazon Pinpoint project for Pinpoint integration with the chosen User Pool Client. Amazon Cognito publishes events to the pinpoint project declared by the app ARN.

ApplicationId
  • Type: string

The application ID for an Amazon Pinpoint application.

ExternalId
  • Type: string

The external ID.

RoleArn
  • Type: string

The ARN of an IAM role that authorizes Amazon Cognito to publish events to Amazon Pinpoint analytics.

UserDataShared
  • Type: boolean

If UserDataShared is true, Amazon Cognito will include user data in the events it publishes to Amazon Pinpoint analytics.

AnalyticsMetadataType

Description

An Amazon Pinpoint analytics endpoint.

An endpoint uniquely identifies a mobile device, email address, or phone number that can receive messages from Amazon Pinpoint analytics.

Cognito User Pools only supports sending events to Amazon Pinpoint projects in the US East (N. Virginia) us-east-1 Region, regardless of the region in which the user pool resides.

Members
AnalyticsEndpointId
  • Type: string

The endpoint ID.

AttributeType

Description

Specifies whether the attribute is standard or custom.

Members
Name
  • Required: Yes
  • Type: string

The name of the attribute.

Value
  • Type: string

The value of the attribute.

AuthEventType

Description

The authentication event type.

Members
ChallengeResponses
  • Type: Array of ChallengeResponseType structures

The challenge responses.

CreationDate
  • Type: timestamp (string|DateTime or anything parsable by strtotime)

The creation date

EventContextData
  • Type: EventContextDataType structure

The user context data captured at the time of an event request. It provides additional information about the client from which event the request is received.

EventFeedback
  • Type: EventFeedbackType structure

A flag specifying the user feedback captured at the time of an event request is good or bad.

EventId
  • Type: string

The event ID.

EventResponse
  • Type: string

The event response.

EventRisk
  • Type: EventRiskType structure

The event risk.

EventType
  • Type: string

The event type.

AuthenticationResultType

Description

The authentication result.

Members
AccessToken
  • Type: string

The access token.

ExpiresIn
  • Type: int

The expiration period of the authentication result in seconds.

IdToken
  • Type: string

The ID token.

NewDeviceMetadata
  • Type: NewDeviceMetadataType structure

The new device metadata from an authentication result.

RefreshToken
  • Type: string

The refresh token.

TokenType
  • Type: string

The token type.

ChallengeResponseType

Description

The challenge response type.

Members
ChallengeName
  • Type: string

The challenge name

ChallengeResponse
  • Type: string

The challenge response.

CodeDeliveryDetailsType

Description

The code delivery details being returned from the server.

Members
AttributeName
  • Type: string

The attribute name.

DeliveryMedium
  • Type: string

The delivery medium (email message or phone number).

Destination
  • Type: string

The destination for the code delivery details.

CodeDeliveryFailureException

Description

This exception is thrown when a verification code fails to deliver successfully.

Members
message
  • Type: string

The message sent when a verification code fails to deliver successfully.

CodeMismatchException

Description

This exception is thrown if the provided code does not match what the server was expecting.

Members
message
  • Type: string

The message provided when the code mismatch exception is thrown.

CompromisedCredentialsActionsType

Description

The compromised credentials actions type

Members
EventAction
  • Required: Yes
  • Type: string

The event action.

CompromisedCredentialsRiskConfigurationType

Description

The compromised credentials risk configuration type.

Members
Actions
  • Required: Yes
  • Type: CompromisedCredentialsActionsType structure

The compromised credentials risk configuration actions.

EventFilter
  • Type: Array of strings

Perform the action for these events. The default is to perform all events if no event filter is specified.

ConcurrentModificationException

Description

This exception is thrown if two or more modifications are happening concurrently.

Members
message
  • Type: string

The message provided when the concurrent exception is thrown.

ContextDataType

Description

Contextual user data type used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

Members
EncodedData
  • Type: string

Encoded data containing device fingerprinting details, collected using the Amazon Cognito context data collection library.

HttpHeaders
  • Required: Yes
  • Type: Array of HttpHeader structures

HttpHeaders received on your server in same order.

IpAddress
  • Required: Yes
  • Type: string

Source IP address of your user.

ServerName
  • Required: Yes
  • Type: string

Your server endpoint where this API is invoked.

ServerPath
  • Required: Yes
  • Type: string

Your server path where this API is invoked.

CustomDomainConfigType

Description

The configuration for a custom domain that hosts the sign-up and sign-in webpages for your application.

Members
CertificateArn
  • Required: Yes
  • Type: string

The Amazon Resource Name (ARN) of an AWS Certificate Manager SSL certificate. You use this certificate for the subdomain of your custom domain.

CustomEmailLambdaVersionConfigType

Description

A custom email sender Lambda configuration type.

Members
LambdaArn
  • Required: Yes
  • Type: string

The Lambda Amazon Resource Name of the Lambda function that Amazon Cognito triggers to send email notifications to users.

LambdaVersion
  • Required: Yes
  • Type: string

The Lambda version represents the signature of the "request" attribute in the "event" information Amazon Cognito passes to your custom email Lambda function. The only supported value is V1_0.

CustomSMSLambdaVersionConfigType

Description

A custom SMS sender Lambda configuration type.

Members
LambdaArn
  • Required: Yes
  • Type: string

The Lambda Amazon Resource Name of the Lambda function that Amazon Cognito triggers to send SMS notifications to users.

LambdaVersion
  • Required: Yes
  • Type: string

The Lambda version represents the signature of the "request" attribute in the "event" information Amazon Cognito passes to your custom SMS Lambda function. The only supported value is V1_0.

DeviceConfigurationType

Description

The configuration for the user pool's device tracking.

Members
ChallengeRequiredOnNewDevice
  • Type: boolean

Indicates whether a challenge is required on a new device. Only applicable to a new device.

DeviceOnlyRememberedOnUserPrompt
  • Type: boolean

If true, a device is only remembered on user prompt.

DeviceSecretVerifierConfigType

Description

The device verifier against which it will be authenticated.

Members
PasswordVerifier
  • Type: string

The password verifier.

Salt
  • Type: string

The salt.

DeviceType

Description

The device type.

Members
DeviceAttributes
  • Type: Array of AttributeType structures

The device attributes.

DeviceCreateDate
  • Type: timestamp (string|DateTime or anything parsable by strtotime)

The creation date of the device.

DeviceKey
  • Type: string

The device key.

DeviceLastAuthenticatedDate
  • Type: timestamp (string|DateTime or anything parsable by strtotime)

The date in which the device was last authenticated.

DeviceLastModifiedDate
  • Type: timestamp (string|DateTime or anything parsable by strtotime)

The last modified date of the device.

DomainDescriptionType

Description

A container for information about a domain.

Members
AWSAccountId
  • Type: string

The AWS account ID for the user pool owner.

CloudFrontDistribution
  • Type: string

The ARN of the CloudFront distribution.

CustomDomainConfig
  • Type: CustomDomainConfigType structure

The configuration for a custom domain that hosts the sign-up and sign-in webpages for your application.

Domain
  • Type: string

The domain string.

S3Bucket
  • Type: string

The S3 bucket where the static files for this domain are stored.

Status
  • Type: string

The domain status.

UserPoolId
  • Type: string

The user pool ID.

Version
  • Type: string

The app version.

DuplicateProviderException

Description

This exception is thrown when the provider is already supported by the user pool.

Members
message
  • Type: string

EmailConfigurationType

Description

The email configuration type.

Amazon Cognito has specific regions for use with Amazon SES. For more information on the supported regions, see Email Settings for Amazon Cognito User Pools.

Members
ConfigurationSet
  • Type: string

The set of configuration rules that can be applied to emails sent using Amazon SES. A configuration set is applied to an email by including a reference to the configuration set in the headers of the email. Once applied, all of the rules in that configuration set are applied to the email. Configuration sets can be used to apply the following types of rules to emails:

  • Event publishing – Amazon SES can track the number of send, delivery, open, click, bounce, and complaint events for each email sent. Use event publishing to send information about these events to other AWS services such as SNS and CloudWatch.

  • IP pool management – When leasing dedicated IP addresses with Amazon SES, you can create groups of IP addresses, called dedicated IP pools. You can then associate the dedicated IP pools with configuration sets.

EmailSendingAccount
  • Type: string

Specifies whether Amazon Cognito emails your users by using its built-in email functionality or your Amazon SES email configuration. Specify one of the following values:

COGNITO_DEFAULT

When Amazon Cognito emails your users, it uses its built-in email functionality. When you use the default option, Amazon Cognito allows only a limited number of emails each day for your user pool. For typical production environments, the default email limit is below the required delivery volume. To achieve a higher delivery volume, specify DEVELOPER to use your Amazon SES email configuration.

To look up the email delivery limit for the default option, see Limits in Amazon Cognito in the Amazon Cognito Developer Guide.

The default FROM address is no-reply@verificationemail.com. To customize the FROM address, provide the ARN of an Amazon SES verified email address for the SourceArn parameter.

If EmailSendingAccount is COGNITO_DEFAULT, the following parameters aren't allowed:

  • EmailVerificationMessage

  • EmailVerificationSubject

  • InviteMessageTemplate.EmailMessage

  • InviteMessageTemplate.EmailSubject

  • VerificationMessageTemplate.EmailMessage

  • VerificationMessageTemplate.EmailMessageByLink

  • VerificationMessageTemplate.EmailSubject,

  • VerificationMessageTemplate.EmailSubjectByLink

DEVELOPER EmailSendingAccount is required.

DEVELOPER

When Amazon Cognito emails your users, it uses your Amazon SES configuration. Amazon Cognito calls Amazon SES on your behalf to send email from your verified email address. When you use this option, the email delivery limits are the same limits that apply to your Amazon SES verified email address in your AWS account.

If you use this option, you must provide the ARN of an Amazon SES verified email address for the SourceArn parameter.

Before Amazon Cognito can email your users, it requires additional permissions to call Amazon SES on your behalf. When you update your user pool with this option, Amazon Cognito creates a service-linked role, which is a type of IAM role, in your AWS account. This role contains the permissions that allow Amazon Cognito to access Amazon SES and send email messages with your address. For more information about the service-linked role that Amazon Cognito creates, see Using Service-Linked Roles for Amazon Cognito in the Amazon Cognito Developer Guide.

From
  • Type: string

Identifies either the sender’s email address or the sender’s name with their email address. For example, testuser@example.com or Test User <testuser@example.com>. This address will appear before the body of the email.

ReplyToEmailAddress
  • Type: string

The destination to which the receiver of the email should reply to.

SourceArn
  • Type: string

The Amazon Resource Name (ARN) of a verified email address in Amazon SES. This email address is used in one of the following ways, depending on the value that you specify for the EmailSendingAccount parameter:

  • If you specify COGNITO_DEFAULT, Amazon Cognito uses this address as the custom FROM address when it emails your users by using its built-in email account.

  • If you specify DEVELOPER, Amazon Cognito emails your users with this address by calling Amazon SES on your behalf.

EnableSoftwareTokenMFAException

Description

This exception is thrown when there is a code mismatch and the service fails to configure the software token TOTP multi-factor authentication (MFA).

Members
message
  • Type: string

EventContextDataType

Description

Specifies the user context data captured at the time of an event request.

Members
City
  • Type: string

The user's city.

Country
  • Type: string

The user's country.

DeviceName
  • Type: string

The user's device name.

IpAddress
  • Type: string

The user's IP address.

Timezone
  • Type: string

The user's time zone.

EventFeedbackType

Description

Specifies the event feedback type.

Members
FeedbackDate
  • Type: timestamp (string|DateTime or anything parsable by strtotime)

The event feedback date.

FeedbackValue
  • Required: Yes
  • Type: string

The event feedback value.

Provider
  • Required: Yes
  • Type: string

The provider.

EventRiskType

Description

The event risk type.

Members
CompromisedCredentialsDetected
  • Type: boolean

Indicates whether compromised credentials were detected during an authentication event.

RiskDecision
  • Type: string

The risk decision.

RiskLevel
  • Type: string

The risk level.

ExpiredCodeException

Description

This exception is thrown if a code has expired.

Members
message
  • Type: string

The message returned when the expired code exception is thrown.

GroupExistsException

Description

This exception is thrown when Amazon Cognito encounters a group that already exists in the user pool.

Members
message
  • Type: string

GroupType

Description

The group type.

Members
CreationDate
  • Type: timestamp (string|DateTime or anything parsable by strtotime)

The date the group was created.

Description
  • Type: string

A string containing the description of the group.

GroupName
  • Type: string

The name of the group.

LastModifiedDate
  • Type: timestamp (string|DateTime or anything parsable by strtotime)

The date the group was last modified.

Precedence
  • Type: int

A nonnegative integer value that specifies the precedence of this group relative to the other groups that a user can belong to in the user pool. If a user belongs to two or more groups, it is the group with the highest precedence whose role ARN will be used in the cognito:roles and cognito:preferred_role claims in the user's tokens. Groups with higher Precedence values take precedence over groups with lower Precedence values or with null Precedence values.

Two groups can have the same Precedence value. If this happens, neither group takes precedence over the other. If two groups with the same Precedence have the same role ARN, that role is used in the cognito:preferred_role claim in tokens for users in each group. If the two groups have different role ARNs, the cognito:preferred_role claim is not set in users' tokens.

The default Precedence value is null.

RoleArn
  • Type: string

The role ARN for the group.

UserPoolId
  • Type: string

The user pool ID for the user pool.

HttpHeader

Description

The HTTP header.

Members
headerName
  • Type: string

The header name

headerValue
  • Type: string

The header value.

IdentityProviderType

Description

A container for information about an identity provider.

Members
AttributeMapping
  • Type: Associative array of custom strings keys (AttributeMappingKeyType) to strings

A mapping of identity provider attributes to standard and custom user pool attributes.

CreationDate
  • Type: timestamp (string|DateTime or anything parsable by strtotime)

The date the identity provider was created.

IdpIdentifiers
  • Type: Array of strings

A list of identity provider identifiers.

LastModifiedDate
  • Type: timestamp (string|DateTime or anything parsable by strtotime)

The date the identity provider was last modified.

ProviderDetails
  • Type: Associative array of custom strings keys (StringType) to strings

The identity provider details. The following list describes the provider detail keys for each identity provider type.

  • For Google and Login with Amazon:

    • client_id

    • client_secret

    • authorize_scopes

  • For Facebook:

    • client_id

    • client_secret

    • authorize_scopes

    • api_version

  • For Sign in with Apple:

    • client_id

    • team_id

    • key_id

    • private_key

    • authorize_scopes

  • For OIDC providers:

    • client_id

    • client_secret

    • attributes_request_method

    • oidc_issuer

    • authorize_scopes

    • authorize_url if not available from discovery URL specified by oidc_issuer key

    • token_url if not available from discovery URL specified by oidc_issuer key

    • attributes_url if not available from discovery URL specified by oidc_issuer key

    • jwks_uri if not available from discovery URL specified by oidc_issuer key

    • authorize_scopes

  • For SAML providers:

    • MetadataFile OR MetadataURL

    • IDPSignOut optional

ProviderName
  • Type: string

The identity provider name.

ProviderType
  • Type: string

The identity provider type.

UserPoolId
  • Type: string

The user pool ID.

InternalErrorException

Description

This exception is thrown when Amazon Cognito encounters an internal error.

Members
message
  • Type: string

The message returned when Amazon Cognito throws an internal error exception.

InvalidEmailRoleAccessPolicyException

Description

This exception is thrown when Amazon Cognito is not allowed to use your email identity. HTTP status code: 400.

Members
message
  • Type: string

The message returned when you have an unverified email address or the identity policy is not set on an email address that Amazon Cognito can access.

InvalidLambdaResponseException

Description

This exception is thrown when the Amazon Cognito service encounters an invalid AWS Lambda response.

Members
message
  • Type: string

The message returned when the Amazon Cognito service throws an invalid AWS Lambda response exception.

InvalidOAuthFlowException

Description

This exception is thrown when the specified OAuth flow is invalid.

Members
message
  • Type: string

InvalidParameterException

Description

This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

Members
message
  • Type: string

The message returned when the Amazon Cognito service throws an invalid parameter exception.

InvalidPasswordException

Description

This exception is thrown when the Amazon Cognito service encounters an invalid password.

Members
message
  • Type: string

The message returned when the Amazon Cognito service throws an invalid user password exception.

InvalidSmsRoleAccessPolicyException

Description

This exception is returned when the role provided for SMS configuration does not have permission to publish using Amazon SNS.

Members
message
  • Type: string

The message retuned when the invalid SMS role access policy exception is thrown.

InvalidSmsRoleTrustRelationshipException

Description

This exception is thrown when the trust relationship is invalid for the role provided for SMS configuration. This can happen if you do not trust cognito-idp.amazonaws.com or the external ID provided in the role does not match what is provided in the SMS configuration for the user pool.

Members
message
  • Type: string

The message returned when the role trust relationship for the SMS message is invalid.

InvalidUserPoolConfigurationException

Description

This exception is thrown when the user pool configuration is invalid.

Members
message
  • Type: string

The message returned when the user pool configuration is invalid.

LambdaConfigType

Description

Specifies the configuration for AWS Lambda triggers.

Members
CreateAuthChallenge
  • Type: string

Creates an authentication challenge.

CustomEmailSender
  • Type: CustomEmailLambdaVersionConfigType structure

A custom email sender AWS Lambda trigger.

CustomMessage
  • Type: string

A custom Message AWS Lambda trigger.

CustomSMSSender
  • Type: CustomSMSLambdaVersionConfigType structure

A custom SMS sender AWS Lambda trigger.

DefineAuthChallenge
  • Type: string

Defines the authentication challenge.

KMSKeyID
  • Type: string

The Amazon Resource Name of Key Management Service Customer master keys . Amazon Cognito uses the key to encrypt codes and temporary passwords sent to CustomEmailSender and CustomSMSSender.

PostAuthentication
  • Type: string

A post-authentication AWS Lambda trigger.

PostConfirmation
  • Type: string

A post-confirmation AWS Lambda trigger.

PreAuthentication
  • Type: string

A pre-authentication AWS Lambda trigger.

PreSignUp
  • Type: string

A pre-registration AWS Lambda trigger.

PreTokenGeneration
  • Type: string

A Lambda trigger that is invoked before token generation.

UserMigration
  • Type: string

The user migration Lambda config type.

VerifyAuthChallengeResponse
  • Type: string

Verifies the authentication challenge response.

LimitExceededException

Description

This exception is thrown when a user exceeds the limit for a requested AWS resource.

Members
message
  • Type: string

The message returned when Amazon Cognito throws a limit exceeded exception.

MFAMethodNotFoundException

Description

This exception is thrown when Amazon Cognito cannot find a multi-factor authentication (MFA) method.

Members
message
  • Type: string

The message returned when Amazon Cognito throws an MFA method not found exception.

MFAOptionType

Description

This data type is no longer supported. You can use it only for SMS MFA configurations. You can't use it for TOTP software token MFA configurations.

Members
AttributeName
  • Type: string

The attribute name of the MFA option type. The only valid value is phone_number.

DeliveryMedium
  • Type: string

The delivery medium to send the MFA code. You can use this parameter to set only the SMS delivery medium value.

MessageTemplateType

Description

The message template structure.

Members
EmailMessage
  • Type: string

The message template for email messages. EmailMessage is allowed only if EmailSendingAccount is DEVELOPER.

EmailSubject
  • Type: string

The subject line for email messages. EmailSubject is allowed only if EmailSendingAccount is DEVELOPER.

SMSMessage
  • Type: string

The message template for SMS messages.

NewDeviceMetadataType

Description

The new device metadata type.

Members
DeviceGroupKey
  • Type: string

The device group key.

DeviceKey
  • Type: string

The device key.

NotAuthorizedException

Description

This exception is thrown when a user is not authorized.

Members
message
  • Type: string

The message returned when the Amazon Cognito service returns a not authorized exception.

NotifyConfigurationType

Description

The notify configuration type.

Members
BlockEmail
  • Type: NotifyEmailType structure

Email template used when a detected risk event is blocked.

From
  • Type: string

The email address that is sending the email. It must be either individually verified with Amazon SES, or from a domain that has been verified with Amazon SES.

MfaEmail
  • Type: NotifyEmailType structure

The MFA email template used when MFA is challenged as part of a detected risk.

NoActionEmail
  • Type: NotifyEmailType structure

The email template used when a detected risk event is allowed.

ReplyTo
  • Type: string

The destination to which the receiver of an email should reply to.

SourceArn
  • Required: Yes
  • Type: string

The Amazon Resource Name (ARN) of the identity that is associated with the sending authorization policy. It permits Amazon Cognito to send for the email address specified in the From parameter.

NotifyEmailType

Description

The notify email type.

Members
HtmlBody
  • Type: string

The HTML body.

Subject
  • Required: Yes
  • Type: string

The subject.

TextBody
  • Type: string

The text body.

NumberAttributeConstraintsType

Description

The minimum and maximum value of an attribute that is of the number data type.

Members
MaxValue
  • Type: string

The maximum value of an attribute that is of the number data type.

MinValue
  • Type: string

The minimum value of an attribute that is of the number data type.

PasswordPolicyType

Description

The password policy type.

Members
MinimumLength
  • Type: int

The minimum length of the password policy that you have set. Cannot be less than 6.

RequireLowercase
  • Type: boolean

In the password policy that you have set, refers to whether you have required users to use at least one lowercase letter in their password.

RequireNumbers
  • Type: boolean

In the password policy that you have set, refers to whether you have required users to use at least one number in their password.

RequireSymbols
  • Type: boolean

In the password policy that you have set, refers to whether you have required users to use at least one symbol in their password.

RequireUppercase
  • Type: boolean

In the password policy that you have set, refers to whether you have required users to use at least one uppercase letter in their password.

TemporaryPasswordValidityDays
  • Type: int

In the password policy you have set, refers to the number of days a temporary password is valid. If the user does not sign-in during this time, their password will need to be reset by an administrator.

When you set TemporaryPasswordValidityDays for a user pool, you will no longer be able to set the deprecated UnusedAccountValidityDays value for that user pool.

PasswordResetRequiredException

Description

This exception is thrown when a password reset is required.

Members
message
  • Type: string

The message returned when a password reset is required.

PreconditionNotMetException

Description

This exception is thrown when a precondition is not met.

Members
message
  • Type: string

The message returned when a precondition is not met.

ProviderDescription

Description

A container for identity provider details.

Members
CreationDate
  • Type: timestamp (string|DateTime or anything parsable by strtotime)

The date the provider was added to the user pool.

LastModifiedDate
  • Type: timestamp (string|DateTime or anything parsable by strtotime)

The date the provider was last modified.

ProviderName
  • Type: string

The identity provider name.

ProviderType
  • Type: string

The identity provider type.

ProviderUserIdentifierType

Description

A container for information about an identity provider for a user pool.

Members
ProviderAttributeName
  • Type: string

The name of the provider attribute to link to, for example, NameID.

ProviderAttributeValue
  • Type: string

The value of the provider attribute to link to, for example, xxxxx_account.

ProviderName
  • Type: string

The name of the provider, for example, Facebook, Google, or Login with Amazon.

RecoveryOptionType

Description

A map containing a priority as a key, and recovery method name as a value.

Members
Name
  • Required: Yes
  • Type: string

Specifies the recovery method for a user.

Priority
  • Required: Yes
  • Type: int

A positive integer specifying priority of a method with 1 being the highest priority.

ResourceNotFoundException

Description

This exception is thrown when the Amazon Cognito service cannot find the requested resource.

Members
message
  • Type: string

The message returned when the Amazon Cognito service returns a resource not found exception.

ResourceServerScopeType

Description

A resource server scope.

Members
ScopeDescription
  • Required: Yes
  • Type: string

A description of the scope.

ScopeName
  • Required: Yes
  • Type: string

The name of the scope.

ResourceServerType

Description

A container for information about a resource server for a user pool.

Members
Identifier
  • Type: string

The identifier for the resource server.

Name
  • Type: string

The name of the resource server.

Scopes
  • Type: Array of ResourceServerScopeType structures

A list of scopes that are defined for the resource server.

UserPoolId
  • Type: string

The user pool ID for the user pool that hosts the resource server.

RiskConfigurationType

Description

The risk configuration type.

Members
AccountTakeoverRiskConfiguration
  • Type: AccountTakeoverRiskConfigurationType structure

The account takeover risk configuration object including the NotifyConfiguration object and Actions to take in the case of an account takeover.

ClientId
  • Type: string

The app client ID.

CompromisedCredentialsRiskConfiguration
  • Type: CompromisedCredentialsRiskConfigurationType structure

The compromised credentials risk configuration object including the EventFilter and the EventAction

LastModifiedDate
  • Type: timestamp (string|DateTime or anything parsable by strtotime)

The last modified date.

RiskExceptionConfiguration
  • Type: RiskExceptionConfigurationType structure

The configuration to override the risk decision.

UserPoolId
  • Type: string

The user pool ID.

RiskExceptionConfigurationType

Description

The type of the configuration to override the risk decision.

Members
BlockedIPRangeList
  • Type: Array of strings

Overrides the risk decision to always block the pre-authentication requests. The IP range is in CIDR notation: a compact representation of an IP address and its associated routing prefix.

SkippedIPRangeList
  • Type: Array of strings

Risk detection is not performed on the IP addresses in the range list. The IP range is in CIDR notation.

SMSMfaSettingsType

Description

The type used for enabling SMS MFA at the user level. Phone numbers don't need to be verified to be used for SMS MFA. If an MFA type is enabled for a user, the user will be prompted for MFA during all sign in attempts, unless device tracking is turned on and the device has been trusted. If you would like MFA to be applied selectively based on the assessed risk level of sign in attempts, disable MFA for users and turn on Adaptive Authentication for the user pool.

Members
Enabled
  • Type: boolean

Specifies whether SMS text message MFA is enabled. If an MFA type is enabled for a user, the user will be prompted for MFA during all sign in attempts, unless device tracking is turned on and the device has been trusted.

PreferredMfa
  • Type: boolean

Specifies whether SMS is the preferred MFA method.

SchemaAttributeType

Description

Contains information about the schema attribute.

Members
AttributeDataType
  • Type: string

The attribute data type.

DeveloperOnlyAttribute
  • Type: boolean

We recommend that you use WriteAttributes in the user pool client to control how attributes can be mutated for new use cases instead of using DeveloperOnlyAttribute.

Specifies whether the attribute type is developer only. This attribute can only be modified by an administrator. Users will not be able to modify this attribute using their access token. For example, DeveloperOnlyAttribute can be modified using AdminUpdateUserAttributes but cannot be updated using UpdateUserAttributes.

Mutable
  • Type: boolean

Specifies whether the value of the attribute can be changed.

For any user pool attribute that's mapped to an identity provider attribute, you must set this parameter to true. Amazon Cognito updates mapped attributes when users sign in to your application through an identity provider. If an attribute is immutable, Amazon Cognito throws an error when it attempts to update the attribute. For more information, see Specifying Identity Provider Attribute Mappings for Your User Pool.

Name
  • Type: string

A schema attribute of the name type.

NumberAttributeConstraints
  • Type: NumberAttributeConstraintsType structure

Specifies the constraints for an attribute of the number type.

Required
  • Type: boolean

Specifies whether a user pool attribute is required. If the attribute is required and the user does not provide a value, registration or sign-in will fail.

StringAttributeConstraints
  • Type: StringAttributeConstraintsType structure

Specifies the constraints for an attribute of the string type.

ScopeDoesNotExistException

Description

This exception is thrown when the specified scope does not exist.

Members
message
  • Type: string

SmsConfigurationType

Description

The SMS configuration type that includes the settings the Cognito User Pool needs to call for the Amazon SNS service to send an SMS message from your AWS account. The Cognito User Pool makes the request to the Amazon SNS Service by using an AWS IAM role that you provide for your AWS account.

Members
ExternalId
  • Type: string

The external ID is a value that we recommend you use to add security to your IAM role which is used to call Amazon SNS to send SMS messages for your user pool. If you provide an ExternalId, the Cognito User Pool will include it when attempting to assume your IAM role, so that you can set your roles trust policy to require the ExternalID. If you use the Cognito Management Console to create a role for SMS MFA, Cognito will create a role with the required permissions and a trust policy that demonstrates use of the ExternalId.

SnsCallerArn
  • Required: Yes
  • Type: string

The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) caller. This is the ARN of the IAM role in your AWS account which Cognito will use to send SMS messages. SMS messages are subject to a spending limit.

SmsMfaConfigType

Description

The SMS text message multi-factor authentication (MFA) configuration type.

Members
SmsAuthenticationMessage
  • Type: string

The SMS authentication message that will be sent to users with the code they need to sign in. The message must contain the ‘{####}’ placeholder, which will be replaced with the code. If the message is not included, and default message will be used.

SmsConfiguration
  • Type: SmsConfigurationType structure

The SMS configuration.

SoftwareTokenMFANotFoundException

Description

This exception is thrown when the software token TOTP multi-factor authentication (MFA) is not enabled for the user pool.

Members
message
  • Type: string

SoftwareTokenMfaConfigType

Description

The type used for enabling software token MFA at the user pool level.

Members
Enabled
  • Type: boolean

Specifies whether software token MFA is enabled.

SoftwareTokenMfaSettingsType

Description

The type used for enabling software token MFA at the user level. If an MFA type is enabled for a user, the user will be prompted for MFA during all sign in attempts, unless device tracking is turned on and the device has been trusted. If you would like MFA to be applied selectively based on the assessed risk level of sign in attempts, disable MFA for users and turn on Adaptive Authentication for the user pool.

Members
Enabled
  • Type: boolean

Specifies whether software token MFA is enabled. If an MFA type is enabled for a user, the user will be prompted for MFA during all sign in attempts, unless device tracking is turned on and the device has been trusted.

PreferredMfa
  • Type: boolean

Specifies whether software token MFA is the preferred MFA method.

StringAttributeConstraintsType

Description

The constraints associated with a string attribute.

Members
MaxLength
  • Type: string

The maximum length.

MinLength
  • Type: string

The minimum length.

TokenValidityUnitsType

Description

The data type for TokenValidityUnits that specifics the time measurements for token validity.

Members
AccessToken
  • Type: string

A time unit in “seconds”, “minutes”, “hours” or “days” for the value in AccessTokenValidity, defaults to hours.

IdToken
  • Type: string

A time unit in “seconds”, “minutes”, “hours” or “days” for the value in IdTokenValidity, defaults to hours.

RefreshToken
  • Type: string

A time unit in “seconds”, “minutes”, “hours” or “days” for the value in RefreshTokenValidity, defaults to days.

TooManyFailedAttemptsException

Description

This exception is thrown when the user has made too many failed attempts for a given action (e.g., sign in).

Members
message
  • Type: string

The message returned when the Amazon Cognito service returns a too many failed attempts exception.

TooManyRequestsException

Description

This exception is thrown when the user has made too many requests for a given operation.

Members
message
  • Type: string

The message returned when the Amazon Cognito service returns a too many requests exception.

UICustomizationType

Description

A container for the UI customization information for a user pool's built-in app UI.

Members
CSS
  • Type: string

The CSS values in the UI customization.

CSSVersion
  • Type: string

The CSS version number.

ClientId
  • Type: string

The client ID for the client app.

CreationDate
  • Type: timestamp (string|DateTime or anything parsable by strtotime)

The creation date for the UI customization.

ImageUrl
  • Type: string

The logo image for the UI customization.

LastModifiedDate
  • Type: timestamp (string|DateTime or anything parsable by strtotime)

The last-modified date for the UI customization.

UserPoolId
  • Type: string

The user pool ID for the user pool.

UnexpectedLambdaException

Description

This exception is thrown when the Amazon Cognito service encounters an unexpected exception with the AWS Lambda service.

Members
message
  • Type: string

The message returned when the Amazon Cognito service returns an unexpected AWS Lambda exception.

UnsupportedIdentityProviderException

Description

This exception is thrown when the specified identifier is not supported.

Members
message
  • Type: string

UnsupportedUserStateException

Description

The request failed because the user is in an unsupported state.

Members
message
  • Type: string

The message returned when the user is in an unsupported state.

UserContextDataType

Description

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

Members
EncodedData
  • Type: string

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

UserImportInProgressException

Description

This exception is thrown when you are trying to modify a user pool while a user import job is in progress for that pool.

Members
message
  • Type: string

The message returned when the user pool has an import job running.

UserImportJobType

Description

The user import job type.

Members
CloudWatchLogsRoleArn
  • Type: string

The role ARN for the Amazon CloudWatch Logging role for the user import job. For more information, see "Creating the CloudWatch Logs IAM Role" in the Amazon Cognito Developer Guide.

CompletionDate
  • Type: timestamp (string|DateTime or anything parsable by strtotime)

The date when the user import job was completed.

CompletionMessage
  • Type: string

The message returned when the user import job is completed.

CreationDate
  • Type: timestamp (string|DateTime or anything parsable by strtotime)

The date the user import job was created.

FailedUsers
  • Type: long (int|float)

The number of users that could not be imported.

ImportedUsers
  • Type: long (int|float)

The number of users that were successfully imported.

JobId
  • Type: string

The job ID for the user import job.

JobName
  • Type: string

The job name for the user import job.

PreSignedUrl
  • Type: string

The pre-signed URL to be used to upload the .csv file.

SkippedUsers
  • Type: long (int|float)

The number of users that were skipped.

StartDate
  • Type: timestamp (string|DateTime or anything parsable by strtotime)

The date when the user import job was started.

Status
  • Type: string

The status of the user import job. One of the following:

  • Created - The job was created but not started.

  • Pending - A transition state. You have started the job, but it has not begun importing users yet.

  • InProgress - The job has started, and users are being imported.

  • Stopping - You have stopped the job, but the job has not stopped importing users yet.

  • Stopped - You have stopped the job, and the job has stopped importing users.

  • Succeeded - The job has completed successfully.

  • Failed - The job has stopped due to an error.

  • Expired - You created a job, but did not start the job within 24-48 hours. All data associated with the job was deleted, and the job cannot be started.

UserPoolId
  • Type: string

The user pool ID for the user pool that the users are being imported into.

UserLambdaValidationException

Description

This exception is thrown when the Amazon Cognito service encounters a user validation exception with the AWS Lambda service.

Members
message
  • Type: string

The message returned when the Amazon Cognito service returns a user validation exception with the AWS Lambda service.

UserNotConfirmedException

Description

This exception is thrown when a user is not confirmed successfully.

Members
message
  • Type: string

The message returned when a user is not confirmed successfully.

UserNotFoundException

Description

This exception is thrown when a user is not found.

Members
message
  • Type: string

The message returned when a user is not found.

UserPoolAddOnNotEnabledException

Description

This exception is thrown when user pool add-ons are not enabled.

Members
message
  • Type: string

UserPoolAddOnsType

Description

The user pool add-ons type.

Members
AdvancedSecurityMode
  • Required: Yes
  • Type: string

The advanced security mode.

UserPoolClientDescription

Description

The description of the user pool client.

Members
ClientId
  • Type: string

The ID of the client associated with the user pool.

ClientName
  • Type: string

The client name from the user pool client description.

UserPoolId
  • Type: string

The user pool ID for the user pool where you want to describe the user pool client.

UserPoolClientType

Description

Contains information about a user pool client.

Members
AccessTokenValidity
  • Type: int

The time limit, specified by tokenValidityUnits, defaulting to hours, after which the access token is no longer valid and cannot be used.

AllowedOAuthFlows
  • Type: Array of strings

The allowed OAuth flows.

Set to code to initiate a code grant flow, which provides an authorization code as the response. This code can be exchanged for access tokens with the token endpoint.

Set to implicit to specify that the client should get the access token (and, optionally, ID token, based on scopes) directly.

Set to client_credentials to specify that the client should get the access token (and, optionally, ID token, based on scopes) from the token endpoint using a combination of client and client_secret.

AllowedOAuthFlowsUserPoolClient
  • Type: boolean

Set to true if the client is allowed to follow the OAuth protocol when interacting with Cognito user pools.

AllowedOAuthScopes
  • Type: Array of strings

The allowed OAuth scopes. Possible values provided by OAuth are: phone, email, openid, and profile. Possible values provided by AWS are: aws.cognito.signin.user.admin. Custom scopes created in Resource Servers are also supported.

AnalyticsConfiguration
  • Type: AnalyticsConfigurationType structure

The Amazon Pinpoint analytics configuration for the user pool client.

Cognito User Pools only supports sending events to Amazon Pinpoint projects in the US East (N. Virginia) us-east-1 Region, regardless of the region in which the user pool resides.

CallbackURLs
  • Type: Array of strings

A list of allowed redirect (callback) URLs for the identity providers.

A redirect URI must:

  • Be an absolute URI.

  • Be registered with the authorization server.

  • Not include a fragment component.

See OAuth 2.0 - Redirection Endpoint.

Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes only.

App callback URLs such as myapp://example are also supported.

ClientId
  • Type: string

The ID of the client associated with the user pool.

ClientName
  • Type: string

The client name from the user pool request of the client type.

ClientSecret
  • Type: string

The client secret from the user pool request of the client type.

CreationDate
  • Type: timestamp (string|DateTime or anything parsable by strtotime)

The date the user pool client was created.

DefaultRedirectURI
  • Type: string

The default redirect URI. Must be in the CallbackURLs list.

A redirect URI must:

  • Be an absolute URI.

  • Be registered with the authorization server.

  • Not include a fragment component.

See OAuth 2.0 - Redirection Endpoint.

Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes only.

App callback URLs such as myapp://example are also supported.

ExplicitAuthFlows
  • Type: Array of strings

The authentication flows that are supported by the user pool clients. Flow names without the ALLOW_ prefix are deprecated in favor of new names with the ALLOW_ prefix. Note that values with ALLOW_ prefix cannot be used along with values without ALLOW_ prefix.

Valid values include:

  • ALLOW_ADMIN_USER_PASSWORD_AUTH: Enable admin based user password authentication flow ADMIN_USER_PASSWORD_AUTH. This setting replaces the ADMIN_NO_SRP_AUTH setting. With this authentication flow, Cognito receives the password in the request instead of using the SRP (Secure Remote Password protocol) protocol to verify passwords.

  • ALLOW_CUSTOM_AUTH: Enable Lambda trigger based authentication.

  • ALLOW_USER_PASSWORD_AUTH: Enable user password-based authentication. In this flow, Cognito receives the password in the request instead of using the SRP protocol to verify passwords.

  • ALLOW_USER_SRP_AUTH: Enable SRP based authentication.

  • ALLOW_REFRESH_TOKEN_AUTH: Enable authflow to refresh tokens.

IdTokenValidity
  • Type: int

The time limit, specified by tokenValidityUnits, defaulting to hours, after which the refresh token is no longer valid and cannot be used.

LastModifiedDate
  • Type: timestamp (string|DateTime or anything parsable by strtotime)

The date the user pool client was last modified.

LogoutURLs
  • Type: Array of strings

A list of allowed logout URLs for the identity providers.

PreventUserExistenceErrors
  • Type: string

Use this setting to choose which errors and responses are returned by Cognito APIs during authentication, account confirmation, and password recovery when the user does not exist in the user pool. When set to ENABLED and the user does not exist, authentication returns an error indicating either the username or password was incorrect, and account confirmation and password recovery return a response indicating a code was sent to a simulated destination. When set to LEGACY, those APIs will return a UserNotFoundException exception if the user does not exist in the user pool.

Valid values include:

  • ENABLED - This prevents user existence-related errors.

  • LEGACY - This represents the old behavior of Cognito where user existence related errors are not prevented.

After February 15th 2020, the value of PreventUserExistenceErrors will default to ENABLED for newly created user pool clients if no value is provided.

ReadAttributes
  • Type: Array of strings

The Read-only attributes.

RefreshTokenValidity
  • Type: int

The time limit, in days, after which the refresh token is no longer valid and cannot be used.

SupportedIdentityProviders
  • Type: Array of strings

A list of provider names for the identity providers that are supported on this client.

TokenValidityUnits
  • Type: TokenValidityUnitsType structure

The time units used to specify the token validity times of their respective token.

UserPoolId
  • Type: string

The user pool ID for the user pool client.

WriteAttributes
  • Type: Array of strings

The writeable attributes.

UserPoolDescriptionType

Description

A user pool description.

Members