-- 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.6.0


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 one or more tags are not valid.
_TagException :: 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 get 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, or
--   additional authenticated data incorporated into the ciphertext, such
--   as the encryption context, is corrupted, missing, or 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 KeyManagerType
AWS :: KeyManagerType
Customer :: KeyManagerType
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
--   referred 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 referred 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 that you can use to allow certain operations in the grant
--   only when the desired 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> .
--   
--   Grant constraints apply only to operations that accept encryption
--   context as input. For example, the <tt><a>DescribeKey</a> </tt>
--   operation does not accept encryption context as input. A grant that
--   allows the <tt>DescribeKey</tt> operation does so regardless of the
--   grant constraints. In constrast, the <tt><a>Encrypt</a> </tt>
--   operation accepts encryption context as input. A grant that allows the
--   <tt>Encrypt</tt> operation does so only when the encryption context of
--   the <tt>Encrypt</tt> operation satisfies the grant constraints.
--   
--   <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> - A list of key-value pairs that
--   must be present in the encryption context of certain subsequent
--   operations that the grant allows. When certain subsequent operations
--   allowed by the grant include encryption context that matches this
--   list, the grant allows the operation. Otherwise, the grant does not
--   allow the operation.</li>
--   <li><a>gcEncryptionContextSubset</a> - A list of key-value pairs, all
--   of which must be present in the encryption context of certain
--   subsequent operations that the grant allows. When certain subsequent
--   operations allowed by the grant include encryption context that
--   matches this list or is a superset of this list, the grant allows the
--   operation. Otherwise, the grant does not allow the operation.</li>
--   </ul>
grantConstraints :: GrantConstraints

-- | A list of key-value pairs that must be present in the encryption
--   context of certain subsequent operations that the grant allows. When
--   certain subsequent operations allowed by the grant include encryption
--   context that matches this list, the grant allows the operation.
--   Otherwise, the grant does not allow the operation.
gcEncryptionContextEquals :: Lens' GrantConstraints (HashMap Text Text)

-- | A list of key-value pairs, all of which must be present in the
--   encryption context of certain subsequent operations that the grant
--   allows. When certain subsequent operations allowed by the grant
--   include encryption context that matches this list or is a superset of
--   this list, the grant allows the operation. Otherwise, the grant does
--   not allow the operation.
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> - A list of key-value pairs that must be
--   present in the encryption context of certain subsequent operations
--   that the grant allows.</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)

-- | A list of key-value pairs that must be present in the encryption
--   context of certain subsequent operations that the grant allows.
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>kmKeyManager</a> - The CMK's manager. CMKs are either
--   customer-managed or AWS-managed. For more information about the
--   difference, see <a>Customer Master Keys</a> in the <i>AWS Key
--   Management Service Developer Guide</i> .</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)

-- | The CMK's manager. CMKs are either customer-managed or AWS-managed.
--   For more information about the difference, see <a>Customer Master
--   Keys</a> in the <i>AWS Key Management Service Developer Guide</i> .
kmKeyManager :: Lens' KeyMetadata (Maybe KeyManagerType)

-- | 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. When this value is true, the list in this response
--   is truncated. To get more items, pass the value of the
--   <tt>NextMarker</tt> element in this response to the <tt>Marker</tt>
--   parameter in a subsequent request.</li>
--   <li><a>lgGrants</a> - A list of grants.</li>
--   <li><a>lgNextMarker</a> - When <tt>Truncated</tt> is true, this
--   element is present and contains the value to use for the
--   <tt>Marker</tt> parameter in a subsequent request.</li>
--   </ul>
listGrantsResponse :: ListGrantsResponse

-- | A flag that indicates whether there are more items in the list. When
--   this value is true, the list in this response is truncated. To get
--   more items, pass the value of the <tt>NextMarker</tt> element in this
--   response to the <tt>Marker</tt> parameter in a subsequent request.
lgTruncated :: Lens' ListGrantsResponse (Maybe Bool)

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

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

-- | A key-value pair. A tag consists of a tag key and a tag value. Tag
--   keys and tag values are both required, but tag values can be empty
--   (null) strings.
--   
--   For information about the rules that apply to tag keys and tag values,
--   see <a>User-Defined Tag Restrictions</a> in the <i>AWS Billing and
--   Cost Management User Guide</i> .
--   
--   <i>See:</i> <a>tag</a> smart constructor.
data Tag

-- | Creates a value of <a>Tag</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>tagTagKey</a> - The key of the tag.</li>
--   <li><a>tagTagValue</a> - The value of the tag.</li>
--   </ul>
tag :: Text -> Text -> Tag

-- | The key of the tag.
tagTagKey :: Lens' Tag Text

-- | The value of the tag.
tagTagValue :: Lens' Tag Text


-- | Adds or overwrites one or more tags for the specified customer master
--   key (CMK). You cannot perform this operation on a CMK in a different
--   AWS account.
--   
--   Each tag consists of a tag key and a tag value. Tag keys and tag
--   values are both required, but tag values can be empty (null) strings.
--   
--   You cannot use the same tag key more than once per CMK. For example,
--   consider a CMK with one tag whose tag key is <tt>Purpose</tt> and tag
--   value is <tt>Test</tt> . If you send a <tt>TagResource</tt> request
--   for this CMK with a tag key of <tt>Purpose</tt> and a tag value of
--   <tt>Prod</tt> , it does not create a second tag. Instead, the original
--   tag is overwritten with the new tag value.
--   
--   For information about the rules that apply to tag keys and tag values,
--   see <a>User-Defined Tag Restrictions</a> in the <i>AWS Billing and
--   Cost Management User Guide</i> .
module Network.AWS.KMS.TagResource

-- | Creates a value of <a>TagResource</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>trKeyId</a> - A unique identifier for the CMK you are tagging.
--   Specify the key ID or the Amazon Resource Name (ARN) of the CMK. For
--   example: * Key ID: <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key
--   ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> .</li>
--   <li><a>trTags</a> - One or more tags. Each tag consists of a tag key
--   and a tag value.</li>
--   </ul>
tagResource :: Text -> TagResource

-- | <i>See:</i> <a>tagResource</a> smart constructor.
data TagResource

-- | A unique identifier for the CMK you are tagging. Specify the key ID or
--   the Amazon Resource Name (ARN) of the CMK. For example: * Key ID:
--   <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> .
trKeyId :: Lens' TagResource Text

-- | One or more tags. Each tag consists of a tag key and a tag value.
trTags :: Lens' TagResource [Tag]

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

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


-- | 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 refer to it.
--   
--   You cannot perform this operation on a CMK in a different AWS account.
--   
--   <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 of the customer master key
--   (CMK) to delete. Specify the key ID or the Amazon Resource Name (ARN)
--   of the CMK. For example: * Key ID:
--   <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a 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 of the customer master key (CMK) to delete.
--   Specify the key ID or the Amazon Resource Name (ARN) of the CMK. For
--   example: * Key ID: <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key
--   ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a 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 Control.DeepSeq.NFData Network.AWS.KMS.ScheduleKeyDeletion.ScheduleKeyDeletionResponse
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


-- | Revokes the specified grant for the specified customer master key
--   (CMK). You can revoke a grant to actively deny operations that depend
--   on it.
--   
--   To perform this operation on a CMK in a different AWS account, specify
--   the key ARN in the value of the KeyId parameter.
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. Specify the key ID or the Amazon Resource
--   Name (ARN) of the CMK. To specify a CMK in a different AWS account,
--   you must use the key ARN. For example: * Key ID:
--   <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> .</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. Specify the key ID or the Amazon Resource Name (ARN) of the
--   CMK. To specify a CMK in a different AWS account, you must use the key
--   ARN. For example: * Key ID:
--   <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> .
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 Control.DeepSeq.NFData Network.AWS.KMS.RevokeGrant.RevokeGrantResponse
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


