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 resource policy.
You can only call this operation from the organization's management account.
Synopsis
- data PutResourcePolicy = PutResourcePolicy' {}
- newPutResourcePolicy :: Text -> PutResourcePolicy
- putResourcePolicy_tags :: Lens' PutResourcePolicy (Maybe [Tag])
- putResourcePolicy_content :: Lens' PutResourcePolicy Text
- data PutResourcePolicyResponse = PutResourcePolicyResponse' {}
- newPutResourcePolicyResponse :: Int -> PutResourcePolicyResponse
- putResourcePolicyResponse_resourcePolicy :: Lens' PutResourcePolicyResponse (Maybe ResourcePolicy)
- 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:
$sel:tags:PutResourcePolicy'
, putResourcePolicy_tags
- Updates the list of tags that you want to attach to the newly-created
resource policy. For each tag in the list, you must specify both a tag
key and a value. You can set the value to an empty string, but you
can't set it to null
. For more information about tagging, see
Tagging Organizations resources
in the Organizations User Guide.
Calls with tags apply to the initial creation of the resource policy, otherwise an exception is thrown. If any one of the tags is invalid or if you exceed the allowed number of tags for the resource policy, then the entire request fails and the resource policy is not created.
PutResourcePolicy
, putResourcePolicy_content
- If provided, the new content for the resource policy. The text must be
correctly formatted JSON that complies with the syntax for the resource
policy's type. For more information, see
Service Control Policy Syntax
in the Organizations User Guide.
Request Lenses
putResourcePolicy_tags :: Lens' PutResourcePolicy (Maybe [Tag]) Source #
Updates the list of tags that you want to attach to the newly-created
resource policy. For each tag in the list, you must specify both a tag
key and a value. You can set the value to an empty string, but you
can't set it to null
. For more information about tagging, see
Tagging Organizations resources
in the Organizations User Guide.
Calls with tags apply to the initial creation of the resource policy, otherwise an exception is thrown. If any one of the tags is invalid or if you exceed the allowed number of tags for the resource policy, then the entire request fails and the resource policy is not created.
putResourcePolicy_content :: Lens' PutResourcePolicy Text Source #
If provided, the new content for the resource policy. The text must be correctly formatted JSON that complies with the syntax for the resource policy's type. For more information, see Service Control Policy Syntax in the Organizations User Guide.
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:
$sel:resourcePolicy:PutResourcePolicyResponse'
, putResourcePolicyResponse_resourcePolicy
- A structure that contains details about the resource policy.
$sel:httpStatus:PutResourcePolicyResponse'
, putResourcePolicyResponse_httpStatus
- The response's http status code.
Response Lenses
putResourcePolicyResponse_resourcePolicy :: Lens' PutResourcePolicyResponse (Maybe ResourcePolicy) Source #
A structure that contains details about the resource policy.
putResourcePolicyResponse_httpStatus :: Lens' PutResourcePolicyResponse Int Source #
The response's http status code.