-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Amazon Key Management Service SDK.
--   
--   The types from this library are intended to be used with
--   <a>amazonka</a>, which provides mechanisms for specifying AuthN/AuthZ
--   information, sending requests, and receiving responses.
--   
--   Lenses are used for constructing and manipulating types, due to the
--   depth of nesting of AWS types and transparency regarding
--   de/serialisation into more palatable Haskell values. The provided
--   lenses should be compatible with any of the major lens libraries such
--   as <a>lens</a> or <a>lens-family-core</a>.
--   
--   See <a>Network.AWS.KMS</a> or <a>the AWS documentation</a> to get
--   started.
@package amazonka-kms
@version 1.4.5


module Network.AWS.KMS.Types

-- | API version <tt>2014-11-01</tt> of the Amazon Key Management Service
--   SDK configuration.
kms :: Service

-- | The request was rejected because the marker that specifies where
--   pagination should next begin is not valid.
_InvalidMarkerException :: AsError a => Getting (First ServiceError) a ServiceError

-- | The request was rejected because the state of the specified resource
--   is not valid for this request.
--   
--   For more information about how key state affects the use of a CMK, see
--   <a>How Key State Affects Use of a Customer Master Key</a> in the
--   <i>AWS Key Management Service Developer Guide</i> .
_KMSInvalidStateException :: AsError a => Getting (First ServiceError) a ServiceError

-- | The request was rejected because the specified <tt>KeySpec</tt> value
--   is not valid.
_InvalidKeyUsageException :: AsError a => Getting (First ServiceError) a ServiceError

-- | The request was rejected because the specified policy is not
--   syntactically or semantically correct.
_MalformedPolicyDocumentException :: AsError a => Getting (First ServiceError) a ServiceError

-- | The request was rejected because a specified parameter is not
--   supported or a specified resource is not valid for this operation.
_UnsupportedOperationException :: AsError a => Getting (First ServiceError) a ServiceError

-- | The request was rejected because the specified CMK is not enabled.
_DisabledException :: AsError a => Getting (First ServiceError) a ServiceError

-- | The request was rejected because the specified CMK was not available.
--   The request can be retried.
_KeyUnavailableException :: AsError a => Getting (First ServiceError) a ServiceError

-- | The request was rejected because the provided key material is invalid
--   or is not the same key material that was previously imported into this
--   customer master key (CMK).
_IncorrectKeyMaterialException :: AsError a => Getting (First ServiceError) a ServiceError

-- | The request was rejected because an internal exception occurred. The
--   request can be retried.
_KMSInternalException :: AsError a => Getting (First ServiceError) a ServiceError

-- | The request was rejected because the provided import token is invalid
--   or is associated with a different customer master key (CMK).
_InvalidImportTokenException :: AsError a => Getting (First ServiceError) a ServiceError

-- | The request was rejected because the specified entity or resource
--   could not be found.
_NotFoundException :: AsError a => Getting (First ServiceError) a ServiceError

-- | The request was rejected because the specified alias name is not
--   valid.
_InvalidAliasNameException :: AsError a => Getting (First ServiceError) a ServiceError

-- | The request was rejected because the specified <tt>GrantId</tt> is not
--   valid.
_InvalidGrantIdException :: AsError a => Getting (First ServiceError) a ServiceError

-- | The request was rejected because the specified grant token is not
--   valid.
_InvalidGrantTokenException :: AsError a => Getting (First ServiceError) a ServiceError

-- | The request was rejected because a specified ARN was not valid.
_InvalidARNException :: AsError a => Getting (First ServiceError) a ServiceError

-- | The system timed out while trying to fulfill the request. The request
--   can be retried.
_DependencyTimeoutException :: AsError a => Getting (First ServiceError) a ServiceError

-- | The request was rejected because the provided import token is expired.
--   Use <tt>GetParametersForImport</tt> to retrieve a new import token and
--   public key, use the new public key to encrypt the key material, and
--   then try the request again.
_ExpiredImportTokenException :: AsError a => Getting (First ServiceError) a ServiceError

-- | The request was rejected because the specified ciphertext has been
--   corrupted or is otherwise invalid.
_InvalidCiphertextException :: AsError a => Getting (First ServiceError) a ServiceError

-- | The request was rejected because it attempted to create a resource
--   that already exists.
_AlreadyExistsException :: AsError a => Getting (First ServiceError) a ServiceError

-- | The request was rejected because a limit was exceeded. For more
--   information, see <a>Limits</a> in the <i>AWS Key Management Service
--   Developer Guide</i> .
_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
data AlgorithmSpec
RsaesOaepSha1 :: AlgorithmSpec
RsaesOaepSha256 :: AlgorithmSpec
RsaesPKCS1V15 :: AlgorithmSpec
data DataKeySpec
AES128 :: DataKeySpec
AES256 :: DataKeySpec
data ExpirationModelType
KeyMaterialDoesNotExpire :: ExpirationModelType
KeyMaterialExpires :: ExpirationModelType
data GrantOperation
CreateGrant :: GrantOperation
Decrypt :: GrantOperation
DescribeKey :: GrantOperation
Encrypt :: GrantOperation
GenerateDataKey :: GrantOperation
GenerateDataKeyWithoutPlaintext :: GrantOperation
ReEncryptFrom :: GrantOperation
ReEncryptTo :: GrantOperation
RetireGrant :: GrantOperation
data KeyState
Disabled :: KeyState
Enabled :: KeyState
PendingDeletion :: KeyState
PendingImport :: KeyState
data KeyUsageType
EncryptDecrypt :: KeyUsageType
data OriginType
AWSKMS :: OriginType
External :: OriginType
data WrappingKeySpec
Rsa2048 :: WrappingKeySpec

-- | Contains information about an alias.
--   
--   <i>See:</i> <a>aliasListEntry</a> smart constructor.
data AliasListEntry

-- | Creates a value of <a>AliasListEntry</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>aleTargetKeyId</a> - String that contains the key identifier
--   pointed to by the alias.</li>
--   <li><a>aleAliasName</a> - String that contains the alias.</li>
--   <li><a>aleAliasARN</a> - String that contains the key ARN.</li>
--   </ul>
aliasListEntry :: AliasListEntry

-- | String that contains the key identifier pointed to by the alias.
aleTargetKeyId :: Lens' AliasListEntry (Maybe Text)

-- | String that contains the alias.
aleAliasName :: Lens' AliasListEntry (Maybe Text)

-- | String that contains the key ARN.
aleAliasARN :: Lens' AliasListEntry (Maybe Text)

-- | A structure for specifying the conditions under which the operations
--   permitted by the grant are allowed.
--   
--   You can use this structure to allow the operations permitted by the
--   grant only when a specified encryption context is present. For more
--   information about encryption context, see <a>Encryption Context</a> in
--   the <i>AWS Key Management Service Developer Guide</i> .
--   
--   <i>See:</i> <a>grantConstraints</a> smart constructor.
data GrantConstraints

-- | Creates a value of <a>GrantConstraints</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>gcEncryptionContextEquals</a> - Contains a list of key-value
--   pairs that must be present in the encryption context of a subsequent
--   operation permitted by the grant. When a subsequent operation
--   permitted by the grant includes an encryption context that matches
--   this list, the grant allows the operation. Otherwise, the operation is
--   not allowed.</li>
--   <li><a>gcEncryptionContextSubset</a> - Contains a list of key-value
--   pairs, a subset of which must be present in the encryption context of
--   a subsequent operation permitted by the grant. When a subsequent
--   operation permitted by the grant includes an encryption context that
--   matches this list or is a subset of this list, the grant allows the
--   operation. Otherwise, the operation is not allowed.</li>
--   </ul>
grantConstraints :: GrantConstraints

-- | Contains a list of key-value pairs that must be present in the
--   encryption context of a subsequent operation permitted by the grant.
--   When a subsequent operation permitted by the grant includes an
--   encryption context that matches this list, the grant allows the
--   operation. Otherwise, the operation is not allowed.
gcEncryptionContextEquals :: Lens' GrantConstraints (HashMap Text Text)

-- | Contains a list of key-value pairs, a subset of which must be present
--   in the encryption context of a subsequent operation permitted by the
--   grant. When a subsequent operation permitted by the grant includes an
--   encryption context that matches this list or is a subset of this list,
--   the grant allows the operation. Otherwise, the operation is not
--   allowed.
gcEncryptionContextSubset :: Lens' GrantConstraints (HashMap Text Text)

-- | Contains information about an entry in a list of grants.
--   
--   <i>See:</i> <a>grantListEntry</a> smart constructor.
data GrantListEntry

-- | Creates a value of <a>GrantListEntry</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>gleKeyId</a> - The unique identifier for the customer master
--   key (CMK) to which the grant applies.</li>
--   <li><a>gleRetiringPrincipal</a> - The principal that can retire the
--   grant.</li>
--   <li><a>gleIssuingAccount</a> - The AWS account under which the grant
--   was issued.</li>
--   <li><a>gleGrantId</a> - The unique identifier for the grant.</li>
--   <li><a>gleConstraints</a> - The conditions under which the grant's
--   operations are allowed.</li>
--   <li><a>gleGranteePrincipal</a> - The principal that receives the
--   grant's permissions.</li>
--   <li><a>gleName</a> - The friendly name that identifies the grant. If a
--   name was provided in the <a>CreateGrant</a> request, that name is
--   returned. Otherwise this value is null.</li>
--   <li><a>gleCreationDate</a> - The date and time when the grant was
--   created.</li>
--   <li><a>gleOperations</a> - The list of operations permitted by the
--   grant.</li>
--   </ul>
grantListEntry :: GrantListEntry

-- | The unique identifier for the customer master key (CMK) to which the
--   grant applies.
gleKeyId :: Lens' GrantListEntry (Maybe Text)

-- | The principal that can retire the grant.
gleRetiringPrincipal :: Lens' GrantListEntry (Maybe Text)

-- | The AWS account under which the grant was issued.
gleIssuingAccount :: Lens' GrantListEntry (Maybe Text)

-- | The unique identifier for the grant.
gleGrantId :: Lens' GrantListEntry (Maybe Text)

-- | The conditions under which the grant's operations are allowed.
gleConstraints :: Lens' GrantListEntry (Maybe GrantConstraints)

-- | The principal that receives the grant's permissions.
gleGranteePrincipal :: Lens' GrantListEntry (Maybe Text)

-- | The friendly name that identifies the grant. If a name was provided in
--   the <a>CreateGrant</a> request, that name is returned. Otherwise this
--   value is null.
gleName :: Lens' GrantListEntry (Maybe Text)

-- | The date and time when the grant was created.
gleCreationDate :: Lens' GrantListEntry (Maybe UTCTime)

-- | The list of operations permitted by the grant.
gleOperations :: Lens' GrantListEntry [GrantOperation]

-- | Contains information about each entry in the key list.
--   
--   <i>See:</i> <a>keyListEntry</a> smart constructor.
data KeyListEntry

-- | Creates a value of <a>KeyListEntry</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>kleKeyId</a> - Unique identifier of the key.</li>
--   <li><a>kleKeyARN</a> - ARN of the key.</li>
--   </ul>
keyListEntry :: KeyListEntry

-- | Unique identifier of the key.
kleKeyId :: Lens' KeyListEntry (Maybe Text)

-- | ARN of the key.
kleKeyARN :: Lens' KeyListEntry (Maybe Text)

-- | Contains metadata about a customer master key (CMK).
--   
--   This data type is used as a response element for the
--   <tt>CreateKey</tt> and <a>DescribeKey</a> operations.
--   
--   <i>See:</i> <a>keyMetadata</a> smart constructor.
data KeyMetadata

-- | Creates a value of <a>KeyMetadata</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>kmOrigin</a> - The source of the CMK's key material. When this
--   value is <tt>AWS_KMS</tt> , AWS KMS created the key material. When
--   this value is <tt>EXTERNAL</tt> , the key material was imported from
--   your existing key management infrastructure or the CMK lacks key
--   material.</li>
--   <li><a>kmExpirationModel</a> - Specifies whether the CMK's key
--   material expires. This value is present only when <tt>Origin</tt> is
--   <tt>EXTERNAL</tt> , otherwise this value is omitted.</li>
--   <li><a>kmEnabled</a> - Specifies whether the CMK is enabled. When
--   <tt>KeyState</tt> is <tt>Enabled</tt> this value is true, otherwise it
--   is false.</li>
--   <li><a>kmValidTo</a> - The time at which the imported key material
--   expires. When the key material expires, AWS KMS deletes the key
--   material and the CMK becomes unusable. This value is present only for
--   CMKs whose <tt>Origin</tt> is <tt>EXTERNAL</tt> and whose
--   <tt>ExpirationModel</tt> is <tt>KEY_MATERIAL_EXPIRES</tt> , otherwise
--   this value is omitted.</li>
--   <li><a>kmARN</a> - The Amazon Resource Name (ARN) of the CMK. For
--   examples, see <a>AWS Key Management Service (AWS KMS)</a> in the
--   Example ARNs section of the <i>AWS General Reference</i> .</li>
--   <li><a>kmKeyState</a> - The state of the CMK. For more information
--   about how key state affects the use of a CMK, see <a>How Key State
--   Affects the Use of a Customer Master Key</a> in the <i>AWS Key
--   Management Service Developer Guide</i> .</li>
--   <li><a>kmAWSAccountId</a> - The twelve-digit account ID of the AWS
--   account that owns the CMK.</li>
--   <li><a>kmKeyUsage</a> - The cryptographic operations for which you can
--   use the CMK. Currently the only allowed value is
--   <tt>ENCRYPT_DECRYPT</tt> , which means you can use the CMK for the
--   <a>Encrypt</a> and <a>Decrypt</a> operations.</li>
--   <li><a>kmCreationDate</a> - The date and time when the CMK was
--   created.</li>
--   <li><a>kmDeletionDate</a> - The date and time after which AWS KMS
--   deletes the CMK. This value is present only when <tt>KeyState</tt> is
--   <tt>PendingDeletion</tt> , otherwise this value is omitted.</li>
--   <li><a>kmDescription</a> - The description of the CMK.</li>
--   <li><a>kmKeyId</a> - The globally unique identifier for the CMK.</li>
--   </ul>
keyMetadata :: Text -> KeyMetadata

-- | The source of the CMK's key material. When this value is
--   <tt>AWS_KMS</tt> , AWS KMS created the key material. When this value
--   is <tt>EXTERNAL</tt> , the key material was imported from your
--   existing key management infrastructure or the CMK lacks key material.
kmOrigin :: Lens' KeyMetadata (Maybe OriginType)

-- | Specifies whether the CMK's key material expires. This value is
--   present only when <tt>Origin</tt> is <tt>EXTERNAL</tt> , otherwise
--   this value is omitted.
kmExpirationModel :: Lens' KeyMetadata (Maybe ExpirationModelType)

-- | Specifies whether the CMK is enabled. When <tt>KeyState</tt> is
--   <tt>Enabled</tt> this value is true, otherwise it is false.
kmEnabled :: Lens' KeyMetadata (Maybe Bool)

-- | The time at which the imported key material expires. When the key
--   material expires, AWS KMS deletes the key material and the CMK becomes
--   unusable. This value is present only for CMKs whose <tt>Origin</tt> is
--   <tt>EXTERNAL</tt> and whose <tt>ExpirationModel</tt> is
--   <tt>KEY_MATERIAL_EXPIRES</tt> , otherwise this value is omitted.
kmValidTo :: Lens' KeyMetadata (Maybe UTCTime)

-- | The Amazon Resource Name (ARN) of the CMK. For examples, see <a>AWS
--   Key Management Service (AWS KMS)</a> in the Example ARNs section of
--   the <i>AWS General Reference</i> .
kmARN :: Lens' KeyMetadata (Maybe Text)

-- | The state of the CMK. For more information about how key state affects
--   the use of a CMK, see <a>How Key State Affects the Use of a Customer
--   Master Key</a> in the <i>AWS Key Management Service Developer
--   Guide</i> .
kmKeyState :: Lens' KeyMetadata (Maybe KeyState)

-- | The twelve-digit account ID of the AWS account that owns the CMK.
kmAWSAccountId :: Lens' KeyMetadata (Maybe Text)

-- | The cryptographic operations for which you can use the CMK. Currently
--   the only allowed value is <tt>ENCRYPT_DECRYPT</tt> , which means you
--   can use the CMK for the <a>Encrypt</a> and <a>Decrypt</a> operations.
kmKeyUsage :: Lens' KeyMetadata (Maybe KeyUsageType)

-- | The date and time when the CMK was created.
kmCreationDate :: Lens' KeyMetadata (Maybe UTCTime)

-- | The date and time after which AWS KMS deletes the CMK. This value is
--   present only when <tt>KeyState</tt> is <tt>PendingDeletion</tt> ,
--   otherwise this value is omitted.
kmDeletionDate :: Lens' KeyMetadata (Maybe UTCTime)

-- | The description of the CMK.
kmDescription :: Lens' KeyMetadata (Maybe Text)

-- | The globally unique identifier for the CMK.
kmKeyId :: Lens' KeyMetadata Text

-- | <i>See:</i> <a>listGrantsResponse</a> smart constructor.
data ListGrantsResponse

-- | Creates a value of <a>ListGrantsResponse</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>lgTruncated</a> - A flag that indicates whether there are more
--   items in the list. If your results were truncated, you can use the
--   <tt>Marker</tt> parameter to make a subsequent pagination request to
--   retrieve more items in the list.</li>
--   <li><a>lgGrants</a> - A list of grants.</li>
--   <li><a>lgNextMarker</a> - When <tt>Truncated</tt> is true, this value
--   is present and contains the value to use for the <tt>Marker</tt>
--   parameter in a subsequent pagination request.</li>
--   </ul>
listGrantsResponse :: ListGrantsResponse

-- | A flag that indicates whether there are more items in the list. If
--   your results were truncated, you can use the <tt>Marker</tt> parameter
--   to make a subsequent pagination request to retrieve more items in the
--   list.
lgTruncated :: Lens' ListGrantsResponse (Maybe Bool)

-- | A list of grants.
lgGrants :: Lens' ListGrantsResponse [GrantListEntry]

-- | When <tt>Truncated</tt> is true, this value is present and contains
--   the value to use for the <tt>Marker</tt> parameter in a subsequent
--   pagination request.
lgNextMarker :: Lens' ListGrantsResponse (Maybe Text)


-- | Updates an alias to map it to a different key.
--   
--   An alias is not a property of a key. Therefore, an alias can be mapped
--   to and unmapped from an existing key without changing the properties
--   of the key.
--   
--   An alias name can contain only alphanumeric characters, forward
--   slashes (<i>), underscores (_), and dashes (-). An alias must start
--   with the word "alias" followed by a forward slash (alias</i>). An
--   alias that begins with "aws" after the forward slash (alias/aws...) is
--   reserved by Amazon Web Services (AWS).
--   
--   The alias and the key it is mapped to must be in the same AWS account
--   and the same region.
module Network.AWS.KMS.UpdateAlias

-- | Creates a value of <a>UpdateAlias</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>uaAliasName</a> - String that contains the name of the alias to
--   be modified. The name must start with the word "alias" followed by a
--   forward slash (alias<i>). Aliases that begin with "alias</i>aws" are
--   reserved.</li>
--   <li><a>uaTargetKeyId</a> - Unique identifier of the customer master
--   key to be mapped to the alias. This value can be a globally unique
--   identifier or the fully specified ARN of a key. * Key ARN Example -
--   arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
--   * Globally Unique Key ID Example -
--   12345678-1234-1234-1234-123456789012 You can call <tt>ListAliases</tt>
--   to verify that the alias is mapped to the correct <tt>TargetKeyId</tt>
--   .</li>
--   </ul>
updateAlias :: Text -> Text -> UpdateAlias

-- | <i>See:</i> <a>updateAlias</a> smart constructor.
data UpdateAlias

-- | String that contains the name of the alias to be modified. The name
--   must start with the word "alias" followed by a forward slash
--   (alias<i>). Aliases that begin with "alias</i>aws" are reserved.
uaAliasName :: Lens' UpdateAlias Text

-- | Unique identifier of the customer master key to be mapped to the
--   alias. This value can be a globally unique identifier or the fully
--   specified ARN of a key. * Key ARN Example -
--   arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
--   * Globally Unique Key ID Example -
--   12345678-1234-1234-1234-123456789012 You can call <tt>ListAliases</tt>
--   to verify that the alias is mapped to the correct <tt>TargetKeyId</tt>
--   .
uaTargetKeyId :: Lens' UpdateAlias Text

-- | Creates a value of <a>UpdateAliasResponse</a> with the minimum fields
--   required to make a request.
updateAliasResponse :: UpdateAliasResponse

-- | <i>See:</i> <a>updateAliasResponse</a> smart constructor.
data UpdateAliasResponse
instance GHC.Generics.Generic Network.AWS.KMS.UpdateAlias.UpdateAliasResponse
instance Data.Data.Data Network.AWS.KMS.UpdateAlias.UpdateAliasResponse
instance GHC.Show.Show Network.AWS.KMS.UpdateAlias.UpdateAliasResponse
instance GHC.Read.Read Network.AWS.KMS.UpdateAlias.UpdateAliasResponse
instance GHC.Classes.Eq Network.AWS.KMS.UpdateAlias.UpdateAliasResponse
instance GHC.Generics.Generic Network.AWS.KMS.UpdateAlias.UpdateAlias
instance Data.Data.Data Network.AWS.KMS.UpdateAlias.UpdateAlias
instance GHC.Show.Show Network.AWS.KMS.UpdateAlias.UpdateAlias
instance GHC.Read.Read Network.AWS.KMS.UpdateAlias.UpdateAlias
instance GHC.Classes.Eq Network.AWS.KMS.UpdateAlias.UpdateAlias
instance Network.AWS.Types.AWSRequest Network.AWS.KMS.UpdateAlias.UpdateAlias
instance Data.Hashable.Class.Hashable Network.AWS.KMS.UpdateAlias.UpdateAlias
instance Control.DeepSeq.NFData Network.AWS.KMS.UpdateAlias.UpdateAlias
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.KMS.UpdateAlias.UpdateAlias
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.KMS.UpdateAlias.UpdateAlias
instance Network.AWS.Data.Path.ToPath Network.AWS.KMS.UpdateAlias.UpdateAlias
instance Network.AWS.Data.Query.ToQuery Network.AWS.KMS.UpdateAlias.UpdateAlias
instance Control.DeepSeq.NFData Network.AWS.KMS.UpdateAlias.UpdateAliasResponse


-- | Updates the description of a key.
module Network.AWS.KMS.UpdateKeyDescription

-- | Creates a value of <a>UpdateKeyDescription</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>ukdKeyId</a> - A unique identifier for the customer master key.
--   This value can be a globally unique identifier or the fully specified
--   ARN to a key. * Key ARN Example -
--   arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
--   * Globally Unique Key ID Example -
--   12345678-1234-1234-1234-123456789012</li>
--   <li><a>ukdDescription</a> - New description for the key.</li>
--   </ul>
updateKeyDescription :: Text -> Text -> UpdateKeyDescription

-- | <i>See:</i> <a>updateKeyDescription</a> smart constructor.
data UpdateKeyDescription

-- | A unique identifier for the customer master key. This value can be a
--   globally unique identifier or the fully specified ARN to a key. * Key
--   ARN Example -
--   arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
--   * Globally Unique Key ID Example -
--   12345678-1234-1234-1234-123456789012
ukdKeyId :: Lens' UpdateKeyDescription Text

-- | New description for the key.
ukdDescription :: Lens' UpdateKeyDescription Text

-- | Creates a value of <a>UpdateKeyDescriptionResponse</a> with the
--   minimum fields required to make a request.
updateKeyDescriptionResponse :: UpdateKeyDescriptionResponse

-- | <i>See:</i> <a>updateKeyDescriptionResponse</a> smart constructor.
data UpdateKeyDescriptionResponse
instance GHC.Generics.Generic Network.AWS.KMS.UpdateKeyDescription.UpdateKeyDescriptionResponse
instance Data.Data.Data Network.AWS.KMS.UpdateKeyDescription.UpdateKeyDescriptionResponse
instance GHC.Show.Show Network.AWS.KMS.UpdateKeyDescription.UpdateKeyDescriptionResponse
instance GHC.Read.Read Network.AWS.KMS.UpdateKeyDescription.UpdateKeyDescriptionResponse
instance GHC.Classes.Eq Network.AWS.KMS.UpdateKeyDescription.UpdateKeyDescriptionResponse
instance GHC.Generics.Generic Network.AWS.KMS.UpdateKeyDescription.UpdateKeyDescription
instance Data.Data.Data Network.AWS.KMS.UpdateKeyDescription.UpdateKeyDescription
instance GHC.Show.Show Network.AWS.KMS.UpdateKeyDescription.UpdateKeyDescription
instance GHC.Read.Read Network.AWS.KMS.UpdateKeyDescription.UpdateKeyDescription
instance GHC.Classes.Eq Network.AWS.KMS.UpdateKeyDescription.UpdateKeyDescription
instance Network.AWS.Types.AWSRequest Network.AWS.KMS.UpdateKeyDescription.UpdateKeyDescription
instance Data.Hashable.Class.Hashable Network.AWS.KMS.UpdateKeyDescription.UpdateKeyDescription
instance Control.DeepSeq.NFData Network.AWS.KMS.UpdateKeyDescription.UpdateKeyDescription
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.KMS.UpdateKeyDescription.UpdateKeyDescription
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.KMS.UpdateKeyDescription.UpdateKeyDescription
instance Network.AWS.Data.Path.ToPath Network.AWS.KMS.UpdateKeyDescription.UpdateKeyDescription
instance Network.AWS.Data.Query.ToQuery Network.AWS.KMS.UpdateKeyDescription.UpdateKeyDescription
instance Control.DeepSeq.NFData Network.AWS.KMS.UpdateKeyDescription.UpdateKeyDescriptionResponse


module Network.AWS.KMS.Waiters


