Copyright | (c) 2013-2017 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 |
Language | Haskell2010 |
Updates an existing policy with a new name, description, or content. If any parameter is not supplied, that value remains unchanged. Note that you cannot change a policy's type.
This operation can be called only from the organization's master account.
- updatePolicy :: Text -> UpdatePolicy
- data UpdatePolicy
- upContent :: Lens' UpdatePolicy (Maybe Text)
- upName :: Lens' UpdatePolicy (Maybe Text)
- upDescription :: Lens' UpdatePolicy (Maybe Text)
- upPolicyId :: Lens' UpdatePolicy Text
- updatePolicyResponse :: Int -> UpdatePolicyResponse
- data UpdatePolicyResponse
- uprsPolicy :: Lens' UpdatePolicyResponse (Maybe Policy)
- uprsResponseStatus :: Lens' UpdatePolicyResponse Int
Creating a Request
Creates a value of UpdatePolicy
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
upContent
- 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 .upName
- 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.upDescription
- If provided, the new description for the policy.upPolicyId
- 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 lower-case letters or digits.
data UpdatePolicy Source #
See: updatePolicy
smart constructor.
Request Lenses
upContent :: 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 .
upName :: 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.
upDescription :: Lens' UpdatePolicy (Maybe Text) Source #
If provided, the new description for the policy.
upPolicyId :: 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 lower-case letters or digits.
Destructuring the Response
Creates a value of UpdatePolicyResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
uprsPolicy
- A structure that contains details about the updated policy, showing the requested changes.uprsResponseStatus
- -- | The response status code.
data UpdatePolicyResponse Source #
See: updatePolicyResponse
smart constructor.
Response Lenses
uprsPolicy :: Lens' UpdatePolicyResponse (Maybe Policy) Source #
A structure that contains details about the updated policy, showing the requested changes.
uprsResponseStatus :: Lens' UpdatePolicyResponse Int Source #
- - | The response status code.