Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Applies a policy to a component. We recommend that you call the RAM API
CreateResourceShare
to share resources. If you call the Image Builder API
PutComponentPolicy
, 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.
Synopsis
- data PutComponentPolicy = PutComponentPolicy' {
- componentArn :: Text
- policy :: Text
- newPutComponentPolicy :: Text -> Text -> PutComponentPolicy
- putComponentPolicy_componentArn :: Lens' PutComponentPolicy Text
- putComponentPolicy_policy :: Lens' PutComponentPolicy Text
- data PutComponentPolicyResponse = PutComponentPolicyResponse' {
- requestId :: Maybe Text
- componentArn :: Maybe Text
- httpStatus :: Int
- newPutComponentPolicyResponse :: Int -> PutComponentPolicyResponse
- putComponentPolicyResponse_requestId :: Lens' PutComponentPolicyResponse (Maybe Text)
- putComponentPolicyResponse_componentArn :: Lens' PutComponentPolicyResponse (Maybe Text)
- putComponentPolicyResponse_httpStatus :: Lens' PutComponentPolicyResponse Int
Creating a Request
data PutComponentPolicy Source #
See: newPutComponentPolicy
smart constructor.
PutComponentPolicy' | |
|
Instances
newPutComponentPolicy Source #
:: Text | |
-> Text | |
-> PutComponentPolicy |
Create a value of PutComponentPolicy
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:componentArn:PutComponentPolicy'
, putComponentPolicy_componentArn
- The Amazon Resource Name (ARN) of the component that this policy should
be applied to.
$sel:policy:PutComponentPolicy'
, putComponentPolicy_policy
- The policy to apply.
Request Lenses
putComponentPolicy_componentArn :: Lens' PutComponentPolicy Text Source #
The Amazon Resource Name (ARN) of the component that this policy should be applied to.
putComponentPolicy_policy :: Lens' PutComponentPolicy Text Source #
The policy to apply.
Destructuring the Response
data PutComponentPolicyResponse Source #
See: newPutComponentPolicyResponse
smart constructor.
PutComponentPolicyResponse' | |
|
Instances
newPutComponentPolicyResponse Source #
Create a value of PutComponentPolicyResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:requestId:PutComponentPolicyResponse'
, putComponentPolicyResponse_requestId
- The request ID that uniquely identifies this request.
$sel:componentArn:PutComponentPolicy'
, putComponentPolicyResponse_componentArn
- The Amazon Resource Name (ARN) of the component that this policy was
applied to.
$sel:httpStatus:PutComponentPolicyResponse'
, putComponentPolicyResponse_httpStatus
- The response's http status code.
Response Lenses
putComponentPolicyResponse_requestId :: Lens' PutComponentPolicyResponse (Maybe Text) Source #
The request ID that uniquely identifies this request.
putComponentPolicyResponse_componentArn :: Lens' PutComponentPolicyResponse (Maybe Text) Source #
The Amazon Resource Name (ARN) of the component that this policy was applied to.
putComponentPolicyResponse_httpStatus :: Lens' PutComponentPolicyResponse Int Source #
The response's http status code.