Skip to main content

authorization_tokens

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

Overview

Nameauthorization_tokens
TypeResource
Idaws.ecr_public.authorization_tokens

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
authorization_tokenstringA 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_atstring (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:

NameAccessible byRequired ParamsOptional ParamsDescription
get_authorization_tokenselectregionRetrieves 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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
;