Skip to content

ImagebuilderClient#

Index > Imagebuilder > ImagebuilderClient

Auto-generated documentation for Imagebuilder type annotations stubs module mypy-boto3-imagebuilder.

ImagebuilderClient#

Type annotations and code completion for boto3.client("imagebuilder"). boto3 documentation

# ImagebuilderClient usage example

from boto3.session import Session
from mypy_boto3_imagebuilder.client import ImagebuilderClient

def get_imagebuilder_client() -> ImagebuilderClient:
    return Session().client("imagebuilder")

Exceptions#

boto3 client exceptions are generated in runtime. This class provides code completion for boto3.client("imagebuilder").exceptions structure.

# Exceptions.exceptions usage example

client = boto3.client("imagebuilder")

try:
    do_something(client)
except (
    client.exceptions.CallRateLimitExceededException,
    client.exceptions.ClientError,
    client.exceptions.ClientException,
    client.exceptions.ForbiddenException,
    client.exceptions.IdempotentParameterMismatchException,
    client.exceptions.InvalidPaginationTokenException,
    client.exceptions.InvalidParameterCombinationException,
    client.exceptions.InvalidParameterException,
    client.exceptions.InvalidParameterValueException,
    client.exceptions.InvalidRequestException,
    client.exceptions.InvalidVersionNumberException,
    client.exceptions.ResourceAlreadyExistsException,
    client.exceptions.ResourceDependencyException,
    client.exceptions.ResourceInUseException,
    client.exceptions.ResourceNotFoundException,
    client.exceptions.ServiceException,
    client.exceptions.ServiceQuotaExceededException,
    client.exceptions.ServiceUnavailableException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_imagebuilder.client import Exceptions

def handle_error(exc: Exceptions.CallRateLimitExceededException) -> None:
    ...

Methods#

can_paginate#

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("imagebuilder").can_paginate method. boto3 documentation

# can_paginate method definition

def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

cancel_image_creation#

CancelImageCreation cancels the creation of Image.

Type annotations and code completion for boto3.client("imagebuilder").cancel_image_creation method. boto3 documentation

# cancel_image_creation method definition

def cancel_image_creation(
    self,
    *,
    imageBuildVersionArn: str,
    clientToken: str,
) -> CancelImageCreationResponseTypeDef:  # (1)
    ...
  1. See CancelImageCreationResponseTypeDef
# cancel_image_creation method usage example with argument unpacking

kwargs: CancelImageCreationRequestRequestTypeDef = {  # (1)
    "imageBuildVersionArn": ...,
    "clientToken": ...,
}

parent.cancel_image_creation(**kwargs)
  1. See CancelImageCreationRequestRequestTypeDef

cancel_lifecycle_execution#

Cancel a specific image lifecycle policy runtime instance.

Type annotations and code completion for boto3.client("imagebuilder").cancel_lifecycle_execution method. boto3 documentation

# cancel_lifecycle_execution method definition

def cancel_lifecycle_execution(
    self,
    *,
    lifecycleExecutionId: str,
    clientToken: str,
) -> CancelLifecycleExecutionResponseTypeDef:  # (1)
    ...