-- | Schedules the deletion of a customer master key (CMK). You may provide
--   a waiting period, specified in days, before deletion occurs. If you do
--   not provide a waiting period, the default period of 30 days is used.
--   When this operation is successful, the state of the CMK changes to
--   <tt>PendingDeletion</tt> . Before the waiting period ends, you can use
--   <tt>CancelKeyDeletion</tt> to cancel the deletion of the CMK. After
--   the waiting period ends, AWS KMS deletes the CMK and all AWS KMS data
--   associated with it, including all aliases that point to it.
--   
--   <i>Important:</i> Deleting a CMK is a destructive and potentially
--   dangerous operation. When a CMK is deleted, all data that was
--   encrypted under the CMK is rendered unrecoverable. To restrict the use
--   of a CMK without deleting it, use <tt>DisableKey</tt> .
--   
--   For more information about scheduling a CMK for deletion, see
--   <a>Deleting Customer Master Keys</a> in the <i>AWS Key Management
--   Service Developer Guide</i> .
module Network.AWS.KMS.ScheduleKeyDeletion

-- | Creates a value of <a>ScheduleKeyDeletion</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>skdPendingWindowInDays</a> - The waiting period, specified in
--   number of days. After the waiting period ends, AWS KMS deletes the
--   customer master key (CMK). This value is optional. If you include a
--   value, it must be between 7 and 30, inclusive. If you do not include a
--   value, it defaults to 30.</li>
--   <li><a>skdKeyId</a> - The unique identifier for the customer master
--   key (CMK) to delete. To specify this value, use the unique key ID or
--   the Amazon Resource Name (ARN) of the CMK. Examples: * Unique key ID:
--   1234abcd-12ab-34cd-56ef-1234567890ab * Key ARN:
--   arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
--   To obtain the unique key ID and key ARN for a given CMK, use
--   <tt>ListKeys</tt> or <a>DescribeKey</a> .</li>
--   </ul>
scheduleKeyDeletion :: Text -> ScheduleKeyDeletion

-- | <i>See:</i> <a>scheduleKeyDeletion</a> smart constructor.
data ScheduleKeyDeletion

-- | The waiting period, specified in number of days. After the waiting
--   period ends, AWS KMS deletes the customer master key (CMK). This value
--   is optional. If you include a value, it must be between 7 and 30,
--   inclusive. If you do not include a value, it defaults to 30.
skdPendingWindowInDays :: Lens' ScheduleKeyDeletion (Maybe Natural)

-- | The unique identifier for the customer master key (CMK) to delete. To
--   specify this value, use the unique key ID or the Amazon Resource Name
--   (ARN) of the CMK. Examples: * Unique key ID:
--   1234abcd-12ab-34cd-56ef-1234567890ab * Key ARN:
--   arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
--   To obtain the unique key ID and key ARN for a given CMK, use
--   <tt>ListKeys</tt> or <a>DescribeKey</a> .
skdKeyId :: Lens' ScheduleKeyDeletion Text

-- | Creates a value of <a>ScheduleKeyDeletionResponse</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>skdrsKeyId</a> - The unique identifier of the customer master
--   key (CMK) for which deletion is scheduled.</li>
--   <li><a>skdrsDeletionDate</a> - The date and time after which AWS KMS
--   deletes the customer master key (CMK).</li>
--   <li><a>skdrsResponseStatus</a> - -- | The response status code.</li>
--   </ul>
scheduleKeyDeletionResponse :: Int -> ScheduleKeyDeletionResponse

-- | <i>See:</i> <a>scheduleKeyDeletionResponse</a> smart constructor.
data ScheduleKeyDeletionResponse

-- | The unique identifier of the customer master key (CMK) for which
--   deletion is scheduled.
skdrsKeyId :: Lens' ScheduleKeyDeletionResponse (Maybe Text)

-- | The date and time after which AWS KMS deletes the customer master key
--   (CMK).
skdrsDeletionDate :: Lens' ScheduleKeyDeletionResponse (Maybe UTCTime)

-- | <ul>
--   <li>- | The response status code.</li>
--   </ul>
skdrsResponseStatus :: Lens' ScheduleKeyDeletionResponse Int
instance GHC.Generics.Generic Network.AWS.KMS.ScheduleKeyDeletion.ScheduleKeyDeletionResponse
instance Data.Data.Data Network.AWS.KMS.ScheduleKeyDeletion.ScheduleKeyDeletionResponse
instance GHC.Show.Show Network.AWS.KMS.ScheduleKeyDeletion.ScheduleKeyDeletionResponse
instance GHC.Read.Read Network.AWS.KMS.ScheduleKeyDeletion.ScheduleKeyDeletionResponse
instance GHC.Classes.Eq Network.AWS.KMS.ScheduleKeyDeletion.ScheduleKeyDeletionResponse
instance GHC.Generics.Generic Network.AWS.KMS.ScheduleKeyDeletion.ScheduleKeyDeletion
instance Data.Data.Data Network.AWS.KMS.ScheduleKeyDeletion.ScheduleKeyDeletion
instance GHC.Show.Show Network.AWS.KMS.ScheduleKeyDeletion.ScheduleKeyDeletion
instance GHC.Read.Read Network.AWS.KMS.ScheduleKeyDeletion.ScheduleKeyDeletion
instance GHC.Classes.Eq Network.AWS.KMS.ScheduleKeyDeletion.ScheduleKeyDeletion
instance Network.AWS.Types.AWSRequest Network.AWS.KMS.ScheduleKeyDeletion.ScheduleKeyDeletion
instance Data.Hashable.Class.Hashable Network.AWS.KMS.ScheduleKeyDeletion.ScheduleKeyDeletion
instance Control.DeepSeq.NFData Network.AWS.KMS.ScheduleKeyDeletion.ScheduleKeyDeletion
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.KMS.ScheduleKeyDeletion.ScheduleKeyDeletion
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.KMS.ScheduleKeyDeletion.ScheduleKeyDeletion
instance Network.AWS.Data.Path.ToPath Network.AWS.KMS.ScheduleKeyDeletion.ScheduleKeyDeletion
instance Network.AWS.Data.Query.ToQuery Network.AWS.KMS.ScheduleKeyDeletion.ScheduleKeyDeletion
instance Control.DeepSeq.NFData Network.AWS.KMS.ScheduleKeyDeletion.ScheduleKeyDeletionResponse


-- | Revokes a grant. You can revoke a grant to actively deny operations
--   that depend on it.
module Network.AWS.KMS.RevokeGrant

-- | Creates a value of <a>RevokeGrant</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rKeyId</a> - A unique identifier for the customer master key
--   associated with the grant. This value can be a globally unique
--   identifier or the fully specified ARN to a key. * Key ARN Example -
--   arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
--   * Globally Unique Key ID Example -
--   12345678-1234-1234-1234-123456789012</li>
--   <li><a>rGrantId</a> - Identifier of the grant to be revoked.</li>
--   </ul>
revokeGrant :: Text -> Text -> RevokeGrant

-- | <i>See:</i> <a>revokeGrant</a> smart constructor.
data RevokeGrant

-- | A unique identifier for the customer master key associated with the
--   grant. This value can be a globally unique identifier or the fully
--   specified ARN to a key. * Key ARN Example -
--   arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
--   * Globally Unique Key ID Example -
--   12345678-1234-1234-1234-123456789012
rKeyId :: Lens' RevokeGrant Text

-- | Identifier of the grant to be revoked.
rGrantId :: Lens' RevokeGrant Text

-- | Creates a value of <a>RevokeGrantResponse</a> with the minimum fields
--   required to make a request.
revokeGrantResponse :: RevokeGrantResponse

-- | <i>See:</i> <a>revokeGrantResponse</a> smart constructor.
data RevokeGrantResponse
instance GHC.Generics.Generic Network.AWS.KMS.RevokeGrant.RevokeGrantResponse
instance Data.Data.Data Network.AWS.KMS.RevokeGrant.RevokeGrantResponse
instance GHC.Show.Show Network.AWS.KMS.RevokeGrant.RevokeGrantResponse
instance GHC.Read.Read Network.AWS.KMS.RevokeGrant.RevokeGrantResponse
instance GHC.Classes.Eq Network.AWS.KMS.RevokeGrant.RevokeGrantResponse
instance GHC.Generics.Generic Network.AWS.KMS.RevokeGrant.RevokeGrant
instance Data.Data.Data Network.AWS.KMS.RevokeGrant.RevokeGrant
instance GHC.Show.Show Network.AWS.KMS.RevokeGrant.RevokeGrant
instance GHC.Read.Read Network.AWS.KMS.RevokeGrant.RevokeGrant
instance GHC.Classes.Eq Network.AWS.KMS.RevokeGrant.RevokeGrant
instance Network.AWS.Types.AWSRequest Network.AWS.KMS.RevokeGrant.RevokeGrant
instance Data.Hashable.Class.Hashable Network.AWS.KMS.RevokeGrant.RevokeGrant
instance Control.DeepSeq.NFData Network.AWS.KMS.RevokeGrant.RevokeGrant
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.KMS.RevokeGrant.RevokeGrant
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.KMS.RevokeGrant.RevokeGrant
instance Network.AWS.Data.Path.ToPath Network.AWS.KMS.RevokeGrant.RevokeGrant
instance Network.AWS.Data.Query.ToQuery Network.AWS.KMS.RevokeGrant.RevokeGrant
instance Control.DeepSeq.NFData Network.AWS.KMS.RevokeGrant.RevokeGrantResponse


-- | Retires a grant. You can retire a grant when you're done using it to
--   clean up. You should revoke a grant when you intend to actively deny
--   operations that depend on it. The following are permitted to call this
--   API:
--   
--   <ul>
--   <li>The account that created the grant</li>
--   <li>The <tt>RetiringPrincipal</tt> , if present</li>
--   <li>The <tt>GranteePrincipal</tt> , if <tt>RetireGrant</tt> is a
--   grantee operation</li>
--   </ul>
--   
--   The grant to retire must be identified by its grant token or by a
--   combination of the key ARN and the grant ID. A grant token is a unique
--   variable-length base64-encoded string. A grant ID is a 64 character
--   unique identifier of a grant. Both are returned by the
--   <tt>CreateGrant</tt> function.
module Network.AWS.KMS.RetireGrant

-- | Creates a value of <a>RetireGrant</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rgKeyId</a> - A unique identifier for the customer master key
--   associated with the grant. This value can be a globally unique
--   identifier or a fully specified ARN of the key. * Key ARN Example -
--   arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
--   * Globally Unique Key ID Example -
--   12345678-1234-1234-1234-123456789012</li>
--   <li><a>rgGrantId</a> - Unique identifier of the grant to be retired.
--   The grant ID is returned by the <tt>CreateGrant</tt> function. * Grant
--   ID Example -
--   0123456789012345678901234567890123456789012345678901234567890123</li>
--   <li><a>rgGrantToken</a> - Token that identifies the grant to be
--   retired.</li>
--   </ul>
retireGrant :: RetireGrant

-- | <i>See:</i> <a>retireGrant</a> smart constructor.
data RetireGrant

-- | A unique identifier for the customer master key associated with the
--   grant. This value can be a globally unique identifier or a fully
--   specified ARN of the key. * Key ARN Example -
--   arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
--   * Globally Unique Key ID Example -
--   12345678-1234-1234-1234-123456789012
rgKeyId :: Lens' RetireGrant (Maybe Text)

-- | Unique identifier of the grant to be retired. The grant ID is returned
--   by the <tt>CreateGrant</tt> function. * Grant ID Example -
--   0123456789012345678901234567890123456789012345678901234567890123
rgGrantId :: Lens' RetireGrant (Maybe Text)

-- | Token that identifies the grant to be retired.
rgGrantToken :: Lens' RetireGrant (Maybe Text)

-- | Creates a value of <a>RetireGrantResponse</a> with the minimum fields
--   required to make a request.
retireGrantResponse :: RetireGrantResponse

-- | <i>See:</i> <a>retireGrantResponse</a> smart constructor.
data RetireGrantResponse
instance GHC.Generics.Generic Network.AWS.KMS.RetireGrant.RetireGrantResponse
instance Data.Data.Data Network.AWS.KMS.RetireGrant.RetireGrantResponse
instance GHC.Show.Show Network.AWS.KMS.RetireGrant.RetireGrantResponse
instance GHC.Read.Read Network.AWS.KMS.RetireGrant.RetireGrantResponse
instance GHC.Classes.Eq Network.AWS.KMS.RetireGrant.RetireGrantResponse
instance GHC.Generics.Generic Network.AWS.KMS.RetireGrant.RetireGrant
instance Data.Data.Data Network.AWS.KMS.RetireGrant.RetireGrant
instance GHC.Show.Show Network.AWS.KMS.RetireGrant.RetireGrant
instance GHC.Read.Read Network.AWS.KMS.RetireGrant.RetireGrant
instance GHC.Classes.Eq Network.AWS.KMS.RetireGrant.RetireGrant
instance Network.AWS.Types.AWSRequest Network.AWS.KMS.RetireGrant.RetireGrant
instance Data.Hashable.Class.Hashable Network.AWS.KMS.RetireGrant.RetireGrant
instance Control.DeepSeq.NFData Network.AWS.KMS.RetireGrant.RetireGrant
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.KMS.RetireGrant.RetireGrant
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.KMS.RetireGrant.RetireGrant
instance Network.AWS.Data.Path.ToPath Network.AWS.KMS.RetireGrant.RetireGrant
instance Network.AWS.Data.Query.ToQuery Network.AWS.KMS.RetireGrant.RetireGrant
instance Control.DeepSeq.NFData Network.AWS.KMS.RetireGrant.RetireGrantResponse


-- | Encrypts data on the server side with a new customer master key
--   without exposing the plaintext of the data on the client side. The
--   data is first decrypted and then encrypted. This operation can also be
--   used to change the encryption context of a ciphertext.
--   
--   Unlike other actions, <tt>ReEncrypt</tt> is authorized twice - once as
--   <tt>ReEncryptFrom</tt> on the source key and once as
--   <tt>ReEncryptTo</tt> on the destination key. We therefore recommend
--   that you include the <tt>"action":"kms:ReEncrypt*"</tt> statement in
--   your key policies to permit re-encryption from or to the key. The
--   statement is included automatically when you authorize use of the key
--   through the console but must be included manually when you set a
--   policy by using the <tt>PutKeyPolicy</tt> function.
module Network.AWS.KMS.ReEncrypt

-- | Creates a value of <a>ReEncrypt</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>reDestinationEncryptionContext</a> - Encryption context to be
--   used when the data is re-encrypted.</li>
--   <li><a>reSourceEncryptionContext</a> - Encryption context used to
--   encrypt and decrypt the data specified in the <tt>CiphertextBlob</tt>
--   parameter.</li>
--   <li><a>reGrantTokens</a> - A list of grant tokens. For more
--   information, see <a>Grant Tokens</a> in the <i>AWS Key Management
--   Service Developer Guide</i> .</li>
--   <li><a>reCiphertextBlob</a> - Ciphertext of the data to re-encrypt.--
--   <i>Note:</i> This <tt>Lens</tt> automatically encodes and decodes
--   Base64 data. The underlying isomorphism will encode to Base64
--   representation during serialisation, and decode from Base64
--   representation during deserialisation. This <tt>Lens</tt> accepts and
--   returns only raw unencoded data.</li>
--   <li><a>reDestinationKeyId</a> - A unique identifier for the customer
--   master key used to re-encrypt the data. This value can be a globally
--   unique identifier, a fully specified ARN to either an alias or a key,
--   or an alias name prefixed by "alias<i>". * Key ARN Example -
--   arn:aws:kms:us-east-1:123456789012:key</i>12345678-1234-1234-1234-123456789012
--   * Alias ARN Example -
--   arn:aws:kms:us-east-1:123456789012:alias<i>MyAliasName * Globally
--   Unique Key ID Example - 12345678-1234-1234-1234-123456789012 * Alias
--   Name Example - alias</i>MyAliasName</li>
--   </ul>
reEncrypt :: ByteString -> Text -> ReEncrypt

-- | <i>See:</i> <a>reEncrypt</a> smart constructor.
data ReEncrypt

-- | Encryption context to be used when the data is re-encrypted.
reDestinationEncryptionContext :: Lens' ReEncrypt (HashMap Text Text)

-- | Encryption context used to encrypt and decrypt the data specified in
--   the <tt>CiphertextBlob</tt> parameter.
reSourceEncryptionContext :: Lens' ReEncrypt (HashMap Text Text)

-- | A list of grant tokens. For more information, see <a>Grant Tokens</a>
--   in the <i>AWS Key Management Service Developer Guide</i> .
reGrantTokens :: Lens' ReEncrypt [Text]

-- | Ciphertext of the data to re-encrypt.-- <i>Note:</i> This
--   <tt>Lens</tt> automatically encodes and decodes Base64 data. The
--   underlying isomorphism will encode to Base64 representation during
--   serialisation, and decode from Base64 representation during
--   deserialisation. This <tt>Lens</tt> accepts and returns only raw
--   unencoded data.
reCiphertextBlob :: Lens' ReEncrypt ByteString

-- | A unique identifier for the customer master key used to re-encrypt the
--   data. This value can be a globally unique identifier, a fully
--   specified ARN to either an alias or a key, or an alias name prefixed
--   by "alias<i>". * Key ARN Example -
--   arn:aws:kms:us-east-1:123456789012:key</i>12345678-1234-1234-1234-123456789012
--   * Alias ARN Example -
--   arn:aws:kms:us-east-1:123456789012:alias<i>MyAliasName * Globally
--   Unique Key ID Example - 12345678-1234-1234-1234-123456789012 * Alias
--   Name Example - alias</i>MyAliasName
reDestinationKeyId :: Lens' ReEncrypt Text

-- | Creates a value of <a>ReEncryptResponse</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rersSourceKeyId</a> - Unique identifier of the key used to
--   originally encrypt the data.</li>
--   <li><a>rersKeyId</a> - Unique identifier of the key used to re-encrypt
--   the data.</li>
--   <li><a>rersCiphertextBlob</a> - The re-encrypted data. If you are
--   using the CLI, the value is Base64 encoded. Otherwise, it is not
--   encoded.-- <i>Note:</i> This <tt>Lens</tt> automatically encodes and
--   decodes Base64 data. The underlying isomorphism will encode to Base64
--   representation during serialisation, and decode from Base64
--   representation during deserialisation. This <tt>Lens</tt> accepts and
--   returns only raw unencoded data.</li>
--   <li><a>rersResponseStatus</a> - -- | The response status code.</li>
--   </ul>
reEncryptResponse :: Int -> ReEncryptResponse

-- | <i>See:</i> <a>reEncryptResponse</a> smart constructor.
data ReEncryptResponse

-- | Unique identifier of the key used to originally encrypt the data.
rersSourceKeyId :: Lens' ReEncryptResponse (Maybe Text)

-- | Unique identifier of the key used to re-encrypt the data.
rersKeyId :: Lens' ReEncryptResponse (Maybe Text)

-- | The re-encrypted data. If you are using the CLI, the value is Base64
--   encoded. Otherwise, it is not encoded.-- <i>Note:</i> This
--   <tt>Lens</tt> automatically encodes and decodes Base64 data. The
--   underlying isomorphism will encode to Base64 representation during
--   serialisation, and decode from Base64 representation during
--   deserialisation. This <tt>Lens</tt> accepts and returns only raw
--   unencoded data.
rersCiphertextBlob :: Lens' ReEncryptResponse (Maybe ByteString)

-- | <ul>
--   <li>- | The response status code.</li>
--   </ul>
rersResponseStatus :: Lens' ReEncryptResponse Int
instance GHC.Generics.Generic Network.AWS.KMS.ReEncrypt.ReEncryptResponse
instance Data.Data.Data Network.AWS.KMS.ReEncrypt.ReEncryptResponse
instance GHC.Show.Show Network.AWS.KMS.ReEncrypt.ReEncryptResponse
instance GHC.Read.Read Network.AWS.KMS.ReEncrypt.ReEncryptResponse
instance GHC.Classes.Eq Network.AWS.KMS.ReEncrypt.ReEncryptResponse
instance GHC.Generics.Generic Network.AWS.KMS.ReEncrypt.ReEncrypt
instance Data.Data.Data Network.AWS.KMS.ReEncrypt.ReEncrypt
instance GHC.Show.Show Network.AWS.KMS.ReEncrypt.ReEncrypt
instance GHC.Read.Read Network.AWS.KMS.ReEncrypt.ReEncrypt
instance GHC.Classes.Eq Network.AWS.KMS.ReEncrypt.ReEncrypt
instance Network.AWS.Types.AWSRequest Network.AWS.KMS.ReEncrypt.ReEncrypt
instance Data.Hashable.Class.Hashable Network.AWS.KMS.ReEncrypt.ReEncrypt
instance Control.DeepSeq.NFData Network.AWS.KMS.ReEncrypt.ReEncrypt
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.KMS.ReEncrypt.ReEncrypt
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.KMS.ReEncrypt.ReEncrypt
instance Network.AWS.Data.Path.ToPath Network.AWS.KMS.ReEncrypt.ReEncrypt
instance Network.AWS.Data.Query.ToQuery Network.AWS.KMS.ReEncrypt.ReEncrypt
instance Control.DeepSeq.NFData Network.AWS.KMS.ReEncrypt.ReEncryptResponse


-- | Attaches a key policy to the specified customer master key (CMK).
--   
--   For more information about key policies, see <a>Key Policies</a> in
--   the <i>AWS Key Management Service Developer Guide</i> .
module Network.AWS.KMS.PutKeyPolicy

-- | Creates a value of <a>PutKeyPolicy</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>pkpBypassPolicyLockoutSafetyCheck</a> - A flag to indicate
--   whether to bypass the key policy lockout safety check.
--   <i>Important:</i> Setting this value to true increases the likelihood
--   that the CMK becomes unmanageable. Do not set this value to true
--   indiscriminately. For more information, refer to the scenario in the
--   <a>Default Key Policy</a> section in the <i>AWS Key Management Service
--   Developer Guide</i> . Use this parameter only when you intend to
--   prevent the principal making the request from making a subsequent
--   <tt>PutKeyPolicy</tt> request on the CMK. The default value is
--   false.</li>
--   <li><a>pkpKeyId</a> - A unique identifier for the CMK. Use the CMK's
--   unique identifier or its Amazon Resource Name (ARN). For example: *
--   Unique ID: 1234abcd-12ab-34cd-56ef-1234567890ab * ARN:
--   arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</li>
--   <li><a>pkpPolicyName</a> - The name of the key policy. This value must
--   be <tt>default</tt> .</li>
--   <li><a>pkpPolicy</a> - The key policy to attach to the CMK. If you do
--   not set <tt>BypassPolicyLockoutSafetyCheck</tt> to true, the policy
--   must meet the following criteria: * It must allow the principal making
--   the <tt>PutKeyPolicy</tt> request to make a subsequent
--   <tt>PutKeyPolicy</tt> request on the CMK. This reduces the likelihood
--   that the CMK becomes unmanageable. For more information, refer to the
--   scenario in the <a>Default Key Policy</a> section in the <i>AWS Key
--   Management Service Developer Guide</i> . * The principal(s) specified
--   in the key policy must exist and be visible to AWS KMS. When you
--   create a new AWS principal (for example, an IAM user or role), you
--   might need to enforce a delay before specifying the new principal in a
--   key policy because the new principal might not immediately be visible
--   to AWS KMS. For more information, see <a>Changes that I make are not
--   always immediately visible</a> in the <i>IAM User Guide</i> . The
--   policy size limit is 32 KiB (32768 bytes).</li>
--   </ul>
putKeyPolicy :: Text -> Text -> Text -> PutKeyPolicy

-- | <i>See:</i> <a>putKeyPolicy</a> smart constructor.
data PutKeyPolicy

-- | A flag to indicate whether to bypass the key policy lockout safety
--   check. <i>Important:</i> Setting this value to true increases the
--   likelihood that the CMK becomes unmanageable. Do not set this value to
--   true indiscriminately. For more information, refer to the scenario in
--   the <a>Default Key Policy</a> section in the <i>AWS Key Management
--   Service Developer Guide</i> . Use this parameter only when you intend
--   to prevent the principal making the request from making a subsequent
--   <tt>PutKeyPolicy</tt> request on the CMK. The default value is false.
pkpBypassPolicyLockoutSafetyCheck :: Lens' PutKeyPolicy (Maybe Bool)

-- | A unique identifier for the CMK. Use the CMK's unique identifier or
--   its Amazon Resource Name (ARN). For example: * Unique ID:
--   1234abcd-12ab-34cd-56ef-1234567890ab * ARN:
--   arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
pkpKeyId :: Lens' PutKeyPolicy Text

-- | The name of the key policy. This value must be <tt>default</tt> .
pkpPolicyName :: Lens' PutKeyPolicy Text

-- | The key policy to attach to the CMK. If you do not set
--   <tt>BypassPolicyLockoutSafetyCheck</tt> to true, the policy must meet
--   the following criteria: * It must allow the principal making the
--   <tt>PutKeyPolicy</tt> request to make a subsequent
--   <tt>PutKeyPolicy</tt> request on the CMK. This reduces the likelihood
--   that the CMK becomes unmanageable. For more information, refer to the
--   scenario in the <a>Default Key Policy</a> section in the <i>AWS Key
--   Management Service Developer Guide</i> . * The principal(s) specified
--   in the key policy must exist and be visible to AWS KMS. When you
--   create a new AWS principal (for example, an IAM user or role), you
--   might need to enforce a delay before specifying the new principal in a
--   key policy because the new principal might not immediately be visible
--   to AWS KMS. For more information, see <a>Changes that I make are not
--   always immediately visible</a> in the <i>IAM User Guide</i> . The
--   policy size limit is 32 KiB (32768 bytes).
pkpPolicy :: Lens' PutKeyPolicy Text

-- | Creates a value of <a>PutKeyPolicyResponse</a> with the minimum fields
--   required to make a request.
putKeyPolicyResponse :: PutKeyPolicyResponse

