imagebuilder / Client / distribute_image
distribute_image¶
- imagebuilder.Client.distribute_image(**kwargs)¶
Distributes an existing AMI to target Regions and accounts without running the full image build process. This operation only runs the distribution phase on an image that has already been built.
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 to distribute. Specify an AMI identifier, SSM parameter path, or Image Builder image Amazon Resource Name (ARN). When you specify an Image Builder image Amazon Resource Name (ARN), the image must be in the
AVAILABLEstate.distributionConfigurationArn (string) –
[REQUIRED]
The Amazon Resource Name (ARN) of the distribution configuration. The configuration defines target Regions, accounts, and AMI settings. The distribution configuration must be in the same Region as this operation.
executionRole (string) –
[REQUIRED]
The name or Amazon Resource Name (ARN) of the IAM role that Image Builder assumes to distribute the image.
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.ServiceExceptionimagebuilder.Client.exceptions.ClientExceptionimagebuilder.Client.exceptions.ServiceUnavailableExceptionimagebuilder.Client.exceptions.InvalidRequestExceptionimagebuilder.Client.exceptions.IdempotentParameterMismatchExceptionimagebuilder.Client.exceptions.ForbiddenExceptionimagebuilder.Client.exceptions.CallRateLimitExceededExceptionimagebuilder.Client.exceptions.ResourceInUseExceptionimagebuilder.Client.exceptions.ServiceQuotaExceededExceptionimagebuilder.Client.exceptions.AccessDeniedExceptionimagebuilder.Client.exceptions.TooManyRequestsExceptionimagebuilder.Client.exceptions.ResourceNotFoundException