Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Creates or updates a Systems Manager resource policy. A resource policy
helps you to define the IAM entity (for example, an Amazon Web Services
account) that can manage your Systems Manager resources. Currently,
OpsItemGroup
is the only resource that supports Systems Manager
resource policies. The resource policy for OpsItemGroup
enables Amazon
Web Services accounts to view and interact with OpsCenter operational
work items (OpsItems).
Synopsis
- data PutResourcePolicy = PutResourcePolicy' {
- policyHash :: Maybe Text
- policyId :: Maybe Text
- resourceArn :: Text
- policy :: Text
- newPutResourcePolicy :: Text -> Text -> PutResourcePolicy
- putResourcePolicy_policyHash :: Lens' PutResourcePolicy (Maybe Text)
- putResourcePolicy_policyId :: Lens' PutResourcePolicy (Maybe Text)
- putResourcePolicy_resourceArn :: Lens' PutResourcePolicy Text
- putResourcePolicy_policy :: Lens' PutResourcePolicy Text
- data PutResourcePolicyResponse = PutResourcePolicyResponse' {
- policyHash :: Maybe Text
- policyId :: Maybe Text
- httpStatus :: Int
- newPutResourcePolicyResponse :: Int -> PutResourcePolicyResponse
- putResourcePolicyResponse_policyHash :: Lens' PutResourcePolicyResponse (Maybe Text)
- putResourcePolicyResponse_policyId :: Lens' PutResourcePolicyResponse (Maybe Text)
- putResourcePolicyResponse_httpStatus :: Lens' PutResourcePolicyResponse Int
Creating a Request
data PutResourcePolicy Source #
See: newPutResourcePolicy
smart constructor.
PutResourcePolicy' | |
|
Instances
Create a value of PutResourcePolicy
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:
PutResourcePolicy
, putResourcePolicy_policyHash
- ID of the current policy version. The hash helps to prevent a situation
where multiple users attempt to overwrite a policy. You must provide
this hash when updating or deleting a policy.
PutResourcePolicy
, putResourcePolicy_policyId
- The policy ID.
$sel:resourceArn:PutResourcePolicy'
, putResourcePolicy_resourceArn
- Amazon Resource Name (ARN) of the resource to which you want to attach a
policy.
PutResourcePolicy
, putResourcePolicy_policy
- A policy you want to associate with a resource.
Request Lenses
putResourcePolicy_policyHash :: Lens' PutResourcePolicy (Maybe Text) Source #
ID of the current policy version. The hash helps to prevent a situation where multiple users attempt to overwrite a policy. You must provide this hash when updating or deleting a policy.
putResourcePolicy_policyId :: Lens' PutResourcePolicy (Maybe Text) Source #
The policy ID.
putResourcePolicy_resourceArn :: Lens' PutResourcePolicy Text Source #
Amazon Resource Name (ARN) of the resource to which you want to attach a policy.
putResourcePolicy_policy :: Lens' PutResourcePolicy Text Source #
A policy you want to associate with a resource.
Destructuring the Response
data PutResourcePolicyResponse Source #
See: newPutResourcePolicyResponse
smart constructor.
PutResourcePolicyResponse' | |
|
Instances
newPutResourcePolicyResponse Source #
Create a value of PutResourcePolicyResponse
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:
PutResourcePolicy
, putResourcePolicyResponse_policyHash
- ID of the current policy version.
PutResourcePolicy
, putResourcePolicyResponse_policyId
- The policy ID. To update a policy, you must specify PolicyId
and
PolicyHash
.
$sel:httpStatus:PutResourcePolicyResponse'
, putResourcePolicyResponse_httpStatus
- The response's http status code.
Response Lenses
putResourcePolicyResponse_policyHash :: Lens' PutResourcePolicyResponse (Maybe Text) Source #
ID of the current policy version.
putResourcePolicyResponse_policyId :: Lens' PutResourcePolicyResponse (Maybe Text) Source #
The policy ID. To update a policy, you must specify PolicyId
and
PolicyHash
.
putResourcePolicyResponse_httpStatus :: Lens' PutResourcePolicyResponse Int Source #
The response's http status code.