Learn R Programming

paws.compute (version 0.1.12)

ecr_get_authorization_token: Retrieves an authorization token

Description

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 AWS 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.

Usage

ecr_get_authorization_token(registryIds)

Value

A list with the following syntax:

list(
  authorizationData = list(
    list(
      authorizationToken = "string",
      expiresAt = as.POSIXct(
        "2015-01-01"
      ),
      proxyEndpoint = "string"
    )
  )
)

Arguments

registryIds

A list of AWS 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 syntax

svc$get_authorization_token(
  registryIds = list(
    "string"
  )
)

Examples

Run this code
if (FALSE) {
# This example gets an authorization token for your default registry.
svc$get_authorization_token()
}

Run the code above in your browser using DataLab