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

***********************
put_image_recipe_policy
***********************



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

  

  Applies a policy to an image recipe. We recommend that you call the RAM API `CreateResourceShare <https://docs.aws.amazon.com/ram/latest/APIReference/API_CreateResourceShare.html>`__ to share resources. If you call the Image Builder API ``PutImageRecipePolicy``, you must also call the RAM API `PromoteResourceShareCreatedFromPolicy <https://docs.aws.amazon.com/ram/latest/APIReference/API_PromoteResourceShareCreatedFromPolicy.html>`__ in order for the resource to be visible to all principals with whom the resource is shared.

  

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


  **Request Syntax**
  ::

    response = client.put_image_recipe_policy(
        imageRecipeArn='string',
        policy='string'
    )
    
  :type imageRecipeArn: string
  :param imageRecipeArn: **[REQUIRED]** 

    The Amazon Resource Name (ARN) of the image recipe that this policy should be applied to.

    

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

    The policy to apply.

    

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

    
    ::

      {
          'requestId': 'string',
          'imageRecipeArn': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **requestId** *(string) --* 

        The request ID that uniquely identifies this request.

        
      

      - **imageRecipeArn** *(string) --* 

        The Amazon Resource Name (ARN) of the image recipe that this policy was applied to.

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

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

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

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

  