-- | Retires a grant. To clean up, you can retire a grant when you're done
--   using it. 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 AWS account (root user) under which the grant was created</li>
--   <li>The <tt>RetiringPrincipal</tt> , if present in the grant</li>
--   <li>The <tt>GranteePrincipal</tt> , if <tt>RetireGrant</tt> is an
--   operation specified in the grant</li>
--   </ul>
--   
--   You must identify the grant to retire by its grant token or by a
--   combination of the grant ID and the Amazon Resource Name (ARN) of the
--   customer master key (CMK). A grant token is a unique variable-length
--   base64-encoded string. A grant ID is a 64 character unique identifier
--   of a grant. The <a>CreateGrant</a> operation returns both.
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> - The Amazon Resource Name (ARN) of the CMK
--   associated with the grant. For example:
--   <tt>arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt></li>
--   <li><a>rgGrantId</a> - Unique identifier of the grant to retire. The
--   grant ID is returned in the response to a <tt>CreateGrant</tt>
--   operation. * 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

-- | The Amazon Resource Name (ARN) of the CMK associated with the grant.
--   For example:
--   <tt>arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
rgKeyId :: Lens' RetireGrant (Maybe Text)

-- | Unique identifier of the grant to retire. The grant ID is returned in
--   the response to a <tt>CreateGrant</tt> operation. * 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 Control.DeepSeq.NFData Network.AWS.KMS.RetireGrant.RetireGrantResponse
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


-- | Encrypts data on the server side with a new customer master key (CMK)
--   without exposing the plaintext of the data on the client side. The
--   data is first decrypted and then reencrypted. You can also use this
--   operation to change the encryption context of a ciphertext.
--   
--   You can reencrypt data using CMKs in different AWS accounts.
--   
--   Unlike other operations, <tt>ReEncrypt</tt> is authorized twice, once
--   as <tt>ReEncryptFrom</tt> on the source CMK and once as
--   <tt>ReEncryptTo</tt> on the destination CMK. We recommend that you
--   include the <tt>"kms:ReEncrypt*"</tt> permission in your <a>key
--   policies</a> to permit reencryption from or to the CMK. This
--   permission is automatically included in the key policy when you create
--   a CMK through the console, but you must include it manually when you
--   create a CMK programmatically or when you set a key policy with the
--   <tt>PutKeyPolicy</tt> operation.
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 use
--   when the data is reencrypted.</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 reencrypt.--
--   <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 CMK that
--   is used to reencrypt the data. To specify a CMK, use its key ID,
--   Amazon Resource Name (ARN), alias name, or alias ARN. When using an
--   alias name, prefix it with "alias<i>". To specify a CMK in a different
--   AWS account, you must use the key ARN or alias ARN. For example: * Key
--   ID: <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   @arn:aws:kms:us-east-2:111122223333:key</i>1234abcd-12ab-34cd-56ef-1234567890ab<tt>
--   * Alias name: </tt>alias<i>ExampleAlias<tt> * Alias ARN:
--   </tt>arn:aws:kms:us-east-2:111122223333:alias</i>ExampleAlias@ To get
--   the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> . To get the alias name and alias ARN, use
--   <tt>ListAliases</tt> .</li>
--   </ul>
reEncrypt :: ByteString -> Text -> ReEncrypt

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

-- | Encryption context to use when the data is reencrypted.
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 reencrypt.-- <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 CMK that is used to reencrypt the data. To
--   specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name,
--   or alias ARN. When using an alias name, prefix it with "alias<i>". To
--   specify a CMK in a different AWS account, you must use the key ARN or
--   alias ARN. For example: * Key ID:
--   <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   @arn:aws:kms:us-east-2:111122223333:key</i>1234abcd-12ab-34cd-56ef-1234567890ab<tt>
--   * Alias name: </tt>alias<i>ExampleAlias<tt> * Alias ARN:
--   </tt>arn:aws:kms:us-east-2:111122223333:alias</i>ExampleAlias@ To get
--   the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> . To get the alias name and alias ARN, use
--   <tt>ListAliases</tt> .
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 CMK used to
--   originally encrypt the data.</li>
--   <li><a>rersKeyId</a> - Unique identifier of the CMK used to reencrypt
--   the data.</li>
--   <li><a>rersCiphertextBlob</a> - The reencrypted data. When you use the
--   HTTP API or the AWS 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 CMK used to originally encrypt the data.
rersSourceKeyId :: Lens' ReEncryptResponse (Maybe Text)

-- | Unique identifier of the CMK used to reencrypt the data.
rersKeyId :: Lens' ReEncryptResponse (Maybe Text)

-- | The reencrypted data. When you use the HTTP API or the AWS 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 Control.DeepSeq.NFData Network.AWS.KMS.ReEncrypt.ReEncryptResponse
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