-- | <i>See:</i> <a>putKeyPolicyResponse</a> smart constructor.
data PutKeyPolicyResponse
instance GHC.Generics.Generic Network.AWS.KMS.PutKeyPolicy.PutKeyPolicyResponse
instance Data.Data.Data Network.AWS.KMS.PutKeyPolicy.PutKeyPolicyResponse
instance GHC.Show.Show Network.AWS.KMS.PutKeyPolicy.PutKeyPolicyResponse
instance GHC.Read.Read Network.AWS.KMS.PutKeyPolicy.PutKeyPolicyResponse
instance GHC.Classes.Eq Network.AWS.KMS.PutKeyPolicy.PutKeyPolicyResponse
instance GHC.Generics.Generic Network.AWS.KMS.PutKeyPolicy.PutKeyPolicy
instance Data.Data.Data Network.AWS.KMS.PutKeyPolicy.PutKeyPolicy
instance GHC.Show.Show Network.AWS.KMS.PutKeyPolicy.PutKeyPolicy
instance GHC.Read.Read Network.AWS.KMS.PutKeyPolicy.PutKeyPolicy
instance GHC.Classes.Eq Network.AWS.KMS.PutKeyPolicy.PutKeyPolicy
instance Network.AWS.Types.AWSRequest Network.AWS.KMS.PutKeyPolicy.PutKeyPolicy
instance Data.Hashable.Class.Hashable Network.AWS.KMS.PutKeyPolicy.PutKeyPolicy
instance Control.DeepSeq.NFData Network.AWS.KMS.PutKeyPolicy.PutKeyPolicy
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.KMS.PutKeyPolicy.PutKeyPolicy
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.KMS.PutKeyPolicy.PutKeyPolicy
instance Network.AWS.Data.Path.ToPath Network.AWS.KMS.PutKeyPolicy.PutKeyPolicy
instance Network.AWS.Data.Query.ToQuery Network.AWS.KMS.PutKeyPolicy.PutKeyPolicy
instance Control.DeepSeq.NFData Network.AWS.KMS.PutKeyPolicy.PutKeyPolicyResponse


-- | Returns a list of all grants for which the grant's
--   <tt>RetiringPrincipal</tt> matches the one specified.
--   
--   A typical use is to list all grants that you are able to retire. To
--   retire a grant, use <a>RetireGrant</a> .
module Network.AWS.KMS.ListRetirableGrants

-- | Creates a value of <a>ListRetirableGrants</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>lrgMarker</a> - Use this parameter only when paginating results
--   and only in a subsequent request after you receive a response with
--   truncated results. Set it to the value of <tt>NextMarker</tt> from the
--   response you just received.</li>
--   <li><a>lrgLimit</a> - When paginating results, specify the maximum
--   number of items to return in the response. If additional items exist
--   beyond the number you specify, the <tt>Truncated</tt> element in the
--   response is set to true. This value is optional. If you include a
--   value, it must be between 1 and 100, inclusive. If you do not include
--   a value, it defaults to 50.</li>
--   <li><a>lrgRetiringPrincipal</a> - The retiring principal for which to
--   list grants. To specify the retiring principal, use the <a>Amazon
--   Resource Name (ARN)</a> of an AWS principal. Valid AWS principals
--   include AWS accounts (root), IAM users, federated users, and assumed
--   role users. For examples of the ARN syntax for specifying a principal,
--   see <a>AWS Identity and Access Management (IAM)</a> in the Example
--   ARNs section of the <i>Amazon Web Services General Reference</i>
--   .</li>
--   </ul>
listRetirableGrants :: Text -> ListRetirableGrants

-- | <i>See:</i> <a>listRetirableGrants</a> smart constructor.
data ListRetirableGrants

-- | Use this parameter only when paginating results and only in a
--   subsequent request after you receive a response with truncated
--   results. Set it to the value of <tt>NextMarker</tt> from the response
--   you just received.
lrgMarker :: Lens' ListRetirableGrants (Maybe Text)

-- | When paginating results, specify the maximum number of items to return
--   in the response. If additional items exist beyond the number you
--   specify, the <tt>Truncated</tt> element in the response is set to
--   true. This value is optional. If you include a value, it must be
--   between 1 and 100, inclusive. If you do not include a value, it
--   defaults to 50.
lrgLimit :: Lens' ListRetirableGrants (Maybe Natural)

-- | The retiring principal for which to list grants. To specify the
--   retiring principal, use the <a>Amazon Resource Name (ARN)</a> of an
--   AWS principal. Valid AWS principals include AWS accounts (root), IAM
--   users, federated users, and assumed role users. For examples of the
--   ARN syntax for specifying a principal, see <a>AWS Identity and Access
--   Management (IAM)</a> in the Example ARNs section of the <i>Amazon Web
--   Services General Reference</i> .
lrgRetiringPrincipal :: Lens' ListRetirableGrants Text

-- | Creates a value of <a>ListGrantsResponse</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>lgTruncated</a> - A flag that indicates whether there are more
--   items in the list. If your results were truncated, you can use the
--   <tt>Marker</tt> parameter to make a subsequent pagination request to
--   retrieve more items in the list.</li>
--   <li><a>lgGrants</a> - A list of grants.</li>
--   <li><a>lgNextMarker</a> - When <tt>Truncated</tt> is true, this value
--   is present and contains the value to use for the <tt>Marker</tt>
--   parameter in a subsequent pagination request.</li>
--   </ul>
listGrantsResponse :: ListGrantsResponse

-- | <i>See:</i> <a>listGrantsResponse</a> smart constructor.
data ListGrantsResponse

-- | A flag that indicates whether there are more items in the list. If
--   your results were truncated, you can use the <tt>Marker</tt> parameter
--   to make a subsequent pagination request to retrieve more items in the
--   list.
lgTruncated :: Lens' ListGrantsResponse (Maybe Bool)

-- | A list of grants.
lgGrants :: Lens' ListGrantsResponse [GrantListEntry]

-- | When <tt>Truncated</tt> is true, this value is present and contains
--   the value to use for the <tt>Marker</tt> parameter in a subsequent
--   pagination request.
lgNextMarker :: Lens' ListGrantsResponse (Maybe Text)
instance GHC.Generics.Generic Network.AWS.KMS.ListRetirableGrants.ListRetirableGrants
instance Data.Data.Data Network.AWS.KMS.ListRetirableGrants.ListRetirableGrants
instance GHC.Show.Show Network.AWS.KMS.ListRetirableGrants.ListRetirableGrants
instance GHC.Read.Read Network.AWS.KMS.ListRetirableGrants.ListRetirableGrants
instance GHC.Classes.Eq Network.AWS.KMS.ListRetirableGrants.ListRetirableGrants
instance Network.AWS.Types.AWSRequest Network.AWS.KMS.ListRetirableGrants.ListRetirableGrants
instance Data.Hashable.Class.Hashable Network.AWS.KMS.ListRetirableGrants.ListRetirableGrants
instance Control.DeepSeq.NFData Network.AWS.KMS.ListRetirableGrants.ListRetirableGrants
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.KMS.ListRetirableGrants.ListRetirableGrants
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.KMS.ListRetirableGrants.ListRetirableGrants
instance Network.AWS.Data.Path.ToPath Network.AWS.KMS.ListRetirableGrants.ListRetirableGrants
instance Network.AWS.Data.Query.ToQuery Network.AWS.KMS.ListRetirableGrants.ListRetirableGrants


-- | Lists the customer master keys.
--   
--   This operation returns paginated results.
module Network.AWS.KMS.ListKeys

-- | Creates a value of <a>ListKeys</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>lkMarker</a> - Use this parameter only when paginating results
--   and only in a subsequent request after you receive a response with
--   truncated results. Set it to the value of <tt>NextMarker</tt> from the
--   response you just received.</li>
--   <li><a>lkLimit</a> - When paginating results, specify the maximum
--   number of items to return in the response. If additional items exist
--   beyond the number you specify, the <tt>Truncated</tt> element in the
--   response is set to true. This value is optional. If you include a
--   value, it must be between 1 and 1000, inclusive. If you do not include
--   a value, it defaults to 100.</li>
--   </ul>
listKeys :: ListKeys

-- | <i>See:</i> <a>listKeys</a> smart constructor.
data ListKeys

-- | Use this parameter only when paginating results and only in a
--   subsequent request after you receive a response with truncated
--   results. Set it to the value of <tt>NextMarker</tt> from the response
--   you just received.
lkMarker :: Lens' ListKeys (Maybe Text)

-- | When paginating results, specify the maximum number of items to return
--   in the response. If additional items exist beyond the number you
--   specify, the <tt>Truncated</tt> element in the response is set to
--   true. This value is optional. If you include a value, it must be
--   between 1 and 1000, inclusive. If you do not include a value, it
--   defaults to 100.
lkLimit :: Lens' ListKeys (Maybe Natural)

-- | Creates a value of <a>ListKeysResponse</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>lkrsTruncated</a> - A flag that indicates whether there are
--   more items in the list. If your results were truncated, you can use
--   the <tt>Marker</tt> parameter to make a subsequent pagination request
--   to retrieve more items in the list.</li>
--   <li><a>lkrsKeys</a> - A list of keys.</li>
--   <li><a>lkrsNextMarker</a> - When <tt>Truncated</tt> is true, this
--   value is present and contains the value to use for the <tt>Marker</tt>
--   parameter in a subsequent pagination request.</li>
--   <li><a>lkrsResponseStatus</a> - -- | The response status code.</li>
--   </ul>
listKeysResponse :: Int -> ListKeysResponse

-- | <i>See:</i> <a>listKeysResponse</a> smart constructor.
data ListKeysResponse

-- | A flag that indicates whether there are more items in the list. If
--   your results were truncated, you can use the <tt>Marker</tt> parameter
--   to make a subsequent pagination request to retrieve more items in the
--   list.
lkrsTruncated :: Lens' ListKeysResponse (Maybe Bool)

-- | A list of keys.
lkrsKeys :: Lens' ListKeysResponse [KeyListEntry]

-- | When <tt>Truncated</tt> is true, this value is present and contains
--   the value to use for the <tt>Marker</tt> parameter in a subsequent
--   pagination request.
lkrsNextMarker :: Lens' ListKeysResponse (Maybe Text)

-- | <ul>
--   <li>- | The response status code.</li>
--   </ul>
lkrsResponseStatus :: Lens' ListKeysResponse Int
instance GHC.Generics.Generic Network.AWS.KMS.ListKeys.ListKeysResponse
instance Data.Data.Data Network.AWS.KMS.ListKeys.ListKeysResponse
instance GHC.Show.Show Network.AWS.KMS.ListKeys.ListKeysResponse
instance GHC.Read.Read Network.AWS.KMS.ListKeys.ListKeysResponse
instance GHC.Classes.Eq Network.AWS.KMS.ListKeys.ListKeysResponse
instance GHC.Generics.Generic Network.AWS.KMS.ListKeys.ListKeys
instance Data.Data.Data Network.AWS.KMS.ListKeys.ListKeys
instance GHC.Show.Show Network.AWS.KMS.ListKeys.ListKeys
instance GHC.Read.Read Network.AWS.KMS.ListKeys.ListKeys
instance GHC.Classes.Eq Network.AWS.KMS.ListKeys.ListKeys
instance Network.AWS.Pager.AWSPager Network.AWS.KMS.ListKeys.ListKeys
instance Network.AWS.Types.AWSRequest Network.AWS.KMS.ListKeys.ListKeys
instance Data.Hashable.Class.Hashable Network.AWS.KMS.ListKeys.ListKeys
instance Control.DeepSeq.NFData Network.AWS.KMS.ListKeys.ListKeys
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.KMS.ListKeys.ListKeys
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.KMS.ListKeys.ListKeys
instance Network.AWS.Data.Path.ToPath Network.AWS.KMS.ListKeys.ListKeys
instance Network.AWS.Data.Query.ToQuery Network.AWS.KMS.ListKeys.ListKeys
instance Control.DeepSeq.NFData Network.AWS.KMS.ListKeys.ListKeysResponse


-- | Retrieves a list of policies attached to a key.
--   
--   This operation returns paginated results.
module Network.AWS.KMS.ListKeyPolicies

-- | Creates a value of <a>ListKeyPolicies</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>lkpMarker</a> - Use this parameter only when paginating results
--   and only in a subsequent request after you receive a response with
--   truncated results. Set it to the value of <tt>NextMarker</tt> from the
--   response you just received.</li>
--   <li><a>lkpLimit</a> - When paginating results, specify the maximum
--   number of items to return in the response. If additional items exist
--   beyond the number you specify, the <tt>Truncated</tt> element in the
--   response is set to true. This value is optional. If you include a
--   value, it must be between 1 and 1000, inclusive. If you do not include
--   a value, it defaults to 100. Currently only 1 policy can be attached
--   to a key.</li>
--   <li><a>lkpKeyId</a> - A unique identifier for the customer master key.
--   This value can be a globally unique identifier, a fully specified ARN
--   to either an alias or a key, or an alias name prefixed by "alias<i>".
--   * Key ARN Example -
--   arn:aws:kms:us-east-1:123456789012:key</i>12345678-1234-1234-1234-123456789012
--   * Alias ARN Example -
--   arn:aws:kms:us-east-1:123456789012:alias<i>MyAliasName * Globally
--   Unique Key ID Example - 12345678-1234-1234-1234-123456789012 * Alias
--   Name Example - alias</i>MyAliasName</li>
--   </ul>
listKeyPolicies :: Text -> ListKeyPolicies

-- | <i>See:</i> <a>listKeyPolicies</a> smart constructor.
data ListKeyPolicies

-- | Use this parameter only when paginating results and only in a
--   subsequent request after you receive a response with truncated
--   results. Set it to the value of <tt>NextMarker</tt> from the response
--   you just received.
lkpMarker :: Lens' ListKeyPolicies (Maybe Text)

-- | When paginating results, specify the maximum number of items to return
--   in the response. If additional items exist beyond the number you
--   specify, the <tt>Truncated</tt> element in the response is set to
--   true. This value is optional. If you include a value, it must be
--   between 1 and 1000, inclusive. If you do not include a value, it
--   defaults to 100. Currently only 1 policy can be attached to a key.
lkpLimit :: Lens' ListKeyPolicies (Maybe Natural)

-- | A unique identifier for the customer master key. This value can be a
--   globally unique identifier, a fully specified ARN to either an alias
--   or a key, or an alias name prefixed by "alias<i>". * Key ARN Example -
--   arn:aws:kms:us-east-1:123456789012:key</i>12345678-1234-1234-1234-123456789012
--   * Alias ARN Example -
--   arn:aws:kms:us-east-1:123456789012:alias<i>MyAliasName * Globally
--   Unique Key ID Example - 12345678-1234-1234-1234-123456789012 * Alias
--   Name Example - alias</i>MyAliasName
lkpKeyId :: Lens' ListKeyPolicies Text

-- | Creates a value of <a>ListKeyPoliciesResponse</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>lkprsPolicyNames</a> - A list of policy names. Currently, there
--   is only one policy and it is named <a>Default</a>.</li>
--   <li><a>lkprsTruncated</a> - A flag that indicates whether there are
--   more items in the list. If your results were truncated, you can use
--   the <tt>Marker</tt> parameter to make a subsequent pagination request
--   to retrieve more items in the list.</li>
--   <li><a>lkprsNextMarker</a> - When <tt>Truncated</tt> is true, this
--   value is present and contains the value to use for the <tt>Marker</tt>
--   parameter in a subsequent pagination request.</li>
--   <li><a>lkprsResponseStatus</a> - -- | The response status code.</li>
--   </ul>
listKeyPoliciesResponse :: Int -> ListKeyPoliciesResponse

-- | <i>See:</i> <a>listKeyPoliciesResponse</a> smart constructor.
data ListKeyPoliciesResponse

-- | A list of policy names. Currently, there is only one policy and it is
--   named <a>Default</a>.
lkprsPolicyNames :: Lens' ListKeyPoliciesResponse [Text]

-- | A flag that indicates whether there are more items in the list. If
--   your results were truncated, you can use the <tt>Marker</tt> parameter
--   to make a subsequent pagination request to retrieve more items in the
--   list.
lkprsTruncated :: Lens' ListKeyPoliciesResponse (Maybe Bool)

-- | When <tt>Truncated</tt> is true, this value is present and contains
--   the value to use for the <tt>Marker</tt> parameter in a subsequent
--   pagination request.
lkprsNextMarker :: Lens' ListKeyPoliciesResponse (Maybe Text)

-- | <ul>
--   <li>- | The response status code.</li>
--   </ul>
lkprsResponseStatus :: Lens' ListKeyPoliciesResponse Int
instance GHC.Generics.Generic Network.AWS.KMS.ListKeyPolicies.ListKeyPoliciesResponse
instance Data.Data.Data Network.AWS.KMS.ListKeyPolicies.ListKeyPoliciesResponse
instance GHC.Show.Show Network.AWS.KMS.ListKeyPolicies.ListKeyPoliciesResponse
instance GHC.Read.Read Network.AWS.KMS.ListKeyPolicies.ListKeyPoliciesResponse
instance GHC.Classes.Eq Network.AWS.KMS.ListKeyPolicies.ListKeyPoliciesResponse
instance GHC.Generics.Generic Network.AWS.KMS.ListKeyPolicies.ListKeyPolicies
instance Data.Data.Data Network.AWS.KMS.ListKeyPolicies.ListKeyPolicies
instance GHC.Show.Show Network.AWS.KMS.ListKeyPolicies.ListKeyPolicies
instance GHC.Read.Read Network.AWS.KMS.ListKeyPolicies.ListKeyPolicies
instance GHC.Classes.Eq Network.AWS.KMS.ListKeyPolicies.ListKeyPolicies
instance Network.AWS.Pager.AWSPager Network.AWS.KMS.ListKeyPolicies.ListKeyPolicies
instance Network.AWS.Types.AWSRequest Network.AWS.KMS.ListKeyPolicies.ListKeyPolicies
instance Data.Hashable.Class.Hashable Network.AWS.KMS.ListKeyPolicies.ListKeyPolicies
instance Control.DeepSeq.NFData Network.AWS.KMS.ListKeyPolicies.ListKeyPolicies
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.KMS.ListKeyPolicies.ListKeyPolicies
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.KMS.ListKeyPolicies.ListKeyPolicies
instance Network.AWS.Data.Path.ToPath Network.AWS.KMS.ListKeyPolicies.ListKeyPolicies
instance Network.AWS.Data.Query.ToQuery Network.AWS.KMS.ListKeyPolicies.ListKeyPolicies
instance Control.DeepSeq.NFData Network.AWS.KMS.ListKeyPolicies.ListKeyPoliciesResponse


-- | List the grants for a specified key.
--   
--   This operation returns paginated results.
module Network.AWS.KMS.ListGrants

-- | Creates a value of <a>ListGrants</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>lgMarker</a> - Use this parameter only when paginating results
--   and only in a subsequent request after you receive a response with
--   truncated results. Set it to the value of <tt>NextMarker</tt> from the
--   response you just received.</li>
--   <li><a>lgLimit</a> - When paginating results, specify the maximum
--   number of items to return in the response. If additional items exist
--   beyond the number you specify, the <tt>Truncated</tt> element in the
--   response is set to true. This value is optional. If you include a
--   value, it must be between 1 and 100, inclusive. If you do not include
--   a value, it defaults to 50.</li>
--   <li><a>lgKeyId</a> - A unique identifier for the customer master key.
--   This value can be a globally unique identifier or the fully specified
--   ARN to a key. * Key ARN Example -
--   arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
--   * Globally Unique Key ID Example -
--   12345678-1234-1234-1234-123456789012</li>
--   </ul>
listGrants :: Text -> ListGrants

-- | <i>See:</i> <a>listGrants</a> smart constructor.
data ListGrants

-- | Use this parameter only when paginating results and only in a
--   subsequent request after you receive a response with truncated
--   results. Set it to the value of <tt>NextMarker</tt> from the response
--   you just received.
lgMarker :: Lens' ListGrants (Maybe Text)

-- | When paginating results, specify the maximum number of items to return
--   in the response. If additional items exist beyond the number you
--   specify, the <tt>Truncated</tt> element in the response is set to
--   true. This value is optional. If you include a value, it must be
--   between 1 and 100, inclusive. If you do not include a value, it
--   defaults to 50.
lgLimit :: Lens' ListGrants (Maybe Natural)

-- | A unique identifier for the customer master key. This value can be a
--   globally unique identifier or the fully specified ARN to a key. * Key
--   ARN Example -
--   arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
--   * Globally Unique Key ID Example -
--   12345678-1234-1234-1234-123456789012
lgKeyId :: Lens' ListGrants Text

-- | Creates a value of <a>ListGrantsResponse</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>lgTruncated</a> - A flag that indicates whether there are more
--   items in the list. If your results were truncated, you can use the
--   <tt>Marker</tt> parameter to make a subsequent pagination request to
--   retrieve more items in the list.</li>
--   <li><a>lgGrants</a> - A list of grants.</li>
--   <li><a>lgNextMarker</a> - When <tt>Truncated</tt> is true, this value
--   is present and contains the value to use for the <tt>Marker</tt>
--   parameter in a subsequent pagination request.</li>
--   </ul>
listGrantsResponse :: ListGrantsResponse

-- | <i>See:</i> <a>listGrantsResponse</a> smart constructor.
data ListGrantsResponse

-- | A flag that indicates whether there are more items in the list. If
--   your results were truncated, you can use the <tt>Marker</tt> parameter
--   to make a subsequent pagination request to retrieve more items in the
--   list.
lgTruncated :: Lens' ListGrantsResponse (Maybe Bool)

-- | A list of grants.
lgGrants :: Lens' ListGrantsResponse [GrantListEntry]

-- | When <tt>Truncated</tt> is true, this value is present and contains
--   the value to use for the <tt>Marker</tt> parameter in a subsequent
--   pagination request.
lgNextMarker :: Lens' ListGrantsResponse (Maybe Text)
instance GHC.Generics.Generic Network.AWS.KMS.ListGrants.ListGrants
instance Data.Data.Data Network.AWS.KMS.ListGrants.ListGrants
instance GHC.Show.Show Network.AWS.KMS.ListGrants.ListGrants
instance GHC.Read.Read Network.AWS.KMS.ListGrants.ListGrants
instance GHC.Classes.Eq Network.AWS.KMS.ListGrants.ListGrants
instance Network.AWS.Pager.AWSPager Network.AWS.KMS.ListGrants.ListGrants
instance Network.AWS.Types.AWSRequest Network.AWS.KMS.ListGrants.ListGrants
instance Data.Hashable.Class.Hashable Network.AWS.KMS.ListGrants.ListGrants
instance Control.DeepSeq.NFData Network.AWS.KMS.ListGrants.ListGrants
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.KMS.ListGrants.ListGrants
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.KMS.ListGrants.ListGrants
instance Network.AWS.Data.Path.ToPath Network.AWS.KMS.ListGrants.ListGrants
instance Network.AWS.Data.Query.ToQuery Network.AWS.KMS.ListGrants.ListGrants


-- | Lists all of the key aliases in the account.
--   
--   This operation returns paginated results.
module Network.AWS.KMS.ListAliases

-- | Creates a value of <a>ListAliases</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>laMarker</a> - Use this parameter only when paginating results
--   and only in a subsequent request after you receive a response with
--   truncated results. Set it to the value of <tt>NextMarker</tt> from the
--   response you just received.</li>
--   <li><a>laLimit</a> - When paginating results, specify the maximum
--   number of items to return in the response. If additional items exist
--   beyond the number you specify, the <tt>Truncated</tt> element in the
--   response is set to true. This value is optional. If you include a
--   value, it must be between 1 and 100, inclusive. If you do not include
--   a value, it defaults to 50.</li>
--   </ul>
listAliases :: ListAliases

-- | <i>See:</i> <a>listAliases</a> smart constructor.
data ListAliases

-- | Use this parameter only when paginating results and only in a
--   subsequent request after you receive a response with truncated
--   results. Set it to the value of <tt>NextMarker</tt> from the response
--   you just received.
laMarker :: Lens' ListAliases (Maybe Text)

-- | When paginating results, specify the maximum number of items to return
--   in the response. If additional items exist beyond the number you
--   specify, the <tt>Truncated</tt> element in the response is set to
--   true. This value is optional. If you include a value, it must be
--   between 1 and 100, inclusive. If you do not include a value, it
--   defaults to 50.
laLimit :: Lens' ListAliases (Maybe Natural)

-- | Creates a value of <a>ListAliasesResponse</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>larsTruncated</a> - A flag that indicates whether there are
--   more items in the list. If your results were truncated, you can use
--   the <tt>Marker</tt> parameter to make a subsequent pagination request
--   to retrieve more items in the list.</li>
--   <li><a>larsAliases</a> - A list of key aliases in the user's
--   account.</li>
--   <li><a>larsNextMarker</a> - When <tt>Truncated</tt> is true, this
--   value is present and contains the value to use for the <tt>Marker</tt>
--   parameter in a subsequent pagination request.</li>
--   <li><a>larsResponseStatus</a> - -- | The response status code.</li>
--   </ul>
listAliasesResponse :: Int -> ListAliasesResponse

-- | <i>See:</i> <a>listAliasesResponse</a> smart constructor.
data ListAliasesResponse

-- | A flag that indicates whether there are more items in the list. If
--   your results were truncated, you can use the <tt>Marker</tt> parameter
--   to make a subsequent pagination request to retrieve more items in the
--   list.
larsTruncated :: Lens' ListAliasesResponse (Maybe Bool)

-- | A list of key aliases in the user's account.
larsAliases :: Lens' ListAliasesResponse [AliasListEntry]

-- | When <tt>Truncated</tt> is true, this value is present and contains
--   the value to use for the <tt>Marker</tt> parameter in a subsequent
--   pagination request.
larsNextMarker :: Lens' ListAliasesResponse (Maybe Text)

-- | <ul>
--   <li>- | The response status code.</li>
--   </ul>
larsResponseStatus :: Lens' ListAliasesResponse Int
instance GHC.Generics.Generic Network.AWS.KMS.ListAliases.ListAliasesResponse
instance Data.Data.Data Network.AWS.KMS.ListAliases.ListAliasesResponse
instance GHC.Show.Show Network.AWS.KMS.ListAliases.ListAliasesResponse
instance GHC.Read.Read Network.AWS.KMS.ListAliases.ListAliasesResponse
instance GHC.Classes.Eq Network.AWS.KMS.ListAliases.ListAliasesResponse
instance GHC.Generics.Generic Network.AWS.KMS.ListAliases.ListAliases
instance Data.Data.Data Network.AWS.KMS.ListAliases.ListAliases
instance GHC.Show.Show Network.AWS.KMS.ListAliases.ListAliases
instance GHC.Read.Read Network.AWS.KMS.ListAliases.ListAliases
instance GHC.Classes.Eq Network.AWS.KMS.ListAliases.ListAliases
instance Network.AWS.Pager.AWSPager Network.AWS.KMS.ListAliases.ListAliases
instance Network.AWS.Types.AWSRequest Network.AWS.KMS.ListAliases.ListAliases
instance Data.Hashable.Class.Hashable Network.AWS.KMS.ListAliases.ListAliases
instance Control.DeepSeq.NFData Network.AWS.KMS.ListAliases.ListAliases
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.KMS.ListAliases.ListAliases
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.KMS.ListAliases.ListAliases
instance Network.AWS.Data.Path.ToPath Network.AWS.KMS.ListAliases.ListAliases
instance Network.AWS.Data.Query.ToQuery Network.AWS.KMS.ListAliases.ListAliases
instance Control.DeepSeq.NFData Network.AWS.KMS.ListAliases.ListAliasesResponse


