authorization_tokens
Creates, updates, deletes, gets or lists an authorization_tokens resource.
Overview
| Name | authorization_tokens |
| Type | Resource |
| Id | aws.ecr_public.authorization_tokens |
Fields
The following fields are returned by SELECT queries:
- get_authorization_token
| Name | Datatype | Description |
|---|---|---|
authorization_token | string | A base64-encoded string that contains authorization data for a public Amazon ECR registry. When the string is decoded, it's presented in the format user:password for public registry authentication using docker login. (pattern: <code>^\S+$</code>) |
expires_at | string (date-time) | The Unix time in seconds and milliseconds when the authorization token expires. Authorization tokens are valid for 12 hours. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_authorization_token | select | region | Retrieves an authorization token. An authorization token represents your IAM authentication credentials. You can use it to access any Amazon ECR registry that your IAM principal has access to. The authorization token is valid for 12 hours. This API requires the ecr-public:GetAuthorizationToken and sts:GetServiceBearerToken permissions. |
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 |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_authorization_token
Retrieves an authorization token. An authorization token represents your IAM authentication credentials. You can use it to access any Amazon ECR registry that your IAM principal has access to. The authorization token is valid for 12 hours. This API requires the ecr-public:GetAuthorizationToken and sts:GetServiceBearerToken permissions.
SELECT
authorization_token,
expires_at
FROM aws.ecr_public.authorization_tokens
WHERE region = '{{ region }}' -- required
;