imagebuilder / Client / distribute_image

distribute_image

imagebuilder.Client.distribute_image(**kwargs)

DistributeImage distributes existing AMIs to additional regions and accounts without rebuilding the image.

See also: AWS API Documentation

Request Syntax

response = client.distribute_image(
    sourceImage='string',
    distributionConfigurationArn='string',
    executionRole='string',
    tags={
        'string': 'string'
    },
    clientToken='string',
    loggingConfiguration={
        'logGroupName': 'string'
    }
)
Parameters:
  • sourceImage (string) –

    [REQUIRED]

    The source image Amazon Resource Name (ARN) to distribute.

  • distributionConfigurationArn (string) –

    [REQUIRED]

    The Amazon Resource Name (ARN) of the distribution configuration to use.

  • executionRole (string) –

    [REQUIRED]

    The IAM role to use for the distribution.

  • tags (dict) –

    The tags to apply to the distributed image.

    • (string) –

      • (string) –

  • clientToken (string) –

    [REQUIRED]

    Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see Ensuring idempotency in the Amazon EC2 API Reference.

    This field is autopopulated if not provided.

  • loggingConfiguration (dict) –

    The logging configuration for the distribution.

    • logGroupName (string) –

      The log group name that Image Builder uses for image creation. If not specified, the log group name defaults to /aws/imagebuilder/image-name.

Return type:

dict

Returns:

Response Syntax

{
    'clientToken': 'string',
    'imageBuildVersionArn': 'string'
}

Response Structure

  • (dict) –

    • clientToken (string) –

      The client token that uniquely identifies the request.

    • imageBuildVersionArn (string) –

      The Amazon Resource Name (ARN) of the image to be distributed.

Exceptions

  • imagebuilder.Client.exceptions.ServiceException

  • imagebuilder.Client.exceptions.ClientException

  • imagebuilder.Client.exceptions.ServiceUnavailableException

  • imagebuilder.Client.exceptions.InvalidRequestException

  • imagebuilder.Client.exceptions.IdempotentParameterMismatchException

  • imagebuilder.Client.exceptions.ForbiddenException

  • imagebuilder.Client.exceptions.CallRateLimitExceededException

  • imagebuilder.Client.exceptions.ResourceInUseException

  • imagebuilder.Client.exceptions.ServiceQuotaExceededException

  • imagebuilder.Client.exceptions.AccessDeniedException

  • imagebuilder.Client.exceptions.TooManyRequestsException

  • imagebuilder.Client.exceptions.ResourceNotFoundException