:doc:`SageMaker <../../sagemaker>` / Client / create_image

************
create_image
************



.. py:method:: SageMaker.Client.create_image(**kwargs)

  

  Creates a custom SageMaker AI image. A SageMaker AI image is a set of image versions. Each image version represents a container image stored in Amazon ECR. For more information, see `Bring your own SageMaker AI image <https://docs.aws.amazon.com/sagemaker/latest/dg/studio-byoi.html>`__.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateImage>`_  


  **Request Syntax**
  ::

    response = client.create_image(
        Description='string',
        DisplayName='string',
        ImageName='string',
        RoleArn='string',
        Tags=[
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    )
    
  :type Description: string
  :param Description: 

    The description of the image.

    

  
  :type DisplayName: string
  :param DisplayName: 

    The display name of the image. If not provided, ``ImageName`` is displayed.

    

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

    The name of the image. Must be unique to your account.

    

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

    The ARN of an IAM role that enables Amazon SageMaker AI to perform tasks on your behalf.

    

  
  :type Tags: list
  :param Tags: 

    A list of tags to apply to the image.

    

  
    - *(dict) --* 

      A tag object that consists of a key and an optional value, used to manage metadata for SageMaker Amazon Web Services resources.

       

      You can add tags to notebook instances, training jobs, hyperparameter tuning jobs, batch transform jobs, models, labeling jobs, work teams, endpoint configurations, and endpoints. For more information on adding tags to SageMaker resources, see `AddTags <https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_AddTags.html>`__.

       

      For more information on adding metadata to your Amazon Web Services resources with tagging, see `Tagging Amazon Web Services resources <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html>`__. For advice on best practices for managing Amazon Web Services resources with tagging, see `Tagging Best Practices\: Implement an Effective Amazon Web Services Resource Tagging Strategy <https://d1.awsstatic.com/whitepapers/aws-tagging-best-practices.pdf>`__.

      

    
      - **Key** *(string) --* **[REQUIRED]** 

        The tag key. Tag keys must be unique per resource.

        

      
      - **Value** *(string) --* **[REQUIRED]** 

        The tag value.

        

      
    

  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'ImageArn': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **ImageArn** *(string) --* 

        The ARN of the image.

        
  
  **Exceptions**
  
  *   :py:class:`SageMaker.Client.exceptions.ResourceInUse`

  
  *   :py:class:`SageMaker.Client.exceptions.ResourceLimitExceeded`

  