-- | Imports key material into an AWS KMS customer master key (CMK) from
--   your existing key management infrastructure. For more information
--   about importing key material into AWS KMS, see <a>Importing Key
--   Material</a> in the <i>AWS Key Management Service Developer Guide</i>
--   .
--   
--   You must specify the key ID of the CMK to import the key material
--   into. This CMK's <tt>Origin</tt> must be <tt>EXTERNAL</tt> . You must
--   also send an import token and the encrypted key material. Send the
--   import token that you received in the same
--   <tt>GetParametersForImport</tt> response that contained the public key
--   that you used to encrypt the key material. You must also specify
--   whether the key material expires and if so, when. When the key
--   material expires, AWS KMS deletes the key material and the CMK becomes
--   unusable. To use the CMK again, you can reimport the same key
--   material. If you set an expiration date, you can change it only by
--   reimporting the same key material and specifying a new expiration
--   date.
--   
--   When this operation is successful, the specified CMK's key state
--   changes to <tt>Enabled</tt> , and you can use the CMK.
--   
--   After you successfully import key material into a CMK, you can
--   reimport the same key material into that CMK, but you cannot import
--   different key material.
module Network.AWS.KMS.ImportKeyMaterial

-- | Creates a value of <a>ImportKeyMaterial</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>ikmExpirationModel</a> - Specifies whether the key material
--   expires. The default is <tt>KEY_MATERIAL_EXPIRES</tt> , in which case
--   you must include the <tt>ValidTo</tt> parameter. When this parameter
--   is set to <tt>KEY_MATERIAL_DOES_NOT_EXPIRE</tt> , you must omit the
--   <tt>ValidTo</tt> parameter.</li>
--   <li><a>ikmValidTo</a> - The time at which the imported key material
--   expires. When the key material expires, AWS KMS deletes the key
--   material and the CMK becomes unusable. You must omit this parameter
--   when the <tt>ExpirationModel</tt> parameter is set to
--   <tt>KEY_MATERIAL_DOES_NOT_EXPIRE</tt> . Otherwise it is required.</li>
--   <li><a>ikmKeyId</a> - The identifier of the CMK to import the key
--   material into. The CMK's <tt>Origin</tt> must be <tt>EXTERNAL</tt> . A
--   valid identifier is the unique key ID or the Amazon Resource Name
--   (ARN) of the CMK. Examples: * Unique key ID:
--   <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt></li>
--   <li><a>ikmImportToken</a> - The import token that you received in the
--   response to a previous <tt>GetParametersForImport</tt> request. It
--   must be from the same response that contained the public key that you
--   used to encrypt the key material.-- <i>Note:</i> This <tt>Lens</tt>
--   automatically encodes and decodes Base64 data. The underlying
--   isomorphism will encode to Base64 representation during serialisation,
--   and decode from Base64 representation during deserialisation. This
--   <tt>Lens</tt> accepts and returns only raw unencoded data.</li>
--   <li><a>ikmEncryptedKeyMaterial</a> - The encrypted key material to
--   import. It must be encrypted with the public key that you received in
--   the response to a previous <tt>GetParametersForImport</tt> request,
--   using the wrapping algorithm that you specified in that request.--
--   <i>Note:</i> This <tt>Lens</tt> automatically encodes and decodes
--   Base64 data. The underlying isomorphism will encode to Base64
--   representation during serialisation, and decode from Base64
--   representation during deserialisation. This <tt>Lens</tt> accepts and
--   returns only raw unencoded data.</li>
--   </ul>
importKeyMaterial :: Text -> ByteString -> ByteString -> ImportKeyMaterial

-- | <i>See:</i> <a>importKeyMaterial</a> smart constructor.
data ImportKeyMaterial

-- | Specifies whether the key material expires. The default is
--   <tt>KEY_MATERIAL_EXPIRES</tt> , in which case you must include the
--   <tt>ValidTo</tt> parameter. When this parameter is set to
--   <tt>KEY_MATERIAL_DOES_NOT_EXPIRE</tt> , you must omit the
--   <tt>ValidTo</tt> parameter.
ikmExpirationModel :: Lens' ImportKeyMaterial (Maybe ExpirationModelType)

-- | The time at which the imported key material expires. When the key
--   material expires, AWS KMS deletes the key material and the CMK becomes
--   unusable. You must omit this parameter when the
--   <tt>ExpirationModel</tt> parameter is set to
--   <tt>KEY_MATERIAL_DOES_NOT_EXPIRE</tt> . Otherwise it is required.
ikmValidTo :: Lens' ImportKeyMaterial (Maybe UTCTime)

-- | The identifier of the CMK to import the key material into. The CMK's
--   <tt>Origin</tt> must be <tt>EXTERNAL</tt> . A valid identifier is the
--   unique key ID or the Amazon Resource Name (ARN) of the CMK. Examples:
--   * Unique key ID: <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key
--   ARN:
--   <tt>arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
ikmKeyId :: Lens' ImportKeyMaterial Text

-- | The import token that you received in the response to a previous
--   <tt>GetParametersForImport</tt> request. It must be from the same
--   response that contained the public key that you used to encrypt the
--   key material.-- <i>Note:</i> This <tt>Lens</tt> automatically encodes
--   and decodes Base64 data. The underlying isomorphism will encode to
--   Base64 representation during serialisation, and decode from Base64
--   representation during deserialisation. This <tt>Lens</tt> accepts and
--   returns only raw unencoded data.
ikmImportToken :: Lens' ImportKeyMaterial ByteString

-- | The encrypted key material to import. It must be encrypted with the
--   public key that you received in the response to a previous
--   <tt>GetParametersForImport</tt> request, using the wrapping algorithm
--   that you specified in that request.-- <i>Note:</i> This <tt>Lens</tt>
--   automatically encodes and decodes Base64 data. The underlying
--   isomorphism will encode to Base64 representation during serialisation,
--   and decode from Base64 representation during deserialisation. This
--   <tt>Lens</tt> accepts and returns only raw unencoded data.
ikmEncryptedKeyMaterial :: Lens' ImportKeyMaterial ByteString

-- | Creates a value of <a>ImportKeyMaterialResponse</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>ikmrsResponseStatus</a> - -- | The response status code.</li>
--   </ul>
importKeyMaterialResponse :: Int -> ImportKeyMaterialResponse

-- | <i>See:</i> <a>importKeyMaterialResponse</a> smart constructor.
data ImportKeyMaterialResponse

-- | <ul>
--   <li>- | The response status code.</li>
--   </ul>
ikmrsResponseStatus :: Lens' ImportKeyMaterialResponse Int
instance GHC.Generics.Generic Network.AWS.KMS.ImportKeyMaterial.ImportKeyMaterialResponse
instance Data.Data.Data Network.AWS.KMS.ImportKeyMaterial.ImportKeyMaterialResponse
instance GHC.Show.Show Network.AWS.KMS.ImportKeyMaterial.ImportKeyMaterialResponse
instance GHC.Read.Read Network.AWS.KMS.ImportKeyMaterial.ImportKeyMaterialResponse
instance GHC.Classes.Eq Network.AWS.KMS.ImportKeyMaterial.ImportKeyMaterialResponse
instance GHC.Generics.Generic Network.AWS.KMS.ImportKeyMaterial.ImportKeyMaterial
instance Data.Data.Data Network.AWS.KMS.ImportKeyMaterial.ImportKeyMaterial
instance GHC.Show.Show Network.AWS.KMS.ImportKeyMaterial.ImportKeyMaterial
instance GHC.Read.Read Network.AWS.KMS.ImportKeyMaterial.ImportKeyMaterial
instance GHC.Classes.Eq Network.AWS.KMS.ImportKeyMaterial.ImportKeyMaterial
instance Network.AWS.Types.AWSRequest Network.AWS.KMS.ImportKeyMaterial.ImportKeyMaterial
instance Data.Hashable.Class.Hashable Network.AWS.KMS.ImportKeyMaterial.ImportKeyMaterial
instance Control.DeepSeq.NFData Network.AWS.KMS.ImportKeyMaterial.ImportKeyMaterial
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.KMS.ImportKeyMaterial.ImportKeyMaterial
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.KMS.ImportKeyMaterial.ImportKeyMaterial
instance Network.AWS.Data.Path.ToPath Network.AWS.KMS.ImportKeyMaterial.ImportKeyMaterial
instance Network.AWS.Data.Query.ToQuery Network.AWS.KMS.ImportKeyMaterial.ImportKeyMaterial
instance Control.DeepSeq.NFData Network.AWS.KMS.ImportKeyMaterial.ImportKeyMaterialResponse


-- | Returns the items you need in order to import key material into AWS
--   KMS from your existing key management infrastructure. For more
--   information about importing key material into AWS KMS, see
--   <a>Importing Key Material</a> in the <i>AWS Key Management Service
--   Developer Guide</i> .
--   
--   You must specify the key ID of the customer master key (CMK) into
--   which you will import key material. This CMK's <tt>Origin</tt> must be
--   <tt>EXTERNAL</tt> . You must also specify the wrapping algorithm and
--   type of wrapping key (public key) that you will use to encrypt the key
--   material.
--   
--   This operation returns a public key and an import token. Use the
--   public key to encrypt the key material. Store the import token to send
--   with a subsequent <tt>ImportKeyMaterial</tt> request. The public key
--   and import token from the same response must be used together. These
--   items are valid for 24 hours, after which they cannot be used for a
--   subsequent <tt>ImportKeyMaterial</tt> request. To retrieve new ones,
--   send another <tt>GetParametersForImport</tt> request.
module Network.AWS.KMS.GetParametersForImport

-- | Creates a value of <a>GetParametersForImport</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>gpfiKeyId</a> - The identifier of the CMK into which you will
--   import key material. The CMK's <tt>Origin</tt> must be
--   <tt>EXTERNAL</tt> . A valid identifier is the unique key ID or the
--   Amazon Resource Name (ARN) of the CMK. Examples: * Unique key ID:
--   <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt></li>
--   <li><a>gpfiWrappingAlgorithm</a> - The algorithm you will use to
--   encrypt the key material before importing it with
--   <tt>ImportKeyMaterial</tt> . For more information, see <a>Encrypt the
--   Key Material</a> in the <i>AWS Key Management Service Developer
--   Guide</i> .</li>
--   <li><a>gpfiWrappingKeySpec</a> - The type of wrapping key (public key)
--   to return in the response. Only 2048-bit RSA public keys are
--   supported.</li>
--   </ul>
getParametersForImport :: Text -> AlgorithmSpec -> WrappingKeySpec -> GetParametersForImport

-- | <i>See:</i> <a>getParametersForImport</a> smart constructor.
data GetParametersForImport

-- | The identifier of the CMK into which you will import key material. The
--   CMK's <tt>Origin</tt> must be <tt>EXTERNAL</tt> . A valid identifier
--   is the unique key ID or the Amazon Resource Name (ARN) of the CMK.
--   Examples: * Unique key ID:
--   <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
gpfiKeyId :: Lens' GetParametersForImport Text

-- | The algorithm you will use to encrypt the key material before
--   importing it with <tt>ImportKeyMaterial</tt> . For more information,
--   see <a>Encrypt the Key Material</a> in the <i>AWS Key Management
--   Service Developer Guide</i> .
gpfiWrappingAlgorithm :: Lens' GetParametersForImport AlgorithmSpec

-- | The type of wrapping key (public key) to return in the response. Only
--   2048-bit RSA public keys are supported.
gpfiWrappingKeySpec :: Lens' GetParametersForImport WrappingKeySpec

-- | Creates a value of <a>GetParametersForImportResponse</a> with the
--   minimum fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>gpfirsKeyId</a> - The identifier of the CMK to use in a
--   subsequent <tt>ImportKeyMaterial</tt> request. This is the same CMK
--   specified in the <tt>GetParametersForImport</tt> request.</li>
--   <li><a>gpfirsPublicKey</a> - The public key to use to encrypt the key
--   material before importing it with <tt>ImportKeyMaterial</tt> .--
--   <i>Note:</i> This <tt>Lens</tt> automatically encodes and decodes
--   Base64 data. The underlying isomorphism will encode to Base64
--   representation during serialisation, and decode from Base64
--   representation during deserialisation. This <tt>Lens</tt> accepts and
--   returns only raw unencoded data.</li>
--   <li><a>gpfirsParametersValidTo</a> - The time at which the import
--   token and public key are no longer valid. After this time, you cannot
--   use them to make an <tt>ImportKeyMaterial</tt> request and you must
--   send another <tt>GetParametersForImport</tt> request to retrieve new
--   ones.</li>
--   <li><a>gpfirsImportToken</a> - The import token to send in a
--   subsequent <tt>ImportKeyMaterial</tt> request.-- <i>Note:</i> This
--   <tt>Lens</tt> automatically encodes and decodes Base64 data. The
--   underlying isomorphism will encode to Base64 representation during
--   serialisation, and decode from Base64 representation during
--   deserialisation. This <tt>Lens</tt> accepts and returns only raw
--   unencoded data.</li>
--   <li><a>gpfirsResponseStatus</a> - -- | The response status code.</li>
--   </ul>
getParametersForImportResponse :: Int -> GetParametersForImportResponse

-- | <i>See:</i> <a>getParametersForImportResponse</a> smart constructor.
data GetParametersForImportResponse

-- | The identifier of the CMK to use in a subsequent
--   <tt>ImportKeyMaterial</tt> request. This is the same CMK specified in
--   the <tt>GetParametersForImport</tt> request.
gpfirsKeyId :: Lens' GetParametersForImportResponse (Maybe Text)

-- | The public key to use to encrypt the key material before importing it
--   with <tt>ImportKeyMaterial</tt> .-- <i>Note:</i> This <tt>Lens</tt>
--   automatically encodes and decodes Base64 data. The underlying
--   isomorphism will encode to Base64 representation during serialisation,
--   and decode from Base64 representation during deserialisation. This
--   <tt>Lens</tt> accepts and returns only raw unencoded data.
gpfirsPublicKey :: Lens' GetParametersForImportResponse (Maybe ByteString)

-- | The time at which the import token and public key are no longer valid.
--   After this time, you cannot use them to make an
--   <tt>ImportKeyMaterial</tt> request and you must send another
--   <tt>GetParametersForImport</tt> request to retrieve new ones.
gpfirsParametersValidTo :: Lens' GetParametersForImportResponse (Maybe UTCTime)

-- | The import token to send in a subsequent <tt>ImportKeyMaterial</tt>
--   request.-- <i>Note:</i> This <tt>Lens</tt> automatically encodes and
--   decodes Base64 data. The underlying isomorphism will encode to Base64
--   representation during serialisation, and decode from Base64
--   representation during deserialisation. This <tt>Lens</tt> accepts and
--   returns only raw unencoded data.
gpfirsImportToken :: Lens' GetParametersForImportResponse (Maybe ByteString)

-- | <ul>
--   <li>- | The response status code.</li>
--   </ul>
gpfirsResponseStatus :: Lens' GetParametersForImportResponse Int
instance GHC.Generics.Generic Network.AWS.KMS.GetParametersForImport.GetParametersForImportResponse
instance Data.Data.Data Network.AWS.KMS.GetParametersForImport.GetParametersForImportResponse
instance GHC.Show.Show Network.AWS.KMS.GetParametersForImport.GetParametersForImportResponse
instance GHC.Read.Read Network.AWS.KMS.GetParametersForImport.GetParametersForImportResponse
instance GHC.Classes.Eq Network.AWS.KMS.GetParametersForImport.GetParametersForImportResponse
instance GHC.Generics.Generic Network.AWS.KMS.GetParametersForImport.GetParametersForImport
instance Data.Data.Data Network.AWS.KMS.GetParametersForImport.GetParametersForImport
instance GHC.Show.Show Network.AWS.KMS.GetParametersForImport.GetParametersForImport
instance GHC.Read.Read Network.AWS.KMS.GetParametersForImport.GetParametersForImport
instance GHC.Classes.Eq Network.AWS.KMS.GetParametersForImport.GetParametersForImport
instance Network.AWS.Types.AWSRequest Network.AWS.KMS.GetParametersForImport.GetParametersForImport
instance Data.Hashable.Class.Hashable Network.AWS.KMS.GetParametersForImport.GetParametersForImport
instance Control.DeepSeq.NFData Network.AWS.KMS.GetParametersForImport.GetParametersForImport
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.KMS.GetParametersForImport.GetParametersForImport
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.KMS.GetParametersForImport.GetParametersForImport
instance Network.AWS.Data.Path.ToPath Network.AWS.KMS.GetParametersForImport.GetParametersForImport
instance Network.AWS.Data.Query.ToQuery Network.AWS.KMS.GetParametersForImport.GetParametersForImport
instance Control.DeepSeq.NFData Network.AWS.KMS.GetParametersForImport.GetParametersForImportResponse


-- | Retrieves a Boolean value that indicates whether key rotation is
--   enabled for the specified key.
module Network.AWS.KMS.GetKeyRotationStatus

-- | Creates a value of <a>GetKeyRotationStatus</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>gkrsKeyId</a> - A unique identifier for the customer master
--   key. This value can be a globally unique identifier or the fully
--   specified ARN to a key. * Key ARN Example -
--   arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
--   * Globally Unique Key ID Example -
--   12345678-1234-1234-1234-123456789012</li>
--   </ul>
getKeyRotationStatus :: Text -> GetKeyRotationStatus

-- | <i>See:</i> <a>getKeyRotationStatus</a> smart constructor.
data GetKeyRotationStatus

-- | A unique identifier for the customer master key. This value can be a
--   globally unique identifier or the fully specified ARN to a key. * Key
--   ARN Example -
--   arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
--   * Globally Unique Key ID Example -
--   12345678-1234-1234-1234-123456789012
gkrsKeyId :: Lens' GetKeyRotationStatus Text

-- | Creates a value of <a>GetKeyRotationStatusResponse</a> with the
--   minimum fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>gkrsrsKeyRotationEnabled</a> - A Boolean value that specifies
--   whether key rotation is enabled.</li>
--   <li><a>gkrsrsResponseStatus</a> - -- | The response status code.</li>
--   </ul>
getKeyRotationStatusResponse :: Int -> GetKeyRotationStatusResponse

-- | <i>See:</i> <a>getKeyRotationStatusResponse</a> smart constructor.
data GetKeyRotationStatusResponse

-- | A Boolean value that specifies whether key rotation is enabled.
gkrsrsKeyRotationEnabled :: Lens' GetKeyRotationStatusResponse (Maybe Bool)

-- | <ul>
--   <li>- | The response status code.</li>
--   </ul>
gkrsrsResponseStatus :: Lens' GetKeyRotationStatusResponse Int
instance GHC.Generics.Generic Network.AWS.KMS.GetKeyRotationStatus.GetKeyRotationStatusResponse
instance Data.Data.Data Network.AWS.KMS.GetKeyRotationStatus.GetKeyRotationStatusResponse
instance GHC.Show.Show Network.AWS.KMS.GetKeyRotationStatus.GetKeyRotationStatusResponse
instance GHC.Read.Read Network.AWS.KMS.GetKeyRotationStatus.GetKeyRotationStatusResponse
instance GHC.Classes.Eq Network.AWS.KMS.GetKeyRotationStatus.GetKeyRotationStatusResponse
instance GHC.Generics.Generic Network.AWS.KMS.GetKeyRotationStatus.GetKeyRotationStatus
instance Data.Data.Data Network.AWS.KMS.GetKeyRotationStatus.GetKeyRotationStatus
instance GHC.Show.Show Network.AWS.KMS.GetKeyRotationStatus.GetKeyRotationStatus
instance GHC.Read.Read Network.AWS.KMS.GetKeyRotationStatus.GetKeyRotationStatus
instance GHC.Classes.Eq Network.AWS.KMS.GetKeyRotationStatus.GetKeyRotationStatus
instance Network.AWS.Types.AWSRequest Network.AWS.KMS.GetKeyRotationStatus.GetKeyRotationStatus
instance Data.Hashable.Class.Hashable Network.AWS.KMS.GetKeyRotationStatus.GetKeyRotationStatus
instance Control.DeepSeq.NFData Network.AWS.KMS.GetKeyRotationStatus.GetKeyRotationStatus
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.KMS.GetKeyRotationStatus.GetKeyRotationStatus
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.KMS.GetKeyRotationStatus.GetKeyRotationStatus
instance Network.AWS.Data.Path.ToPath Network.AWS.KMS.GetKeyRotationStatus.GetKeyRotationStatus
instance Network.AWS.Data.Query.ToQuery Network.AWS.KMS.GetKeyRotationStatus.GetKeyRotationStatus
instance Control.DeepSeq.NFData Network.AWS.KMS.GetKeyRotationStatus.GetKeyRotationStatusResponse


-- | Retrieves a policy attached to the specified key.
module Network.AWS.KMS.GetKeyPolicy

-- | Creates a value of <a>GetKeyPolicy</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>gkpKeyId</a> - A unique identifier for the customer master key.
--   This value can be a globally unique identifier or the fully specified
--   ARN to a key. * Key ARN Example -
--   arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
--   * Globally Unique Key ID Example -
--   12345678-1234-1234-1234-123456789012</li>
--   <li><a>gkpPolicyName</a> - String that contains the name of the
--   policy. Currently, this must be "default". Policy names can be
--   discovered by calling <tt>ListKeyPolicies</tt> .</li>
--   </ul>
getKeyPolicy :: Text -> Text -> GetKeyPolicy

-- | <i>See:</i> <a>getKeyPolicy</a> smart constructor.
data GetKeyPolicy

-- | A unique identifier for the customer master key. This value can be a
--   globally unique identifier or the fully specified ARN to a key. * Key
--   ARN Example -
--   arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
--   * Globally Unique Key ID Example -
--   12345678-1234-1234-1234-123456789012
gkpKeyId :: Lens' GetKeyPolicy Text

-- | String that contains the name of the policy. Currently, this must be
--   "default". Policy names can be discovered by calling
--   <tt>ListKeyPolicies</tt> .
gkpPolicyName :: Lens' GetKeyPolicy Text

-- | Creates a value of <a>GetKeyPolicyResponse</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>gkprsPolicy</a> - A policy document in JSON format.</li>
--   <li><a>gkprsResponseStatus</a> - -- | The response status code.</li>
--   </ul>
getKeyPolicyResponse :: Int -> GetKeyPolicyResponse

-- | <i>See:</i> <a>getKeyPolicyResponse</a> smart constructor.
data GetKeyPolicyResponse

-- | A policy document in JSON format.
gkprsPolicy :: Lens' GetKeyPolicyResponse (Maybe Text)

-- | <ul>
--   <li>- | The response status code.</li>
--   </ul>
gkprsResponseStatus :: Lens' GetKeyPolicyResponse Int
instance GHC.Generics.Generic Network.AWS.KMS.GetKeyPolicy.GetKeyPolicyResponse
instance Data.Data.Data Network.AWS.KMS.GetKeyPolicy.GetKeyPolicyResponse
instance GHC.Show.Show Network.AWS.KMS.GetKeyPolicy.GetKeyPolicyResponse
instance GHC.Read.Read Network.AWS.KMS.GetKeyPolicy.GetKeyPolicyResponse
instance GHC.Classes.Eq Network.AWS.KMS.GetKeyPolicy.GetKeyPolicyResponse
instance GHC.Generics.Generic Network.AWS.KMS.GetKeyPolicy.GetKeyPolicy
instance Data.Data.Data Network.AWS.KMS.GetKeyPolicy.GetKeyPolicy
instance GHC.Show.Show Network.AWS.KMS.GetKeyPolicy.GetKeyPolicy
instance GHC.Read.Read Network.AWS.KMS.GetKeyPolicy.GetKeyPolicy
instance GHC.Classes.Eq Network.AWS.KMS.GetKeyPolicy.GetKeyPolicy
instance Network.AWS.Types.AWSRequest Network.AWS.KMS.GetKeyPolicy.GetKeyPolicy
instance Data.Hashable.Class.Hashable Network.AWS.KMS.GetKeyPolicy.GetKeyPolicy
instance Control.DeepSeq.NFData Network.AWS.KMS.GetKeyPolicy.GetKeyPolicy
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.KMS.GetKeyPolicy.GetKeyPolicy
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.KMS.GetKeyPolicy.GetKeyPolicy
instance Network.AWS.Data.Path.ToPath Network.AWS.KMS.GetKeyPolicy.GetKeyPolicy
instance Network.AWS.Data.Query.ToQuery Network.AWS.KMS.GetKeyPolicy.GetKeyPolicy
instance Control.DeepSeq.NFData Network.AWS.KMS.GetKeyPolicy.GetKeyPolicyResponse


-- | Generates an unpredictable byte string.
module Network.AWS.KMS.GenerateRandom

-- | Creates a value of <a>GenerateRandom</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>grNumberOfBytes</a> - The length of the byte string.</li>
--   </ul>
generateRandom :: GenerateRandom

-- | <i>See:</i> <a>generateRandom</a> smart constructor.
data GenerateRandom

-- | The length of the byte string.
grNumberOfBytes :: Lens' GenerateRandom (Maybe Natural)

-- | Creates a value of <a>GenerateRandomResponse</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>grrsPlaintext</a> - The unpredictable byte string.--
--   <i>Note:</i> This <tt>Lens</tt> automatically encodes and decodes
--   Base64 data. The underlying isomorphism will encode to Base64
--   representation during serialisation, and decode from Base64
--   representation during deserialisation. This <tt>Lens</tt> accepts and
--   returns only raw unencoded data.</li>
--   <li><a>grrsResponseStatus</a> - -- | The response status code.</li>
--   </ul>
generateRandomResponse :: Int -> GenerateRandomResponse

