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 managed policy. To update a managed policy, you create a new policy version. A managed policy can have up to five versions. If the policy has five versions, you must delete an existing version using DeletePolicyVersion
before you create a new version.
Optionally, you can set the new version as the policy's default version. The default version is the version that is in effect for the IAM users, groups, and roles to which the policy is attached.
For more information about managed policy versions, see Versioning for Managed Policies in the IAM User Guide .
- createPolicyVersion :: Text -> Text -> CreatePolicyVersion
- data CreatePolicyVersion
- cpvSetAsDefault :: Lens' CreatePolicyVersion (Maybe Bool)
- cpvPolicyARN :: Lens' CreatePolicyVersion Text
- cpvPolicyDocument :: Lens' CreatePolicyVersion Text
- createPolicyVersionResponse :: Int -> CreatePolicyVersionResponse
- data CreatePolicyVersionResponse
- cpvrsPolicyVersion :: Lens' CreatePolicyVersionResponse (Maybe PolicyVersion)
- 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 to set this version as the policy's default version. When this parameter istrue
, the new policy version becomes the operative version. That is, it becomes the version that is in effect for the IAM users, groups, and roles that the policy is attached to. For more information about managed policy versions, see Versioning for Managed Policies in the IAM User Guide .cpvPolicyARN
- The Amazon Resource Name (ARN) of the IAM policy to which you want to add a new version. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference .cpvPolicyDocument
- The JSON policy document that you want to use as the content for this new version of the policy. The regex pattern used to validate this parameter is a string of characters consisting of the following: * Any printable ASCII character ranging from the space character (u0020) through the end of the ASCII character range * The printable characters in the Basic Latin and Latin-1 Supplement character set (through u00FF) * The special characters tab (u0009), line feed (u000A), and carriage return (u000D)
data CreatePolicyVersion Source #
See: createPolicyVersion
smart constructor.
Request Lenses
cpvSetAsDefault :: Lens' CreatePolicyVersion (Maybe Bool) Source #
Specifies whether to set this version as the policy's default version. When this parameter is true
, the new policy version becomes the operative version. That is, it becomes the version that is in effect for the IAM users, groups, and roles that the policy is attached to. For more information about managed policy versions, see Versioning for Managed Policies in the IAM User Guide .
cpvPolicyARN :: Lens' CreatePolicyVersion Text Source #
The Amazon Resource Name (ARN) of the IAM policy to which you want to add a new version. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference .
cpvPolicyDocument :: Lens' CreatePolicyVersion Text Source #
The JSON policy document that you want to use as the content for this new version of the policy. The regex pattern used to validate this parameter is a string of characters consisting of the following: * Any printable ASCII character ranging from the space character (u0020) through the end of the ASCII character range * The printable characters in the Basic Latin and Latin-1 Supplement character set (through u00FF) * The special characters tab (u0009), line feed (u000A), and carriage return (u000D)
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:
cpvrsPolicyVersion
- A structure containing details about the new policy version.cpvrsResponseStatus
- -- | The response status code.
data CreatePolicyVersionResponse Source #
Contains the response to a successful CreatePolicyVersion
request.
See: createPolicyVersionResponse
smart constructor.
Response Lenses
cpvrsPolicyVersion :: Lens' CreatePolicyVersionResponse (Maybe PolicyVersion) Source #
A structure containing details about the new policy version.
cpvrsResponseStatus :: Lens' CreatePolicyVersionResponse Int Source #
- - | The response status code.