| Copyright | (c) 2013-2018 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 |
Network.AWS.IoT.CreatePolicy
Description
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.
Synopsis
- 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
Arguments
| :: Text | |
| -> Text | |
| -> CreatePolicy |
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:
cpPolicyName- The policy name.cpPolicyDocument- The JSON document that describes the policy. policyDocument must have a minimum length of 1, with a maximum length of 2048, excluding whitespace.
data CreatePolicy Source #
The input for the CreatePolicy operation.
See: createPolicy smart constructor.
Instances
Request Lenses
cpPolicyName :: Lens' CreatePolicy Text Source #
The policy name.
cpPolicyDocument :: Lens' CreatePolicy Text Source #
The JSON document that describes the policy. policyDocument must have a minimum length of 1, with a maximum length of 2048, excluding whitespace.
Destructuring the Response
Arguments
| :: Int | |
| -> CreatePolicyResponse |
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:
cprsPolicyName- The policy name.cprsPolicyDocument- The JSON document that describes the policy.cprsPolicyVersionId- The policy version ID.cprsPolicyARN- The policy ARN.cprsResponseStatus- -- | The response status code.
data CreatePolicyResponse Source #
The output from the CreatePolicy operation.
See: createPolicyResponse smart constructor.
Instances
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.