-- | Attaches a key policy to the specified customer master key (CMK). You
--   cannot perform this operation on a CMK in a different AWS account.
--   
--   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 risk 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 that is 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 customer master key
--   (CMK). Specify the key ID or the Amazon Resource Name (ARN) of the
--   CMK. For example: * Key ID:
--   <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> .</li>
--   <li><a>pkpPolicyName</a> - The name of the key policy. The only valid
--   value is <tt>default</tt> .</li>
--   <li><a>pkpPolicy</a> - The key policy to attach to the CMK. The key
--   policy must meet the following criteria: * If you don't set
--   <tt>BypassPolicyLockoutSafetyCheck</tt> to true, the key policy must
--   allow the principal that is making the <tt>PutKeyPolicy</tt> request
--   to make a subsequent <tt>PutKeyPolicy</tt> request on the CMK. This
--   reduces the risk that the CMK becomes unmanageable. For more
--   information, refer to the scenario in the <a>Default Key Policy</a>
--   section of the <i>AWS Key Management Service Developer Guide</i> . *
--   Each statement in the key policy must contain one or more principals.
--   The principals 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 including the new
--   principal in a key policy because the new principal might not be
--   immediately visible to AWS KMS. For more information, see <a>Changes
--   that I make are not always immediately visible</a> in the <i>AWS
--   Identity and Access Management User Guide</i> . The key policy size
--   limit is 32 kilobytes (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 risk
--   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 that is 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 customer master key (CMK). Specify the key
--   ID or the Amazon Resource Name (ARN) of the CMK. For example: * Key
--   ID: <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> .
pkpKeyId :: Lens' PutKeyPolicy Text

-- | The name of the key policy. The only valid value is <tt>default</tt> .
pkpPolicyName :: Lens' PutKeyPolicy Text

-- | The key policy to attach to the CMK. The key policy must meet the
--   following criteria: * If you don't set
--   <tt>BypassPolicyLockoutSafetyCheck</tt> to true, the key policy must
--   allow the principal that is making the <tt>PutKeyPolicy</tt> request
--   to make a subsequent <tt>PutKeyPolicy</tt> request on the CMK. This
--   reduces the risk that the CMK becomes unmanageable. For more
--   information, refer to the scenario in the <a>Default Key Policy</a>
--   section of the <i>AWS Key Management Service Developer Guide</i> . *
--   Each statement in the key policy must contain one or more principals.
--   The principals 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 including the new
--   principal in a key policy because the new principal might not be
--   immediately visible to AWS KMS. For more information, see <a>Changes
--   that I make are not always immediately visible</a> in the <i>AWS
--   Identity and Access Management User Guide</i> . The key policy size
--   limit is 32 kilobytes (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 Control.DeepSeq.NFData Network.AWS.KMS.PutKeyPolicy.PutKeyPolicyResponse
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


-- | 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 in a subsequent request
--   after you receive a response with truncated results. Set it to the
--   value of <tt>NextMarker</tt> from the truncated response you just
--   received.</li>
--   <li><a>lrgLimit</a> - Use this parameter to specify the maximum number
--   of items to return. When this value is present, AWS KMS does not
--   return more than the specified number of items, but it might return
--   fewer. 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 in a subsequent request after you receive a
--   response with truncated results. Set it to the value of
--   <tt>NextMarker</tt> from the truncated response you just received.
lrgMarker :: Lens' ListRetirableGrants (Maybe Text)

-- | Use this parameter to specify the maximum number of items to return.
--   When this value is present, AWS KMS does not return more than the
--   specified number of items, but it might return fewer. 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. When this value is true, the list in this response
--   is truncated. To get more items, pass the value of the
--   <tt>NextMarker</tt> element in this response to the <tt>Marker</tt>
--   parameter in a subsequent request.</li>
--   <li><a>lgGrants</a> - A list of grants.</li>
--   <li><a>lgNextMarker</a> - When <tt>Truncated</tt> is true, this
--   element is present and contains the value to use for the
--   <tt>Marker</tt> parameter in a subsequent 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. When
--   this value is true, the list in this response is truncated. To get
--   more items, pass the value of the <tt>NextMarker</tt> element in this
--   response to the <tt>Marker</tt> parameter in a subsequent request.
lgTruncated :: Lens' ListGrantsResponse (Maybe Bool)

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

-- | When <tt>Truncated</tt> is true, this element is present and contains
--   the value to use for the <tt>Marker</tt> parameter in a subsequent
--   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


-- | Returns a list of all tags for the specified customer master key
--   (CMK).
--   
--   You cannot perform this operation on a CMK in a different AWS account.
module Network.AWS.KMS.ListResourceTags

-- | Creates a value of <a>ListResourceTags</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>lrtMarker</a> - Use this parameter in a subsequent request
--   after you receive a response with truncated results. Set it to the
--   value of <tt>NextMarker</tt> from the truncated response you just
--   received. Do not attempt to construct this value. Use only the value
--   of <tt>NextMarker</tt> from the truncated response you just
--   received.</li>
--   <li><a>lrtLimit</a> - Use this parameter to specify the maximum number
--   of items to return. When this value is present, AWS KMS does not
--   return more than the specified number of items, but it might return
--   fewer. This value is optional. If you include a value, it must be
--   between 1 and 50, inclusive. If you do not include a value, it
--   defaults to 50.</li>
--   <li><a>lrtKeyId</a> - A unique identifier for the customer master key
--   (CMK). Specify the key ID or the Amazon Resource Name (ARN) of the
--   CMK. For example: * Key ID:
--   <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> .</li>
--   </ul>
listResourceTags :: Text -> ListResourceTags

-- | <i>See:</i> <a>listResourceTags</a> smart constructor.
data ListResourceTags

-- | Use this parameter in a subsequent request after you receive a
--   response with truncated results. Set it to the value of
--   <tt>NextMarker</tt> from the truncated response you just received. Do
--   not attempt to construct this value. Use only the value of
--   <tt>NextMarker</tt> from the truncated response you just received.
lrtMarker :: Lens' ListResourceTags (Maybe Text)

-- | Use this parameter to specify the maximum number of items to return.
--   When this value is present, AWS KMS does not return more than the
--   specified number of items, but it might return fewer. This value is
--   optional. If you include a value, it must be between 1 and 50,
--   inclusive. If you do not include a value, it defaults to 50.
lrtLimit :: Lens' ListResourceTags (Maybe Natural)

-- | A unique identifier for the customer master key (CMK). Specify the key
--   ID or the Amazon Resource Name (ARN) of the CMK. For example: * Key
--   ID: <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> .
lrtKeyId :: Lens' ListResourceTags Text

-- | Creates a value of <a>ListResourceTagsResponse</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>lrtrsTruncated</a> - A flag that indicates whether there are
--   more items in the list. When this value is true, the list in this
--   response is truncated. To get more items, pass the value of the
--   <tt>NextMarker</tt> element in this response to the <tt>Marker</tt>
--   parameter in a subsequent request.</li>
--   <li><a>lrtrsNextMarker</a> - When <tt>Truncated</tt> is true, this
--   element is present and contains the value to use for the
--   <tt>Marker</tt> parameter in a subsequent request. Do not assume or
--   infer any information from this value.</li>
--   <li><a>lrtrsTags</a> - A list of tags. Each tag consists of a tag key
--   and a tag value.</li>
--   <li><a>lrtrsResponseStatus</a> - -- | The response status code.</li>
--   </ul>
listResourceTagsResponse :: Int -> ListResourceTagsResponse

-- | <i>See:</i> <a>listResourceTagsResponse</a> smart constructor.
data ListResourceTagsResponse

-- | A flag that indicates whether there are more items in the list. When
--   this value is true, the list in this response is truncated. To get
--   more items, pass the value of the <tt>NextMarker</tt> element in this
--   response to the <tt>Marker</tt> parameter in a subsequent request.
lrtrsTruncated :: Lens' ListResourceTagsResponse (Maybe Bool)

-- | When <tt>Truncated</tt> is true, this element is present and contains
--   the value to use for the <tt>Marker</tt> parameter in a subsequent
--   request. Do not assume or infer any information from this value.
lrtrsNextMarker :: Lens' ListResourceTagsResponse (Maybe Text)

-- | A list of tags. Each tag consists of a tag key and a tag value.
lrtrsTags :: Lens' ListResourceTagsResponse [Tag]

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


-- | Gets a list of all customer master keys (CMKs) in the caller's AWS
--   account and region.
--   
--   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 in a subsequent request after
--   you receive a response with truncated results. Set it to the value of
--   <tt>NextMarker</tt> from the truncated response you just
--   received.</li>
--   <li><a>lkLimit</a> - Use this parameter to specify the maximum number
--   of items to return. When this value is present, AWS KMS does not
--   return more than the specified number of items, but it might return
--   fewer. 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 in a subsequent request after you receive a
--   response with truncated results. Set it to the value of
--   <tt>NextMarker</tt> from the truncated response you just received.
lkMarker :: Lens' ListKeys (Maybe Text)

-- | Use this parameter to specify the maximum number of items to return.
--   When this value is present, AWS KMS does not return more than the
--   specified number of items, but it might return fewer. 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. When this value is true, the list in this
--   response is truncated. To get more items, pass the value of the
--   <tt>NextMarker</tt> element in this response to the <tt>Marker</tt>
--   parameter in a subsequent request.</li>
--   <li><a>lkrsKeys</a> - A list of customer master keys (CMKs).</li>
--   <li><a>lkrsNextMarker</a> - When <tt>Truncated</tt> is true, this
--   element is present and contains the value to use for the
--   <tt>Marker</tt> parameter in a subsequent 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. When
--   this value is true, the list in this response is truncated. To get
--   more items, pass the value of the <tt>NextMarker</tt> element in this
--   response to the <tt>Marker</tt> parameter in a subsequent request.
lkrsTruncated :: Lens' ListKeysResponse (Maybe Bool)

-- | A list of customer master keys (CMKs).
lkrsKeys :: Lens' ListKeysResponse [KeyListEntry]

-- | When <tt>Truncated</tt> is true, this element is present and contains
--   the value to use for the <tt>Marker</tt> parameter in a subsequent
--   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.Types.AWSRequest Network.AWS.KMS.ListKeys.ListKeys
instance Control.DeepSeq.NFData Network.AWS.KMS.ListKeys.ListKeysResponse
instance Network.AWS.Pager.AWSPager 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


-- | Gets the names of the key policies that are attached to a customer
--   master key (CMK). This operation is designed to get policy names that
--   you can use in a <tt>GetKeyPolicy</tt> operation. However, the only
--   valid policy name is <tt>default</tt> . You cannot perform this
--   operation on a CMK in a different AWS account.
--   
--   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 in a subsequent request
--   after you receive a response with truncated results. Set it to the
--   value of <tt>NextMarker</tt> from the truncated response you just
--   received.</li>
--   <li><a>lkpLimit</a> - Use this parameter to specify the maximum number
--   of items to return. When this value is present, AWS KMS does not
--   return more than the specified number of items, but it might return
--   fewer. 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
--   (CMK). Specify the key ID or the Amazon Resource Name (ARN) of the
--   CMK. For example: * Key ID:
--   <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> .</li>
--   </ul>
listKeyPolicies :: Text -> ListKeyPolicies

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

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

-- | Use this parameter to specify the maximum number of items to return.
--   When this value is present, AWS KMS does not return more than the
--   specified number of items, but it might return fewer. 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 (CMK). Specify the key
--   ID or the Amazon Resource Name (ARN) of the CMK. For example: * Key
--   ID: <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> .
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 key policy names. Currently,
--   there is only one key policy per CMK and it is always named
--   <tt>default</tt> .</li>
--   <li><a>lkprsTruncated</a> - A flag that indicates whether there are
--   more items in the list. When this value is true, the list in this
--   response is truncated. To get more items, pass the value of the
--   <tt>NextMarker</tt> element in this response to the <tt>Marker</tt>
--   parameter in a subsequent request.</li>
--   <li><a>lkprsNextMarker</a> - When <tt>Truncated</tt> is true, this
--   element is present and contains the value to use for the
--   <tt>Marker</tt> parameter in a subsequent 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 key policy names. Currently, there is only one key policy
--   per CMK and it is always named <tt>default</tt> .
lkprsPolicyNames :: Lens' ListKeyPoliciesResponse [Text]

-- | A flag that indicates whether there are more items in the list. When
--   this value is true, the list in this response is truncated. To get
--   more items, pass the value of the <tt>NextMarker</tt> element in this
--   response to the <tt>Marker</tt> parameter in a subsequent request.
lkprsTruncated :: Lens' ListKeyPoliciesResponse (Maybe Bool)

-- | When <tt>Truncated</tt> is true, this element is present and contains
--   the value to use for the <tt>Marker</tt> parameter in a subsequent
--   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.Types.AWSRequest Network.AWS.KMS.ListKeyPolicies.ListKeyPolicies
instance Control.DeepSeq.NFData Network.AWS.KMS.ListKeyPolicies.ListKeyPoliciesResponse
instance Network.AWS.Pager.AWSPager 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


-- | Gets a list of all grants for the specified customer master key (CMK).
--   
--   To perform this operation on a CMK in a different AWS account, specify
--   the key ARN in the value of the KeyId parameter.
--   
--   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 in a subsequent request after
--   you receive a response with truncated results. Set it to the value of
--   <tt>NextMarker</tt> from the truncated response you just
--   received.</li>
--   <li><a>lgLimit</a> - Use this parameter to specify the maximum number
--   of items to return. When this value is present, AWS KMS does not
--   return more than the specified number of items, but it might return
--   fewer. 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
--   (CMK). Specify the key ID or the Amazon Resource Name (ARN) of the
--   CMK. To specify a CMK in a different AWS account, you must use the key
--   ARN. For example: * Key ID:
--   <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> .</li>
--   </ul>
listGrants :: Text -> ListGrants

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

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

-- | Use this parameter to specify the maximum number of items to return.
--   When this value is present, AWS KMS does not return more than the
--   specified number of items, but it might return fewer. 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 (CMK). Specify the key
--   ID or the Amazon Resource Name (ARN) of the CMK. To specify a CMK in a
--   different AWS account, you must use the key ARN. For example: * Key
--   ID: <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> .
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. When this value is true, the list in this response
--   is truncated. To get more items, pass the value of the
--   <tt>NextMarker</tt> element in this response to the <tt>Marker</tt>
--   parameter in a subsequent request.</li>
--   <li><a>lgGrants</a> - A list of grants.</li>
--   <li><a>lgNextMarker</a> - When <tt>Truncated</tt> is true, this
--   element is present and contains the value to use for the
--   <tt>Marker</tt> parameter in a subsequent 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. When
--   this value is true, the list in this response is truncated. To get
--   more items, pass the value of the <tt>NextMarker</tt> element in this
--   response to the <tt>Marker</tt> parameter in a subsequent request.
lgTruncated :: Lens' ListGrantsResponse (Maybe Bool)

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

-- | When <tt>Truncated</tt> is true, this element is present and contains
--   the value to use for the <tt>Marker</tt> parameter in a subsequent
--   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


-- | Gets a list of all aliases in the caller's AWS account and region. You
--   cannot list aliases in other accounts. For more information about
--   aliases, see <tt>CreateAlias</tt> .
--   
--   The response might include several aliases that do not have a
--   <tt>TargetKeyId</tt> field because they are not associated with a CMK.
--   These are predefined aliases that are reserved for CMKs managed by AWS
--   services. If an alias is not associated with a CMK, the alias does not
--   count against the <a>alias limit</a> for your 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 in a subsequent request after
--   you receive a response with truncated results. Set it to the value of
--   <tt>NextMarker</tt> from the truncated response you just
--   received.</li>
--   <li><a>laLimit</a> - Use this parameter to specify the maximum number
--   of items to return. When this value is present, AWS KMS does not
--   return more than the specified number of items, but it might return
--   fewer. 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 in a subsequent request after you receive a
--   response with truncated results. Set it to the value of
--   <tt>NextMarker</tt> from the truncated response you just received.
laMarker :: Lens' ListAliases (Maybe Text)

-- | Use this parameter to specify the maximum number of items to return.
--   When this value is present, AWS KMS does not return more than the
--   specified number of items, but it might return fewer. 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. When this value is true, the list in this
--   response is truncated. To get more items, pass the value of the
--   <tt>NextMarker</tt> element in this response to the <tt>Marker</tt>
--   parameter in a subsequent request.</li>
--   <li><a>larsAliases</a> - A list of aliases.</li>
--   <li><a>larsNextMarker</a> - When <tt>Truncated</tt> is true, this
--   element is present and contains the value to use for the
--   <tt>Marker</tt> parameter in a subsequent 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. When
--   this value is true, the list in this response is truncated. To get
--   more items, pass the value of the <tt>NextMarker</tt> element in this
--   response to the <tt>Marker</tt> parameter in a subsequent request.
larsTruncated :: Lens' ListAliasesResponse (Maybe Bool)

-- | A list of aliases.
larsAliases :: Lens' ListAliasesResponse [AliasListEntry]

-- | When <tt>Truncated</tt> is true, this element is present and contains
--   the value to use for the <tt>Marker</tt> parameter in a subsequent
--   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.Types.AWSRequest Network.AWS.KMS.ListAliases.ListAliases
instance Control.DeepSeq.NFData Network.AWS.KMS.ListAliases.ListAliasesResponse
instance Network.AWS.Pager.AWSPager 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


-- | Imports key material into an existing AWS KMS customer master key
--   (CMK) that was created without key material. You cannot perform this
--   operation on a CMK in a different AWS account. For more information
--   about creating CMKs with no key material and then importing key
--   material, see <a>Importing Key Material</a> in the <i>AWS Key
--   Management Service Developer Guide</i> .
--   
--   Before using this operation, call <tt>GetParametersForImport</tt> .
--   Its response includes a public key and an import token. Use the public
--   key to encrypt the key material. Then, submit the import token from
--   the same <tt>GetParametersForImport</tt> response.
--   
--   When calling this operation, you must specify the following values:
--   
--   <ul>
--   <li>The key ID or key ARN of a CMK with no key material. Its
--   <tt>Origin</tt> must be <tt>EXTERNAL</tt> .</li>
--   </ul>
--   
--   To create a CMK with no key material, call <tt>CreateKey</tt> and set
--   the value of its <tt>Origin</tt> parameter to <tt>EXTERNAL</tt> . To
--   get the <tt>Origin</tt> of a CMK, call <a>DescribeKey</a> .)
--   
--   <ul>
--   <li>The encrypted key material. To get the public key to encrypt the
--   key material, call <tt>GetParametersForImport</tt> .</li>
--   <li>The import token that <tt>GetParametersForImport</tt> returned.
--   This token and the public key used to encrypt the key material must
--   have come from the same response.</li>
--   <li>Whether the key material expires and if so, when. If you set an
--   expiration date, you can change it only by reimporting the same key
--   material and specifying a new expiration date. If the key material
--   expires, AWS KMS deletes the key material and the CMK becomes
--   unusable. To use the CMK again, you must reimport the same key
--   material.</li>
--   </ul>
--   
--   When this operation is successful, the CMK's key state changes from
--   <tt>PendingImport</tt> 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> .
--   Specify the key ID or the Amazon Resource Name (ARN) of the CMK. For
--   example: * Key ID: <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key
--   ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> .</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> . Specify the key ID or the
--   Amazon Resource Name (ARN) of the CMK. For example: * Key ID:
--   <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> .
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 Control.DeepSeq.NFData Network.AWS.KMS.ImportKeyMaterial.ImportKeyMaterialResponse
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


-- | 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. You cannot perform this operation on a CMK in a different
--   AWS account.
--   
--   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. When they expire, they cannot be used
--   for a subsequent <tt>ImportKeyMaterial</tt> request. To get 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> . Specify the key ID or the Amazon Resource Name
--   (ARN) of the CMK. For example: * Key ID:
--   <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> .</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> . Specify the key ID
--   or the Amazon Resource Name (ARN) of the CMK. For example: * Key ID:
--   <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> .
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 get 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 get 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.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 Control.DeepSeq.NFData Network.AWS.KMS.GetParametersForImport.GetParametersForImportResponse
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


-- | Gets a Boolean value that indicates whether automatic rotation of the
--   key material is enabled for the specified customer master key (CMK).
--   
--   To perform this operation on a CMK in a different AWS account, specify
--   the key ARN in the value of the KeyId parameter.
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
--   (CMK). Specify the key ID or the Amazon Resource Name (ARN) of the
--   CMK. To specify a CMK in a different AWS account, you must use the key
--   ARN. For example: * Key ID:
--   <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> .</li>
--   </ul>
getKeyRotationStatus :: Text -> GetKeyRotationStatus

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

-- | A unique identifier for the customer master key (CMK). Specify the key
--   ID or the Amazon Resource Name (ARN) of the CMK. To specify a CMK in a
--   different AWS account, you must use the key ARN. For example: * Key
--   ID: <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> .
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 Control.DeepSeq.NFData Network.AWS.KMS.GetKeyRotationStatus.GetKeyRotationStatusResponse
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


-- | Gets a key policy attached to the specified customer master key (CMK).
--   You cannot perform this operation on a CMK in a different AWS account.
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
--   (CMK). Specify the key ID or the Amazon Resource Name (ARN) of the
--   CMK. For example: * Key ID:
--   <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> .</li>
--   <li><a>gkpPolicyName</a> - Specifies the name of the key policy. The
--   only valid name is <tt>default</tt> . To get the names of key
--   policies, use <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 (CMK). Specify the key
--   ID or the Amazon Resource Name (ARN) of the CMK. For example: * Key
--   ID: <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> .
gkpKeyId :: Lens' GetKeyPolicy Text

-- | Specifies the name of the key policy. The only valid name is
--   <tt>default</tt> . To get the names of key policies, use
--   <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 key 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 key 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 Control.DeepSeq.NFData Network.AWS.KMS.GetKeyPolicy.GetKeyPolicyResponse
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


-- | Returns a random byte string that is cryptographically secure.
--   
--   For more information about entropy and random number generation, see
--   the <a>AWS Key Management Service Cryptographic Details</a>
--   whitepaper.
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 random byte string. When you use the
--   HTTP API or the AWS 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>grrsResponseStatus</a> - -- | The response status code.</li>
--   </ul>
generateRandomResponse :: Int -> GenerateRandomResponse

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

-- | The random byte string. When you use the HTTP API or the AWS 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.
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.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 Control.DeepSeq.NFData Network.AWS.KMS.GenerateRandom.GenerateRandomResponse
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


-- | 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.
--   
--   To perform this operation on a CMK in a different AWS account, specify
--   the key ARN or alias ARN in the value of the KeyId parameter.
--   
--   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 customer master key
--   (CMK) under which to generate and encrypt the data encryption key. To
--   specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name,
--   or alias ARN. When using an alias name, prefix it with "alias<i>". To
--   specify a CMK in a different AWS account, you must use the key ARN or
--   alias ARN. For example: * Key ID:
--   <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   @arn:aws:kms:us-east-2:111122223333:key</i>1234abcd-12ab-34cd-56ef-1234567890ab<tt>
--   * Alias name: </tt>alias<i>ExampleAlias<tt> * Alias ARN:
--   </tt>arn:aws:kms:us-east-2:111122223333:alias</i>ExampleAlias@ To get
--   the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> . To get the alias name and alias ARN, use
--   <tt>ListAliases</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 customer master key (CMK) under which to
--   generate and encrypt the data encryption key. To specify a CMK, use
--   its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. When
--   using an alias name, prefix it with "alias<i>". To specify a CMK in a
--   different AWS account, you must use the key ARN or alias ARN. For
--   example: * Key ID: <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key
--   ARN:
--   @arn:aws:kms:us-east-2:111122223333:key</i>1234abcd-12ab-34cd-56ef-1234567890ab<tt>
--   * Alias name: </tt>alias<i>ExampleAlias<tt> * Alias ARN:
--   </tt>arn:aws:kms:us-east-2:111122223333:alias</i>ExampleAlias@ To get
--   the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> . To get the alias name and alias ARN, use
--   <tt>ListAliases</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.
--   When you use the HTTP API or the AWS 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>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. When you use the HTTP API or the
--   AWS 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.
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 Control.DeepSeq.NFData Network.AWS.KMS.GenerateDataKeyWithoutPlaintext.GenerateDataKeyWithoutPlaintextResponse
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


-- | 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> . To perform this operation on a CMK in a different
--   AWS account, specify the key ARN or alias ARN in the value of the
--   KeyId parameter.
--   
--   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 get 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 a random byte
--   string that is cryptographically secure, 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. To specify a CMK, use
--   its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. When
--   using an alias name, prefix it with "alias<i>". To specify a CMK in a
--   different AWS account, you must use the key ARN or alias ARN. For
--   example: * Key ID: <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key
--   ARN:
--   @arn:aws:kms:us-east-2:111122223333:key</i>1234abcd-12ab-34cd-56ef-1234567890ab<tt>
--   * Alias name: </tt>alias<i>ExampleAlias<tt> * Alias ARN:
--   </tt>arn:aws:kms:us-east-2:111122223333:alias</i>ExampleAlias@ To get
--   the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> . To get the alias name and alias ARN, use
--   <tt>ListAliases</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. To specify a CMK, use its key ID, Amazon Resource Name
--   (ARN), alias name, or alias ARN. When using an alias name, prefix it
--   with "alias<i>". To specify a CMK in a different AWS account, you must
--   use the key ARN or alias ARN. For example: * Key ID:
--   <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   @arn:aws:kms:us-east-2:111122223333:key</i>1234abcd-12ab-34cd-56ef-1234567890ab<tt>
--   * Alias name: </tt>alias<i>ExampleAlias<tt> * Alias ARN:
--   </tt>arn:aws:kms:us-east-2:111122223333:alias</i>ExampleAlias@ To get
--   the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> . To get the alias name and alias ARN, use
--   <tt>ListAliases</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. When you use the
--   HTTP API or the AWS CLI, the value is Base64-encoded. Otherwise, it is
--   not encoded. 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.
--   When you use the HTTP API or the AWS 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>
--   </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. When you use the HTTP API or the AWS CLI, the
--   value is Base64-encoded. Otherwise, it is not encoded. 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. When you use the HTTP API or the
--   AWS 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.
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.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 Control.DeepSeq.NFData Network.AWS.KMS.GenerateDataKey.GenerateDataKeyResponse
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


-- | Encrypts plaintext into ciphertext by using a customer master key
--   (CMK). The <tt>Encrypt</tt> operation has two primary use cases:
--   
--   <ul>
--   <li>You can encrypt up to 4 kilobytes (4096 bytes) of arbitrary data
--   such as an RSA key, a database password, or other sensitive
--   information.</li>
--   <li>To move encrypted data from one AWS region to another, you can use
--   this operation 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>
--   
--   To perform this operation on a CMK in a different AWS account, specify
--   the key ARN or alias ARN in the value of the KeyId parameter.
--   
--   Unless you are moving encrypted data from one region to another, you
--   don't use this operation to encrypt a generated data key within a
--   region. To get data keys that are already encrypted, call the
--   <a>GenerateDataKey</a> or <a>GenerateDataKeyWithoutPlaintext</a>
--   operation. Data keys don't need to be encrypted again by calling
--   <tt>Encrypt</tt> .
--   
--   To encrypt data locally in your application, use the
--   <a>GenerateDataKey</a> operation to return a plaintext data encryption
--   key and a copy of the key encrypted under the 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
--   (CMK). To specify a CMK, use its key ID, Amazon Resource Name (ARN),
--   alias name, or alias ARN. When using an alias name, prefix it with
--   "alias<i>". To specify a CMK in a different AWS account, you must use
--   the key ARN or alias ARN. For example: * Key ID:
--   <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   @arn:aws:kms:us-east-2:111122223333:key</i>1234abcd-12ab-34cd-56ef-1234567890ab<tt>
--   * Alias name: </tt>alias<i>ExampleAlias<tt> * Alias ARN:
--   </tt>arn:aws:kms:us-east-2:111122223333:alias</i>ExampleAlias@ To get
--   the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> . To get the alias name and alias ARN, use
--   <tt>ListAliases</tt> .</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 (CMK). To specify a
--   CMK, use its key ID, Amazon Resource Name (ARN), alias name, or alias
--   ARN. When using an alias name, prefix it with "alias<i>". To specify a
--   CMK in a different AWS account, you must use the key ARN or alias ARN.
--   For example: * Key ID: <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> *
--   Key ARN:
--   @arn:aws:kms:us-east-2:111122223333:key</i>1234abcd-12ab-34cd-56ef-1234567890ab<tt>
--   * Alias name: </tt>alias<i>ExampleAlias<tt> * Alias ARN:
--   </tt>arn:aws:kms:us-east-2:111122223333:alias</i>ExampleAlias@ To get
--   the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> . To get the alias name and alias ARN, use
--   <tt>ListAliases</tt> .
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. When you use
--   the HTTP API or the AWS 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. When you use the HTTP API or the AWS 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.Classes.Eq Network.AWS.KMS.Encrypt.Encrypt
instance Network.AWS.Types.AWSRequest Network.AWS.KMS.Encrypt.Encrypt
instance Control.DeepSeq.NFData Network.AWS.KMS.Encrypt.EncryptResponse
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


-- | Enables automatic rotation of the key material for the specified
--   customer master key (CMK). You cannot perform this operation on a CMK
--   in a different AWS account.
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
--   (CMK). Specify the key ID or the Amazon Resource Name (ARN) of the
--   CMK. For example: * Key ID:
--   <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> .</li>
--   </ul>
enableKeyRotation :: Text -> EnableKeyRotation

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

-- | A unique identifier for the customer master key (CMK). Specify the key
--   ID or the Amazon Resource Name (ARN) of the CMK. For example: * Key
--   ID: <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> .
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 Control.DeepSeq.NFData Network.AWS.KMS.EnableKeyRotation.EnableKeyRotationResponse
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


-- | Sets the state of a customer master key (CMK) to enabled, thereby
--   permitting its use for cryptographic operations. You cannot perform
--   this operation on a CMK in a different AWS account.
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
--   (CMK). Specify the key ID or the Amazon Resource Name (ARN) of the
--   CMK. For example: * Key ID:
--   <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> .</li>
--   </ul>
enableKey :: Text -> EnableKey

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

-- | A unique identifier for the customer master key (CMK). Specify the key
--   ID or the Amazon Resource Name (ARN) of the CMK. For example: * Key
--   ID: <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> .
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 Control.DeepSeq.NFData Network.AWS.KMS.EnableKey.EnableKeyResponse
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


-- | Disables automatic rotation of the key material for the specified
--   customer master key (CMK). You cannot perform this operation on a CMK
--   in a different AWS account.
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
--   (CMK). Specify the key ID or the Amazon Resource Name (ARN) of the
--   CMK. For example: * Key ID:
--   <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> .</li>
--   </ul>
disableKeyRotation :: Text -> DisableKeyRotation

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

-- | A unique identifier for the customer master key (CMK). Specify the key
--   ID or the Amazon Resource Name (ARN) of the CMK. For example: * Key
--   ID: <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> .
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 Control.DeepSeq.NFData Network.AWS.KMS.DisableKeyRotation.DisableKeyRotationResponse
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


-- | Sets the state of a customer master key (CMK) to disabled, thereby
--   preventing its use for cryptographic operations. You cannot perform
--   this operation on a CMK in a different AWS account.
--   
--   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 customer master key
--   (CMK). Specify the key ID or the Amazon Resource Name (ARN) of the
--   CMK. For example: * Key ID:
--   <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> .</li>
--   </ul>
disableKey :: Text -> DisableKey

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

-- | A unique identifier for the customer master key (CMK). Specify the key
--   ID or the Amazon Resource Name (ARN) of the CMK. For example: * Key
--   ID: <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> .
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 Control.DeepSeq.NFData Network.AWS.KMS.DisableKey.DisableKeyResponse
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


-- | Provides detailed information about the specified customer master key
--   (CMK).
--   
--   To perform this operation on a CMK in a different AWS account, specify
--   the key ARN or alias ARN in the value of the KeyId parameter.
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
--   (CMK). To specify a CMK, use its key ID, Amazon Resource Name (ARN),
--   alias name, or alias ARN. When using an alias name, prefix it with
--   "alias<i>". To specify a CMK in a different AWS account, you must use
--   the key ARN or alias ARN. For example: * Key ID:
--   <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   @arn:aws:kms:us-east-2:111122223333:key</i>1234abcd-12ab-34cd-56ef-1234567890ab<tt>
--   * Alias name: </tt>alias<i>ExampleAlias<tt> * Alias ARN:
--   </tt>arn:aws:kms:us-east-2:111122223333:alias</i>ExampleAlias@ To get
--   the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> . To get the alias name and alias ARN, use
--   <tt>ListAliases</tt> .</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 (CMK). To specify a
--   CMK, use its key ID, Amazon Resource Name (ARN), alias name, or alias
--   ARN. When using an alias name, prefix it with "alias<i>". To specify a
--   CMK in a different AWS account, you must use the key ARN or alias ARN.
--   For example: * Key ID: <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> *
--   Key ARN:
--   @arn:aws:kms:us-east-2:111122223333:key</i>1234abcd-12ab-34cd-56ef-1234567890ab<tt>
--   * Alias name: </tt>alias<i>ExampleAlias<tt> * Alias ARN:
--   </tt>arn:aws:kms:us-east-2:111122223333:alias</i>ExampleAlias@ To get
--   the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> . To get the alias name and alias ARN, use
--   <tt>ListAliases</tt> .
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 Control.DeepSeq.NFData Network.AWS.KMS.DescribeKey.DescribeKeyResponse
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


-- | Deletes key material that you previously imported. This operation
--   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> . You cannot perform this operation on a CMK in a
--   different AWS account.
--   
--   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> . Specify
--   the key ID or the Amazon Resource Name (ARN) of the CMK. For example:
--   * Key ID: <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> .</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> . Specify the key ID or the
--   Amazon Resource Name (ARN) of the CMK. For example: * Key ID:
--   <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> .
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 Control.DeepSeq.NFData Network.AWS.KMS.DeleteImportedKeyMaterial.DeleteImportedKeyMaterialResponse
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


-- | Deletes the specified alias. You cannot perform this operation on an
--   alias in a different AWS account.
--   
--   Because an alias is not a property of a CMK, you can delete and change
--   the aliases of a CMK without affecting the CMK. Also, aliases do not
--   appear in the response from the <a>DescribeKey</a> operation. To get
--   the aliases of all CMKs, use the <tt>ListAliases</tt> operation.
--   
--   Each CMK can have multiple aliases. To change the alias of a CMK, use
--   <a>DeleteAlias</a> to delete the current alias and
--   <tt>CreateAlias</tt> to create a new alias. To associate an existing
--   alias with a different customer master key (CMK), 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 Control.DeepSeq.NFData Network.AWS.KMS.DeleteAlias.DeleteAliasResponse
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


-- | Decrypts ciphertext. Ciphertext is plaintext that has been previously
--   encrypted by using any of the following operations:
--   
--   <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. When you use the
--   HTTP API or the AWS 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>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. When you use the HTTP API or the AWS 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.
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.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 Control.DeepSeq.NFData Network.AWS.KMS.Decrypt.DecryptResponse
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


-- | Creates a customer master key (CMK) in the caller's AWS account.
--   
--   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>
--   
--   You cannot use this operation to create a CMK in a different AWS
--   account.
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 risk 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 that is
--   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
--   provide a key policy, it must meet the following criteria: * If you
--   don't set <tt>BypassPolicyLockoutSafetyCheck</tt> to true, the key
--   policy must allow the principal that is making the <tt>CreateKey</tt>
--   request to make a subsequent <tt>PutKeyPolicy</tt> request on the CMK.
--   This reduces the risk that the CMK becomes unmanageable. For more
--   information, refer to the scenario in the <a>Default Key Policy</a>
--   section of the <i>AWS Key Management Service Developer Guide</i> . *
--   Each statement in the key policy must contain one or more principals.
--   The principals 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 including the new
--   principal in a key policy because the new principal might not be
--   immediately visible to AWS KMS. For more information, see <a>Changes
--   that I make are not always immediately visible</a> in the <i>AWS
--   Identity and Access Management User Guide</i> . If you do not provide
--   a key 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 key policy size limit is
--   32 kilobytes (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>
--   <li><a>ckTags</a> - One or more tags. Each tag consists of a tag key
--   and a tag value. Tag keys and tag values are both required, but tag
--   values can be empty (null) strings. Use this parameter to tag the CMK
--   when it is created. Alternately, you can omit this parameter and
--   instead tag the CMK after it is created using <tt>TagResource</tt>
--   .</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 risk
--   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 that is
--   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 provide a key policy, it
--   must meet the following criteria: * If you don't set
--   <tt>BypassPolicyLockoutSafetyCheck</tt> to true, the key policy must
--   allow the principal that is making the <tt>CreateKey</tt> request to
--   make a subsequent <tt>PutKeyPolicy</tt> request on the CMK. This
--   reduces the risk that the CMK becomes unmanageable. For more
--   information, refer to the scenario in the <a>Default Key Policy</a>
--   section of the <i>AWS Key Management Service Developer Guide</i> . *
--   Each statement in the key policy must contain one or more principals.
--   The principals 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 including the new
--   principal in a key policy because the new principal might not be
--   immediately visible to AWS KMS. For more information, see <a>Changes
--   that I make are not always immediately visible</a> in the <i>AWS
--   Identity and Access Management User Guide</i> . If you do not provide
--   a key 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 key policy size limit is
--   32 kilobytes (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)

-- | One or more tags. Each tag consists of a tag key and a tag value. Tag
--   keys and tag values are both required, but tag values can be empty
--   (null) strings. Use this parameter to tag the CMK when it is created.
--   Alternately, you can omit this parameter and instead tag the CMK after
--   it is created using <tt>TagResource</tt> .
ckTags :: Lens' CreateKey [Tag]

-- | 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 Control.DeepSeq.NFData Network.AWS.KMS.CreateKey.CreateKeyResponse
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


-- | Adds a grant to a customer master key (CMK). The grant specifies who
--   can use the CMK and under what conditions. When setting permissions,
--   grants are an alternative to key policies.
--   
--   To perform this operation on a CMK in a different AWS account, specify
--   the key ARN in the value of the KeyId parameter. 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> - A structure that you can use to allow
--   certain operations in the grant only when the desired 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> .</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>cgKeyId</a> - The unique identifier for the customer master key
--   (CMK) that the grant applies to. Specify the key ID or the Amazon
--   Resource Name (ARN) of the CMK. To specify a CMK in a different AWS
--   account, you must use the key ARN. For example: * Key ID:
--   <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> .</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, IAM roles, 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>cgOperations</a> - A list of operations that the grant
--   permits.</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]

-- | A structure that you can use to allow certain operations in the grant
--   only when the desired 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> .
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)

