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.
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.
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.
Raises:
-
AccessDeniedException
–
Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to access a resource.
-
InvalidInputException
–
Lightsail throws this exception when user input does not conform to the validation rules of an input field.
Domain and distribution APIs are only available in the N. Virginia (us-east-1) Amazon Web Services Region. Please set your Amazon Web Services Region configuration to us-east-1 to create, view, or edit these resources.
-
NotFoundException
–
Lightsail throws this exception when it cannot find a resource.
-
RegionSetupInProgressException
–
Lightsail throws this exception when an operation is performed on resources in an opt-in Region that is currently being set up.
-
ServiceException
–
A general service exception.
-
UnauthenticatedException
–
Lightsail throws this exception when the user has not been authenticated.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_lightsail/_services/async_lightsail.py
| async def create_container_service_registry_login(
self, *, config_overrides: Optional[AsyncLightsailClientConfig] = None
) -> "capo_lightsail.types.create_container_service_registry_login_result.CreateContainerServiceRegistryLoginResult":
"""<p>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.</p> <note> <p>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.</p> </note> <p>After you push your container images to the container image registry of your Lightsail account, use the <code>RegisterContainerImage</code> action to register the pushed images to a specific Lightsail container service.</p> <note> <p>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 <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-pushing-container-images">Pushing and managing container images on your Amazon Lightsail container services</a> in the <i>Amazon Lightsail Developer Guide</i>.</p> </note>
Raises:
capo_lightsail.errors.access_denied_exception.AccessDeniedException: <p>Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to access a resource.</p>
capo_lightsail.errors.invalid_input_exception.InvalidInputException: <p>Lightsail throws this exception when user input does not conform to the validation rules of an input field.</p> <note> <p>Domain and distribution APIs are only available in the N. Virginia (<code>us-east-1</code>) Amazon Web Services Region. Please set your Amazon Web Services Region configuration to <code>us-east-1</code> to create, view, or edit these resources.</p> </note>
capo_lightsail.errors.not_found_exception.NotFoundException: <p>Lightsail throws this exception when it cannot find a resource.</p>
capo_lightsail.errors.region_setup_in_progress_exception.RegionSetupInProgressException: <p>Lightsail throws this exception when an operation is performed on resources in an opt-in Region that is currently being set up.</p>
capo_lightsail.errors.service_exception.ServiceException: <p>A general service exception.</p>
capo_lightsail.errors.unauthenticated_exception.UnauthenticatedException: <p>Lightsail throws this exception when the user has not been authenticated.</p>
capo_lightsail.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_lightsail.types.create_container_service_registry_login_request.CreateContainerServiceRegistryLoginRequest]",
) -> AsyncOperationResponse[
"capo_lightsail.types.create_container_service_registry_login_result.CreateContainerServiceRegistryLoginResult"
]:
import capo_lightsail._operations.lightsail_20161128.create_container_service_registry_login
(
output,
http_response,
) = await capo_lightsail._operations.lightsail_20161128.create_container_service_registry_login.async_create_container_service_registry_login(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateContainerServiceRegistryLogin")
)
input_: capo_lightsail.types.create_container_service_registry_login_request.CreateContainerServiceRegistryLoginRequest = {}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|