Skip to main content

access_tokens

Creates, updates, deletes, gets or lists an access_tokens resource.

Overview

Nameaccess_tokens
TypeResource
Idaws.codecatalyst.access_tokens

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe system-generated ID of the personal access token.
namestringThe friendly name of the personal access token.
expires_timestring (date-time)The date and time when the personal access token will expire, in coordinated universal time (UTC) timestamp format as specified in RFC 3339.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_access_tokensselectregionLists all personal access tokens (PATs) associated with the user who calls the API. You can only list PATs associated with your Amazon Web Services Builder ID.
create_access_tokeninsertregion, nameCreates 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 identity for use across all spaces and projects in Amazon CodeCatalyst. You use PATs to access CodeCatalyst from resources that include integrated development environments (IDEs) and Git-based source repositories. PATs represent you in Amazon CodeCatalyst and you can manage them in your user settings.For more information, see Managing personal access tokens in Amazon CodeCatalyst.
delete_access_tokendeleteid, regionDeletes a specified personal access token (PAT). A personal access token can only be deleted by the user who created it.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
idstringThe ID of the personal access token to delete. You can find the IDs of all PATs associated with your Amazon Web Services Builder ID in a space by calling ListAccessTokens.
regionstringAWS region (default: us-east-1)

SELECT examples

Lists all personal access tokens (PATs) associated with the user who calls the API. You can only list PATs associated with your Amazon Web Services Builder ID.

SELECT
id,
name,
expires_time
FROM aws.codecatalyst.access_tokens
WHERE region = '{{ region }}' -- required
;

INSERT examples

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 identity for use across all spaces and projects in Amazon CodeCatalyst. You use PATs to access CodeCatalyst from resources that include integrated development environments (IDEs) and Git-based source repositories. PATs represent you in Amazon CodeCatalyst and you can manage them in your user settings.For more information, see Managing personal access tokens in Amazon CodeCatalyst.

INSERT INTO aws.codecatalyst.access_tokens (
name,
expiresTime,
region
)
SELECT
'{{ name }}' /* required */,
'{{ expiresTime }}',
'{{ region }}'
RETURNING
name,
access_token_id,
expires_time,
secret
;

DELETE examples

Deletes a specified personal access token (PAT). A personal access token can only be deleted by the user who created it.

DELETE FROM aws.codecatalyst.access_tokens
WHERE id = '{{ id }}' --required
AND region = '{{ region }}' --required
;