-- | The unique identifier for the customer master key (CMK) that the grant
--   applies to. Specify the key ID or the Amazon Resource Name (ARN) of
--   the CMK. To specify a CMK in a different AWS account, you must use the
--   key ARN. For example: * Key ID:
--   <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> .
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, IAM roles, 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

-- | A list of operations that the grant permits.
cgOperations :: Lens' CreateGrant [GrantOperation]

-- | 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 Control.DeepSeq.NFData Network.AWS.KMS.CreateGrant.CreateGrantResponse
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


-- | Creates a display name for a customer master key (CMK). You can use an
--   alias to identify a CMK in selected operations, such as <a>Encrypt</a>
--   and <a>GenerateDataKey</a> .
--   
--   Each CMK can have multiple aliases, but each alias points to only one
--   CMK. The alias name must be unique in the AWS account and region. To
--   simplify code that runs in multiple regions, use the same alias name,
--   but point it to a different CMK in each region.
--   
--   Because an alias is not a property of a CMK, you can delete and change
--   the aliases of a CMK without affecting the CMK. Also, aliases do not
--   appear in the response from the <a>DescribeKey</a> operation. To get
--   the aliases of all CMKs, use the <tt>ListAliases</tt> operation.
--   
--   An alias must start with the word <tt>alias</tt> followed by a forward
--   slash (<tt>alias/</tt> ). The alias name can contain only alphanumeric
--   characters, forward slashes (/), underscores (_), and dashes (-).
--   Alias names cannot begin with <tt>aws</tt> ; that alias name prefix is
--   reserved by Amazon Web Services (AWS).
--   
--   The alias and the CMK it is mapped to must be in the same AWS account
--   and the same region. You cannot perform this operation on an alias in
--   a different AWS account.
--   
--   To map an existing alias to a different CMK, 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> - Identifies the CMK for which you are
--   creating the alias. This value cannot be an alias. Specify the key ID
--   or the Amazon Resource Name (ARN) of the CMK. For example: * Key ID:
--   <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> .</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

