Copyright | (c) 2013-2021 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 |
Creates a new version of the specified 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).
Requires permission to access the CreatePolicyVersion action.
Synopsis
- data CreatePolicyVersion = CreatePolicyVersion' {}
- newCreatePolicyVersion :: Text -> Text -> CreatePolicyVersion
- createPolicyVersion_setAsDefault :: Lens' CreatePolicyVersion (Maybe Bool)
- createPolicyVersion_policyName :: Lens' CreatePolicyVersion Text
- createPolicyVersion_policyDocument :: Lens' CreatePolicyVersion Text
- data CreatePolicyVersionResponse = CreatePolicyVersionResponse' {}
- newCreatePolicyVersionResponse :: Int -> CreatePolicyVersionResponse
- createPolicyVersionResponse_policyDocument :: Lens' CreatePolicyVersionResponse (Maybe Text)
- createPolicyVersionResponse_policyVersionId :: Lens' CreatePolicyVersionResponse (Maybe Text)
- createPolicyVersionResponse_policyArn :: Lens' CreatePolicyVersionResponse (Maybe Text)
- createPolicyVersionResponse_isDefaultVersion :: Lens' CreatePolicyVersionResponse (Maybe Bool)
- createPolicyVersionResponse_httpStatus :: Lens' CreatePolicyVersionResponse Int
Creating a Request
data CreatePolicyVersion Source #
The input for the CreatePolicyVersion operation.
See: newCreatePolicyVersion
smart constructor.
CreatePolicyVersion' | |
|
Instances
newCreatePolicyVersion Source #
:: Text | |
-> Text | |
-> CreatePolicyVersion |
Create a value of CreatePolicyVersion
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:setAsDefault:CreatePolicyVersion'
, createPolicyVersion_setAsDefault
- 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).
$sel:policyName:CreatePolicyVersion'
, createPolicyVersion_policyName
- The policy name.
$sel:policyDocument:CreatePolicyVersion'
, createPolicyVersion_policyDocument
- The JSON document that describes the policy. Minimum length of 1.
Maximum length of 2048, excluding whitespace.
Request Lenses
createPolicyVersion_setAsDefault :: 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).
createPolicyVersion_policyName :: Lens' CreatePolicyVersion Text Source #
The policy name.
createPolicyVersion_policyDocument :: Lens' CreatePolicyVersion Text Source #
The JSON document that describes the policy. Minimum length of 1. Maximum length of 2048, excluding whitespace.
Destructuring the Response
data CreatePolicyVersionResponse Source #
The output of the CreatePolicyVersion operation.
See: newCreatePolicyVersionResponse
smart constructor.
CreatePolicyVersionResponse' | |
|
Instances
newCreatePolicyVersionResponse Source #
Create a value of CreatePolicyVersionResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:policyDocument:CreatePolicyVersion'
, createPolicyVersionResponse_policyDocument
- The JSON document that describes the policy.
$sel:policyVersionId:CreatePolicyVersionResponse'
, createPolicyVersionResponse_policyVersionId
- The policy version ID.
$sel:policyArn:CreatePolicyVersionResponse'
, createPolicyVersionResponse_policyArn
- The policy ARN.
$sel:isDefaultVersion:CreatePolicyVersionResponse'
, createPolicyVersionResponse_isDefaultVersion
- Specifies whether the policy version is the default.
$sel:httpStatus:CreatePolicyVersionResponse'
, createPolicyVersionResponse_httpStatus
- The response's http status code.
Response Lenses
createPolicyVersionResponse_policyDocument :: Lens' CreatePolicyVersionResponse (Maybe Text) Source #
The JSON document that describes the policy.
createPolicyVersionResponse_policyVersionId :: Lens' CreatePolicyVersionResponse (Maybe Text) Source #
The policy version ID.
createPolicyVersionResponse_policyArn :: Lens' CreatePolicyVersionResponse (Maybe Text) Source #
The policy ARN.
createPolicyVersionResponse_isDefaultVersion :: Lens' CreatePolicyVersionResponse (Maybe Bool) Source #
Specifies whether the policy version is the default.
createPolicyVersionResponse_httpStatus :: Lens' CreatePolicyVersionResponse Int Source #
The response's http status code.