# Update Cognito external user source

Update an external user source.

A valid environment token is required to call this endpoint.

Endpoint: PUT /resources/user-sources/v1/external/cognito/{id}
Version: 1.0
Security: bearer

## Security:

  - `bearer` (unknown)
    http bearer JWT

## Path parameters:

  - `id` (string, required)

## Request fields (application/json):

  - `name` (string)
    The user source name

  - `configuration` (object)
    User source configuration

  - `configuration.syncOnLogin` (boolean, required)
    Whether to sync user profile attributes on each login

  - `configuration.isMigrated` (boolean, required)
    Whether to migrate the users

  - `configuration.region` (string, required)
    The aws region of the cognito user pool

  - `configuration.clientId` (string, required)
    The cognito app client id

  - `configuration.userPoolId` (string, required)
    The id of the cognito user pool

  - `configuration.accessKeyId` (string, required)
    The access key of the aws account

  - `configuration.secretAccessKey` (string, required)
    The secret of the aws account

  - `configuration.clientSecret` (string)
    The cognito application client secret, required if the app client is configured with a client secret

  - `configuration.tenantConfig` (any, required)

  - `configuration.tenantConfig.tenantIdFieldName` (string, required)
    The attribute name of which the tenant id would be taken from

  - `configuration.tenantConfig.tenantResolverType` (string, required)
    Enum: "dynamic"

  - `configuration.tenantConfig.tenantId` (string, required)
    The tenant id which all of the users would be added to

  - `configuration.tenantConfig.tenantResolverType` (string, required)
    Enum: "static"

  - `configuration.tenantConfig.tenantResolverType` (string, required)
    Enum: "new"

  - `configuration.attributeMap` (object)
    Maps Frontegg identifier fields to Cognito attribute names

  - `configuration.attributeMap.email` (object)

  - `configuration.attributeMap.email.name` (string, required)
    The Cognito attribute used as the unique user identifier

  - `configuration.attributeMap.username` (object)

  - `configuration.attributeMap.username.name` (string, required)
    Defines which Cognito field is used for attributeMap.username
    Enum: "preferred_username", "username"

  - `configuration.attributeMap.phoneNumber` (object)

  - `configuration.attributeMap.phoneNumber.name` (string, required)
    The Cognito attribute used as the unique user identifier

  - `configuration.attributeMap.phoneNumber.verifiedMigrationPolicy` (string)
    Defines how the phone number verification status is resolved during migration. Defaults to FromSource (uses Cognito phone_number_verified).
    Enum: "AlwaysVerified", "AlwaysUnverified", "FromSource"

  - `index` (number)
    The user source index

  - `description` (string)
    The user source description