-- | Identifies the CMK for which you are creating the alias. This value
--   cannot be an alias. Specify the key ID or the Amazon Resource Name
--   (ARN) of the CMK. For example: * Key ID:
--   <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> .
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 Control.DeepSeq.NFData Network.AWS.KMS.CreateAlias.CreateAliasResponse
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


-- | 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> . You cannot perform
--   this operation on a CMK in a different AWS account.
--   
--   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. Specify the key ID or the
--   Amazon Resource Name (ARN) of the CMK. For example: * Key ID:
--   <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a 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. Specify the key ID or the Amazon Resource Name (ARN)
--   of the CMK. For example: * Key ID:
--   <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a 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 Control.DeepSeq.NFData Network.AWS.KMS.CancelKeyDeletion.CancelKeyDeletionResponse
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


-- | Removes the specified tag or tags from the specified customer master
--   key (CMK). You cannot perform this operation on a CMK in a different
--   AWS account.
--   
--   To remove a tag, you specify the tag key for each tag to remove. You
--   do not specify the tag value. To overwrite the tag value for an
--   existing tag, use <tt>TagResource</tt> .
module Network.AWS.KMS.UntagResource

-- | Creates a value of <a>UntagResource</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>urKeyId</a> - A unique identifier for the CMK from which you
--   are removing tags. Specify the key ID or the Amazon Resource Name
--   (ARN) of the CMK. For example: * Key ID:
--   <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> .</li>
--   <li><a>urTagKeys</a> - One or more tag keys. Specify only the tag
--   keys, not the tag values.</li>
--   </ul>
untagResource :: Text -> UntagResource