-- | <i>See:</i> <a>generateRandomResponse</a> smart constructor.
data GenerateRandomResponse

-- | The unpredictable byte string.-- <i>Note:</i> This <tt>Lens</tt>
--   automatically encodes and decodes Base64 data. The underlying
--   isomorphism will encode to Base64 representation during serialisation,
--   and decode from Base64 representation during deserialisation. This
--   <tt>Lens</tt> accepts and returns only raw unencoded data.
grrsPlaintext :: Lens' GenerateRandomResponse (Maybe ByteString)

-- | <ul>
--   <li>- | The response status code.</li>
--   </ul>
grrsResponseStatus :: Lens' GenerateRandomResponse Int
instance GHC.Generics.Generic Network.AWS.KMS.GenerateRandom.GenerateRandomResponse
instance Data.Data.Data Network.AWS.KMS.GenerateRandom.GenerateRandomResponse
instance GHC.Show.Show Network.AWS.KMS.GenerateRandom.GenerateRandomResponse
instance GHC.Read.Read Network.AWS.KMS.GenerateRandom.GenerateRandomResponse
instance GHC.Classes.Eq Network.AWS.KMS.GenerateRandom.GenerateRandomResponse
instance GHC.Generics.Generic Network.AWS.KMS.GenerateRandom.GenerateRandom
instance Data.Data.Data Network.AWS.KMS.GenerateRandom.GenerateRandom
instance GHC.Show.Show Network.AWS.KMS.GenerateRandom.GenerateRandom
instance GHC.Read.Read Network.AWS.KMS.GenerateRandom.GenerateRandom
instance GHC.Classes.Eq Network.AWS.KMS.GenerateRandom.GenerateRandom
instance Network.AWS.Types.AWSRequest Network.AWS.KMS.GenerateRandom.GenerateRandom
instance Data.Hashable.Class.Hashable Network.AWS.KMS.GenerateRandom.GenerateRandom
instance Control.DeepSeq.NFData Network.AWS.KMS.GenerateRandom.GenerateRandom
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.KMS.GenerateRandom.GenerateRandom
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.KMS.GenerateRandom.GenerateRandom
instance Network.AWS.Data.Path.ToPath Network.AWS.KMS.GenerateRandom.GenerateRandom
instance Network.AWS.Data.Query.ToQuery Network.AWS.KMS.GenerateRandom.GenerateRandom
instance Control.DeepSeq.NFData Network.AWS.KMS.GenerateRandom.GenerateRandomResponse


-- | Returns a data encryption key encrypted under a customer master key
--   (CMK). This operation is identical to <a>GenerateDataKey</a> but
--   returns only the encrypted copy of the data key.
--   
--   This operation is useful in a system that has multiple components with
--   different degrees of trust. For example, consider a system that stores
--   encrypted data in containers. Each container stores the encrypted data
--   and an encrypted copy of the data key. One component of the system,
--   called the <i>control plane</i> , creates new containers. When it
--   creates a new container, it uses this operation
--   (<tt>GenerateDataKeyWithoutPlaintext</tt> ) to get an encrypted data
--   key and then stores it in the container. Later, a different component
--   of the system, called the <i>data plane</i> , puts encrypted data into
--   the containers. To do this, it passes the encrypted data key to the
--   <a>Decrypt</a> operation, then uses the returned plaintext data key to
--   encrypt data, and finally stores the encrypted data in the container.
--   In this system, the control plane never sees the plaintext data key.
module Network.AWS.KMS.GenerateDataKeyWithoutPlaintext

-- | Creates a value of <a>GenerateDataKeyWithoutPlaintext</a> with the
--   minimum fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>gdkwpKeySpec</a> - The length of the data encryption key. Use
--   <tt>AES_128</tt> to generate a 128-bit symmetric key, or
--   <tt>AES_256</tt> to generate a 256-bit symmetric key.</li>
--   <li><a>gdkwpEncryptionContext</a> - A set of key-value pairs that
--   represents additional authenticated data. For more information, see
--   <a>Encryption Context</a> in the <i>AWS Key Management Service
--   Developer Guide</i> .</li>
--   <li><a>gdkwpNumberOfBytes</a> - The length of the data encryption key
--   in bytes. For example, use the value 64 to generate a 512-bit data key
--   (64 bytes is 512 bits). For common key lengths (128-bit and 256-bit
--   symmetric keys), we recommend that you use the <tt>KeySpec</tt> field
--   instead of this one.</li>
--   <li><a>gdkwpGrantTokens</a> - A list of grant tokens. For more
--   information, see <a>Grant Tokens</a> in the <i>AWS Key Management
--   Service Developer Guide</i> .</li>
--   <li><a>gdkwpKeyId</a> - The identifier of the CMK under which to
--   generate and encrypt the data encryption key. A valid identifier is
--   the unique key ID or the Amazon Resource Name (ARN) of the CMK, or the
--   alias name or ARN of an alias that points to the CMK. Examples: *
--   Unique key ID: <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * CMK
--   ARN:
--   <tt>arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   * Alias name: <tt>alias/ExampleAlias</tt> * Alias ARN:
--   <tt>arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias</tt></li>
--   </ul>
generateDataKeyWithoutPlaintext :: Text -> GenerateDataKeyWithoutPlaintext

-- | <i>See:</i> <a>generateDataKeyWithoutPlaintext</a> smart constructor.
data GenerateDataKeyWithoutPlaintext

-- | The length of the data encryption key. Use <tt>AES_128</tt> to
--   generate a 128-bit symmetric key, or <tt>AES_256</tt> to generate a
--   256-bit symmetric key.
gdkwpKeySpec :: Lens' GenerateDataKeyWithoutPlaintext (Maybe DataKeySpec)

-- | A set of key-value pairs that represents additional authenticated
--   data. For more information, see <a>Encryption Context</a> in the
--   <i>AWS Key Management Service Developer Guide</i> .
gdkwpEncryptionContext :: Lens' GenerateDataKeyWithoutPlaintext (HashMap Text Text)

-- | The length of the data encryption key in bytes. For example, use the
--   value 64 to generate a 512-bit data key (64 bytes is 512 bits). For
--   common key lengths (128-bit and 256-bit symmetric keys), we recommend
--   that you use the <tt>KeySpec</tt> field instead of this one.
gdkwpNumberOfBytes :: Lens' GenerateDataKeyWithoutPlaintext (Maybe Natural)

-- | A list of grant tokens. For more information, see <a>Grant Tokens</a>
--   in the <i>AWS Key Management Service Developer Guide</i> .
gdkwpGrantTokens :: Lens' GenerateDataKeyWithoutPlaintext [Text]

-- | The identifier of the CMK under which to generate and encrypt the data
--   encryption key. A valid identifier is the unique key ID or the Amazon
--   Resource Name (ARN) of the CMK, or the alias name or ARN of an alias
--   that points to the CMK. Examples: * Unique key ID:
--   <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * CMK ARN:
--   <tt>arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   * Alias name: <tt>alias/ExampleAlias</tt> * Alias ARN:
--   <tt>arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias</tt>
gdkwpKeyId :: Lens' GenerateDataKeyWithoutPlaintext Text

-- | Creates a value of <a>GenerateDataKeyWithoutPlaintextResponse</a> with
--   the minimum fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>gdkwprsKeyId</a> - The identifier of the CMK under which the
--   data encryption key was generated and encrypted.</li>
--   <li><a>gdkwprsCiphertextBlob</a> - The encrypted data encryption
--   key.-- <i>Note:</i> This <tt>Lens</tt> automatically encodes and
--   decodes Base64 data. The underlying isomorphism will encode to Base64
--   representation during serialisation, and decode from Base64
--   representation during deserialisation. This <tt>Lens</tt> accepts and
--   returns only raw unencoded data.</li>
--   <li><a>gdkwprsResponseStatus</a> - -- | The response status code.</li>
--   </ul>
generateDataKeyWithoutPlaintextResponse :: Int -> GenerateDataKeyWithoutPlaintextResponse

-- | <i>See:</i> <a>generateDataKeyWithoutPlaintextResponse</a> smart
--   constructor.
data GenerateDataKeyWithoutPlaintextResponse

-- | The identifier of the CMK under which the data encryption key was
--   generated and encrypted.
gdkwprsKeyId :: Lens' GenerateDataKeyWithoutPlaintextResponse (Maybe Text)

-- | The encrypted data encryption key.-- <i>Note:</i> This <tt>Lens</tt>
--   automatically encodes and decodes Base64 data. The underlying
--   isomorphism will encode to Base64 representation during serialisation,
--   and decode from Base64 representation during deserialisation. This
--   <tt>Lens</tt> accepts and returns only raw unencoded data.
gdkwprsCiphertextBlob :: Lens' GenerateDataKeyWithoutPlaintextResponse (Maybe ByteString)

-- | <ul>
--   <li>- | The response status code.</li>
--   </ul>
gdkwprsResponseStatus :: Lens' GenerateDataKeyWithoutPlaintextResponse Int
instance GHC.Generics.Generic Network.AWS.KMS.GenerateDataKeyWithoutPlaintext.GenerateDataKeyWithoutPlaintextResponse
instance Data.Data.Data Network.AWS.KMS.GenerateDataKeyWithoutPlaintext.GenerateDataKeyWithoutPlaintextResponse
instance GHC.Show.Show Network.AWS.KMS.GenerateDataKeyWithoutPlaintext.GenerateDataKeyWithoutPlaintextResponse
instance GHC.Read.Read Network.AWS.KMS.GenerateDataKeyWithoutPlaintext.GenerateDataKeyWithoutPlaintextResponse
instance GHC.Classes.Eq Network.AWS.KMS.GenerateDataKeyWithoutPlaintext.GenerateDataKeyWithoutPlaintextResponse
instance GHC.Generics.Generic Network.AWS.KMS.GenerateDataKeyWithoutPlaintext.GenerateDataKeyWithoutPlaintext
instance Data.Data.Data Network.AWS.KMS.GenerateDataKeyWithoutPlaintext.GenerateDataKeyWithoutPlaintext
instance GHC.Show.Show Network.AWS.KMS.GenerateDataKeyWithoutPlaintext.GenerateDataKeyWithoutPlaintext
instance GHC.Read.Read Network.AWS.KMS.GenerateDataKeyWithoutPlaintext.GenerateDataKeyWithoutPlaintext
instance GHC.Classes.Eq Network.AWS.KMS.GenerateDataKeyWithoutPlaintext.GenerateDataKeyWithoutPlaintext
instance Network.AWS.Types.AWSRequest Network.AWS.KMS.GenerateDataKeyWithoutPlaintext.GenerateDataKeyWithoutPlaintext
instance Data.Hashable.Class.Hashable Network.AWS.KMS.GenerateDataKeyWithoutPlaintext.GenerateDataKeyWithoutPlaintext
instance Control.DeepSeq.NFData Network.AWS.KMS.GenerateDataKeyWithoutPlaintext.GenerateDataKeyWithoutPlaintext
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.KMS.GenerateDataKeyWithoutPlaintext.GenerateDataKeyWithoutPlaintext
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.KMS.GenerateDataKeyWithoutPlaintext.GenerateDataKeyWithoutPlaintext
instance Network.AWS.Data.Path.ToPath Network.AWS.KMS.GenerateDataKeyWithoutPlaintext.GenerateDataKeyWithoutPlaintext
instance Network.AWS.Data.Query.ToQuery Network.AWS.KMS.GenerateDataKeyWithoutPlaintext.GenerateDataKeyWithoutPlaintext
instance Control.DeepSeq.NFData Network.AWS.KMS.GenerateDataKeyWithoutPlaintext.GenerateDataKeyWithoutPlaintextResponse


-- | Returns a data encryption key that you can use in your application to
--   encrypt data locally.
--   
--   You must specify the customer master key (CMK) under which to generate
--   the data key. You must also specify the length of the data key using
--   either the <tt>KeySpec</tt> or <tt>NumberOfBytes</tt> field. You must
--   specify one field or the other, but not both. For common key lengths
--   (128-bit and 256-bit symmetric keys), we recommend that you use
--   <tt>KeySpec</tt> .
--   
--   This operation returns a plaintext copy of the data key in the
--   <tt>Plaintext</tt> field of the response, and an encrypted copy of the
--   data key in the <tt>CiphertextBlob</tt> field. The data key is
--   encrypted under the CMK specified in the <tt>KeyId</tt> field of the
--   request.
--   
--   We recommend that you use the following pattern to encrypt data
--   locally in your application:
--   
--   <ul>
--   <li>Use this operation (<tt>GenerateDataKey</tt> ) to retrieve a data
--   encryption key.</li>
--   <li>Use the plaintext data encryption key (returned in the
--   <tt>Plaintext</tt> field of the response) to encrypt data locally,
--   then erase the plaintext data key from memory.</li>
--   <li>Store the encrypted data key (returned in the
--   <tt>CiphertextBlob</tt> field of the response) alongside the locally
--   encrypted data.</li>
--   </ul>
--   
--   To decrypt data locally:
--   
--   <ul>
--   <li>Use the <a>Decrypt</a> operation to decrypt the encrypted data key
--   into a plaintext copy of the data key.</li>
--   <li>Use the plaintext data key to decrypt data locally, then erase the
--   plaintext data key from memory.</li>
--   </ul>
--   
--   To return only an encrypted copy of the data key, use
--   <a>GenerateDataKeyWithoutPlaintext</a> . To return an arbitrary
--   unpredictable byte string, use <tt>GenerateRandom</tt> .
--   
--   If you use the optional <tt>EncryptionContext</tt> field, you must
--   store at least enough information to be able to reconstruct the full
--   encryption context when you later send the ciphertext to the
--   <a>Decrypt</a> operation. It is a good practice to choose an
--   encryption context that you can reconstruct on the fly to better
--   secure the ciphertext. For more information, see <a>Encryption
--   Context</a> in the <i>AWS Key Management Service Developer Guide</i> .
module Network.AWS.KMS.GenerateDataKey

-- | Creates a value of <a>GenerateDataKey</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>gdkKeySpec</a> - The length of the data encryption key. Use
--   <tt>AES_128</tt> to generate a 128-bit symmetric key, or
--   <tt>AES_256</tt> to generate a 256-bit symmetric key.</li>
--   <li><a>gdkEncryptionContext</a> - A set of key-value pairs that
--   represents additional authenticated data. For more information, see
--   <a>Encryption Context</a> in the <i>AWS Key Management Service
--   Developer Guide</i> .</li>
--   <li><a>gdkNumberOfBytes</a> - The length of the data encryption key in
--   bytes. For example, use the value 64 to generate a 512-bit data key
--   (64 bytes is 512 bits). For common key lengths (128-bit and 256-bit
--   symmetric keys), we recommend that you use the <tt>KeySpec</tt> field
--   instead of this one.</li>
--   <li><a>gdkGrantTokens</a> - A list of grant tokens. For more
--   information, see <a>Grant Tokens</a> in the <i>AWS Key Management
--   Service Developer Guide</i> .</li>
--   <li><a>gdkKeyId</a> - The identifier of the CMK under which to
--   generate and encrypt the data encryption key. A valid identifier is
--   the unique key ID or the Amazon Resource Name (ARN) of the CMK, or the
--   alias name or ARN of an alias that points to the CMK. Examples: *
--   Unique key ID: <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * CMK
--   ARN:
--   <tt>arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   * Alias name: <tt>alias/ExampleAlias</tt> * Alias ARN:
--   <tt>arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias</tt></li>
--   </ul>
generateDataKey :: Text -> GenerateDataKey

-- | <i>See:</i> <a>generateDataKey</a> smart constructor.
data GenerateDataKey

-- | The length of the data encryption key. Use <tt>AES_128</tt> to
--   generate a 128-bit symmetric key, or <tt>AES_256</tt> to generate a
--   256-bit symmetric key.
gdkKeySpec :: Lens' GenerateDataKey (Maybe DataKeySpec)

-- | A set of key-value pairs that represents additional authenticated
--   data. For more information, see <a>Encryption Context</a> in the
--   <i>AWS Key Management Service Developer Guide</i> .
gdkEncryptionContext :: Lens' GenerateDataKey (HashMap Text Text)

-- | The length of the data encryption key in bytes. For example, use the
--   value 64 to generate a 512-bit data key (64 bytes is 512 bits). For
--   common key lengths (128-bit and 256-bit symmetric keys), we recommend
--   that you use the <tt>KeySpec</tt> field instead of this one.
gdkNumberOfBytes :: Lens' GenerateDataKey (Maybe Natural)

-- | A list of grant tokens. For more information, see <a>Grant Tokens</a>
--   in the <i>AWS Key Management Service Developer Guide</i> .
gdkGrantTokens :: Lens' GenerateDataKey [Text]

-- | The identifier of the CMK under which to generate and encrypt the data
--   encryption key. A valid identifier is the unique key ID or the Amazon
--   Resource Name (ARN) of the CMK, or the alias name or ARN of an alias
--   that points to the CMK. Examples: * Unique key ID:
--   <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * CMK ARN:
--   <tt>arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   * Alias name: <tt>alias/ExampleAlias</tt> * Alias ARN:
--   <tt>arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias</tt>
gdkKeyId :: Lens' GenerateDataKey Text

-- | Creates a value of <a>GenerateDataKeyResponse</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>gdkrsResponseStatus</a> - -- | The response status code.</li>
--   <li><a>gdkrsKeyId</a> - The identifier of the CMK under which the data
--   encryption key was generated and encrypted.</li>
--   <li><a>gdkrsPlaintext</a> - The data encryption key. Use this data key
--   for local encryption and decryption, then remove it from memory as
--   soon as possible.-- <i>Note:</i> This <tt>Lens</tt> automatically
--   encodes and decodes Base64 data. The underlying isomorphism will
--   encode to Base64 representation during serialisation, and decode from
--   Base64 representation during deserialisation. This <tt>Lens</tt>
--   accepts and returns only raw unencoded data.</li>
--   <li><a>gdkrsCiphertextBlob</a> - The encrypted data encryption key.--
--   <i>Note:</i> This <tt>Lens</tt> automatically encodes and decodes
--   Base64 data. The underlying isomorphism will encode to Base64
--   representation during serialisation, and decode from Base64
--   representation during deserialisation. This <tt>Lens</tt> accepts and
--   returns only raw unencoded data.</li>
--   </ul>
generateDataKeyResponse :: Int -> Text -> ByteString -> ByteString -> GenerateDataKeyResponse

-- | <i>See:</i> <a>generateDataKeyResponse</a> smart constructor.
data GenerateDataKeyResponse

-- | <ul>
--   <li>- | The response status code.</li>
--   </ul>
gdkrsResponseStatus :: Lens' GenerateDataKeyResponse Int

-- | The identifier of the CMK under which the data encryption key was
--   generated and encrypted.
gdkrsKeyId :: Lens' GenerateDataKeyResponse Text

-- | The data encryption key. Use this data key for local encryption and
--   decryption, then remove it from memory as soon as possible.--
--   <i>Note:</i> This <tt>Lens</tt> automatically encodes and decodes
--   Base64 data. The underlying isomorphism will encode to Base64
--   representation during serialisation, and decode from Base64
--   representation during deserialisation. This <tt>Lens</tt> accepts and
--   returns only raw unencoded data.
gdkrsPlaintext :: Lens' GenerateDataKeyResponse ByteString

-- | The encrypted data encryption key.-- <i>Note:</i> This <tt>Lens</tt>
--   automatically encodes and decodes Base64 data. The underlying
--   isomorphism will encode to Base64 representation during serialisation,
--   and decode from Base64 representation during deserialisation. This
--   <tt>Lens</tt> accepts and returns only raw unencoded data.
gdkrsCiphertextBlob :: Lens' GenerateDataKeyResponse ByteString
instance GHC.Generics.Generic Network.AWS.KMS.GenerateDataKey.GenerateDataKeyResponse
instance Data.Data.Data Network.AWS.KMS.GenerateDataKey.GenerateDataKeyResponse
instance GHC.Show.Show Network.AWS.KMS.GenerateDataKey.GenerateDataKeyResponse
instance GHC.Read.Read Network.AWS.KMS.GenerateDataKey.GenerateDataKeyResponse
instance GHC.Classes.Eq Network.AWS.KMS.GenerateDataKey.GenerateDataKeyResponse
instance GHC.Generics.Generic Network.AWS.KMS.GenerateDataKey.GenerateDataKey
instance Data.Data.Data Network.AWS.KMS.GenerateDataKey.GenerateDataKey
instance GHC.Show.Show Network.AWS.KMS.GenerateDataKey.GenerateDataKey
instance GHC.Read.Read Network.AWS.KMS.GenerateDataKey.GenerateDataKey
instance GHC.Classes.Eq Network.AWS.KMS.GenerateDataKey.GenerateDataKey
instance Network.AWS.Types.AWSRequest Network.AWS.KMS.GenerateDataKey.GenerateDataKey
instance Data.Hashable.Class.Hashable Network.AWS.KMS.GenerateDataKey.GenerateDataKey
instance Control.DeepSeq.NFData Network.AWS.KMS.GenerateDataKey.GenerateDataKey
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.KMS.GenerateDataKey.GenerateDataKey
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.KMS.GenerateDataKey.GenerateDataKey
instance Network.AWS.Data.Path.ToPath Network.AWS.KMS.GenerateDataKey.GenerateDataKey
instance Network.AWS.Data.Query.ToQuery Network.AWS.KMS.GenerateDataKey.GenerateDataKey
instance Control.DeepSeq.NFData Network.AWS.KMS.GenerateDataKey.GenerateDataKeyResponse


-- | Encrypts plaintext into ciphertext by using a customer master key. The
--   <tt>Encrypt</tt> function has two primary use cases:
--   
--   <ul>
--   <li>You can encrypt up to 4 KB of arbitrary data such as an RSA key, a
--   database password, or other sensitive customer information.</li>
--   <li>If you are moving encrypted data from one region to another, you
--   can use this API to encrypt in the new region the plaintext data key
--   that was used to encrypt the data in the original region. This
--   provides you with an encrypted copy of the data key that can be
--   decrypted in the new region and used there to decrypt the encrypted
--   data.</li>
--   </ul>
--   
--   Unless you are moving encrypted data from one region to another, you
--   don't use this function to encrypt a generated data key within a
--   region. You retrieve data keys already encrypted by calling the
--   <a>GenerateDataKey</a> or <a>GenerateDataKeyWithoutPlaintext</a>
--   function. Data keys don't need to be encrypted again by calling
--   <tt>Encrypt</tt> .
--   
--   If you want to encrypt data locally in your application, you can use
--   the <tt>GenerateDataKey</tt> function to return a plaintext data
--   encryption key and a copy of the key encrypted under the customer
--   master key (CMK) of your choosing.
module Network.AWS.KMS.Encrypt

-- | Creates a value of <a>Encrypt</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>eEncryptionContext</a> - Name-value pair that specifies the
--   encryption context to be used for authenticated encryption. If used
--   here, the same value must be supplied to the <tt>Decrypt</tt> API or
--   decryption will fail. For more information, see <a>Encryption
--   Context</a> .</li>
--   <li><a>eGrantTokens</a> - A list of grant tokens. For more
--   information, see <a>Grant Tokens</a> in the <i>AWS Key Management
--   Service Developer Guide</i> .</li>
--   <li><a>eKeyId</a> - A unique identifier for the customer master key.
--   This value can be a globally unique identifier, a fully specified ARN
--   to either an alias or a key, or an alias name prefixed by "alias<i>".
--   * Key ARN Example -
--   arn:aws:kms:us-east-1:123456789012:key</i>12345678-1234-1234-1234-123456789012
--   * Alias ARN Example -
--   arn:aws:kms:us-east-1:123456789012:alias<i>MyAliasName * Globally
--   Unique Key ID Example - 12345678-1234-1234-1234-123456789012 * Alias
--   Name Example - alias</i>MyAliasName</li>
--   <li><a>ePlaintext</a> - Data to be encrypted.-- <i>Note:</i> This
--   <tt>Lens</tt> automatically encodes and decodes Base64 data. The
--   underlying isomorphism will encode to Base64 representation during
--   serialisation, and decode from Base64 representation during
--   deserialisation. This <tt>Lens</tt> accepts and returns only raw
--   unencoded data.</li>
--   </ul>
encrypt :: Text -> ByteString -> Encrypt

-- | <i>See:</i> <a>encrypt</a> smart constructor.
data Encrypt

-- | Name-value pair that specifies the encryption context to be used for
--   authenticated encryption. If used here, the same value must be
--   supplied to the <tt>Decrypt</tt> API or decryption will fail. For more
--   information, see <a>Encryption Context</a> .
eEncryptionContext :: Lens' Encrypt (HashMap Text Text)

-- | A list of grant tokens. For more information, see <a>Grant Tokens</a>
--   in the <i>AWS Key Management Service Developer Guide</i> .
eGrantTokens :: Lens' Encrypt [Text]

-- | A unique identifier for the customer master key. This value can be a
--   globally unique identifier, a fully specified ARN to either an alias
--   or a key, or an alias name prefixed by "alias<i>". * Key ARN Example -
--   arn:aws:kms:us-east-1:123456789012:key</i>12345678-1234-1234-1234-123456789012
--   * Alias ARN Example -
--   arn:aws:kms:us-east-1:123456789012:alias<i>MyAliasName * Globally
--   Unique Key ID Example - 12345678-1234-1234-1234-123456789012 * Alias
--   Name Example - alias</i>MyAliasName
eKeyId :: Lens' Encrypt Text

-- | Data to be encrypted.-- <i>Note:</i> This <tt>Lens</tt> automatically
--   encodes and decodes Base64 data. The underlying isomorphism will
--   encode to Base64 representation during serialisation, and decode from
--   Base64 representation during deserialisation. This <tt>Lens</tt>
--   accepts and returns only raw unencoded data.
ePlaintext :: Lens' Encrypt ByteString

-- | Creates a value of <a>EncryptResponse</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>ersKeyId</a> - The ID of the key used during encryption.</li>
--   <li><a>ersCiphertextBlob</a> - The encrypted plaintext. If you are
--   using the CLI, the value is Base64 encoded. Otherwise, it is not
--   encoded.-- <i>Note:</i> This <tt>Lens</tt> automatically encodes and
--   decodes Base64 data. The underlying isomorphism will encode to Base64
--   representation during serialisation, and decode from Base64
--   representation during deserialisation. This <tt>Lens</tt> accepts and
--   returns only raw unencoded data.</li>
--   <li><a>ersResponseStatus</a> - -- | The response status code.</li>
--   </ul>
encryptResponse :: Int -> EncryptResponse

