imagebuilder / Client / put_image_policy
put_image_policy#
- imagebuilder.Client.put_image_policy(**kwargs)#
- Applies a policy to an image. We recommend that you call the RAM API CreateResourceShare to share resources. If you call the Image Builder API - PutImagePolicy, you must also call the RAM API PromoteResourceShareCreatedFromPolicy in order for the resource to be visible to all principals with whom the resource is shared.- See also: AWS API Documentation - Request Syntax- response = client.put_image_policy( imageArn='string', policy='string' ) - Parameters:
- imageArn (string) – - [REQUIRED] - The Amazon Resource Name (ARN) of the image that this policy should be applied to. 
- policy (string) – - [REQUIRED] - The policy to apply. 
 
- Return type:
- dict 
- Returns:
- Response Syntax- { 'requestId': 'string', 'imageArn': 'string' } - Response Structure- (dict) – - requestId (string) – - The request ID that uniquely identifies this request. 
- imageArn (string) – - The Amazon Resource Name (ARN) of the image that this policy was applied to. 
 
 
 - Exceptions- imagebuilder.Client.exceptions.ServiceException
- imagebuilder.Client.exceptions.ClientException
- imagebuilder.Client.exceptions.ServiceUnavailableException
- imagebuilder.Client.exceptions.InvalidRequestException
- imagebuilder.Client.exceptions.InvalidParameterValueException
- imagebuilder.Client.exceptions.ResourceNotFoundException
- imagebuilder.Client.exceptions.ForbiddenException
- imagebuilder.Client.exceptions.CallRateLimitExceededException