-- | <i>See:</i> <a>untagResource</a> smart constructor.
data UntagResource

-- | A unique identifier for the CMK from which you are removing tags.
--   Specify the key ID or the Amazon Resource Name (ARN) of the CMK. For
--   example: * Key ID: <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key
--   ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> .
urKeyId :: Lens' UntagResource Text

-- | One or more tag keys. Specify only the tag keys, not the tag values.
urTagKeys :: Lens' UntagResource [Text]

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

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


-- | Associates an existing alias with a different customer master key
--   (CMK). Each CMK can have multiple aliases, but the aliases must be
--   unique within the account and region. You cannot perform this
--   operation on an alias in a different AWS account.
--   
--   This operation works only on existing aliases. To change the alias of
--   a CMK to a new value, use <tt>CreateAlias</tt> to create a new alias
--   and <tt>DeleteAlias</tt> to delete the old alias.
--   
--   Because an alias is not a property of a CMK, you can create, update,
--   and delete the aliases of a CMK without affecting the CMK. Also,
--   aliases do not appear in the response from the <a>DescribeKey</a>
--   operation. To get the aliases of all CMKs in the account, use the
--   <tt>ListAliases</tt> operation.
--   
--   An alias name can contain only alphanumeric characters, forward
--   slashes (<i>), underscores (_), and dashes (-). An alias must start
--   with the word <tt>alias</tt> followed by a forward slash
--   (@alias</i><tt> ). The alias name can contain only alphanumeric
--   characters, forward slashes (/), underscores (_), and dashes (-).
--   Alias names cannot begin with </tt>aws@ ; that alias name prefix is
--   reserved by Amazon Web Services (AWS).
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. Specify the key ID or the Amazon
--   Resource Name (ARN) of the CMK. For example: * Key ID:
--   <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> . To verify that the alias is mapped to the correct
--   CMK, use <tt>ListAliases</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. Specify the key ID or the Amazon Resource Name (ARN) of the
--   CMK. For example: * Key ID:
--   <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> . To verify that the alias is mapped to the correct
--   CMK, use <tt>ListAliases</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 Control.DeepSeq.NFData Network.AWS.KMS.UpdateAlias.UpdateAliasResponse
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


