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 |
Updates an existing policy with a new name, description, or content. If you don't supply any parameter, that value remains unchanged. You can't change a policy's type.
This operation can be called only from the organization's management account.
Synopsis
- data UpdatePolicy = UpdatePolicy' {}
- newUpdatePolicy :: Text -> UpdatePolicy
- updatePolicy_content :: Lens' UpdatePolicy (Maybe Text)
- updatePolicy_name :: Lens' UpdatePolicy (Maybe Text)
- updatePolicy_description :: Lens' UpdatePolicy (Maybe Text)
- updatePolicy_policyId :: Lens' UpdatePolicy Text
- data UpdatePolicyResponse = UpdatePolicyResponse' {
- policy :: Maybe Policy
- httpStatus :: Int
- newUpdatePolicyResponse :: Int -> UpdatePolicyResponse
- updatePolicyResponse_policy :: Lens' UpdatePolicyResponse (Maybe Policy)
- updatePolicyResponse_httpStatus :: Lens' UpdatePolicyResponse Int
Creating a Request
data UpdatePolicy Source #
See: newUpdatePolicy
smart constructor.
UpdatePolicy' | |
|
Instances
Create a value of UpdatePolicy
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:content:UpdatePolicy'
, updatePolicy_content
- If provided, the new content for the policy. The text must be correctly
formatted JSON that complies with the syntax for the policy's type. For
more information, see
Service Control Policy Syntax
in the AWS Organizations User Guide.
$sel:name:UpdatePolicy'
, updatePolicy_name
- If provided, the new name for the policy.
The regex pattern that is used to validate this parameter is a string of any of the characters in the ASCII character range.
$sel:description:UpdatePolicy'
, updatePolicy_description
- If provided, the new description for the policy.
$sel:policyId:UpdatePolicy'
, updatePolicy_policyId
- The unique identifier (ID) of the policy that you want to update.
The regex pattern for a policy ID string requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits, or the underscore character (_).
Request Lenses
updatePolicy_content :: Lens' UpdatePolicy (Maybe Text) Source #
If provided, the new content for the policy. The text must be correctly formatted JSON that complies with the syntax for the policy's type. For more information, see Service Control Policy Syntax in the AWS Organizations User Guide.
updatePolicy_name :: Lens' UpdatePolicy (Maybe Text) Source #
If provided, the new name for the policy.
The regex pattern that is used to validate this parameter is a string of any of the characters in the ASCII character range.
updatePolicy_description :: Lens' UpdatePolicy (Maybe Text) Source #
If provided, the new description for the policy.
updatePolicy_policyId :: Lens' UpdatePolicy Text Source #
The unique identifier (ID) of the policy that you want to update.
The regex pattern for a policy ID string requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits, or the underscore character (_).
Destructuring the Response
data UpdatePolicyResponse Source #
See: newUpdatePolicyResponse
smart constructor.
UpdatePolicyResponse' | |
|
Instances
newUpdatePolicyResponse Source #
Create a value of UpdatePolicyResponse
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:policy:UpdatePolicyResponse'
, updatePolicyResponse_policy
- A structure that contains details about the updated policy, showing the
requested changes.
$sel:httpStatus:UpdatePolicyResponse'
, updatePolicyResponse_httpStatus
- The response's http status code.
Response Lenses
updatePolicyResponse_policy :: Lens' UpdatePolicyResponse (Maybe Policy) Source #
A structure that contains details about the updated policy, showing the requested changes.
updatePolicyResponse_httpStatus :: Lens' UpdatePolicyResponse Int Source #
The response's http status code.