Copyright | (c) 2013-2015 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 an AWS IoT policy.
The created policy is the default version for the policy. This operation creates a policy version with a version identifier of 1 and sets 1 as the policy's default version.
See: AWS API Reference for CreatePolicy.
- createPolicy :: Text -> Text -> CreatePolicy
- data CreatePolicy
- cpPolicyName :: Lens' CreatePolicy Text
- cpPolicyDocument :: Lens' CreatePolicy Text
- createPolicyResponse :: Int -> CreatePolicyResponse
- data CreatePolicyResponse
- cprsPolicyName :: Lens' CreatePolicyResponse (Maybe Text)
- cprsPolicyDocument :: Lens' CreatePolicyResponse (Maybe Text)
- cprsPolicyVersionId :: Lens' CreatePolicyResponse (Maybe Text)
- cprsPolicyARN :: Lens' CreatePolicyResponse (Maybe Text)
- 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
The input for the CreatePolicy operation.
See: createPolicy
smart constructor.
Request Lenses
cpPolicyName :: Lens' CreatePolicy Text Source
The policy name.
cpPolicyDocument :: Lens' CreatePolicy Text Source
The JSON document that describes the policy. The length of the policyDocument must be a minimum length of 1, with a maximum length of 2048, excluding whitespace.
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
The output from the CreatePolicy operation.
See: createPolicyResponse
smart constructor.
Response Lenses
cprsPolicyName :: Lens' CreatePolicyResponse (Maybe Text) Source
The policy name.
cprsPolicyDocument :: Lens' CreatePolicyResponse (Maybe Text) Source
The JSON document that describes the policy.
cprsPolicyVersionId :: Lens' CreatePolicyResponse (Maybe Text) Source
The policy version ID.
cprsPolicyARN :: Lens' CreatePolicyResponse (Maybe Text) Source
The policy ARN.
cprsResponseStatus :: Lens' CreatePolicyResponse Int Source
The response status code.