-- | Updates the description of a customer master key (CMK). To see the
--   decription of a CMK, use <a>DescribeKey</a> .
--   
--   You cannot perform this operation on a CMK in a different AWS account.
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
--   (CMK). Specify the key ID or the Amazon Resource Name (ARN) of the
--   CMK. For example: * Key ID:
--   <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> .</li>
--   <li><a>ukdDescription</a> - New description for the CMK.</li>
--   </ul>
updateKeyDescription :: Text -> Text -> UpdateKeyDescription

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

-- | A unique identifier for the customer master key (CMK). Specify the key
--   ID or the Amazon Resource Name (ARN) of the CMK. For example: * Key
--   ID: <tt>1234abcd-12ab-34cd-56ef-1234567890ab</tt> * Key ARN:
--   <tt>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</tt>
--   To get the key ID and key ARN for a CMK, use <tt>ListKeys</tt> or
--   <a>DescribeKey</a> .
ukdKeyId :: Lens' UpdateKeyDescription Text

-- | New description for the CMK.
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 Control.DeepSeq.NFData Network.AWS.KMS.UpdateKeyDescription.UpdateKeyDescriptionResponse
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


module Network.AWS.KMS.Waiters


-- | <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 one or more tags are not valid.
_TagException :: 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 get 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, or
--   additional authenticated data incorporated into the ciphertext, such
--   as the encryption context, is corrupted, missing, or 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 KeyManagerType
AWS :: KeyManagerType
Customer :: KeyManagerType
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
--   referred 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 referred 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 that you can use to allow certain operations in the grant
--   only when the desired 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> .
--   
--   Grant constraints apply only to operations that accept encryption
--   context as input. For example, the <tt><a>DescribeKey</a> </tt>
--   operation does not accept encryption context as input. A grant that
--   allows the <tt>DescribeKey</tt> operation does so regardless of the
--   grant constraints. In constrast, the <tt><a>Encrypt</a> </tt>
--   operation accepts encryption context as input. A grant that allows the
--   <tt>Encrypt</tt> operation does so only when the encryption context of
--   the <tt>Encrypt</tt> operation satisfies the grant constraints.
--   
--   <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> - A list of key-value pairs that
--   must be present in the encryption context of certain subsequent
--   operations that the grant allows. When certain subsequent operations
--   allowed by the grant include encryption context that matches this
--   list, the grant allows the operation. Otherwise, the grant does not
--   allow the operation.</li>
--   <li><a>gcEncryptionContextSubset</a> - A list of key-value pairs, all
--   of which must be present in the encryption context of certain
--   subsequent operations that the grant allows. When certain subsequent
--   operations allowed by the grant include encryption context that
--   matches this list or is a superset of this list, the grant allows the
--   operation. Otherwise, the grant does not allow the operation.</li>
--   </ul>
grantConstraints :: GrantConstraints

