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.
Request Request Example
Shell
JavaScript
Java
Swift
curl--location--request POST '/' \
--header'X-Amz-Target;' \
--header'Content-Type: application/json' \
--data-raw''
An authorization token data object that corresponds to a public registry.
authorizationToken
string
optional
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.
Match pattern:
^\S+$
expiresAt
string<date-time>
optional
The Unix time in seconds and milliseconds when the authorization token expires. Authorization tokens are valid for 12 hours.