Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
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.
Synopsis
- data GetAuthorizationToken = GetAuthorizationToken' {
- registryIds :: Maybe (NonEmpty Text)
- newGetAuthorizationToken :: GetAuthorizationToken
- getAuthorizationToken_registryIds :: Lens' GetAuthorizationToken (Maybe (NonEmpty Text))
- data GetAuthorizationTokenResponse = GetAuthorizationTokenResponse' {}
- newGetAuthorizationTokenResponse :: Int -> GetAuthorizationTokenResponse
- getAuthorizationTokenResponse_authorizationData :: Lens' GetAuthorizationTokenResponse (Maybe [AuthorizationData])
- getAuthorizationTokenResponse_httpStatus :: Lens' GetAuthorizationTokenResponse Int
Creating a Request
data GetAuthorizationToken Source #
See: newGetAuthorizationToken
smart constructor.
GetAuthorizationToken' | |
|
Instances
newGetAuthorizationToken :: GetAuthorizationToken Source #
Create a value of GetAuthorizationToken
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:registryIds:GetAuthorizationToken'
, getAuthorizationToken_registryIds
- A list of Amazon Web Services account IDs that are associated with the
registries for which to get AuthorizationData objects. If you do not
specify a registry, the default registry is assumed.
Request Lenses
getAuthorizationToken_registryIds :: Lens' GetAuthorizationToken (Maybe (NonEmpty Text)) Source #
A list of Amazon Web Services account IDs that are associated with the registries for which to get AuthorizationData objects. If you do not specify a registry, the default registry is assumed.
Destructuring the Response
data GetAuthorizationTokenResponse Source #
See: newGetAuthorizationTokenResponse
smart constructor.
GetAuthorizationTokenResponse' | |
|
Instances
newGetAuthorizationTokenResponse Source #
Create a value of GetAuthorizationTokenResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:authorizationData:GetAuthorizationTokenResponse'
, getAuthorizationTokenResponse_authorizationData
- A list of authorization token data objects that correspond to the
registryIds
values in the request.
$sel:httpStatus:GetAuthorizationTokenResponse'
, getAuthorizationTokenResponse_httpStatus
- The response's http status code.
Response Lenses
getAuthorizationTokenResponse_authorizationData :: Lens' GetAuthorizationTokenResponse (Maybe [AuthorizationData]) Source #
A list of authorization token data objects that correspond to the
registryIds
values in the request.
getAuthorizationTokenResponse_httpStatus :: Lens' GetAuthorizationTokenResponse Int Source #
The response's http status code.