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 |
Creates a new version of the specified AWS IoT policy. To update a policy, create a new policy version. A managed policy can have up to five versions. If the policy has five versions, you must use DeletePolicyVersion
to delete an existing version before you create a new one.
Optionally, you can set the new version as the policy's default version. The default version is the operative version (that is, the version that is in effect for the certificates to which the policy is attached).
Synopsis
- createPolicyVersion :: Text -> Text -> CreatePolicyVersion
- data CreatePolicyVersion
- cpvSetAsDefault :: Lens' CreatePolicyVersion (Maybe Bool)
- cpvPolicyName :: Lens' CreatePolicyVersion Text
- cpvPolicyDocument :: Lens' CreatePolicyVersion Text
- createPolicyVersionResponse :: Int -> CreatePolicyVersionResponse
- data CreatePolicyVersionResponse
- cpvrsPolicyDocument :: Lens' CreatePolicyVersionResponse (Maybe Text)
- cpvrsPolicyVersionId :: Lens' CreatePolicyVersionResponse (Maybe Text)
- cpvrsPolicyARN :: Lens' CreatePolicyVersionResponse (Maybe Text)
- cpvrsIsDefaultVersion :: Lens' CreatePolicyVersionResponse (Maybe Bool)
- cpvrsResponseStatus :: Lens' CreatePolicyVersionResponse Int
Creating a Request
Creates a value of CreatePolicyVersion
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
cpvSetAsDefault
- Specifies whether the policy version is set as the default. When this parameter is true, the new policy version becomes the operative version (that is, the version that is in effect for the certificates to which the policy is attached).cpvPolicyName
- The policy name.cpvPolicyDocument
- The JSON document that describes the policy. Minimum length of 1. Maximum length of 2048, excluding whitespace.
data CreatePolicyVersion Source #
The input for the CreatePolicyVersion operation.
See: createPolicyVersion
smart constructor.
Instances
Request Lenses
cpvSetAsDefault :: Lens' CreatePolicyVersion (Maybe Bool) Source #
Specifies whether the policy version is set as the default. When this parameter is true, the new policy version becomes the operative version (that is, the version that is in effect for the certificates to which the policy is attached).
cpvPolicyName :: Lens' CreatePolicyVersion Text Source #
The policy name.
cpvPolicyDocument :: Lens' CreatePolicyVersion Text Source #
The JSON document that describes the policy. Minimum length of 1. Maximum length of 2048, excluding whitespace.
Destructuring the Response
createPolicyVersionResponse Source #
Creates a value of CreatePolicyVersionResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
cpvrsPolicyDocument
- The JSON document that describes the policy.cpvrsPolicyVersionId
- The policy version ID.cpvrsPolicyARN
- The policy ARN.cpvrsIsDefaultVersion
- Specifies whether the policy version is the default.cpvrsResponseStatus
- -- | The response status code.
data CreatePolicyVersionResponse Source #
The output of the CreatePolicyVersion operation.
See: createPolicyVersionResponse
smart constructor.
Instances
Response Lenses
cpvrsPolicyDocument :: Lens' CreatePolicyVersionResponse (Maybe Text) Source #
The JSON document that describes the policy.
cpvrsPolicyVersionId :: Lens' CreatePolicyVersionResponse (Maybe Text) Source #
The policy version ID.
cpvrsPolicyARN :: Lens' CreatePolicyVersionResponse (Maybe Text) Source #
The policy ARN.
cpvrsIsDefaultVersion :: Lens' CreatePolicyVersionResponse (Maybe Bool) Source #
Specifies whether the policy version is the default.
cpvrsResponseStatus :: Lens' CreatePolicyVersionResponse Int Source #
- - | The response status code.