imagebuilder / Client / put_container_recipe_policy
put_container_recipe_policy¶
- imagebuilder.Client.put_container_recipe_policy(**kwargs)¶
Applies a policy to a container recipe. The preferred way to share resources is with the RAM API CreateResourceShare. If you use the PutContainerRecipePolicy operation instead, you must also call the RAM API PromoteResourceShareCreatedFromPolicy. Otherwise, the resource isn’t visible to the principals that it’s shared with.
See also: AWS API Documentation
Request Syntax
response = client.put_container_recipe_policy( containerRecipeArn='string', policy='string' )
- Parameters:
containerRecipeArn (string) –
[REQUIRED]
The Amazon Resource Name (ARN) of the container recipe that this policy should be applied to.
policy (string) –
[REQUIRED]
The policy to apply to the container recipe.
- Return type:
dict
- Returns:
Response Syntax
{ 'requestId': 'string', 'containerRecipeArn': 'string' }
Response Structure
(dict) –
requestId (string) –
The request ID that uniquely identifies this request.
containerRecipeArn (string) –
The Amazon Resource Name (ARN) of the container recipe that this policy was applied to.
Exceptions
imagebuilder.Client.exceptions.ServiceExceptionimagebuilder.Client.exceptions.ClientExceptionimagebuilder.Client.exceptions.ServiceUnavailableExceptionimagebuilder.Client.exceptions.InvalidRequestExceptionimagebuilder.Client.exceptions.InvalidParameterValueExceptionimagebuilder.Client.exceptions.ResourceNotFoundExceptionimagebuilder.Client.exceptions.ForbiddenExceptionimagebuilder.Client.exceptions.CallRateLimitExceededException