-- | A list of key-value pairs that must be present in the encryption
--   context of certain subsequent operations that the grant allows. When
--   certain subsequent operations allowed by the grant include encryption
--   context that matches this list, the grant allows the operation.
--   Otherwise, the grant does not allow the operation.
gcEncryptionContextEquals :: Lens' GrantConstraints (HashMap Text Text)

-- | A list of key-value pairs, all of which must be present in the
--   encryption context of certain subsequent operations that the grant
--   allows. When certain subsequent operations allowed by the grant
--   include encryption context that matches this list or is a superset of
--   this list, the grant allows the operation. Otherwise, the grant does
--   not allow the operation.
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> - A list of key-value pairs that must be
--   present in the encryption context of certain subsequent operations
--   that the grant allows.</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)

-- | A list of key-value pairs that must be present in the encryption
--   context of certain subsequent operations that the grant allows.
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>kmKeyManager</a> - The CMK's manager. CMKs are either
--   customer-managed or AWS-managed. For more information about the
--   difference, see <a>Customer Master Keys</a> in the <i>AWS Key
--   Management Service Developer Guide</i> .</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)

-- | The CMK's manager. CMKs are either customer-managed or AWS-managed.
--   For more information about the difference, see <a>Customer Master
--   Keys</a> in the <i>AWS Key Management Service Developer Guide</i> .
kmKeyManager :: Lens' KeyMetadata (Maybe KeyManagerType)

-- | 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. When this value is true, the list in this response
--   is truncated. To get more items, pass the value of the
--   <tt>NextMarker</tt> element in this response to the <tt>Marker</tt>
--   parameter in a subsequent request.</li>
--   <li><a>lgGrants</a> - A list of grants.</li>
--   <li><a>lgNextMarker</a> - When <tt>Truncated</tt> is true, this
--   element is present and contains the value to use for the
--   <tt>Marker</tt> parameter in a subsequent request.</li>
--   </ul>
listGrantsResponse :: ListGrantsResponse

-- | A flag that indicates whether there are more items in the list. When
--   this value is true, the list in this response is truncated. To get
--   more items, pass the value of the <tt>NextMarker</tt> element in this
--   response to the <tt>Marker</tt> parameter in a subsequent request.
lgTruncated :: Lens' ListGrantsResponse (Maybe Bool)

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

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

-- | A key-value pair. A tag consists of a tag key and a tag value. Tag
--   keys and tag values are both required, but tag values can be empty
--   (null) strings.
--   
--   For information about the rules that apply to tag keys and tag values,
--   see <a>User-Defined Tag Restrictions</a> in the <i>AWS Billing and
--   Cost Management User Guide</i> .
--   
--   <i>See:</i> <a>tag</a> smart constructor.
data Tag

-- | Creates a value of <a>Tag</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>tagTagKey</a> - The key of the tag.</li>
--   <li><a>tagTagValue</a> - The value of the tag.</li>
--   </ul>
tag :: Text -> Text -> Tag

-- | The key of the tag.
tagTagKey :: Lens' Tag Text

-- | The value of the tag.
tagTagValue :: Lens' Tag Text
