CmdID / aws / aws imagebuilder
aws imagebuilder get-component-policy
Retrieves a component policy. AWS CLI reference
1 example 1 option Its page in the AWS CLI reference
Examples
To get component policy details
The following get-component-policy example lists the details of a component policy by specifying its ARN.
aws imagebuilder get-component-policy --component-arn arn:aws:imagebuilder:us-west-2:123456789012:component/my-example-component/2019.12.03/1Identify--component-arnThe Amazon Resource Name (ARN) of the component whose policy you want to retrieve.Its output
{
"requestId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
"policy": "{ \"Version\": \"2012-10-17\", \"Statement\": [ { \"Effect\": \"Allow\", \"Principal\": { \"AWS\": [ \"123456789012\" ] }, \"Action\": [ \"imagebuilder:GetComponent\", \"imagebuilder:ListComponents\" ], \"Resource\": [ \"arn:aws:imagebuilder:us-west-2:123456789012:component/my-example-component/2019.12.03/1\" ] } ] }"
}For more information, see Share Image Builder resources with AWS RAM in the EC2 Image Builder User Guide.
Options
--component-arnThe Amazon Resource Name (ARN) of the component whose policy you want to retrieve.