The following code examples show how to use GetAuthorizationToken
.
Action examples are code excerpts from larger programs and must be run in context. You can see this action in context in the following code example:
- AWS CLI
-
To get an authorization token for your default registry
The following
get-authorization-token
example command gets an authorization token for your default registry.aws ecr get-authorization-token
Output:
{ "authorizationData": [ { "authorizationToken": "QVdTOkN...", "expiresAt": 1448875853.241, "proxyEndpoint": "https://123456789012.dkr.ecr.us-west-2.amazonaws.com" } ] }
-
For API details, see GetAuthorizationToken
in AWS CLI Command Reference.
-
For a complete list of AWS SDK developer guides and code examples, see Using Amazon ECR with an AWS SDK. This topic also includes information about getting started and details about previous SDK versions.