access_tokens
Creates, updates, deletes, gets or lists an access_tokens resource.
Overview
| Name | access_tokens |
| Type | Resource |
| Id | aws.codecatalyst.access_tokens |
Fields
The following fields are returned by SELECT queries:
- list_access_tokens
| Name | Datatype | Description |
|---|---|---|
id | string | The system-generated ID of the personal access token. |
name | string | The friendly name of the personal access token. |
expires_time | string (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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_access_tokens | select | region | 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. | |
create_access_token | insert | region, name | 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. | |
delete_access_token | delete | id, region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
id | string | The 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. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- list_access_tokens
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
- create_access_token
- Manifest
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
;
# Description fields are for documentation purposes
- name: access_tokens
props:
- name: region
value: "{{ region }}"
description: Required parameter for the access_tokens resource.
- name: name
value: "{{ name }}"
- name: expiresTime
value: "{{ expiresTime }}"
DELETE examples
- delete_access_token
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
;