CognitoIdentityProvider / Client / get_csv_header
get_csv_header#
- CognitoIdentityProvider.Client.get_csv_header(**kwargs)#
Given a user pool ID, generates a comma-separated value (CSV) list populated with available user attributes in the user pool. This list is the header for the CSV file that determines the users in a user import job. Save the content of
CSVHeader
in the response as a.csv
file and populate it with the usernames and attributes of users that you want to import. For more information about CSV user import, see Importing users from a CSV file.Note
Amazon Cognito evaluates Identity and Access Management (IAM) policies in requests for this API operation. For this operation, you must use IAM credentials to authorize requests, and you must grant yourself the corresponding IAM permission in a policy.
Learn more
See also: AWS API Documentation
Request Syntax
response = client.get_csv_header( UserPoolId='string' )
- Parameters:
UserPoolId (string) –
[REQUIRED]
The ID of the user pool that you want to import users into.
- Return type:
dict
- Returns:
Response Syntax
{ 'UserPoolId': 'string', 'CSVHeader': [ 'string', ] }
Response Structure
(dict) –
Represents the response from the server to the request to get the header information of the CSV file for the user import job.
UserPoolId (string) –
The ID of the requested user pool.
CSVHeader (list) –
A comma-separated list of attributes from your user pool. Save this output to a
.csv
file and populate it with the attributes of the users that you want to import.(string) –
Exceptions
CognitoIdentityProvider.Client.exceptions.ResourceNotFoundException
CognitoIdentityProvider.Client.exceptions.InvalidParameterException
CognitoIdentityProvider.Client.exceptions.TooManyRequestsException
CognitoIdentityProvider.Client.exceptions.NotAuthorizedException
CognitoIdentityProvider.Client.exceptions.InternalErrorException