-- | <i>See:</i> <a>encryptResponse</a> smart constructor.
data EncryptResponse

-- | The ID of the key used during encryption.
ersKeyId :: Lens' EncryptResponse (Maybe Text)

-- | The encrypted plaintext. If you are using the CLI, the value is Base64
--   encoded. Otherwise, it is not encoded.-- <i>Note:</i> This
--   <tt>Lens</tt> automatically encodes and decodes Base64 data. The
--   underlying isomorphism will encode to Base64 representation during
--   serialisation, and decode from Base64 representation during
--   deserialisation. This <tt>Lens</tt> accepts and returns only raw
--   unencoded data.
ersCiphertextBlob :: Lens' EncryptResponse (Maybe ByteString)

-- | <ul>
--   <li>- | The response status code.</li>
--   </ul>
ersResponseStatus :: Lens' EncryptResponse Int
instance GHC.Generics.Generic Network.AWS.KMS.Encrypt.EncryptResponse
instance Data.Data.Data Network.AWS.KMS.Encrypt.EncryptResponse
instance GHC.Show.Show Network.AWS.KMS.Encrypt.EncryptResponse
instance GHC.Read.Read Network.AWS.KMS.Encrypt.EncryptResponse
instance GHC.Classes.Eq Network.AWS.KMS.Encrypt.EncryptResponse
instance GHC.Generics.Generic Network.AWS.KMS.Encrypt.Encrypt
instance Data.Data.Data Network.AWS.KMS.Encrypt.Encrypt
instance GHC.Show.Show Network.AWS.KMS.Encrypt.Encrypt
instance GHC.Read.Read Network.AWS.KMS.Encrypt.Encrypt
instance GHC.Classes.Eq Network.AWS.KMS.Encrypt.Encrypt
instance Network.AWS.Types.AWSRequest Network.AWS.KMS.Encrypt.Encrypt
instance Data.Hashable.Class.Hashable Network.AWS.KMS.Encrypt.Encrypt
instance Control.DeepSeq.NFData Network.AWS.KMS.Encrypt.Encrypt
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.KMS.Encrypt.Encrypt
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.KMS.Encrypt.Encrypt
instance Network.AWS.Data.Path.ToPath Network.AWS.KMS.Encrypt.Encrypt
instance Network.AWS.Data.Query.ToQuery Network.AWS.KMS.Encrypt.Encrypt
instance Control.DeepSeq.NFData Network.AWS.KMS.Encrypt.EncryptResponse


-- | Enables rotation of the specified customer master key.
module Network.AWS.KMS.EnableKeyRotation

-- | Creates a value of <a>EnableKeyRotation</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>ekrKeyId</a> - A unique identifier for the customer master key.
--   This value can be a globally unique identifier or the fully specified
--   ARN to a key. * Key ARN Example -
--   arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
--   * Globally Unique Key ID Example -
--   12345678-1234-1234-1234-123456789012</li>
--   </ul>
enableKeyRotation :: Text -> EnableKeyRotation

-- | <i>See:</i> <a>enableKeyRotation</a> smart constructor.
data EnableKeyRotation

-- | A unique identifier for the customer master key. This value can be a
--   globally unique identifier or the fully specified ARN to a key. * Key
--   ARN Example -
--   arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
--   * Globally Unique Key ID Example -
--   12345678-1234-1234-1234-123456789012
ekrKeyId :: Lens' EnableKeyRotation Text

-- | Creates a value of <a>EnableKeyRotationResponse</a> with the minimum
--   fields required to make a request.
enableKeyRotationResponse :: EnableKeyRotationResponse

-- | <i>See:</i> <a>enableKeyRotationResponse</a> smart constructor.
data EnableKeyRotationResponse
instance GHC.Generics.Generic Network.AWS.KMS.EnableKeyRotation.EnableKeyRotationResponse
instance Data.Data.Data Network.AWS.KMS.EnableKeyRotation.EnableKeyRotationResponse
instance GHC.Show.Show Network.AWS.KMS.EnableKeyRotation.EnableKeyRotationResponse
instance GHC.Read.Read Network.AWS.KMS.EnableKeyRotation.EnableKeyRotationResponse
instance GHC.Classes.Eq Network.AWS.KMS.EnableKeyRotation.EnableKeyRotationResponse
instance GHC.Generics.Generic Network.AWS.KMS.EnableKeyRotation.EnableKeyRotation
instance Data.Data.Data Network.AWS.KMS.EnableKeyRotation.EnableKeyRotation
instance GHC.Show.Show Network.AWS.KMS.EnableKeyRotation.EnableKeyRotation
instance GHC.Read.Read Network.AWS.KMS.EnableKeyRotation.EnableKeyRotation
instance GHC.Classes.Eq Network.AWS.KMS.EnableKeyRotation.EnableKeyRotation
instance Network.AWS.Types.AWSRequest Network.AWS.KMS.EnableKeyRotation.EnableKeyRotation
instance Data.Hashable.Class.Hashable Network.AWS.KMS.EnableKeyRotation.EnableKeyRotation
instance Control.DeepSeq.NFData Network.AWS.KMS.EnableKeyRotation.EnableKeyRotation
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.KMS.EnableKeyRotation.EnableKeyRotation
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.KMS.EnableKeyRotation.EnableKeyRotation
instance Network.AWS.Data.Path.ToPath Network.AWS.KMS.EnableKeyRotation.EnableKeyRotation
instance Network.AWS.Data.Query.ToQuery Network.AWS.KMS.EnableKeyRotation.EnableKeyRotation
instance Control.DeepSeq.NFData Network.AWS.KMS.EnableKeyRotation.EnableKeyRotationResponse


-- | Marks a key as enabled, thereby permitting its use.
module Network.AWS.KMS.EnableKey

-- | Creates a value of <a>EnableKey</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>ekKeyId</a> - A unique identifier for the customer master key.
--   This value can be a globally unique identifier or the fully specified
--   ARN to a key. * Key ARN Example -
--   arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
--   * Globally Unique Key ID Example -
--   12345678-1234-1234-1234-123456789012</li>
--   </ul>
enableKey :: Text -> EnableKey

-- | <i>See:</i> <a>enableKey</a> smart constructor.
data EnableKey

-- | A unique identifier for the customer master key. This value can be a
--   globally unique identifier or the fully specified ARN to a key. * Key
--   ARN Example -
--   arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
--   * Globally Unique Key ID Example -
--   12345678-1234-1234-1234-123456789012
ekKeyId :: Lens' EnableKey Text

-- | Creates a value of <a>EnableKeyResponse</a> with the minimum fields
--   required to make a request.
enableKeyResponse :: EnableKeyResponse

-- | <i>See:</i> <a>enableKeyResponse</a> smart constructor.
data EnableKeyResponse
instance GHC.Generics.Generic Network.AWS.KMS.EnableKey.EnableKeyResponse
instance Data.Data.Data Network.AWS.KMS.EnableKey.EnableKeyResponse
instance GHC.Show.Show Network.AWS.KMS.EnableKey.EnableKeyResponse
instance GHC.Read.Read Network.AWS.KMS.EnableKey.EnableKeyResponse
instance GHC.Classes.Eq Network.AWS.KMS.EnableKey.EnableKeyResponse
instance GHC.Generics.Generic Network.AWS.KMS.EnableKey.EnableKey
instance Data.Data.Data Network.AWS.KMS.EnableKey.EnableKey
instance GHC.Show.Show Network.AWS.KMS.EnableKey.EnableKey
instance GHC.Read.Read Network.AWS.KMS.EnableKey.EnableKey
instance GHC.Classes.Eq Network.AWS.KMS.EnableKey.EnableKey
instance Network.AWS.Types.AWSRequest Network.AWS.KMS.EnableKey.EnableKey
instance Data.Hashable.Class.Hashable Network.AWS.KMS.EnableKey.EnableKey
instance Control.DeepSeq.NFData Network.AWS.KMS.EnableKey.EnableKey
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.KMS.EnableKey.EnableKey
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.KMS.EnableKey.EnableKey
instance Network.AWS.Data.Path.ToPath Network.AWS.KMS.EnableKey.EnableKey
instance Network.AWS.Data.Query.ToQuery Network.AWS.KMS.EnableKey.EnableKey
instance Control.DeepSeq.NFData Network.AWS.KMS.EnableKey.EnableKeyResponse


-- | Disables rotation of the specified key.
module Network.AWS.KMS.DisableKeyRotation

-- | Creates a value of <a>DisableKeyRotation</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>dkrKeyId</a> - A unique identifier for the customer master key.
--   This value can be a globally unique identifier or the fully specified
--   ARN to a key. * Key ARN Example -
--   arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
--   * Globally Unique Key ID Example -
--   12345678-1234-1234-1234-123456789012</li>
--   </ul>
disableKeyRotation :: Text -> DisableKeyRotation

-- | <i>See:</i> <a>disableKeyRotation</a> smart constructor.
data DisableKeyRotation

-- | A unique identifier for the customer master key. This value can be a
--   globally unique identifier or the fully specified ARN to a key. * Key
--   ARN Example -
--   arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
--   * Globally Unique Key ID Example -
--   12345678-1234-1234-1234-123456789012
dkrKeyId :: Lens' DisableKeyRotation Text

-- | Creates a value of <a>DisableKeyRotationResponse</a> with the minimum
--   fields required to make a request.
disableKeyRotationResponse :: DisableKeyRotationResponse

-- | <i>See:</i> <a>disableKeyRotationResponse</a> smart constructor.
data DisableKeyRotationResponse
instance GHC.Generics.Generic Network.AWS.KMS.DisableKeyRotation.DisableKeyRotationResponse
instance Data.Data.Data Network.AWS.KMS.DisableKeyRotation.DisableKeyRotationResponse
instance GHC.Show.Show Network.AWS.KMS.DisableKeyRotation.DisableKeyRotationResponse
instance GHC.Read.Read Network.AWS.KMS.DisableKeyRotation.DisableKeyRotationResponse
instance GHC.Classes.Eq Network.AWS.KMS.DisableKeyRotation.DisableKeyRotationResponse
instance GHC.Generics.Generic Network.AWS.KMS.DisableKeyRotation.DisableKeyRotation
instance Data.Data.Data Network.AWS.KMS.DisableKeyRotation.DisableKeyRotation
instance GHC.Show.Show Network.AWS.KMS.DisableKeyRotation.DisableKeyRotation
instance GHC.Read.Read Network.AWS.KMS.DisableKeyRotation.DisableKeyRotation
instance GHC.Classes.Eq Network.AWS.KMS.DisableKeyRotation.DisableKeyRotation
instance Network.AWS.Types.AWSRequest Network.AWS.KMS.DisableKeyRotation.DisableKeyRotation
instance Data.Hashable.Class.Hashable Network.AWS.KMS.DisableKeyRotation.DisableKeyRotation
instance Control.DeepSeq.NFData Network.AWS.KMS.DisableKeyRotation.DisableKeyRotation
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.KMS.DisableKeyRotation.DisableKeyRotation
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.KMS.DisableKeyRotation.DisableKeyRotation
instance Network.AWS.Data.Path.ToPath Network.AWS.KMS.DisableKeyRotation.DisableKeyRotation
instance Network.AWS.Data.Query.ToQuery Network.AWS.KMS.DisableKeyRotation.DisableKeyRotation
instance Control.DeepSeq.NFData Network.AWS.KMS.DisableKeyRotation.DisableKeyRotationResponse


-- | Sets the state of a customer master key (CMK) to disabled, thereby
--   preventing its use for cryptographic operations. For more information
--   about how key state affects the use of a CMK, see <a>How Key State
--   Affects the Use of a Customer Master Key</a> in the <i>AWS Key
--   Management Service Developer Guide</i> .
module Network.AWS.KMS.DisableKey

-- | Creates a value of <a>DisableKey</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>dkKeyId</a> - A unique identifier for the CMK. Use the CMK's
--   unique identifier or its Amazon Resource Name (ARN). For example: *
--   Unique ID: 1234abcd-12ab-34cd-56ef-1234567890ab * ARN:
--   arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</li>
--   </ul>
disableKey :: Text -> DisableKey

-- | <i>See:</i> <a>disableKey</a> smart constructor.
data DisableKey

-- | A unique identifier for the CMK. Use the CMK's unique identifier or
--   its Amazon Resource Name (ARN). For example: * Unique ID:
--   1234abcd-12ab-34cd-56ef-1234567890ab * ARN:
--   arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
dkKeyId :: Lens' DisableKey Text

-- | Creates a value of <a>DisableKeyResponse</a> with the minimum fields
--   required to make a request.
disableKeyResponse :: DisableKeyResponse

-- | <i>See:</i> <a>disableKeyResponse</a> smart constructor.
data DisableKeyResponse
instance GHC.Generics.Generic Network.AWS.KMS.DisableKey.DisableKeyResponse
instance Data.Data.Data Network.AWS.KMS.DisableKey.DisableKeyResponse
instance GHC.Show.Show Network.AWS.KMS.DisableKey.DisableKeyResponse
instance GHC.Read.Read Network.AWS.KMS.DisableKey.DisableKeyResponse
instance GHC.Classes.Eq Network.AWS.KMS.DisableKey.DisableKeyResponse
instance GHC.Generics.Generic Network.AWS.KMS.DisableKey.DisableKey
instance Data.Data.Data Network.AWS.KMS.DisableKey.DisableKey
instance GHC.Show.Show Network.AWS.KMS.DisableKey.DisableKey
instance GHC.Read.Read Network.AWS.KMS.DisableKey.DisableKey
instance GHC.Classes.Eq Network.AWS.KMS.DisableKey.DisableKey
instance Network.AWS.Types.AWSRequest Network.AWS.KMS.DisableKey.DisableKey
instance Data.Hashable.Class.Hashable Network.AWS.KMS.DisableKey.DisableKey
instance Control.DeepSeq.NFData Network.AWS.KMS.DisableKey.DisableKey
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.KMS.DisableKey.DisableKey
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.KMS.DisableKey.DisableKey
instance Network.AWS.Data.Path.ToPath Network.AWS.KMS.DisableKey.DisableKey
instance Network.AWS.Data.Query.ToQuery Network.AWS.KMS.DisableKey.DisableKey
instance Control.DeepSeq.NFData Network.AWS.KMS.DisableKey.DisableKeyResponse


-- | Provides detailed information about the specified customer master key.
module Network.AWS.KMS.DescribeKey

-- | Creates a value of <a>DescribeKey</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>dGrantTokens</a> - A list of grant tokens. For more
--   information, see <a>Grant Tokens</a> in the <i>AWS Key Management
--   Service Developer Guide</i> .</li>
--   <li><a>dKeyId</a> - A unique identifier for the customer master key.
--   This value can be a globally unique identifier, a fully specified ARN
--   to either an alias or a key, or an alias name prefixed by "alias<i>".
--   * Key ARN Example -
--   arn:aws:kms:us-east-1:123456789012:key</i>12345678-1234-1234-1234-123456789012
--   * Alias ARN Example -
--   arn:aws:kms:us-east-1:123456789012:alias<i>MyAliasName * Globally
--   Unique Key ID Example - 12345678-1234-1234-1234-123456789012 * Alias
--   Name Example - alias</i>MyAliasName</li>
--   </ul>
describeKey :: Text -> DescribeKey

-- | <i>See:</i> <a>describeKey</a> smart constructor.
data DescribeKey

-- | A list of grant tokens. For more information, see <a>Grant Tokens</a>
--   in the <i>AWS Key Management Service Developer Guide</i> .
dGrantTokens :: Lens' DescribeKey [Text]

-- | A unique identifier for the customer master key. This value can be a
--   globally unique identifier, a fully specified ARN to either an alias
--   or a key, or an alias name prefixed by "alias<i>". * Key ARN Example -
--   arn:aws:kms:us-east-1:123456789012:key</i>12345678-1234-1234-1234-123456789012
--   * Alias ARN Example -
--   arn:aws:kms:us-east-1:123456789012:alias<i>MyAliasName * Globally
--   Unique Key ID Example - 12345678-1234-1234-1234-123456789012 * Alias
--   Name Example - alias</i>MyAliasName
dKeyId :: Lens' DescribeKey Text

-- | Creates a value of <a>DescribeKeyResponse</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>dkrsKeyMetadata</a> - Metadata associated with the key.</li>
--   <li><a>dkrsResponseStatus</a> - -- | The response status code.</li>
--   </ul>
describeKeyResponse :: Int -> DescribeKeyResponse

-- | <i>See:</i> <a>describeKeyResponse</a> smart constructor.
data DescribeKeyResponse

-- | Metadata associated with the key.
dkrsKeyMetadata :: Lens' DescribeKeyResponse (Maybe KeyMetadata)

-- | <ul>
--   <li>- | The response status code.</li>
--   </ul>
dkrsResponseStatus :: Lens' DescribeKeyResponse Int
instance GHC.Generics.Generic Network.AWS.KMS.DescribeKey.DescribeKeyResponse
instance Data.Data.Data Network.AWS.KMS.DescribeKey.DescribeKeyResponse
instance GHC.Show.Show Network.AWS.KMS.DescribeKey.DescribeKeyResponse
instance GHC.Read.Read Network.AWS.KMS.DescribeKey.DescribeKeyResponse
instance GHC.Classes.Eq Network.AWS.KMS.DescribeKey.DescribeKeyResponse
instance GHC.Generics.Generic Network.AWS.KMS.DescribeKey.DescribeKey
instance Data.Data.Data Network.AWS.KMS.DescribeKey.DescribeKey
instance GHC.Show.Show Network.AWS.KMS.DescribeKey.DescribeKey
instance GHC.Read.Read Network.AWS.KMS.DescribeKey.DescribeKey
instance GHC.Classes.Eq Network.AWS.KMS.DescribeKey.DescribeKey
instance Network.AWS.Types.AWSRequest Network.AWS.KMS.DescribeKey.DescribeKey
instance Data.Hashable.Class.Hashable Network.AWS.KMS.DescribeKey.DescribeKey
instance Control.DeepSeq.NFData Network.AWS.KMS.DescribeKey.DescribeKey
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.KMS.DescribeKey.DescribeKey
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.KMS.DescribeKey.DescribeKey
instance Network.AWS.Data.Path.ToPath Network.AWS.KMS.DescribeKey.DescribeKey
instance Network.AWS.Data.Query.ToQuery Network.AWS.KMS.DescribeKey.DescribeKey
instance Control.DeepSeq.NFData Network.AWS.KMS.DescribeKey.DescribeKeyResponse


-- | Deletes key material that you previously imported and makes the
--   specified customer master key (CMK) unusable. For more information
--   about importing key material into AWS KMS, see <a>Importing Key
--   Material</a> in the <i>AWS Key Management Service Developer Guide</i>
--   .
--   
--   When the specified CMK is in the <tt>PendingDeletion</tt> state, this
--   operation does not change the CMK's state. Otherwise, it changes the
--   CMK's state to <tt>PendingImport</tt> .
--   
--   After you delete key material, you can use <tt>ImportKeyMaterial</tt>
--   to reimport the same key material into the CMK.
module Network.AWS.KMS.DeleteImportedKeyMaterial

-- | Creates a value of <a>DeleteImportedKeyMaterial</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>dikmKeyId</a> - The identifier of the CMK whose key material to
--   delete. The CMK's <tt>Origin</tt> must be <tt>EXTERNAL</tt> . A valid
--   identifier is the unique key ID or the Amazon Resource Name (ARN) of
--   the CMK. Examples: * Unique key ID:
--   <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt></li>
--   </ul>
deleteImportedKeyMaterial :: Text -> DeleteImportedKeyMaterial

-- | <i>See:</i> <a>deleteImportedKeyMaterial</a> smart constructor.
data DeleteImportedKeyMaterial

-- | The identifier of the CMK whose key material to delete. The CMK's
--   <tt>Origin</tt> must be <tt>EXTERNAL</tt> . A valid identifier is the
--   unique key ID or the Amazon Resource Name (ARN) of the CMK. Examples:
--   * Unique key ID: <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key
--   ARN:
--   <tt>arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
dikmKeyId :: Lens' DeleteImportedKeyMaterial Text

-- | Creates a value of <a>DeleteImportedKeyMaterialResponse</a> with the
--   minimum fields required to make a request.
deleteImportedKeyMaterialResponse :: DeleteImportedKeyMaterialResponse

-- | <i>See:</i> <a>deleteImportedKeyMaterialResponse</a> smart
--   constructor.
data DeleteImportedKeyMaterialResponse
instance GHC.Generics.Generic Network.AWS.KMS.DeleteImportedKeyMaterial.DeleteImportedKeyMaterialResponse
instance Data.Data.Data Network.AWS.KMS.DeleteImportedKeyMaterial.DeleteImportedKeyMaterialResponse
instance GHC.Show.Show Network.AWS.KMS.DeleteImportedKeyMaterial.DeleteImportedKeyMaterialResponse
instance GHC.Read.Read Network.AWS.KMS.DeleteImportedKeyMaterial.DeleteImportedKeyMaterialResponse
instance GHC.Classes.Eq Network.AWS.KMS.DeleteImportedKeyMaterial.DeleteImportedKeyMaterialResponse
instance GHC.Generics.Generic Network.AWS.KMS.DeleteImportedKeyMaterial.DeleteImportedKeyMaterial
instance Data.Data.Data Network.AWS.KMS.DeleteImportedKeyMaterial.DeleteImportedKeyMaterial
instance GHC.Show.Show Network.AWS.KMS.DeleteImportedKeyMaterial.DeleteImportedKeyMaterial
instance GHC.Read.Read Network.AWS.KMS.DeleteImportedKeyMaterial.DeleteImportedKeyMaterial
instance GHC.Classes.Eq Network.AWS.KMS.DeleteImportedKeyMaterial.DeleteImportedKeyMaterial
instance Network.AWS.Types.AWSRequest Network.AWS.KMS.DeleteImportedKeyMaterial.DeleteImportedKeyMaterial
instance Data.Hashable.Class.Hashable Network.AWS.KMS.DeleteImportedKeyMaterial.DeleteImportedKeyMaterial
instance Control.DeepSeq.NFData Network.AWS.KMS.DeleteImportedKeyMaterial.DeleteImportedKeyMaterial
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.KMS.DeleteImportedKeyMaterial.DeleteImportedKeyMaterial
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.KMS.DeleteImportedKeyMaterial.DeleteImportedKeyMaterial
instance Network.AWS.Data.Path.ToPath Network.AWS.KMS.DeleteImportedKeyMaterial.DeleteImportedKeyMaterial
instance Network.AWS.Data.Query.ToQuery Network.AWS.KMS.DeleteImportedKeyMaterial.DeleteImportedKeyMaterial
instance Control.DeepSeq.NFData Network.AWS.KMS.DeleteImportedKeyMaterial.DeleteImportedKeyMaterialResponse


-- | Deletes the specified alias. To map an alias to a different key, call
--   <tt>UpdateAlias</tt> .
module Network.AWS.KMS.DeleteAlias

-- | Creates a value of <a>DeleteAlias</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>daAliasName</a> - The alias to be deleted. The name must start
--   with the word "alias" followed by a forward slash (alias<i>). Aliases
--   that begin with "alias</i>AWS" are reserved.</li>
--   </ul>
deleteAlias :: Text -> DeleteAlias

-- | <i>See:</i> <a>deleteAlias</a> smart constructor.
data DeleteAlias

-- | The alias to be deleted. The name must start with the word "alias"
--   followed by a forward slash (alias<i>). Aliases that begin with
--   "alias</i>AWS" are reserved.
daAliasName :: Lens' DeleteAlias Text

-- | Creates a value of <a>DeleteAliasResponse</a> with the minimum fields
--   required to make a request.
deleteAliasResponse :: DeleteAliasResponse

-- | <i>See:</i> <a>deleteAliasResponse</a> smart constructor.
data DeleteAliasResponse
instance GHC.Generics.Generic Network.AWS.KMS.DeleteAlias.DeleteAliasResponse
instance Data.Data.Data Network.AWS.KMS.DeleteAlias.DeleteAliasResponse
instance GHC.Show.Show Network.AWS.KMS.DeleteAlias.DeleteAliasResponse
instance GHC.Read.Read Network.AWS.KMS.DeleteAlias.DeleteAliasResponse
instance GHC.Classes.Eq Network.AWS.KMS.DeleteAlias.DeleteAliasResponse
instance GHC.Generics.Generic Network.AWS.KMS.DeleteAlias.DeleteAlias
instance Data.Data.Data Network.AWS.KMS.DeleteAlias.DeleteAlias
instance GHC.Show.Show Network.AWS.KMS.DeleteAlias.DeleteAlias
instance GHC.Read.Read Network.AWS.KMS.DeleteAlias.DeleteAlias
instance GHC.Classes.Eq Network.AWS.KMS.DeleteAlias.DeleteAlias
instance Network.AWS.Types.AWSRequest Network.AWS.KMS.DeleteAlias.DeleteAlias
instance Data.Hashable.Class.Hashable Network.AWS.KMS.DeleteAlias.DeleteAlias
instance Control.DeepSeq.NFData Network.AWS.KMS.DeleteAlias.DeleteAlias
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.KMS.DeleteAlias.DeleteAlias
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.KMS.DeleteAlias.DeleteAlias
instance Network.AWS.Data.Path.ToPath Network.AWS.KMS.DeleteAlias.DeleteAlias
instance Network.AWS.Data.Query.ToQuery Network.AWS.KMS.DeleteAlias.DeleteAlias
instance Control.DeepSeq.NFData Network.AWS.KMS.DeleteAlias.DeleteAliasResponse


-- | Decrypts ciphertext. Ciphertext is plaintext that has been previously
--   encrypted by using any of the following functions:
--   
--   <ul>
--   <li><a>GenerateDataKey</a></li>
--   <li><a>GenerateDataKeyWithoutPlaintext</a></li>
--   <li><a>Encrypt</a></li>
--   </ul>
--   
--   Note that if a caller has been granted access permissions to all keys
--   (through, for example, IAM user policies that grant <tt>Decrypt</tt>
--   permission on all resources), then ciphertext encrypted by using keys
--   in other accounts where the key grants access to the caller can be
--   decrypted. To remedy this, we recommend that you do not grant
--   <tt>Decrypt</tt> access in an IAM user policy. Instead grant
--   <tt>Decrypt</tt> access only in key policies. If you must grant
--   <tt>Decrypt</tt> access in an IAM user policy, you should scope the
--   resource to specific keys or to specific trusted accounts.
module Network.AWS.KMS.Decrypt

