:doc:`imagebuilder <../../imagebuilder>` / Client / distribute_image

****************
distribute_image
****************



.. py:method:: imagebuilder.Client.distribute_image(**kwargs)

  

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

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/imagebuilder-2019-12-02/DistributeImage>`_  


  **Request Syntax**
  ::

    response = client.distribute_image(
        sourceImage='string',
        distributionConfigurationArn='string',
        executionRole='string',
        tags={
            'string': 'string'
        },
        clientToken='string',
        loggingConfiguration={
            'logGroupName': 'string'
        }
    )
    
  :type sourceImage: string
  :param sourceImage: **[REQUIRED]** 

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

    

  
  :type distributionConfigurationArn: string
  :param distributionConfigurationArn: **[REQUIRED]** 

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

    

  
  :type executionRole: string
  :param executionRole: **[REQUIRED]** 

    The IAM role to use for the distribution.

    

  
  :type tags: dict
  :param tags: 

    The tags to apply to the distributed image.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


  :type clientToken: string
  :param clientToken: **[REQUIRED]** 

    Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see `Ensuring idempotency <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html>`__ in the *Amazon EC2 API Reference*.

    This field is autopopulated if not provided.

  
  :type loggingConfiguration: dict
  :param loggingConfiguration: 

    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``.

      

    
  
  
  :rtype: 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**
  
  *   :py:class:`imagebuilder.Client.exceptions.ServiceException`

  
  *   :py:class:`imagebuilder.Client.exceptions.ClientException`

  
  *   :py:class:`imagebuilder.Client.exceptions.ServiceUnavailableException`

  
  *   :py:class:`imagebuilder.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`imagebuilder.Client.exceptions.IdempotentParameterMismatchException`

  
  *   :py:class:`imagebuilder.Client.exceptions.ForbiddenException`

  
  *   :py:class:`imagebuilder.Client.exceptions.CallRateLimitExceededException`

  
  *   :py:class:`imagebuilder.Client.exceptions.ResourceInUseException`

  
  *   :py:class:`imagebuilder.Client.exceptions.ServiceQuotaExceededException`

  
  *   :py:class:`imagebuilder.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`imagebuilder.Client.exceptions.TooManyRequestsException`

  
  *   :py:class:`imagebuilder.Client.exceptions.ResourceNotFoundException`

  