Copyright | (c) 2013-2016 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Creates a new managed policy for your AWS account.
This operation creates a policy version with a version identifier of
v1
and sets v1 as the policy's default version. For more information
about policy versions, see
Versioning for Managed Policies
in the IAM User Guide.
For more information about managed policies in general, refer to Managed Policies and Inline Policies in the IAM User Guide.
- createPolicy :: Text -> Text -> CreatePolicy
- data CreatePolicy
- cpPath :: Lens' CreatePolicy (Maybe Text)
- cpDescription :: Lens' CreatePolicy (Maybe Text)
- cpPolicyName :: Lens' CreatePolicy Text
- cpPolicyDocument :: Lens' CreatePolicy Text
- createPolicyResponse :: Int -> CreatePolicyResponse
- data CreatePolicyResponse
- cprsPolicy :: Lens' CreatePolicyResponse (Maybe Policy)
- cprsResponseStatus :: Lens' CreatePolicyResponse Int
Creating a Request
Creates a value of CreatePolicy
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data CreatePolicy Source
See: createPolicy
smart constructor.
Request Lenses
cpPath :: Lens' CreatePolicy (Maybe Text) Source
The path for the policy.
For more information about paths, see IAM Identifiers in the IAM User Guide.
This parameter is optional. If it is not included, it defaults to a slash (/).
cpDescription :: Lens' CreatePolicy (Maybe Text) Source
A friendly description of the policy.
Typically used to store information about the permissions defined in the policy. For example, "Grants access to production DynamoDB tables."
The policy description is immutable. After a value is assigned, it cannot be changed.
cpPolicyName :: Lens' CreatePolicy Text Source
The name of the policy document.
cpPolicyDocument :: Lens' CreatePolicy Text Source
The policy document.
Destructuring the Response
Creates a value of CreatePolicyResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data CreatePolicyResponse Source
Contains the response to a successful CreatePolicy request.
See: createPolicyResponse
smart constructor.
Response Lenses
cprsPolicy :: Lens' CreatePolicyResponse (Maybe Policy) Source
Information about the policy.
cprsResponseStatus :: Lens' CreatePolicyResponse Int Source
The response status code.