-- | Creates a value of <a>Decrypt</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>decEncryptionContext</a> - The encryption context. If this was
--   specified in the <a>Encrypt</a> function, it must be specified here or
--   the decryption operation will fail. For more information, see
--   <a>Encryption Context</a> .</li>
--   <li><a>decGrantTokens</a> - A list of grant tokens. For more
--   information, see <a>Grant Tokens</a> in the <i>AWS Key Management
--   Service Developer Guide</i> .</li>
--   <li><a>decCiphertextBlob</a> - Ciphertext to be decrypted. The blob
--   includes metadata.-- <i>Note:</i> This <tt>Lens</tt> automatically
--   encodes and decodes Base64 data. The underlying isomorphism will
--   encode to Base64 representation during serialisation, and decode from
--   Base64 representation during deserialisation. This <tt>Lens</tt>
--   accepts and returns only raw unencoded data.</li>
--   </ul>
decrypt :: ByteString -> Decrypt

-- | <i>See:</i> <a>decrypt</a> smart constructor.
data Decrypt

-- | The encryption context. If this was specified in the <a>Encrypt</a>
--   function, it must be specified here or the decryption operation will
--   fail. For more information, see <a>Encryption Context</a> .
decEncryptionContext :: Lens' Decrypt (HashMap Text Text)

-- | A list of grant tokens. For more information, see <a>Grant Tokens</a>
--   in the <i>AWS Key Management Service Developer Guide</i> .
decGrantTokens :: Lens' Decrypt [Text]

-- | Ciphertext to be decrypted. The blob includes metadata.-- <i>Note:</i>
--   This <tt>Lens</tt> automatically encodes and decodes Base64 data. The
--   underlying isomorphism will encode to Base64 representation during
--   serialisation, and decode from Base64 representation during
--   deserialisation. This <tt>Lens</tt> accepts and returns only raw
--   unencoded data.
decCiphertextBlob :: Lens' Decrypt ByteString

-- | Creates a value of <a>DecryptResponse</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>drsKeyId</a> - ARN of the key used to perform the decryption.
--   This value is returned if no errors are encountered during the
--   operation.</li>
--   <li><a>drsPlaintext</a> - Decrypted plaintext data. This value may not
--   be returned if the customer master key is not available or if you
--   didn't have permission to use it.-- <i>Note:</i> This <tt>Lens</tt>
--   automatically encodes and decodes Base64 data. The underlying
--   isomorphism will encode to Base64 representation during serialisation,
--   and decode from Base64 representation during deserialisation. This
--   <tt>Lens</tt> accepts and returns only raw unencoded data.</li>
--   <li><a>drsResponseStatus</a> - -- | The response status code.</li>
--   </ul>
decryptResponse :: Int -> DecryptResponse

-- | <i>See:</i> <a>decryptResponse</a> smart constructor.
data DecryptResponse

-- | ARN of the key used to perform the decryption. This value is returned
--   if no errors are encountered during the operation.
drsKeyId :: Lens' DecryptResponse (Maybe Text)

-- | Decrypted plaintext data. This value may not be returned if the
--   customer master key is not available or if you didn't have permission
--   to use it.-- <i>Note:</i> This <tt>Lens</tt> automatically encodes and
--   decodes Base64 data. The underlying isomorphism will encode to Base64
--   representation during serialisation, and decode from Base64
--   representation during deserialisation. This <tt>Lens</tt> accepts and
--   returns only raw unencoded data.
drsPlaintext :: Lens' DecryptResponse (Maybe ByteString)

-- | <ul>
--   <li>- | The response status code.</li>
--   </ul>
drsResponseStatus :: Lens' DecryptResponse Int
instance GHC.Generics.Generic Network.AWS.KMS.Decrypt.DecryptResponse
instance Data.Data.Data Network.AWS.KMS.Decrypt.DecryptResponse
instance GHC.Show.Show Network.AWS.KMS.Decrypt.DecryptResponse
instance GHC.Read.Read Network.AWS.KMS.Decrypt.DecryptResponse
instance GHC.Classes.Eq Network.AWS.KMS.Decrypt.DecryptResponse
instance GHC.Generics.Generic Network.AWS.KMS.Decrypt.Decrypt
instance Data.Data.Data Network.AWS.KMS.Decrypt.Decrypt
instance GHC.Show.Show Network.AWS.KMS.Decrypt.Decrypt
instance GHC.Read.Read Network.AWS.KMS.Decrypt.Decrypt
instance GHC.Classes.Eq Network.AWS.KMS.Decrypt.Decrypt
instance Network.AWS.Types.AWSRequest Network.AWS.KMS.Decrypt.Decrypt
instance Data.Hashable.Class.Hashable Network.AWS.KMS.Decrypt.Decrypt
instance Control.DeepSeq.NFData Network.AWS.KMS.Decrypt.Decrypt
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.KMS.Decrypt.Decrypt
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.KMS.Decrypt.Decrypt
instance Network.AWS.Data.Path.ToPath Network.AWS.KMS.Decrypt.Decrypt
instance Network.AWS.Data.Query.ToQuery Network.AWS.KMS.Decrypt.Decrypt
instance Control.DeepSeq.NFData Network.AWS.KMS.Decrypt.DecryptResponse


-- | Creates a customer master key (CMK).
--   
--   You can use a CMK to encrypt small amounts of data (4 KiB or less)
--   directly, but CMKs are more commonly used to encrypt data encryption
--   keys (DEKs), which are used to encrypt raw data. For more information
--   about DEKs and the difference between CMKs and DEKs, see the
--   following:
--   
--   <ul>
--   <li>The <a>GenerateDataKey</a> operation</li>
--   <li><a>AWS Key Management Service Concepts</a> in the <i>AWS Key
--   Management Service Developer Guide</i></li>
--   </ul>
module Network.AWS.KMS.CreateKey

-- | Creates a value of <a>CreateKey</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>ckOrigin</a> - The source of the CMK's key material. The
--   default is <tt>AWS_KMS</tt> , which means AWS KMS creates the key
--   material. When this parameter is set to <tt>EXTERNAL</tt> , the
--   request creates a CMK without key material so that you can import key
--   material from your existing key management infrastructure. For more
--   information about importing key material into AWS KMS, see
--   <a>Importing Key Material</a> in the <i>AWS Key Management Service
--   Developer Guide</i> . The CMK's <tt>Origin</tt> is immutable and is
--   set when the CMK is created.</li>
--   <li><a>ckKeyUsage</a> - The intended use of the CMK. You can use CMKs
--   only for symmetric encryption and decryption.</li>
--   <li><a>ckBypassPolicyLockoutSafetyCheck</a> - A flag to indicate
--   whether to bypass the key policy lockout safety check.
--   <i>Important:</i> Setting this value to true increases the likelihood
--   that the CMK becomes unmanageable. Do not set this value to true
--   indiscriminately. For more information, refer to the scenario in the
--   <a>Default Key Policy</a> section in the <i>AWS Key Management Service
--   Developer Guide</i> . Use this parameter only when you include a
--   policy in the request and you intend to prevent the principal making
--   the request from making a subsequent <tt>PutKeyPolicy</tt> request on
--   the CMK. The default value is false.</li>
--   <li><a>ckPolicy</a> - The key policy to attach to the CMK. If you
--   specify a policy and do not set
--   <tt>BypassPolicyLockoutSafetyCheck</tt> to true, the policy must meet
--   the following criteria: * It must allow the principal making the
--   <tt>CreateKey</tt> request to make a subsequent <tt>PutKeyPolicy</tt>
--   request on the CMK. This reduces the likelihood that the CMK becomes
--   unmanageable. For more information, refer to the scenario in the
--   <a>Default Key Policy</a> section in the <i>AWS Key Management Service
--   Developer Guide</i> . * The principal(s) specified in the key policy
--   must exist and be visible to AWS KMS. When you create a new AWS
--   principal (for example, an IAM user or role), you might need to
--   enforce a delay before specifying the new principal in a key policy
--   because the new principal might not immediately be visible to AWS KMS.
--   For more information, see <a>Changes that I make are not always
--   immediately visible</a> in the <i>IAM User Guide</i> . If you do not
--   specify a policy, AWS KMS attaches a default key policy to the CMK.
--   For more information, see <a>Default Key Policy</a> in the <i>AWS Key
--   Management Service Developer Guide</i> . The policy size limit is 32
--   KiB (32768 bytes).</li>
--   <li><a>ckDescription</a> - A description of the CMK. Use a description
--   that helps you decide whether the CMK is appropriate for a task.</li>
--   </ul>
createKey :: CreateKey

-- | <i>See:</i> <a>createKey</a> smart constructor.
data CreateKey

-- | The source of the CMK's key material. The default is <tt>AWS_KMS</tt>
--   , which means AWS KMS creates the key material. When this parameter is
--   set to <tt>EXTERNAL</tt> , the request creates a CMK without key
--   material so that you can import key material from your existing key
--   management infrastructure. For more information about importing key
--   material into AWS KMS, see <a>Importing Key Material</a> in the <i>AWS
--   Key Management Service Developer Guide</i> . The CMK's <tt>Origin</tt>
--   is immutable and is set when the CMK is created.
ckOrigin :: Lens' CreateKey (Maybe OriginType)

-- | The intended use of the CMK. You can use CMKs only for symmetric
--   encryption and decryption.
ckKeyUsage :: Lens' CreateKey (Maybe KeyUsageType)

-- | A flag to indicate whether to bypass the key policy lockout safety
--   check. <i>Important:</i> Setting this value to true increases the
--   likelihood that the CMK becomes unmanageable. Do not set this value to
--   true indiscriminately. For more information, refer to the scenario in
--   the <a>Default Key Policy</a> section in the <i>AWS Key Management
--   Service Developer Guide</i> . Use this parameter only when you include
--   a policy in the request and you intend to prevent the principal making
--   the request from making a subsequent <tt>PutKeyPolicy</tt> request on
--   the CMK. The default value is false.
ckBypassPolicyLockoutSafetyCheck :: Lens' CreateKey (Maybe Bool)

-- | The key policy to attach to the CMK. If you specify a policy and do
--   not set <tt>BypassPolicyLockoutSafetyCheck</tt> to true, the policy
--   must meet the following criteria: * It must allow the principal making
--   the <tt>CreateKey</tt> request to make a subsequent
--   <tt>PutKeyPolicy</tt> request on the CMK. This reduces the likelihood
--   that the CMK becomes unmanageable. For more information, refer to the
--   scenario in the <a>Default Key Policy</a> section in the <i>AWS Key
--   Management Service Developer Guide</i> . * The principal(s) specified
--   in the key policy must exist and be visible to AWS KMS. When you
--   create a new AWS principal (for example, an IAM user or role), you
--   might need to enforce a delay before specifying the new principal in a
--   key policy because the new principal might not immediately be visible
--   to AWS KMS. For more information, see <a>Changes that I make are not
--   always immediately visible</a> in the <i>IAM User Guide</i> . If you
--   do not specify a policy, AWS KMS attaches a default key policy to the
--   CMK. For more information, see <a>Default Key Policy</a> in the <i>AWS
--   Key Management Service Developer Guide</i> . The policy size limit is
--   32 KiB (32768 bytes).
ckPolicy :: Lens' CreateKey (Maybe Text)

-- | A description of the CMK. Use a description that helps you decide
--   whether the CMK is appropriate for a task.
ckDescription :: Lens' CreateKey (Maybe Text)

-- | Creates a value of <a>CreateKeyResponse</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>ckrsKeyMetadata</a> - Metadata associated with the CMK.</li>
--   <li><a>ckrsResponseStatus</a> - -- | The response status code.</li>
--   </ul>
createKeyResponse :: Int -> CreateKeyResponse

-- | <i>See:</i> <a>createKeyResponse</a> smart constructor.
data CreateKeyResponse

-- | Metadata associated with the CMK.
ckrsKeyMetadata :: Lens' CreateKeyResponse (Maybe KeyMetadata)

-- | <ul>
--   <li>- | The response status code.</li>
--   </ul>
ckrsResponseStatus :: Lens' CreateKeyResponse Int
instance GHC.Generics.Generic Network.AWS.KMS.CreateKey.CreateKeyResponse
instance Data.Data.Data Network.AWS.KMS.CreateKey.CreateKeyResponse
instance GHC.Show.Show Network.AWS.KMS.CreateKey.CreateKeyResponse
instance GHC.Read.Read Network.AWS.KMS.CreateKey.CreateKeyResponse
instance GHC.Classes.Eq Network.AWS.KMS.CreateKey.CreateKeyResponse
instance GHC.Generics.Generic Network.AWS.KMS.CreateKey.CreateKey
instance Data.Data.Data Network.AWS.KMS.CreateKey.CreateKey
instance GHC.Show.Show Network.AWS.KMS.CreateKey.CreateKey
instance GHC.Read.Read Network.AWS.KMS.CreateKey.CreateKey
instance GHC.Classes.Eq Network.AWS.KMS.CreateKey.CreateKey
instance Network.AWS.Types.AWSRequest Network.AWS.KMS.CreateKey.CreateKey
instance Data.Hashable.Class.Hashable Network.AWS.KMS.CreateKey.CreateKey
instance Control.DeepSeq.NFData Network.AWS.KMS.CreateKey.CreateKey
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.KMS.CreateKey.CreateKey
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.KMS.CreateKey.CreateKey
instance Network.AWS.Data.Path.ToPath Network.AWS.KMS.CreateKey.CreateKey
instance Network.AWS.Data.Query.ToQuery Network.AWS.KMS.CreateKey.CreateKey
instance Control.DeepSeq.NFData Network.AWS.KMS.CreateKey.CreateKeyResponse


-- | Adds a grant to a key to specify who can use the key and under what
--   conditions. Grants are alternate permission mechanisms to key
--   policies.
--   
--   For more information about grants, see <a>Grants</a> in the <i>AWS Key
--   Management Service Developer Guide</i> .
module Network.AWS.KMS.CreateGrant

-- | Creates a value of <a>CreateGrant</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>cgRetiringPrincipal</a> - The principal that is given
--   permission to retire the grant by using <a>RetireGrant</a> operation.
--   To specify the principal, use the <a>Amazon Resource Name (ARN)</a> of
--   an AWS principal. Valid AWS principals include AWS accounts (root),
--   IAM users, federated users, and assumed role users. For examples of
--   the ARN syntax to use for specifying a principal, see <a>AWS Identity
--   and Access Management (IAM)</a> in the Example ARNs section of the
--   <i>AWS General Reference</i> .</li>
--   <li><a>cgGrantTokens</a> - A list of grant tokens. For more
--   information, see <a>Grant Tokens</a> in the <i>AWS Key Management
--   Service Developer Guide</i> .</li>
--   <li><a>cgConstraints</a> - The conditions under which the operations
--   permitted by the grant are allowed. You can use this value to allow
--   the operations permitted by the grant only when a specified encryption
--   context is present. For more information, see <a>Encryption
--   Context</a> in the <i>AWS Key Management Service Developer Guide</i>
--   .</li>
--   <li><a>cgName</a> - A friendly name for identifying the grant. Use
--   this value to prevent unintended creation of duplicate grants when
--   retrying this request. When this value is absent, all
--   <tt>CreateGrant</tt> requests result in a new grant with a unique
--   <tt>GrantId</tt> even if all the supplied parameters are identical.
--   This can result in unintended duplicates when you retry the
--   <tt>CreateGrant</tt> request. When this value is present, you can
--   retry a <tt>CreateGrant</tt> request with identical parameters; if the
--   grant already exists, the original <tt>GrantId</tt> is returned
--   without creating a new grant. Note that the returned grant token is
--   unique with every <tt>CreateGrant</tt> request, even when a duplicate
--   <tt>GrantId</tt> is returned. All grant tokens obtained in this way
--   can be used interchangeably.</li>
--   <li><a>cgOperations</a> - A list of operations that the grant permits.
--   The list can contain any combination of one or more of the following
--   values: * <a>Decrypt</a> * <a>Encrypt</a> * <a>GenerateDataKey</a> *
--   <a>GenerateDataKeyWithoutPlaintext</a> * <a>ReEncryptFrom</a> *
--   <a>ReEncryptTo</a> * <a>CreateGrant</a> * <a>RetireGrant</a> *
--   <a>DescribeKey</a></li>
--   <li><a>cgKeyId</a> - The unique identifier for the customer master key
--   (CMK) that the grant applies to. To specify this value, use the
--   globally unique key ID or the Amazon Resource Name (ARN) of the key.
--   Examples: * Globally unique key ID:
--   12345678-1234-1234-1234-123456789012 * Key ARN:
--   arn:aws:kms:us-west-2:123456789012:key/12345678-1234-1234-1234-123456789012</li>
--   <li><a>cgGranteePrincipal</a> - The principal that is given permission
--   to perform the operations that the grant permits. To specify the
--   principal, use the <a>Amazon Resource Name (ARN)</a> of an AWS
--   principal. Valid AWS principals include AWS accounts (root), IAM
--   users, federated users, and assumed role users. For examples of the
--   ARN syntax to use for specifying a principal, see <a>AWS Identity and
--   Access Management (IAM)</a> in the Example ARNs section of the <i>AWS
--   General Reference</i> .</li>
--   </ul>
createGrant :: Text -> Text -> CreateGrant

-- | <i>See:</i> <a>createGrant</a> smart constructor.
data CreateGrant

-- | The principal that is given permission to retire the grant by using
--   <a>RetireGrant</a> operation. To specify the principal, use the
--   <a>Amazon Resource Name (ARN)</a> of an AWS principal. Valid AWS
--   principals include AWS accounts (root), IAM users, federated users,
--   and assumed role users. For examples of the ARN syntax to use for
--   specifying a principal, see <a>AWS Identity and Access Management
--   (IAM)</a> in the Example ARNs section of the <i>AWS General
--   Reference</i> .
cgRetiringPrincipal :: Lens' CreateGrant (Maybe Text)

-- | A list of grant tokens. For more information, see <a>Grant Tokens</a>
--   in the <i>AWS Key Management Service Developer Guide</i> .
cgGrantTokens :: Lens' CreateGrant [Text]

-- | The conditions under which the operations permitted by the grant are
--   allowed. You can use this value to allow the operations permitted by
--   the grant only when a specified encryption context is present. For
--   more information, see <a>Encryption Context</a> in the <i>AWS Key
--   Management Service Developer Guide</i> .
cgConstraints :: Lens' CreateGrant (Maybe GrantConstraints)

-- | A friendly name for identifying the grant. Use this value to prevent
--   unintended creation of duplicate grants when retrying this request.
--   When this value is absent, all <tt>CreateGrant</tt> requests result in
--   a new grant with a unique <tt>GrantId</tt> even if all the supplied
--   parameters are identical. This can result in unintended duplicates
--   when you retry the <tt>CreateGrant</tt> request. When this value is
--   present, you can retry a <tt>CreateGrant</tt> request with identical
--   parameters; if the grant already exists, the original <tt>GrantId</tt>
--   is returned without creating a new grant. Note that the returned grant
--   token is unique with every <tt>CreateGrant</tt> request, even when a
--   duplicate <tt>GrantId</tt> is returned. All grant tokens obtained in
--   this way can be used interchangeably.
cgName :: Lens' CreateGrant (Maybe Text)

-- | A list of operations that the grant permits. The list can contain any
--   combination of one or more of the following values: * <a>Decrypt</a> *
--   <a>Encrypt</a> * <a>GenerateDataKey</a> *
--   <a>GenerateDataKeyWithoutPlaintext</a> * <a>ReEncryptFrom</a> *
--   <a>ReEncryptTo</a> * <a>CreateGrant</a> * <a>RetireGrant</a> *
--   <a>DescribeKey</a>
cgOperations :: Lens' CreateGrant [GrantOperation]

-- | The unique identifier for the customer master key (CMK) that the grant
--   applies to. To specify this value, use the globally unique key ID or
--   the Amazon Resource Name (ARN) of the key. Examples: * Globally unique
--   key ID: 12345678-1234-1234-1234-123456789012 * Key ARN:
--   arn:aws:kms:us-west-2:123456789012:key/12345678-1234-1234-1234-123456789012
cgKeyId :: Lens' CreateGrant Text

-- | The principal that is given permission to perform the operations that
--   the grant permits. To specify the principal, use the <a>Amazon
--   Resource Name (ARN)</a> of an AWS principal. Valid AWS principals
--   include AWS accounts (root), IAM users, federated users, and assumed
--   role users. For examples of the ARN syntax to use for specifying a
--   principal, see <a>AWS Identity and Access Management (IAM)</a> in the
--   Example ARNs section of the <i>AWS General Reference</i> .
cgGranteePrincipal :: Lens' CreateGrant Text

-- | Creates a value of <a>CreateGrantResponse</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>cgrsGrantId</a> - The unique identifier for the grant. You can
--   use the <tt>GrantId</tt> in a subsequent <a>RetireGrant</a> or
--   <tt>RevokeGrant</tt> operation.</li>
--   <li><a>cgrsGrantToken</a> - The grant token. For more information, see
--   <a>Grant Tokens</a> in the <i>AWS Key Management Service Developer
--   Guide</i> .</li>
--   <li><a>cgrsResponseStatus</a> - -- | The response status code.</li>
--   </ul>
createGrantResponse :: Int -> CreateGrantResponse

-- | <i>See:</i> <a>createGrantResponse</a> smart constructor.
data CreateGrantResponse

-- | The unique identifier for the grant. You can use the <tt>GrantId</tt>
--   in a subsequent <a>RetireGrant</a> or <tt>RevokeGrant</tt> operation.
cgrsGrantId :: Lens' CreateGrantResponse (Maybe Text)

-- | The grant token. For more information, see <a>Grant Tokens</a> in the
--   <i>AWS Key Management Service Developer Guide</i> .
cgrsGrantToken :: Lens' CreateGrantResponse (Maybe Text)

-- | <ul>
--   <li>- | The response status code.</li>
--   </ul>
cgrsResponseStatus :: Lens' CreateGrantResponse Int
instance GHC.Generics.Generic Network.AWS.KMS.CreateGrant.CreateGrantResponse
instance Data.Data.Data Network.AWS.KMS.CreateGrant.CreateGrantResponse
instance GHC.Show.Show Network.AWS.KMS.CreateGrant.CreateGrantResponse
instance GHC.Read.Read Network.AWS.KMS.CreateGrant.CreateGrantResponse
instance GHC.Classes.Eq Network.AWS.KMS.CreateGrant.CreateGrantResponse
instance GHC.Generics.Generic Network.AWS.KMS.CreateGrant.CreateGrant
instance Data.Data.Data Network.AWS.KMS.CreateGrant.CreateGrant
instance GHC.Show.Show Network.AWS.KMS.CreateGrant.CreateGrant
instance GHC.Read.Read Network.AWS.KMS.CreateGrant.CreateGrant
instance GHC.Classes.Eq Network.AWS.KMS.CreateGrant.CreateGrant
instance Network.AWS.Types.AWSRequest Network.AWS.KMS.CreateGrant.CreateGrant
instance Data.Hashable.Class.Hashable Network.AWS.KMS.CreateGrant.CreateGrant
instance Control.DeepSeq.NFData Network.AWS.KMS.CreateGrant.CreateGrant
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.KMS.CreateGrant.CreateGrant
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.KMS.CreateGrant.CreateGrant
instance Network.AWS.Data.Path.ToPath Network.AWS.KMS.CreateGrant.CreateGrant
instance Network.AWS.Data.Query.ToQuery Network.AWS.KMS.CreateGrant.CreateGrant
instance Control.DeepSeq.NFData Network.AWS.KMS.CreateGrant.CreateGrantResponse


-- | Creates a display name for a customer master key. An alias can be used
--   to identify a key and should be unique. The console enforces a
--   one-to-one mapping between the alias and a key. An alias name can
--   contain only alphanumeric characters, forward slashes (<i>),
--   underscores (_), and dashes (-). An alias must start with the word
--   "alias" followed by a forward slash (alias</i>). An alias that begins
--   with "aws" after the forward slash (alias/aws...) is reserved by
--   Amazon Web Services (AWS).
--   
--   The alias and the key it is mapped to must be in the same AWS account
--   and the same region.
--   
--   To map an alias to a different key, call <tt>UpdateAlias</tt> .
module Network.AWS.KMS.CreateAlias

-- | Creates a value of <a>CreateAlias</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>caAliasName</a> - String that contains the display name. The
--   name must start with the word "alias" followed by a forward slash
--   (alias<i>). Aliases that begin with "alias</i>AWS" are reserved.</li>
--   <li><a>caTargetKeyId</a> - An identifier of the key for which you are
--   creating the alias. This value cannot be another alias but can be a
--   globally unique identifier or a fully specified ARN to a key. * Key
--   ARN Example -
--   arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
--   * Globally Unique Key ID Example -
--   12345678-1234-1234-1234-123456789012</li>
--   </ul>
createAlias :: Text -> Text -> CreateAlias

-- | <i>See:</i> <a>createAlias</a> smart constructor.
data CreateAlias

-- | String that contains the display name. The name must start with the
--   word "alias" followed by a forward slash (alias<i>). Aliases that
--   begin with "alias</i>AWS" are reserved.
caAliasName :: Lens' CreateAlias Text

-- | An identifier of the key for which you are creating the alias. This
--   value cannot be another alias but can be a globally unique identifier
--   or a fully specified ARN to a key. * Key ARN Example -
--   arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
--   * Globally Unique Key ID Example -
--   12345678-1234-1234-1234-123456789012
caTargetKeyId :: Lens' CreateAlias Text

-- | Creates a value of <a>CreateAliasResponse</a> with the minimum fields
--   required to make a request.
createAliasResponse :: CreateAliasResponse

