create_access_token

create_access_token(**kwargs)

Creates a personal access token (PAT) for the current user. A personal access token (PAT) is similar to a password. It is associated with your user account. You use PATs to access Amazon CodeCatalyst resources such as source repositories from third-party applications like Git and integrated development environments (IDEs). For more information, see Managing personal access tokens in Amazon CodeCatalyst.

See also: AWS API Documentation

Request Syntax

response = client.create_access_token(
    name='string',
    expiresTime=datetime(2015, 1, 1)
)
Parameters
  • name (string) --

    [REQUIRED]

    The friendly name of the personal access token.

  • expiresTime (datetime) -- The date and time the personal access token expires, in coordinated universal time (UTC) timestamp format as specified in RFC 3339.
Return type

dict

Returns

Response Syntax

{
    'secret': 'string',
    'name': 'string',
    'expiresTime': datetime(2015, 1, 1),
    'accessTokenId': 'string'
}

Response Structure

  • (dict) --

    • secret (string) --

      The secret value of the personal access token.

    • name (string) --

      The friendly name of the personal access token.

    • expiresTime (datetime) --

      The date and time the personal access token expires, in coordinated universal time (UTC) timestamp format as specified in RFC 3339. If not specified, the default is one year from creation.

    • accessTokenId (string) --

      The system-generated unique ID of the access token.

Exceptions

  • CodeCatalyst.Client.exceptions.ThrottlingException
  • CodeCatalyst.Client.exceptions.ConflictException
  • CodeCatalyst.Client.exceptions.ValidationException
  • CodeCatalyst.Client.exceptions.ServiceQuotaExceededException
  • CodeCatalyst.Client.exceptions.ResourceNotFoundException
  • CodeCatalyst.Client.exceptions.AccessDeniedException