Retrieves an authorization token. An authorization token represents your IAM
authentication credentials and can be used to access any Amazon ECR registry that your IAM
principal has access to. The authorization token is valid for 12 hours.
The authorizationToken returned is a base64 encoded string that can be
decoded and used in a docker login command to authenticate to a registry.
The CLI offers an get-login-password command that simplifies the login
process. For more information, see Registry
authentication in the Amazon Elastic Container Registry User Guide.
Example
Use a bare-bones client and the command you need to make an API call.
Retrieves an authorization token. An authorization token represents your IAM authentication credentials and can be used to access any Amazon ECR registry that your IAM principal has access to. The authorization token is valid for 12 hours.
The
authorizationToken
returned is a base64 encoded string that can be decoded and used in adocker login
command to authenticate to a registry. The CLI offers anget-login-password
command that simplifies the login process. For more information, see Registry authentication in the Amazon Elastic Container Registry User Guide.Example
Use a bare-bones client and the command you need to make an API call.
Param
GetAuthorizationTokenCommandInput
Returns
GetAuthorizationTokenCommandOutput
See
input
shape.response
shape.config
shape.Throws
InvalidParameterException (client fault)
The specified parameter is invalid. Review the available parameters for the API request.
Throws
ServerException (server fault)
These errors are usually caused by a server-side issue.
Example
To obtain an authorization token