create_container_service_registry_login

create_container_service_registry_login()

Creates a temporary set of log in credentials that you can use to log in to the Docker process on your local machine. After you're logged in, you can use the native Docker commands to push your local container images to the container image registry of your Amazon Lightsail account so that you can use them with your Lightsail container service. The log in credentials expire 12 hours after they are created, at which point you will need to create a new set of log in credentials.

Note

You can only push container images to the container service registry of your Lightsail account. You cannot pull container images or perform any other container image management actions on the container service registry.

After you push your container images to the container image registry of your Lightsail account, use the RegisterContainerImage action to register the pushed images to a specific Lightsail container service.

Note

This action is not required if you install and use the Lightsail Control (lightsailctl) plugin to push container images to your Lightsail container service. For more information, see Pushing and managing container images on your Amazon Lightsail container services in the Amazon Lightsail Developer Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_container_service_registry_login()
Return type
dict
Returns
Response Syntax
{
    'registryLogin': {
        'username': 'string',
        'password': 'string',
        'expiresAt': datetime(2015, 1, 1),
        'registry': 'string'
    }
}

Response Structure

  • (dict) --
    • registryLogin (dict) --

      An object that describes the log in information for the container service registry of your Lightsail account.

      • username (string) --

        The container service registry username to use to push container images to the container image registry of a Lightsail account.

      • password (string) --

        The container service registry password to use to push container images to the container image registry of a Lightsail account

      • expiresAt (datetime) --

        The timestamp of when the container image registry sign-in credentials expire.

        The log in credentials expire 12 hours after they are created, at which point you will need to create a new set of log in credentials using the CreateContainerServiceRegistryLogin action.

      • registry (string) --

        The address to use to push container images to the container image registry of a Lightsail account.

Exceptions

  • Lightsail.Client.exceptions.ServiceException
  • Lightsail.Client.exceptions.InvalidInputException
  • Lightsail.Client.exceptions.NotFoundException
  • Lightsail.Client.exceptions.AccessDeniedException
  • Lightsail.Client.exceptions.UnauthenticatedException