-- | <i>See:</i> <a>createAliasResponse</a> smart constructor.
data CreateAliasResponse
instance GHC.Generics.Generic Network.AWS.KMS.CreateAlias.CreateAliasResponse
instance Data.Data.Data Network.AWS.KMS.CreateAlias.CreateAliasResponse
instance GHC.Show.Show Network.AWS.KMS.CreateAlias.CreateAliasResponse
instance GHC.Read.Read Network.AWS.KMS.CreateAlias.CreateAliasResponse
instance GHC.Classes.Eq Network.AWS.KMS.CreateAlias.CreateAliasResponse
instance GHC.Generics.Generic Network.AWS.KMS.CreateAlias.CreateAlias
instance Data.Data.Data Network.AWS.KMS.CreateAlias.CreateAlias
instance GHC.Show.Show Network.AWS.KMS.CreateAlias.CreateAlias
instance GHC.Read.Read Network.AWS.KMS.CreateAlias.CreateAlias
instance GHC.Classes.Eq Network.AWS.KMS.CreateAlias.CreateAlias
instance Network.AWS.Types.AWSRequest Network.AWS.KMS.CreateAlias.CreateAlias
instance Data.Hashable.Class.Hashable Network.AWS.KMS.CreateAlias.CreateAlias
instance Control.DeepSeq.NFData Network.AWS.KMS.CreateAlias.CreateAlias
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.KMS.CreateAlias.CreateAlias
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.KMS.CreateAlias.CreateAlias
instance Network.AWS.Data.Path.ToPath Network.AWS.KMS.CreateAlias.CreateAlias
instance Network.AWS.Data.Query.ToQuery Network.AWS.KMS.CreateAlias.CreateAlias
instance Control.DeepSeq.NFData Network.AWS.KMS.CreateAlias.CreateAliasResponse


-- | Cancels the deletion of a customer master key (CMK). When this
--   operation is successful, the CMK is set to the <tt>Disabled</tt>
--   state. To enable a CMK, use <tt>EnableKey</tt> .
--   
--   For more information about scheduling and canceling deletion of a CMK,
--   see <a>Deleting Customer Master Keys</a> in the <i>AWS Key Management
--   Service Developer Guide</i> .
module Network.AWS.KMS.CancelKeyDeletion

-- | Creates a value of <a>CancelKeyDeletion</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>ckdKeyId</a> - The unique identifier for the customer master
--   key (CMK) for which to cancel deletion. To specify this value, use the
--   unique key ID or the Amazon Resource Name (ARN) of the CMK. Examples:
--   * Unique key ID: 1234abcd-12ab-34cd-56ef-1234567890ab * Key ARN:
--   arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
--   To obtain the unique key ID and key ARN for a given CMK, use
--   <tt>ListKeys</tt> or <a>DescribeKey</a> .</li>
--   </ul>
cancelKeyDeletion :: Text -> CancelKeyDeletion

-- | <i>See:</i> <a>cancelKeyDeletion</a> smart constructor.
data CancelKeyDeletion

-- | The unique identifier for the customer master key (CMK) for which to
--   cancel deletion. To specify this value, use the unique key ID or the
--   Amazon Resource Name (ARN) of the CMK. Examples: * Unique key ID:
--   1234abcd-12ab-34cd-56ef-1234567890ab * Key ARN:
--   arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
--   To obtain the unique key ID and key ARN for a given CMK, use
--   <tt>ListKeys</tt> or <a>DescribeKey</a> .
ckdKeyId :: Lens' CancelKeyDeletion Text

-- | Creates a value of <a>CancelKeyDeletionResponse</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>ckdrsKeyId</a> - The unique identifier of the master key for
--   which deletion is canceled.</li>
--   <li><a>ckdrsResponseStatus</a> - -- | The response status code.</li>
--   </ul>
cancelKeyDeletionResponse :: Int -> CancelKeyDeletionResponse

-- | <i>See:</i> <a>cancelKeyDeletionResponse</a> smart constructor.
data CancelKeyDeletionResponse

-- | The unique identifier of the master key for which deletion is
--   canceled.
ckdrsKeyId :: Lens' CancelKeyDeletionResponse (Maybe Text)

-- | <ul>
--   <li>- | The response status code.</li>
--   </ul>
ckdrsResponseStatus :: Lens' CancelKeyDeletionResponse Int
instance GHC.Generics.Generic Network.AWS.KMS.CancelKeyDeletion.CancelKeyDeletionResponse
instance Data.Data.Data Network.AWS.KMS.CancelKeyDeletion.CancelKeyDeletionResponse
instance GHC.Show.Show Network.AWS.KMS.CancelKeyDeletion.CancelKeyDeletionResponse
instance GHC.Read.Read Network.AWS.KMS.CancelKeyDeletion.CancelKeyDeletionResponse
instance GHC.Classes.Eq Network.AWS.KMS.CancelKeyDeletion.CancelKeyDeletionResponse
instance GHC.Generics.Generic Network.AWS.KMS.CancelKeyDeletion.CancelKeyDeletion
instance Data.Data.Data Network.AWS.KMS.CancelKeyDeletion.CancelKeyDeletion
instance GHC.Show.Show Network.AWS.KMS.CancelKeyDeletion.CancelKeyDeletion
instance GHC.Read.Read Network.AWS.KMS.CancelKeyDeletion.CancelKeyDeletion
instance GHC.Classes.Eq Network.AWS.KMS.CancelKeyDeletion.CancelKeyDeletion
instance Network.AWS.Types.AWSRequest Network.AWS.KMS.CancelKeyDeletion.CancelKeyDeletion
instance Data.Hashable.Class.Hashable Network.AWS.KMS.CancelKeyDeletion.CancelKeyDeletion
instance Control.DeepSeq.NFData Network.AWS.KMS.CancelKeyDeletion.CancelKeyDeletion
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.KMS.CancelKeyDeletion.CancelKeyDeletion
instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.KMS.CancelKeyDeletion.CancelKeyDeletion
instance Network.AWS.Data.Path.ToPath Network.AWS.KMS.CancelKeyDeletion.CancelKeyDeletion
instance Network.AWS.Data.Query.ToQuery Network.AWS.KMS.CancelKeyDeletion.CancelKeyDeletion
instance Control.DeepSeq.NFData Network.AWS.KMS.CancelKeyDeletion.CancelKeyDeletionResponse


-- | <b>AWS Key Management Service</b>
--   
--   AWS Key Management Service (AWS KMS) is an encryption and key
--   management web service. This guide describes the AWS KMS operations
--   that you can call programmatically. For general information about AWS
--   KMS, see the <a>AWS Key Management Service Developer Guide</a> .
--   
--   We recommend that you use the AWS SDKs to make programmatic API calls
--   to AWS KMS.
--   
--   Clients must support TLS (Transport Layer Security) 1.0. We recommend
--   TLS 1.2. Clients must also support cipher suites with Perfect Forward
--   Secrecy (PFS) such as Ephemeral Diffie-Hellman (DHE) or Elliptic Curve
--   Ephemeral Diffie-Hellman (ECDHE). Most modern systems such as Java 7
--   and later support these modes.
--   
--   <b>Signing Requests</b>
--   
--   Requests must be signed by using an access key ID and a secret access
--   key. We strongly recommend that you <i>do not</i> use your AWS account
--   (root) access key ID and secret key for everyday work with AWS KMS.
--   Instead, use the access key ID and secret access key for an IAM user,
--   or you can use the AWS Security Token Service to generate temporary
--   security credentials that you can use to sign requests.
--   
--   All AWS KMS operations require <a>Signature Version 4</a> .
--   
--   <b>Logging API Requests</b>
--   
--   AWS KMS supports AWS CloudTrail, a service that logs AWS API calls and
--   related events for your AWS account and delivers them to an Amazon S3
--   bucket that you specify. By using the information collected by
--   CloudTrail, you can determine what requests were made to AWS KMS, who
--   made the request, when it was made, and so on. To learn more about
--   CloudTrail, including how to turn it on and find your log files, see
--   the <a>AWS CloudTrail User Guide</a> .
--   
--   <b>Additional Resources</b>
--   
--   For more information about credentials and request signing, see the
--   following:
--   
--   <ul>
--   <li><a>AWS Security Credentials</a> - This topic provides general
--   information about the types of credentials used for accessing
--   AWS.</li>
--   <li><a>Temporary Security Credentials</a> - This section of the <i>IAM
--   User Guide</i> describes how to create and use temporary security
--   credentials.</li>
--   <li><a>Signature Version 4 Signing Process</a> - This set of topics
--   walks you through the process of signing a request using an access key
--   ID and a secret access key.</li>
--   </ul>
--   
--   <b>Commonly Used APIs</b>
--   
--   Of the APIs discussed in this guide, the following will prove the most
--   useful for most applications. You will likely perform actions other
--   than these, such as creating keys and assigning policies, by using the
--   console.
--   
--   <ul>
--   <li><a>Encrypt</a></li>
--   <li><a>Decrypt</a></li>
--   <li><a>GenerateDataKey</a></li>
--   <li><a>GenerateDataKeyWithoutPlaintext</a></li>
--   </ul>
module Network.AWS.KMS

-- | API version <tt>2014-11-01</tt> of the Amazon Key Management Service
--   SDK configuration.
kms :: Service

-- | The request was rejected because the marker that specifies where
--   pagination should next begin is not valid.
_InvalidMarkerException :: AsError a => Getting (First ServiceError) a ServiceError

-- | The request was rejected because the state of the specified resource
--   is not valid for this request.
--   
--   For more information about how key state affects the use of a CMK, see
--   <a>How Key State Affects Use of a Customer Master Key</a> in the
--   <i>AWS Key Management Service Developer Guide</i> .
_KMSInvalidStateException :: AsError a => Getting (First ServiceError) a ServiceError

-- | The request was rejected because the specified <tt>KeySpec</tt> value
--   is not valid.
_InvalidKeyUsageException :: AsError a => Getting (First ServiceError) a ServiceError

-- | The request was rejected because the specified policy is not
--   syntactically or semantically correct.
_MalformedPolicyDocumentException :: AsError a => Getting (First ServiceError) a ServiceError

-- | The request was rejected because a specified parameter is not
--   supported or a specified resource is not valid for this operation.
_UnsupportedOperationException :: AsError a => Getting (First ServiceError) a ServiceError

-- | The request was rejected because the specified CMK is not enabled.
_DisabledException :: AsError a => Getting (First ServiceError) a ServiceError

-- | The request was rejected because the specified CMK was not available.
--   The request can be retried.
_KeyUnavailableException :: AsError a => Getting (First ServiceError) a ServiceError

-- | The request was rejected because the provided key material is invalid
--   or is not the same key material that was previously imported into this
--   customer master key (CMK).
_IncorrectKeyMaterialException :: AsError a => Getting (First ServiceError) a ServiceError

-- | The request was rejected because an internal exception occurred. The
--   request can be retried.
_KMSInternalException :: AsError a => Getting (First ServiceError) a ServiceError

-- | The request was rejected because the provided import token is invalid
--   or is associated with a different customer master key (CMK).
_InvalidImportTokenException :: AsError a => Getting (First ServiceError) a ServiceError

-- | The request was rejected because the specified entity or resource
--   could not be found.
_NotFoundException :: AsError a => Getting (First ServiceError) a ServiceError

-- | The request was rejected because the specified alias name is not
--   valid.
_InvalidAliasNameException :: AsError a => Getting (First ServiceError) a ServiceError

-- | The request was rejected because the specified <tt>GrantId</tt> is not
--   valid.
_InvalidGrantIdException :: AsError a => Getting (First ServiceError) a ServiceError

-- | The request was rejected because the specified grant token is not
--   valid.
_InvalidGrantTokenException :: AsError a => Getting (First ServiceError) a ServiceError

-- | The request was rejected because a specified ARN was not valid.
_InvalidARNException :: AsError a => Getting (First ServiceError) a ServiceError

-- | The system timed out while trying to fulfill the request. The request
--   can be retried.
_DependencyTimeoutException :: AsError a => Getting (First ServiceError) a ServiceError

-- | The request was rejected because the provided import token is expired.
--   Use <tt>GetParametersForImport</tt> to retrieve a new import token and
--   public key, use the new public key to encrypt the key material, and
--   then try the request again.
_ExpiredImportTokenException :: AsError a => Getting (First ServiceError) a ServiceError

-- | The request was rejected because the specified ciphertext has been
--   corrupted or is otherwise invalid.
_InvalidCiphertextException :: AsError a => Getting (First ServiceError) a ServiceError

-- | The request was rejected because it attempted to create a resource
--   that already exists.
_AlreadyExistsException :: AsError a => Getting (First ServiceError) a ServiceError

-- | The request was rejected because a limit was exceeded. For more
--   information, see <a>Limits</a> in the <i>AWS Key Management Service
--   Developer Guide</i> .
_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
data AlgorithmSpec
RsaesOaepSha1 :: AlgorithmSpec
RsaesOaepSha256 :: AlgorithmSpec
RsaesPKCS1V15 :: AlgorithmSpec
data DataKeySpec
AES128 :: DataKeySpec
AES256 :: DataKeySpec
data ExpirationModelType
KeyMaterialDoesNotExpire :: ExpirationModelType
KeyMaterialExpires :: ExpirationModelType
data GrantOperation
CreateGrant :: GrantOperation
Decrypt :: GrantOperation
DescribeKey :: GrantOperation
Encrypt :: GrantOperation
GenerateDataKey :: GrantOperation
GenerateDataKeyWithoutPlaintext :: GrantOperation
ReEncryptFrom :: GrantOperation
ReEncryptTo :: GrantOperation
RetireGrant :: GrantOperation
data KeyState
Disabled :: KeyState
Enabled :: KeyState
PendingDeletion :: KeyState
PendingImport :: KeyState
data KeyUsageType
EncryptDecrypt :: KeyUsageType
data OriginType
AWSKMS :: OriginType
External :: OriginType
data WrappingKeySpec
Rsa2048 :: WrappingKeySpec

-- | Contains information about an alias.
--   
--   <i>See:</i> <a>aliasListEntry</a> smart constructor.
data AliasListEntry

-- | Creates a value of <a>AliasListEntry</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>aleTargetKeyId</a> - String that contains the key identifier
--   pointed to by the alias.</li>
--   <li><a>aleAliasName</a> - String that contains the alias.</li>
--   <li><a>aleAliasARN</a> - String that contains the key ARN.</li>
--   </ul>
aliasListEntry :: AliasListEntry

-- | String that contains the key identifier pointed to by the alias.
aleTargetKeyId :: Lens' AliasListEntry (Maybe Text)

-- | String that contains the alias.
aleAliasName :: Lens' AliasListEntry (Maybe Text)

-- | String that contains the key ARN.
aleAliasARN :: Lens' AliasListEntry (Maybe Text)

-- | A structure for specifying the conditions under which the operations
--   permitted by the grant are allowed.
--   
--   You can use this structure to allow the operations permitted by the
--   grant only when a specified encryption context is present. For more
--   information about encryption context, see <a>Encryption Context</a> in
--   the <i>AWS Key Management Service Developer Guide</i> .
--   
--   <i>See:</i> <a>grantConstraints</a> smart constructor.
data GrantConstraints

-- | Creates a value of <a>GrantConstraints</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>gcEncryptionContextEquals</a> - Contains a list of key-value
--   pairs that must be present in the encryption context of a subsequent
--   operation permitted by the grant. When a subsequent operation
--   permitted by the grant includes an encryption context that matches
--   this list, the grant allows the operation. Otherwise, the operation is
--   not allowed.</li>
--   <li><a>gcEncryptionContextSubset</a> - Contains a list of key-value
--   pairs, a subset of which must be present in the encryption context of
--   a subsequent operation permitted by the grant. When a subsequent
--   operation permitted by the grant includes an encryption context that
--   matches this list or is a subset of this list, the grant allows the
--   operation. Otherwise, the operation is not allowed.</li>
--   </ul>
grantConstraints :: GrantConstraints

-- | Contains a list of key-value pairs that must be present in the
--   encryption context of a subsequent operation permitted by the grant.
--   When a subsequent operation permitted by the grant includes an
--   encryption context that matches this list, the grant allows the
--   operation. Otherwise, the operation is not allowed.
gcEncryptionContextEquals :: Lens' GrantConstraints (HashMap Text Text)

-- | Contains a list of key-value pairs, a subset of which must be present
--   in the encryption context of a subsequent operation permitted by the
--   grant. When a subsequent operation permitted by the grant includes an
--   encryption context that matches this list or is a subset of this list,
--   the grant allows the operation. Otherwise, the operation is not
--   allowed.
gcEncryptionContextSubset :: Lens' GrantConstraints (HashMap Text Text)

-- | Contains information about an entry in a list of grants.
--   
--   <i>See:</i> <a>grantListEntry</a> smart constructor.
data GrantListEntry

-- | Creates a value of <a>GrantListEntry</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>gleKeyId</a> - The unique identifier for the customer master
--   key (CMK) to which the grant applies.</li>
--   <li><a>gleRetiringPrincipal</a> - The principal that can retire the
--   grant.</li>
--   <li><a>gleIssuingAccount</a> - The AWS account under which the grant
--   was issued.</li>
--   <li><a>gleGrantId</a> - The unique identifier for the grant.</li>
--   <li><a>gleConstraints</a> - The conditions under which the grant's
--   operations are allowed.</li>
--   <li><a>gleGranteePrincipal</a> - The principal that receives the
--   grant's permissions.</li>
--   <li><a>gleName</a> - The friendly name that identifies the grant. If a
--   name was provided in the <a>CreateGrant</a> request, that name is
--   returned. Otherwise this value is null.</li>
--   <li><a>gleCreationDate</a> - The date and time when the grant was
--   created.</li>
--   <li><a>gleOperations</a> - The list of operations permitted by the
--   grant.</li>
--   </ul>
grantListEntry :: GrantListEntry

-- | The unique identifier for the customer master key (CMK) to which the
--   grant applies.
gleKeyId :: Lens' GrantListEntry (Maybe Text)

-- | The principal that can retire the grant.
gleRetiringPrincipal :: Lens' GrantListEntry (Maybe Text)

-- | The AWS account under which the grant was issued.
gleIssuingAccount :: Lens' GrantListEntry (Maybe Text)

-- | The unique identifier for the grant.
gleGrantId :: Lens' GrantListEntry (Maybe Text)

-- | The conditions under which the grant's operations are allowed.
gleConstraints :: Lens' GrantListEntry (Maybe GrantConstraints)

-- | The principal that receives the grant's permissions.
gleGranteePrincipal :: Lens' GrantListEntry (Maybe Text)

-- | The friendly name that identifies the grant. If a name was provided in
--   the <a>CreateGrant</a> request, that name is returned. Otherwise this
--   value is null.
gleName :: Lens' GrantListEntry (Maybe Text)

-- | The date and time when the grant was created.
gleCreationDate :: Lens' GrantListEntry (Maybe UTCTime)

-- | The list of operations permitted by the grant.
gleOperations :: Lens' GrantListEntry [GrantOperation]

-- | Contains information about each entry in the key list.
--   
--   <i>See:</i> <a>keyListEntry</a> smart constructor.
data KeyListEntry

-- | Creates a value of <a>KeyListEntry</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>kleKeyId</a> - Unique identifier of the key.</li>
--   <li><a>kleKeyARN</a> - ARN of the key.</li>
--   </ul>
keyListEntry :: KeyListEntry

-- | Unique identifier of the key.
kleKeyId :: Lens' KeyListEntry (Maybe Text)

-- | ARN of the key.
kleKeyARN :: Lens' KeyListEntry (Maybe Text)

-- | Contains metadata about a customer master key (CMK).
--   
--   This data type is used as a response element for the
--   <tt>CreateKey</tt> and <a>DescribeKey</a> operations.
--   
--   <i>See:</i> <a>keyMetadata</a> smart constructor.
data KeyMetadata

-- | Creates a value of <a>KeyMetadata</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>kmOrigin</a> - The source of the CMK's key material. When this
--   value is <tt>AWS_KMS</tt> , AWS KMS created the key material. When
--   this value is <tt>EXTERNAL</tt> , the key material was imported from
--   your existing key management infrastructure or the CMK lacks key
--   material.</li>
--   <li><a>kmExpirationModel</a> - Specifies whether the CMK's key
--   material expires. This value is present only when <tt>Origin</tt> is
--   <tt>EXTERNAL</tt> , otherwise this value is omitted.</li>
--   <li><a>kmEnabled</a> - Specifies whether the CMK is enabled. When
--   <tt>KeyState</tt> is <tt>Enabled</tt> this value is true, otherwise it
--   is false.</li>
--   <li><a>kmValidTo</a> - The time at which the imported key material
--   expires. When the key material expires, AWS KMS deletes the key
--   material and the CMK becomes unusable. This value is present only for
--   CMKs whose <tt>Origin</tt> is <tt>EXTERNAL</tt> and whose
--   <tt>ExpirationModel</tt> is <tt>KEY_MATERIAL_EXPIRES</tt> , otherwise
--   this value is omitted.</li>
--   <li><a>kmARN</a> - The Amazon Resource Name (ARN) of the CMK. For
--   examples, see <a>AWS Key Management Service (AWS KMS)</a> in the
--   Example ARNs section of the <i>AWS General Reference</i> .</li>
--   <li><a>kmKeyState</a> - The state of the CMK. For more information
--   about how key state affects the use of a CMK, see <a>How Key State
--   Affects the Use of a Customer Master Key</a> in the <i>AWS Key
--   Management Service Developer Guide</i> .</li>
--   <li><a>kmAWSAccountId</a> - The twelve-digit account ID of the AWS
--   account that owns the CMK.</li>
--   <li><a>kmKeyUsage</a> - The cryptographic operations for which you can
--   use the CMK. Currently the only allowed value is
--   <tt>ENCRYPT_DECRYPT</tt> , which means you can use the CMK for the
--   <a>Encrypt</a> and <a>Decrypt</a> operations.</li>
--   <li><a>kmCreationDate</a> - The date and time when the CMK was
--   created.</li>
--   <li><a>kmDeletionDate</a> - The date and time after which AWS KMS
--   deletes the CMK. This value is present only when <tt>KeyState</tt> is
--   <tt>PendingDeletion</tt> , otherwise this value is omitted.</li>
--   <li><a>kmDescription</a> - The description of the CMK.</li>
--   <li><a>kmKeyId</a> - The globally unique identifier for the CMK.</li>
--   </ul>
keyMetadata :: Text -> KeyMetadata

-- | The source of the CMK's key material. When this value is
--   <tt>AWS_KMS</tt> , AWS KMS created the key material. When this value
--   is <tt>EXTERNAL</tt> , the key material was imported from your
--   existing key management infrastructure or the CMK lacks key material.
kmOrigin :: Lens' KeyMetadata (Maybe OriginType)

-- | Specifies whether the CMK's key material expires. This value is
--   present only when <tt>Origin</tt> is <tt>EXTERNAL</tt> , otherwise
--   this value is omitted.
kmExpirationModel :: Lens' KeyMetadata (Maybe ExpirationModelType)

-- | Specifies whether the CMK is enabled. When <tt>KeyState</tt> is
--   <tt>Enabled</tt> this value is true, otherwise it is false.
kmEnabled :: Lens' KeyMetadata (Maybe Bool)

-- | The time at which the imported key material expires. When the key
--   material expires, AWS KMS deletes the key material and the CMK becomes
--   unusable. This value is present only for CMKs whose <tt>Origin</tt> is
--   <tt>EXTERNAL</tt> and whose <tt>ExpirationModel</tt> is
--   <tt>KEY_MATERIAL_EXPIRES</tt> , otherwise this value is omitted.
kmValidTo :: Lens' KeyMetadata (Maybe UTCTime)

-- | The Amazon Resource Name (ARN) of the CMK. For examples, see <a>AWS
--   Key Management Service (AWS KMS)</a> in the Example ARNs section of
--   the <i>AWS General Reference</i> .
kmARN :: Lens' KeyMetadata (Maybe Text)

-- | The state of the CMK. For more information about how key state affects
--   the use of a CMK, see <a>How Key State Affects the Use of a Customer
--   Master Key</a> in the <i>AWS Key Management Service Developer
--   Guide</i> .
kmKeyState :: Lens' KeyMetadata (Maybe KeyState)

-- | The twelve-digit account ID of the AWS account that owns the CMK.
kmAWSAccountId :: Lens' KeyMetadata (Maybe Text)

-- | The cryptographic operations for which you can use the CMK. Currently
--   the only allowed value is <tt>ENCRYPT_DECRYPT</tt> , which means you
--   can use the CMK for the <a>Encrypt</a> and <a>Decrypt</a> operations.
kmKeyUsage :: Lens' KeyMetadata (Maybe KeyUsageType)

-- | The date and time when the CMK was created.
kmCreationDate :: Lens' KeyMetadata (Maybe UTCTime)

-- | The date and time after which AWS KMS deletes the CMK. This value is
--   present only when <tt>KeyState</tt> is <tt>PendingDeletion</tt> ,
--   otherwise this value is omitted.
kmDeletionDate :: Lens' KeyMetadata (Maybe UTCTime)

-- | The description of the CMK.
kmDescription :: Lens' KeyMetadata (Maybe Text)

-- | The globally unique identifier for the CMK.
kmKeyId :: Lens' KeyMetadata Text

-- | <i>See:</i> <a>listGrantsResponse</a> smart constructor.
data ListGrantsResponse

-- | Creates a value of <a>ListGrantsResponse</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>lgTruncated</a> - A flag that indicates whether there are more
--   items in the list. If your results were truncated, you can use the
--   <tt>Marker</tt> parameter to make a subsequent pagination request to
--   retrieve more items in the list.</li>
--   <li><a>lgGrants</a> - A list of grants.</li>
--   <li><a>lgNextMarker</a> - When <tt>Truncated</tt> is true, this value
--   is present and contains the value to use for the <tt>Marker</tt>
--   parameter in a subsequent pagination request.</li>
--   </ul>
listGrantsResponse :: ListGrantsResponse

-- | A flag that indicates whether there are more items in the list. If
--   your results were truncated, you can use the <tt>Marker</tt> parameter
--   to make a subsequent pagination request to retrieve more items in the
--   list.
lgTruncated :: Lens' ListGrantsResponse (Maybe Bool)

-- | A list of grants.
lgGrants :: Lens' ListGrantsResponse [GrantListEntry]

-- | When <tt>Truncated</tt> is true, this value is present and contains
--   the value to use for the <tt>Marker</tt> parameter in a subsequent
--   pagination request.
lgNextMarker :: Lens' ListGrantsResponse (Maybe Text)
