packages feed

amazonka-kms 0.3.6 → 1.0.0

raw patch · 37 files changed

+4617/−3115 lines, 37 filesdep +amazonka-kmsdep +amazonka-testdep +bytestringdep ~amazonka-coredep ~basePVP ok

version bump matches the API change (PVP)

Dependencies added: amazonka-kms, amazonka-test, bytestring, lens, tasty, tasty-hunit, text, time, unordered-containers

Dependency ranges changed: amazonka-core, base

API changes (from Hackage documentation)

- Network.AWS.KMS.CreateAlias: instance Ord CreateAlias
- Network.AWS.KMS.CreateAlias: instance Ord CreateAliasResponse
- Network.AWS.KMS.CreateGrant: cgrGrantId :: Lens' CreateGrantResponse (Maybe Text)
- Network.AWS.KMS.CreateGrant: cgrGrantToken :: Lens' CreateGrantResponse (Maybe Text)
- Network.AWS.KMS.CreateGrant: instance FromJSON CreateGrantResponse
- Network.AWS.KMS.CreateGrant: instance Ord CreateGrantResponse
- Network.AWS.KMS.CreateKey: ckrKeyMetadata :: Lens' CreateKeyResponse (Maybe KeyMetadata)
- Network.AWS.KMS.CreateKey: instance FromJSON CreateKeyResponse
- Network.AWS.KMS.Decrypt: drKeyId :: Lens' DecryptResponse (Maybe Text)
- Network.AWS.KMS.Decrypt: drPlaintext :: Lens' DecryptResponse (Maybe Base64)
- Network.AWS.KMS.Decrypt: instance FromJSON DecryptResponse
- Network.AWS.KMS.DeleteAlias: instance IsString DeleteAlias
- Network.AWS.KMS.DeleteAlias: instance Monoid DeleteAlias
- Network.AWS.KMS.DeleteAlias: instance Ord DeleteAlias
- Network.AWS.KMS.DeleteAlias: instance Ord DeleteAliasResponse
- Network.AWS.KMS.DescribeKey: dk1KeyId :: Lens' DescribeKey Text
- Network.AWS.KMS.DescribeKey: dkrKeyMetadata :: Lens' DescribeKeyResponse (Maybe KeyMetadata)
- Network.AWS.KMS.DescribeKey: instance FromJSON DescribeKeyResponse
- Network.AWS.KMS.DescribeKey: instance IsString DescribeKey
- Network.AWS.KMS.DescribeKey: instance Monoid DescribeKey
- Network.AWS.KMS.DescribeKey: instance Ord DescribeKey
- Network.AWS.KMS.DisableKey: instance IsString DisableKey
- Network.AWS.KMS.DisableKey: instance Monoid DisableKey
- Network.AWS.KMS.DisableKey: instance Ord DisableKey
- Network.AWS.KMS.DisableKey: instance Ord DisableKeyResponse
- Network.AWS.KMS.DisableKeyRotation: instance IsString DisableKeyRotation
- Network.AWS.KMS.DisableKeyRotation: instance Monoid DisableKeyRotation
- Network.AWS.KMS.DisableKeyRotation: instance Ord DisableKeyRotation
- Network.AWS.KMS.DisableKeyRotation: instance Ord DisableKeyRotationResponse
- Network.AWS.KMS.EnableKey: instance IsString EnableKey
- Network.AWS.KMS.EnableKey: instance Monoid EnableKey
- Network.AWS.KMS.EnableKey: instance Ord EnableKey
- Network.AWS.KMS.EnableKey: instance Ord EnableKeyResponse
- Network.AWS.KMS.EnableKeyRotation: instance IsString EnableKeyRotation
- Network.AWS.KMS.EnableKeyRotation: instance Monoid EnableKeyRotation
- Network.AWS.KMS.EnableKeyRotation: instance Ord EnableKeyRotation
- Network.AWS.KMS.EnableKeyRotation: instance Ord EnableKeyRotationResponse
- Network.AWS.KMS.Encrypt: erCiphertextBlob :: Lens' EncryptResponse (Maybe Base64)
- Network.AWS.KMS.Encrypt: erKeyId :: Lens' EncryptResponse (Maybe Text)
- Network.AWS.KMS.Encrypt: instance FromJSON EncryptResponse
- Network.AWS.KMS.GenerateDataKey: gdkrCiphertextBlob :: Lens' GenerateDataKeyResponse (Maybe Base64)
- Network.AWS.KMS.GenerateDataKey: gdkrKeyId :: Lens' GenerateDataKeyResponse (Maybe Text)
- Network.AWS.KMS.GenerateDataKey: gdkrPlaintext :: Lens' GenerateDataKeyResponse (Maybe Base64)
- Network.AWS.KMS.GenerateDataKey: instance FromJSON GenerateDataKeyResponse
- Network.AWS.KMS.GenerateDataKeyWithoutPlaintext: gdkwprCiphertextBlob :: Lens' GenerateDataKeyWithoutPlaintextResponse (Maybe Base64)
- Network.AWS.KMS.GenerateDataKeyWithoutPlaintext: gdkwprKeyId :: Lens' GenerateDataKeyWithoutPlaintextResponse (Maybe Text)
- Network.AWS.KMS.GenerateDataKeyWithoutPlaintext: instance FromJSON GenerateDataKeyWithoutPlaintextResponse
- Network.AWS.KMS.GenerateRandom: grrPlaintext :: Lens' GenerateRandomResponse (Maybe Base64)
- Network.AWS.KMS.GenerateRandom: instance FromJSON GenerateRandomResponse
- Network.AWS.KMS.GenerateRandom: instance Ord GenerateRandom
- Network.AWS.KMS.GetKeyPolicy: gkprPolicy :: Lens' GetKeyPolicyResponse (Maybe Text)
- Network.AWS.KMS.GetKeyPolicy: instance FromJSON GetKeyPolicyResponse
- Network.AWS.KMS.GetKeyPolicy: instance Monoid GetKeyPolicyResponse
- Network.AWS.KMS.GetKeyPolicy: instance Ord GetKeyPolicy
- Network.AWS.KMS.GetKeyPolicy: instance Ord GetKeyPolicyResponse
- Network.AWS.KMS.GetKeyRotationStatus: gkrsrKeyRotationEnabled :: Lens' GetKeyRotationStatusResponse (Maybe Bool)
- Network.AWS.KMS.GetKeyRotationStatus: instance FromJSON GetKeyRotationStatusResponse
- Network.AWS.KMS.GetKeyRotationStatus: instance IsString GetKeyRotationStatus
- Network.AWS.KMS.GetKeyRotationStatus: instance Monoid GetKeyRotationStatus
- Network.AWS.KMS.GetKeyRotationStatus: instance Ord GetKeyRotationStatus
- Network.AWS.KMS.GetKeyRotationStatus: instance Ord GetKeyRotationStatusResponse
- Network.AWS.KMS.ListAliases: instance FromJSON ListAliasesResponse
- Network.AWS.KMS.ListAliases: instance Ord ListAliases
- Network.AWS.KMS.ListAliases: larAliases :: Lens' ListAliasesResponse [AliasListEntry]
- Network.AWS.KMS.ListAliases: larNextMarker :: Lens' ListAliasesResponse (Maybe Text)
- Network.AWS.KMS.ListAliases: larTruncated :: Lens' ListAliasesResponse (Maybe Bool)
- Network.AWS.KMS.ListGrants: instance FromJSON ListGrantsResponse
- Network.AWS.KMS.ListGrants: instance Ord ListGrants
- Network.AWS.KMS.ListGrants: lgrGrants :: Lens' ListGrantsResponse [GrantListEntry]
- Network.AWS.KMS.ListGrants: lgrNextMarker :: Lens' ListGrantsResponse (Maybe Text)
- Network.AWS.KMS.ListGrants: lgrTruncated :: Lens' ListGrantsResponse (Maybe Bool)
- Network.AWS.KMS.ListKeyPolicies: instance FromJSON ListKeyPoliciesResponse
- Network.AWS.KMS.ListKeyPolicies: instance Ord ListKeyPolicies
- Network.AWS.KMS.ListKeyPolicies: instance Ord ListKeyPoliciesResponse
- Network.AWS.KMS.ListKeyPolicies: lkprNextMarker :: Lens' ListKeyPoliciesResponse (Maybe Text)
- Network.AWS.KMS.ListKeyPolicies: lkprPolicyNames :: Lens' ListKeyPoliciesResponse [Text]
- Network.AWS.KMS.ListKeyPolicies: lkprTruncated :: Lens' ListKeyPoliciesResponse (Maybe Bool)
- Network.AWS.KMS.ListKeys: instance FromJSON ListKeysResponse
- Network.AWS.KMS.ListKeys: instance Ord ListKeys
- Network.AWS.KMS.ListKeys: lkrKeys :: Lens' ListKeysResponse [KeyListEntry]
- Network.AWS.KMS.ListKeys: lkrNextMarker :: Lens' ListKeysResponse (Maybe Text)
- Network.AWS.KMS.ListKeys: lkrTruncated :: Lens' ListKeysResponse (Maybe Bool)
- Network.AWS.KMS.PutKeyPolicy: instance Ord PutKeyPolicy
- Network.AWS.KMS.PutKeyPolicy: instance Ord PutKeyPolicyResponse
- Network.AWS.KMS.ReEncrypt: instance FromJSON ReEncryptResponse
- Network.AWS.KMS.ReEncrypt: rerCiphertextBlob :: Lens' ReEncryptResponse (Maybe Base64)
- Network.AWS.KMS.ReEncrypt: rerKeyId :: Lens' ReEncryptResponse (Maybe Text)
- Network.AWS.KMS.ReEncrypt: rerSourceKeyId :: Lens' ReEncryptResponse (Maybe Text)
- Network.AWS.KMS.RetireGrant: instance Ord RetireGrant
- Network.AWS.KMS.RetireGrant: instance Ord RetireGrantResponse
- Network.AWS.KMS.RevokeGrant: instance Ord RevokeGrant
- Network.AWS.KMS.RevokeGrant: instance Ord RevokeGrantResponse
- Network.AWS.KMS.RevokeGrant: rg1GrantId :: Lens' RevokeGrant Text
- Network.AWS.KMS.RevokeGrant: rg1KeyId :: Lens' RevokeGrant Text
- Network.AWS.KMS.Types: GOCreateGrant :: GrantOperation
- Network.AWS.KMS.Types: GODecrypt :: GrantOperation
- Network.AWS.KMS.Types: GOEncrypt :: GrantOperation
- Network.AWS.KMS.Types: GOGenerateDataKey :: GrantOperation
- Network.AWS.KMS.Types: GOGenerateDataKeyWithoutPlaintext :: GrantOperation
- Network.AWS.KMS.Types: GOReEncryptFrom :: GrantOperation
- Network.AWS.KMS.Types: GOReEncryptTo :: GrantOperation
- Network.AWS.KMS.Types: GORetireGrant :: GrantOperation
- Network.AWS.KMS.Types: aleAliasArn :: Lens' AliasListEntry (Maybe Text)
- Network.AWS.KMS.Types: data JSONError :: *
- Network.AWS.KMS.Types: instance Constructor C1_0DataKeySpec
- Network.AWS.KMS.Types: instance Constructor C1_0GrantOperation
- Network.AWS.KMS.Types: instance Constructor C1_0KeyUsageType
- Network.AWS.KMS.Types: instance Constructor C1_1DataKeySpec
- Network.AWS.KMS.Types: instance Constructor C1_1GrantOperation
- Network.AWS.KMS.Types: instance Constructor C1_2GrantOperation
- Network.AWS.KMS.Types: instance Constructor C1_3GrantOperation
- Network.AWS.KMS.Types: instance Constructor C1_4GrantOperation
- Network.AWS.KMS.Types: instance Constructor C1_5GrantOperation
- Network.AWS.KMS.Types: instance Constructor C1_6GrantOperation
- Network.AWS.KMS.Types: instance Constructor C1_7GrantOperation
- Network.AWS.KMS.Types: instance Datatype D1DataKeySpec
- Network.AWS.KMS.Types: instance Datatype D1GrantOperation
- Network.AWS.KMS.Types: instance Datatype D1KeyUsageType
- Network.AWS.KMS.Types: instance Enum DataKeySpec
- Network.AWS.KMS.Types: instance Enum GrantOperation
- Network.AWS.KMS.Types: instance Enum KeyUsageType
- Network.AWS.KMS.Types: instance Eq AliasListEntry
- Network.AWS.KMS.Types: instance Eq DataKeySpec
- Network.AWS.KMS.Types: instance Eq GrantConstraints
- Network.AWS.KMS.Types: instance Eq GrantListEntry
- Network.AWS.KMS.Types: instance Eq GrantOperation
- Network.AWS.KMS.Types: instance Eq KeyListEntry
- Network.AWS.KMS.Types: instance Eq KeyMetadata
- Network.AWS.KMS.Types: instance Eq KeyUsageType
- Network.AWS.KMS.Types: instance FromJSON AliasListEntry
- Network.AWS.KMS.Types: instance FromJSON DataKeySpec
- Network.AWS.KMS.Types: instance FromJSON GrantConstraints
- Network.AWS.KMS.Types: instance FromJSON GrantListEntry
- Network.AWS.KMS.Types: instance FromJSON GrantOperation
- Network.AWS.KMS.Types: instance FromJSON KeyListEntry
- Network.AWS.KMS.Types: instance FromJSON KeyMetadata
- Network.AWS.KMS.Types: instance FromJSON KeyUsageType
- Network.AWS.KMS.Types: instance FromText DataKeySpec
- Network.AWS.KMS.Types: instance FromText GrantOperation
- Network.AWS.KMS.Types: instance FromText KeyUsageType
- Network.AWS.KMS.Types: instance Generic DataKeySpec
- Network.AWS.KMS.Types: instance Generic GrantOperation
- Network.AWS.KMS.Types: instance Generic KeyUsageType
- Network.AWS.KMS.Types: instance Hashable DataKeySpec
- Network.AWS.KMS.Types: instance Hashable GrantOperation
- Network.AWS.KMS.Types: instance Hashable KeyUsageType
- Network.AWS.KMS.Types: instance Ord AliasListEntry
- Network.AWS.KMS.Types: instance Ord DataKeySpec
- Network.AWS.KMS.Types: instance Ord GrantOperation
- Network.AWS.KMS.Types: instance Ord KeyListEntry
- Network.AWS.KMS.Types: instance Ord KeyUsageType
- Network.AWS.KMS.Types: instance Read AliasListEntry
- Network.AWS.KMS.Types: instance Read DataKeySpec
- Network.AWS.KMS.Types: instance Read GrantConstraints
- Network.AWS.KMS.Types: instance Read GrantListEntry
- Network.AWS.KMS.Types: instance Read GrantOperation
- Network.AWS.KMS.Types: instance Read KeyListEntry
- Network.AWS.KMS.Types: instance Read KeyMetadata
- Network.AWS.KMS.Types: instance Read KeyUsageType
- Network.AWS.KMS.Types: instance Show AliasListEntry
- Network.AWS.KMS.Types: instance Show DataKeySpec
- Network.AWS.KMS.Types: instance Show GrantConstraints
- Network.AWS.KMS.Types: instance Show GrantListEntry
- Network.AWS.KMS.Types: instance Show GrantOperation
- Network.AWS.KMS.Types: instance Show KeyListEntry
- Network.AWS.KMS.Types: instance Show KeyMetadata
- Network.AWS.KMS.Types: instance Show KeyUsageType
- Network.AWS.KMS.Types: instance ToByteString DataKeySpec
- Network.AWS.KMS.Types: instance ToByteString GrantOperation
- Network.AWS.KMS.Types: instance ToByteString KeyUsageType
- Network.AWS.KMS.Types: instance ToHeader DataKeySpec
- Network.AWS.KMS.Types: instance ToHeader GrantOperation
- Network.AWS.KMS.Types: instance ToHeader KeyUsageType
- Network.AWS.KMS.Types: instance ToJSON AliasListEntry
- Network.AWS.KMS.Types: instance ToJSON DataKeySpec
- Network.AWS.KMS.Types: instance ToJSON GrantConstraints
- Network.AWS.KMS.Types: instance ToJSON GrantListEntry
- Network.AWS.KMS.Types: instance ToJSON GrantOperation
- Network.AWS.KMS.Types: instance ToJSON KeyListEntry
- Network.AWS.KMS.Types: instance ToJSON KeyMetadata
- Network.AWS.KMS.Types: instance ToJSON KeyUsageType
- Network.AWS.KMS.Types: instance ToQuery DataKeySpec
- Network.AWS.KMS.Types: instance ToQuery GrantOperation
- Network.AWS.KMS.Types: instance ToQuery KeyUsageType
- Network.AWS.KMS.Types: instance ToText DataKeySpec
- Network.AWS.KMS.Types: instance ToText GrantOperation
- Network.AWS.KMS.Types: instance ToText KeyUsageType
- Network.AWS.KMS.Types: kleKeyArn :: Lens' KeyListEntry (Maybe Text)
- Network.AWS.KMS.Types: kmArn :: Lens' KeyMetadata (Maybe Text)
- Network.AWS.KMS.UpdateAlias: instance Ord UpdateAlias
- Network.AWS.KMS.UpdateAlias: instance Ord UpdateAliasResponse
- Network.AWS.KMS.UpdateKeyDescription: instance Ord UpdateKeyDescription
- Network.AWS.KMS.UpdateKeyDescription: instance Ord UpdateKeyDescriptionResponse
+ Network.AWS.KMS: AES128 :: DataKeySpec
+ Network.AWS.KMS: AES256 :: DataKeySpec
+ Network.AWS.KMS: CreateGrant :: GrantOperation
+ Network.AWS.KMS: Decrypt :: GrantOperation
+ Network.AWS.KMS: Encrypt :: GrantOperation
+ Network.AWS.KMS: EncryptDecrypt :: KeyUsageType
+ Network.AWS.KMS: GenerateDataKey :: GrantOperation
+ Network.AWS.KMS: GenerateDataKeyWithoutPlaintext :: GrantOperation
+ Network.AWS.KMS: ReEncryptFrom :: GrantOperation
+ Network.AWS.KMS: ReEncryptTo :: GrantOperation
+ Network.AWS.KMS: RetireGrant :: GrantOperation
+ Network.AWS.KMS: _AlreadyExistsException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.KMS: _DependencyTimeoutException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.KMS: _DisabledException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.KMS: _InvalidARNException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.KMS: _InvalidAliasNameException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.KMS: _InvalidCiphertextException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.KMS: _InvalidGrantTokenException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.KMS: _InvalidKeyUsageException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.KMS: _InvalidMarkerException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.KMS: _KMSInternalException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.KMS: _KeyUnavailableException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.KMS: _LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.KMS: _MalformedPolicyDocumentException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.KMS: _NotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.KMS: _UnsupportedOperationException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.KMS: aleAliasARN :: Lens' AliasListEntry (Maybe Text)
+ Network.AWS.KMS: aleAliasName :: Lens' AliasListEntry (Maybe Text)
+ Network.AWS.KMS: aleTargetKeyId :: Lens' AliasListEntry (Maybe Text)
+ Network.AWS.KMS: aliasListEntry :: AliasListEntry
+ Network.AWS.KMS: data AliasListEntry
+ Network.AWS.KMS: data DataKeySpec
+ Network.AWS.KMS: data GrantConstraints
+ Network.AWS.KMS: data GrantListEntry
+ Network.AWS.KMS: data GrantOperation
+ Network.AWS.KMS: data KMS
+ Network.AWS.KMS: data KeyListEntry
+ Network.AWS.KMS: data KeyMetadata
+ Network.AWS.KMS: data KeyUsageType
+ Network.AWS.KMS: gcEncryptionContextEquals :: Lens' GrantConstraints (HashMap Text Text)
+ Network.AWS.KMS: gcEncryptionContextSubset :: Lens' GrantConstraints (HashMap Text Text)
+ Network.AWS.KMS: gleConstraints :: Lens' GrantListEntry (Maybe GrantConstraints)
+ Network.AWS.KMS: gleGrantId :: Lens' GrantListEntry (Maybe Text)
+ Network.AWS.KMS: gleGranteePrincipal :: Lens' GrantListEntry (Maybe Text)
+ Network.AWS.KMS: gleIssuingAccount :: Lens' GrantListEntry (Maybe Text)
+ Network.AWS.KMS: gleOperations :: Lens' GrantListEntry [GrantOperation]
+ Network.AWS.KMS: gleRetiringPrincipal :: Lens' GrantListEntry (Maybe Text)
+ Network.AWS.KMS: grantConstraints :: GrantConstraints
+ Network.AWS.KMS: grantListEntry :: GrantListEntry
+ Network.AWS.KMS: keyListEntry :: KeyListEntry
+ Network.AWS.KMS: keyMetadata :: Text -> KeyMetadata
+ Network.AWS.KMS: kleKeyARN :: Lens' KeyListEntry (Maybe Text)
+ Network.AWS.KMS: kleKeyId :: Lens' KeyListEntry (Maybe Text)
+ Network.AWS.KMS: kmARN :: Lens' KeyMetadata (Maybe Text)
+ Network.AWS.KMS: kmAWSAccountId :: Lens' KeyMetadata (Maybe Text)
+ Network.AWS.KMS: kmCreationDate :: Lens' KeyMetadata (Maybe UTCTime)
+ Network.AWS.KMS: kmDescription :: Lens' KeyMetadata (Maybe Text)
+ Network.AWS.KMS: kmEnabled :: Lens' KeyMetadata (Maybe Bool)
+ Network.AWS.KMS: kmKeyId :: Lens' KeyMetadata Text
+ Network.AWS.KMS: kmKeyUsage :: Lens' KeyMetadata (Maybe KeyUsageType)
+ Network.AWS.KMS.CreateAlias: instance Constructor C1_0CreateAlias
+ Network.AWS.KMS.CreateAlias: instance Data CreateAlias
+ Network.AWS.KMS.CreateAlias: instance Data CreateAliasResponse
+ Network.AWS.KMS.CreateAlias: instance Datatype D1CreateAlias
+ Network.AWS.KMS.CreateAlias: instance Generic CreateAlias
+ Network.AWS.KMS.CreateAlias: instance Selector S1_0_0CreateAlias
+ Network.AWS.KMS.CreateAlias: instance Selector S1_0_1CreateAlias
+ Network.AWS.KMS.CreateAlias: instance Typeable CreateAlias
+ Network.AWS.KMS.CreateAlias: instance Typeable CreateAliasResponse
+ Network.AWS.KMS.CreateGrant: cgrsGrantId :: Lens' CreateGrantResponse (Maybe Text)
+ Network.AWS.KMS.CreateGrant: cgrsGrantToken :: Lens' CreateGrantResponse (Maybe Text)
+ Network.AWS.KMS.CreateGrant: cgrsStatus :: Lens' CreateGrantResponse Int
+ Network.AWS.KMS.CreateGrant: instance Constructor C1_0CreateGrant
+ Network.AWS.KMS.CreateGrant: instance Constructor C1_0CreateGrantResponse
+ Network.AWS.KMS.CreateGrant: instance Data CreateGrant
+ Network.AWS.KMS.CreateGrant: instance Data CreateGrantResponse
+ Network.AWS.KMS.CreateGrant: instance Datatype D1CreateGrant
+ Network.AWS.KMS.CreateGrant: instance Datatype D1CreateGrantResponse
+ Network.AWS.KMS.CreateGrant: instance Generic CreateGrant
+ Network.AWS.KMS.CreateGrant: instance Generic CreateGrantResponse
+ Network.AWS.KMS.CreateGrant: instance Selector S1_0_0CreateGrant
+ Network.AWS.KMS.CreateGrant: instance Selector S1_0_0CreateGrantResponse
+ Network.AWS.KMS.CreateGrant: instance Selector S1_0_1CreateGrant
+ Network.AWS.KMS.CreateGrant: instance Selector S1_0_1CreateGrantResponse
+ Network.AWS.KMS.CreateGrant: instance Selector S1_0_2CreateGrant
+ Network.AWS.KMS.CreateGrant: instance Selector S1_0_2CreateGrantResponse
+ Network.AWS.KMS.CreateGrant: instance Selector S1_0_3CreateGrant
+ Network.AWS.KMS.CreateGrant: instance Selector S1_0_4CreateGrant
+ Network.AWS.KMS.CreateGrant: instance Selector S1_0_5CreateGrant
+ Network.AWS.KMS.CreateGrant: instance Typeable CreateGrant
+ Network.AWS.KMS.CreateGrant: instance Typeable CreateGrantResponse
+ Network.AWS.KMS.CreateKey: ckrsKeyMetadata :: Lens' CreateKeyResponse (Maybe KeyMetadata)
+ Network.AWS.KMS.CreateKey: ckrsStatus :: Lens' CreateKeyResponse Int
+ Network.AWS.KMS.CreateKey: instance Constructor C1_0CreateKey
+ Network.AWS.KMS.CreateKey: instance Constructor C1_0CreateKeyResponse
+ Network.AWS.KMS.CreateKey: instance Data CreateKey
+ Network.AWS.KMS.CreateKey: instance Data CreateKeyResponse
+ Network.AWS.KMS.CreateKey: instance Datatype D1CreateKey
+ Network.AWS.KMS.CreateKey: instance Datatype D1CreateKeyResponse
+ Network.AWS.KMS.CreateKey: instance Generic CreateKey
+ Network.AWS.KMS.CreateKey: instance Generic CreateKeyResponse
+ Network.AWS.KMS.CreateKey: instance Selector S1_0_0CreateKey
+ Network.AWS.KMS.CreateKey: instance Selector S1_0_0CreateKeyResponse
+ Network.AWS.KMS.CreateKey: instance Selector S1_0_1CreateKey
+ Network.AWS.KMS.CreateKey: instance Selector S1_0_1CreateKeyResponse
+ Network.AWS.KMS.CreateKey: instance Selector S1_0_2CreateKey
+ Network.AWS.KMS.CreateKey: instance Typeable CreateKey
+ Network.AWS.KMS.CreateKey: instance Typeable CreateKeyResponse
+ Network.AWS.KMS.Decrypt: drsKeyId :: Lens' DecryptResponse (Maybe Text)
+ Network.AWS.KMS.Decrypt: drsPlaintext :: Lens' DecryptResponse (Maybe ByteString)
+ Network.AWS.KMS.Decrypt: drsStatus :: Lens' DecryptResponse Int
+ Network.AWS.KMS.Decrypt: instance Constructor C1_0Decrypt
+ Network.AWS.KMS.Decrypt: instance Constructor C1_0DecryptResponse
+ Network.AWS.KMS.Decrypt: instance Data Decrypt
+ Network.AWS.KMS.Decrypt: instance Data DecryptResponse
+ Network.AWS.KMS.Decrypt: instance Datatype D1Decrypt
+ Network.AWS.KMS.Decrypt: instance Datatype D1DecryptResponse
+ Network.AWS.KMS.Decrypt: instance Generic Decrypt
+ Network.AWS.KMS.Decrypt: instance Generic DecryptResponse
+ Network.AWS.KMS.Decrypt: instance Selector S1_0_0Decrypt
+ Network.AWS.KMS.Decrypt: instance Selector S1_0_0DecryptResponse
+ Network.AWS.KMS.Decrypt: instance Selector S1_0_1Decrypt
+ Network.AWS.KMS.Decrypt: instance Selector S1_0_1DecryptResponse
+ Network.AWS.KMS.Decrypt: instance Selector S1_0_2Decrypt
+ Network.AWS.KMS.Decrypt: instance Selector S1_0_2DecryptResponse
+ Network.AWS.KMS.Decrypt: instance Typeable Decrypt
+ Network.AWS.KMS.Decrypt: instance Typeable DecryptResponse
+ Network.AWS.KMS.DeleteAlias: instance Constructor C1_0DeleteAlias
+ Network.AWS.KMS.DeleteAlias: instance Data DeleteAlias
+ Network.AWS.KMS.DeleteAlias: instance Data DeleteAliasResponse
+ Network.AWS.KMS.DeleteAlias: instance Datatype D1DeleteAlias
+ Network.AWS.KMS.DeleteAlias: instance Generic DeleteAlias
+ Network.AWS.KMS.DeleteAlias: instance Selector S1_0_0DeleteAlias
+ Network.AWS.KMS.DeleteAlias: instance Typeable DeleteAlias
+ Network.AWS.KMS.DeleteAlias: instance Typeable DeleteAliasResponse
+ Network.AWS.KMS.DescribeKey: dKeyId :: Lens' DescribeKey Text
+ Network.AWS.KMS.DescribeKey: dkrsKeyMetadata :: Lens' DescribeKeyResponse (Maybe KeyMetadata)
+ Network.AWS.KMS.DescribeKey: dkrsStatus :: Lens' DescribeKeyResponse Int
+ Network.AWS.KMS.DescribeKey: instance Constructor C1_0DescribeKey
+ Network.AWS.KMS.DescribeKey: instance Constructor C1_0DescribeKeyResponse
+ Network.AWS.KMS.DescribeKey: instance Data DescribeKey
+ Network.AWS.KMS.DescribeKey: instance Data DescribeKeyResponse
+ Network.AWS.KMS.DescribeKey: instance Datatype D1DescribeKey
+ Network.AWS.KMS.DescribeKey: instance Datatype D1DescribeKeyResponse
+ Network.AWS.KMS.DescribeKey: instance Generic DescribeKey
+ Network.AWS.KMS.DescribeKey: instance Generic DescribeKeyResponse
+ Network.AWS.KMS.DescribeKey: instance Selector S1_0_0DescribeKey
+ Network.AWS.KMS.DescribeKey: instance Selector S1_0_0DescribeKeyResponse
+ Network.AWS.KMS.DescribeKey: instance Selector S1_0_1DescribeKeyResponse
+ Network.AWS.KMS.DescribeKey: instance Typeable DescribeKey
+ Network.AWS.KMS.DescribeKey: instance Typeable DescribeKeyResponse
+ Network.AWS.KMS.DisableKey: instance Constructor C1_0DisableKey
+ Network.AWS.KMS.DisableKey: instance Data DisableKey
+ Network.AWS.KMS.DisableKey: instance Data DisableKeyResponse
+ Network.AWS.KMS.DisableKey: instance Datatype D1DisableKey
+ Network.AWS.KMS.DisableKey: instance Generic DisableKey
+ Network.AWS.KMS.DisableKey: instance Selector S1_0_0DisableKey
+ Network.AWS.KMS.DisableKey: instance Typeable DisableKey
+ Network.AWS.KMS.DisableKey: instance Typeable DisableKeyResponse
+ Network.AWS.KMS.DisableKeyRotation: instance Constructor C1_0DisableKeyRotation
+ Network.AWS.KMS.DisableKeyRotation: instance Data DisableKeyRotation
+ Network.AWS.KMS.DisableKeyRotation: instance Data DisableKeyRotationResponse
+ Network.AWS.KMS.DisableKeyRotation: instance Datatype D1DisableKeyRotation
+ Network.AWS.KMS.DisableKeyRotation: instance Generic DisableKeyRotation
+ Network.AWS.KMS.DisableKeyRotation: instance Selector S1_0_0DisableKeyRotation
+ Network.AWS.KMS.DisableKeyRotation: instance Typeable DisableKeyRotation
+ Network.AWS.KMS.DisableKeyRotation: instance Typeable DisableKeyRotationResponse
+ Network.AWS.KMS.EnableKey: instance Constructor C1_0EnableKey
+ Network.AWS.KMS.EnableKey: instance Data EnableKey
+ Network.AWS.KMS.EnableKey: instance Data EnableKeyResponse
+ Network.AWS.KMS.EnableKey: instance Datatype D1EnableKey
+ Network.AWS.KMS.EnableKey: instance Generic EnableKey
+ Network.AWS.KMS.EnableKey: instance Selector S1_0_0EnableKey
+ Network.AWS.KMS.EnableKey: instance Typeable EnableKey
+ Network.AWS.KMS.EnableKey: instance Typeable EnableKeyResponse
+ Network.AWS.KMS.EnableKeyRotation: instance Constructor C1_0EnableKeyRotation
+ Network.AWS.KMS.EnableKeyRotation: instance Data EnableKeyRotation
+ Network.AWS.KMS.EnableKeyRotation: instance Data EnableKeyRotationResponse
+ Network.AWS.KMS.EnableKeyRotation: instance Datatype D1EnableKeyRotation
+ Network.AWS.KMS.EnableKeyRotation: instance Generic EnableKeyRotation
+ Network.AWS.KMS.EnableKeyRotation: instance Selector S1_0_0EnableKeyRotation
+ Network.AWS.KMS.EnableKeyRotation: instance Typeable EnableKeyRotation
+ Network.AWS.KMS.EnableKeyRotation: instance Typeable EnableKeyRotationResponse
+ Network.AWS.KMS.Encrypt: ersCiphertextBlob :: Lens' EncryptResponse (Maybe ByteString)
+ Network.AWS.KMS.Encrypt: ersKeyId :: Lens' EncryptResponse (Maybe Text)
+ Network.AWS.KMS.Encrypt: ersStatus :: Lens' EncryptResponse Int
+ Network.AWS.KMS.Encrypt: instance Constructor C1_0Encrypt
+ Network.AWS.KMS.Encrypt: instance Constructor C1_0EncryptResponse
+ Network.AWS.KMS.Encrypt: instance Data Encrypt
+ Network.AWS.KMS.Encrypt: instance Data EncryptResponse
+ Network.AWS.KMS.Encrypt: instance Datatype D1Encrypt
+ Network.AWS.KMS.Encrypt: instance Datatype D1EncryptResponse
+ Network.AWS.KMS.Encrypt: instance Generic Encrypt
+ Network.AWS.KMS.Encrypt: instance Generic EncryptResponse
+ Network.AWS.KMS.Encrypt: instance Selector S1_0_0Encrypt
+ Network.AWS.KMS.Encrypt: instance Selector S1_0_0EncryptResponse
+ Network.AWS.KMS.Encrypt: instance Selector S1_0_1Encrypt
+ Network.AWS.KMS.Encrypt: instance Selector S1_0_1EncryptResponse
+ Network.AWS.KMS.Encrypt: instance Selector S1_0_2Encrypt
+ Network.AWS.KMS.Encrypt: instance Selector S1_0_2EncryptResponse
+ Network.AWS.KMS.Encrypt: instance Selector S1_0_3Encrypt
+ Network.AWS.KMS.Encrypt: instance Typeable Encrypt
+ Network.AWS.KMS.Encrypt: instance Typeable EncryptResponse
+ Network.AWS.KMS.GenerateDataKey: gdkrsCiphertextBlob :: Lens' GenerateDataKeyResponse (Maybe ByteString)
+ Network.AWS.KMS.GenerateDataKey: gdkrsKeyId :: Lens' GenerateDataKeyResponse (Maybe Text)
+ Network.AWS.KMS.GenerateDataKey: gdkrsPlaintext :: Lens' GenerateDataKeyResponse (Maybe ByteString)
+ Network.AWS.KMS.GenerateDataKey: gdkrsStatus :: Lens' GenerateDataKeyResponse Int
+ Network.AWS.KMS.GenerateDataKey: instance Constructor C1_0GenerateDataKey
+ Network.AWS.KMS.GenerateDataKey: instance Constructor C1_0GenerateDataKeyResponse
+ Network.AWS.KMS.GenerateDataKey: instance Data GenerateDataKey
+ Network.AWS.KMS.GenerateDataKey: instance Data GenerateDataKeyResponse
+ Network.AWS.KMS.GenerateDataKey: instance Datatype D1GenerateDataKey
+ Network.AWS.KMS.GenerateDataKey: instance Datatype D1GenerateDataKeyResponse
+ Network.AWS.KMS.GenerateDataKey: instance Generic GenerateDataKey
+ Network.AWS.KMS.GenerateDataKey: instance Generic GenerateDataKeyResponse
+ Network.AWS.KMS.GenerateDataKey: instance Selector S1_0_0GenerateDataKey
+ Network.AWS.KMS.GenerateDataKey: instance Selector S1_0_0GenerateDataKeyResponse
+ Network.AWS.KMS.GenerateDataKey: instance Selector S1_0_1GenerateDataKey
+ Network.AWS.KMS.GenerateDataKey: instance Selector S1_0_1GenerateDataKeyResponse
+ Network.AWS.KMS.GenerateDataKey: instance Selector S1_0_2GenerateDataKey
+ Network.AWS.KMS.GenerateDataKey: instance Selector S1_0_2GenerateDataKeyResponse
+ Network.AWS.KMS.GenerateDataKey: instance Selector S1_0_3GenerateDataKey
+ Network.AWS.KMS.GenerateDataKey: instance Selector S1_0_3GenerateDataKeyResponse
+ Network.AWS.KMS.GenerateDataKey: instance Selector S1_0_4GenerateDataKey
+ Network.AWS.KMS.GenerateDataKey: instance Typeable GenerateDataKey
+ Network.AWS.KMS.GenerateDataKey: instance Typeable GenerateDataKeyResponse
+ Network.AWS.KMS.GenerateDataKeyWithoutPlaintext: gdkwprsCiphertextBlob :: Lens' GenerateDataKeyWithoutPlaintextResponse (Maybe ByteString)
+ Network.AWS.KMS.GenerateDataKeyWithoutPlaintext: gdkwprsKeyId :: Lens' GenerateDataKeyWithoutPlaintextResponse (Maybe Text)
+ Network.AWS.KMS.GenerateDataKeyWithoutPlaintext: gdkwprsStatus :: Lens' GenerateDataKeyWithoutPlaintextResponse Int
+ Network.AWS.KMS.GenerateDataKeyWithoutPlaintext: instance Constructor C1_0GenerateDataKeyWithoutPlaintext
+ Network.AWS.KMS.GenerateDataKeyWithoutPlaintext: instance Constructor C1_0GenerateDataKeyWithoutPlaintextResponse
+ Network.AWS.KMS.GenerateDataKeyWithoutPlaintext: instance Data GenerateDataKeyWithoutPlaintext
+ Network.AWS.KMS.GenerateDataKeyWithoutPlaintext: instance Data GenerateDataKeyWithoutPlaintextResponse
+ Network.AWS.KMS.GenerateDataKeyWithoutPlaintext: instance Datatype D1GenerateDataKeyWithoutPlaintext
+ Network.AWS.KMS.GenerateDataKeyWithoutPlaintext: instance Datatype D1GenerateDataKeyWithoutPlaintextResponse
+ Network.AWS.KMS.GenerateDataKeyWithoutPlaintext: instance Generic GenerateDataKeyWithoutPlaintext
+ Network.AWS.KMS.GenerateDataKeyWithoutPlaintext: instance Generic GenerateDataKeyWithoutPlaintextResponse
+ Network.AWS.KMS.GenerateDataKeyWithoutPlaintext: instance Selector S1_0_0GenerateDataKeyWithoutPlaintext
+ Network.AWS.KMS.GenerateDataKeyWithoutPlaintext: instance Selector S1_0_0GenerateDataKeyWithoutPlaintextResponse
+ Network.AWS.KMS.GenerateDataKeyWithoutPlaintext: instance Selector S1_0_1GenerateDataKeyWithoutPlaintext
+ Network.AWS.KMS.GenerateDataKeyWithoutPlaintext: instance Selector S1_0_1GenerateDataKeyWithoutPlaintextResponse
+ Network.AWS.KMS.GenerateDataKeyWithoutPlaintext: instance Selector S1_0_2GenerateDataKeyWithoutPlaintext
+ Network.AWS.KMS.GenerateDataKeyWithoutPlaintext: instance Selector S1_0_2GenerateDataKeyWithoutPlaintextResponse
+ Network.AWS.KMS.GenerateDataKeyWithoutPlaintext: instance Selector S1_0_3GenerateDataKeyWithoutPlaintext
+ Network.AWS.KMS.GenerateDataKeyWithoutPlaintext: instance Selector S1_0_4GenerateDataKeyWithoutPlaintext
+ Network.AWS.KMS.GenerateDataKeyWithoutPlaintext: instance Typeable GenerateDataKeyWithoutPlaintext
+ Network.AWS.KMS.GenerateDataKeyWithoutPlaintext: instance Typeable GenerateDataKeyWithoutPlaintextResponse
+ Network.AWS.KMS.GenerateRandom: grrsPlaintext :: Lens' GenerateRandomResponse (Maybe ByteString)
+ Network.AWS.KMS.GenerateRandom: grrsStatus :: Lens' GenerateRandomResponse Int
+ Network.AWS.KMS.GenerateRandom: instance Constructor C1_0GenerateRandom
+ Network.AWS.KMS.GenerateRandom: instance Constructor C1_0GenerateRandomResponse
+ Network.AWS.KMS.GenerateRandom: instance Data GenerateRandom
+ Network.AWS.KMS.GenerateRandom: instance Data GenerateRandomResponse
+ Network.AWS.KMS.GenerateRandom: instance Datatype D1GenerateRandom
+ Network.AWS.KMS.GenerateRandom: instance Datatype D1GenerateRandomResponse
+ Network.AWS.KMS.GenerateRandom: instance Generic GenerateRandom
+ Network.AWS.KMS.GenerateRandom: instance Generic GenerateRandomResponse
+ Network.AWS.KMS.GenerateRandom: instance Selector S1_0_0GenerateRandom
+ Network.AWS.KMS.GenerateRandom: instance Selector S1_0_0GenerateRandomResponse
+ Network.AWS.KMS.GenerateRandom: instance Selector S1_0_1GenerateRandomResponse
+ Network.AWS.KMS.GenerateRandom: instance Typeable GenerateRandom
+ Network.AWS.KMS.GenerateRandom: instance Typeable GenerateRandomResponse
+ Network.AWS.KMS.GetKeyPolicy: gkprsPolicy :: Lens' GetKeyPolicyResponse (Maybe Text)
+ Network.AWS.KMS.GetKeyPolicy: gkprsStatus :: Lens' GetKeyPolicyResponse Int
+ Network.AWS.KMS.GetKeyPolicy: instance Constructor C1_0GetKeyPolicy
+ Network.AWS.KMS.GetKeyPolicy: instance Constructor C1_0GetKeyPolicyResponse
+ Network.AWS.KMS.GetKeyPolicy: instance Data GetKeyPolicy
+ Network.AWS.KMS.GetKeyPolicy: instance Data GetKeyPolicyResponse
+ Network.AWS.KMS.GetKeyPolicy: instance Datatype D1GetKeyPolicy
+ Network.AWS.KMS.GetKeyPolicy: instance Datatype D1GetKeyPolicyResponse
+ Network.AWS.KMS.GetKeyPolicy: instance Generic GetKeyPolicy
+ Network.AWS.KMS.GetKeyPolicy: instance Generic GetKeyPolicyResponse
+ Network.AWS.KMS.GetKeyPolicy: instance Selector S1_0_0GetKeyPolicy
+ Network.AWS.KMS.GetKeyPolicy: instance Selector S1_0_0GetKeyPolicyResponse
+ Network.AWS.KMS.GetKeyPolicy: instance Selector S1_0_1GetKeyPolicy
+ Network.AWS.KMS.GetKeyPolicy: instance Selector S1_0_1GetKeyPolicyResponse
+ Network.AWS.KMS.GetKeyPolicy: instance Typeable GetKeyPolicy
+ Network.AWS.KMS.GetKeyPolicy: instance Typeable GetKeyPolicyResponse
+ Network.AWS.KMS.GetKeyRotationStatus: gkrsrsKeyRotationEnabled :: Lens' GetKeyRotationStatusResponse (Maybe Bool)
+ Network.AWS.KMS.GetKeyRotationStatus: gkrsrsStatus :: Lens' GetKeyRotationStatusResponse Int
+ Network.AWS.KMS.GetKeyRotationStatus: instance Constructor C1_0GetKeyRotationStatus
+ Network.AWS.KMS.GetKeyRotationStatus: instance Constructor C1_0GetKeyRotationStatusResponse
+ Network.AWS.KMS.GetKeyRotationStatus: instance Data GetKeyRotationStatus
+ Network.AWS.KMS.GetKeyRotationStatus: instance Data GetKeyRotationStatusResponse
+ Network.AWS.KMS.GetKeyRotationStatus: instance Datatype D1GetKeyRotationStatus
+ Network.AWS.KMS.GetKeyRotationStatus: instance Datatype D1GetKeyRotationStatusResponse
+ Network.AWS.KMS.GetKeyRotationStatus: instance Generic GetKeyRotationStatus
+ Network.AWS.KMS.GetKeyRotationStatus: instance Generic GetKeyRotationStatusResponse
+ Network.AWS.KMS.GetKeyRotationStatus: instance Selector S1_0_0GetKeyRotationStatus
+ Network.AWS.KMS.GetKeyRotationStatus: instance Selector S1_0_0GetKeyRotationStatusResponse
+ Network.AWS.KMS.GetKeyRotationStatus: instance Selector S1_0_1GetKeyRotationStatusResponse
+ Network.AWS.KMS.GetKeyRotationStatus: instance Typeable GetKeyRotationStatus
+ Network.AWS.KMS.GetKeyRotationStatus: instance Typeable GetKeyRotationStatusResponse
+ Network.AWS.KMS.ListAliases: instance Constructor C1_0ListAliases
+ Network.AWS.KMS.ListAliases: instance Constructor C1_0ListAliasesResponse
+ Network.AWS.KMS.ListAliases: instance Data ListAliases
+ Network.AWS.KMS.ListAliases: instance Data ListAliasesResponse
+ Network.AWS.KMS.ListAliases: instance Datatype D1ListAliases
+ Network.AWS.KMS.ListAliases: instance Datatype D1ListAliasesResponse
+ Network.AWS.KMS.ListAliases: instance Generic ListAliases
+ Network.AWS.KMS.ListAliases: instance Generic ListAliasesResponse
+ Network.AWS.KMS.ListAliases: instance Selector S1_0_0ListAliases
+ Network.AWS.KMS.ListAliases: instance Selector S1_0_0ListAliasesResponse
+ Network.AWS.KMS.ListAliases: instance Selector S1_0_1ListAliases
+ Network.AWS.KMS.ListAliases: instance Selector S1_0_1ListAliasesResponse
+ Network.AWS.KMS.ListAliases: instance Selector S1_0_2ListAliasesResponse
+ Network.AWS.KMS.ListAliases: instance Selector S1_0_3ListAliasesResponse
+ Network.AWS.KMS.ListAliases: instance Typeable ListAliases
+ Network.AWS.KMS.ListAliases: instance Typeable ListAliasesResponse
+ Network.AWS.KMS.ListAliases: larsAliases :: Lens' ListAliasesResponse [AliasListEntry]
+ Network.AWS.KMS.ListAliases: larsNextMarker :: Lens' ListAliasesResponse (Maybe Text)
+ Network.AWS.KMS.ListAliases: larsStatus :: Lens' ListAliasesResponse Int
+ Network.AWS.KMS.ListAliases: larsTruncated :: Lens' ListAliasesResponse (Maybe Bool)
+ Network.AWS.KMS.ListGrants: instance Constructor C1_0ListGrants
+ Network.AWS.KMS.ListGrants: instance Constructor C1_0ListGrantsResponse
+ Network.AWS.KMS.ListGrants: instance Data ListGrants
+ Network.AWS.KMS.ListGrants: instance Data ListGrantsResponse
+ Network.AWS.KMS.ListGrants: instance Datatype D1ListGrants
+ Network.AWS.KMS.ListGrants: instance Datatype D1ListGrantsResponse
+ Network.AWS.KMS.ListGrants: instance Generic ListGrants
+ Network.AWS.KMS.ListGrants: instance Generic ListGrantsResponse
+ Network.AWS.KMS.ListGrants: instance Selector S1_0_0ListGrants
+ Network.AWS.KMS.ListGrants: instance Selector S1_0_0ListGrantsResponse
+ Network.AWS.KMS.ListGrants: instance Selector S1_0_1ListGrants
+ Network.AWS.KMS.ListGrants: instance Selector S1_0_1ListGrantsResponse
+ Network.AWS.KMS.ListGrants: instance Selector S1_0_2ListGrants
+ Network.AWS.KMS.ListGrants: instance Selector S1_0_2ListGrantsResponse
+ Network.AWS.KMS.ListGrants: instance Selector S1_0_3ListGrantsResponse
+ Network.AWS.KMS.ListGrants: instance Typeable ListGrants
+ Network.AWS.KMS.ListGrants: instance Typeable ListGrantsResponse
+ Network.AWS.KMS.ListGrants: lgrsGrants :: Lens' ListGrantsResponse [GrantListEntry]
+ Network.AWS.KMS.ListGrants: lgrsNextMarker :: Lens' ListGrantsResponse (Maybe Text)
+ Network.AWS.KMS.ListGrants: lgrsStatus :: Lens' ListGrantsResponse Int
+ Network.AWS.KMS.ListGrants: lgrsTruncated :: Lens' ListGrantsResponse (Maybe Bool)
+ Network.AWS.KMS.ListKeyPolicies: instance Constructor C1_0ListKeyPolicies
+ Network.AWS.KMS.ListKeyPolicies: instance Constructor C1_0ListKeyPoliciesResponse
+ Network.AWS.KMS.ListKeyPolicies: instance Data ListKeyPolicies
+ Network.AWS.KMS.ListKeyPolicies: instance Data ListKeyPoliciesResponse
+ Network.AWS.KMS.ListKeyPolicies: instance Datatype D1ListKeyPolicies
+ Network.AWS.KMS.ListKeyPolicies: instance Datatype D1ListKeyPoliciesResponse
+ Network.AWS.KMS.ListKeyPolicies: instance Generic ListKeyPolicies
+ Network.AWS.KMS.ListKeyPolicies: instance Generic ListKeyPoliciesResponse
+ Network.AWS.KMS.ListKeyPolicies: instance Selector S1_0_0ListKeyPolicies
+ Network.AWS.KMS.ListKeyPolicies: instance Selector S1_0_0ListKeyPoliciesResponse
+ Network.AWS.KMS.ListKeyPolicies: instance Selector S1_0_1ListKeyPolicies
+ Network.AWS.KMS.ListKeyPolicies: instance Selector S1_0_1ListKeyPoliciesResponse
+ Network.AWS.KMS.ListKeyPolicies: instance Selector S1_0_2ListKeyPolicies
+ Network.AWS.KMS.ListKeyPolicies: instance Selector S1_0_2ListKeyPoliciesResponse
+ Network.AWS.KMS.ListKeyPolicies: instance Selector S1_0_3ListKeyPoliciesResponse
+ Network.AWS.KMS.ListKeyPolicies: instance Typeable ListKeyPolicies
+ Network.AWS.KMS.ListKeyPolicies: instance Typeable ListKeyPoliciesResponse
+ Network.AWS.KMS.ListKeyPolicies: lkprsNextMarker :: Lens' ListKeyPoliciesResponse (Maybe Text)
+ Network.AWS.KMS.ListKeyPolicies: lkprsPolicyNames :: Lens' ListKeyPoliciesResponse [Text]
+ Network.AWS.KMS.ListKeyPolicies: lkprsStatus :: Lens' ListKeyPoliciesResponse Int
+ Network.AWS.KMS.ListKeyPolicies: lkprsTruncated :: Lens' ListKeyPoliciesResponse (Maybe Bool)
+ Network.AWS.KMS.ListKeys: instance Constructor C1_0ListKeys
+ Network.AWS.KMS.ListKeys: instance Constructor C1_0ListKeysResponse
+ Network.AWS.KMS.ListKeys: instance Data ListKeys
+ Network.AWS.KMS.ListKeys: instance Data ListKeysResponse
+ Network.AWS.KMS.ListKeys: instance Datatype D1ListKeys
+ Network.AWS.KMS.ListKeys: instance Datatype D1ListKeysResponse
+ Network.AWS.KMS.ListKeys: instance Generic ListKeys
+ Network.AWS.KMS.ListKeys: instance Generic ListKeysResponse
+ Network.AWS.KMS.ListKeys: instance Selector S1_0_0ListKeys
+ Network.AWS.KMS.ListKeys: instance Selector S1_0_0ListKeysResponse
+ Network.AWS.KMS.ListKeys: instance Selector S1_0_1ListKeys
+ Network.AWS.KMS.ListKeys: instance Selector S1_0_1ListKeysResponse
+ Network.AWS.KMS.ListKeys: instance Selector S1_0_2ListKeysResponse
+ Network.AWS.KMS.ListKeys: instance Selector S1_0_3ListKeysResponse
+ Network.AWS.KMS.ListKeys: instance Typeable ListKeys
+ Network.AWS.KMS.ListKeys: instance Typeable ListKeysResponse
+ Network.AWS.KMS.ListKeys: lkrsKeys :: Lens' ListKeysResponse [KeyListEntry]
+ Network.AWS.KMS.ListKeys: lkrsNextMarker :: Lens' ListKeysResponse (Maybe Text)
+ Network.AWS.KMS.ListKeys: lkrsStatus :: Lens' ListKeysResponse Int
+ Network.AWS.KMS.ListKeys: lkrsTruncated :: Lens' ListKeysResponse (Maybe Bool)
+ Network.AWS.KMS.PutKeyPolicy: instance Constructor C1_0PutKeyPolicy
+ Network.AWS.KMS.PutKeyPolicy: instance Data PutKeyPolicy
+ Network.AWS.KMS.PutKeyPolicy: instance Data PutKeyPolicyResponse
+ Network.AWS.KMS.PutKeyPolicy: instance Datatype D1PutKeyPolicy
+ Network.AWS.KMS.PutKeyPolicy: instance Generic PutKeyPolicy
+ Network.AWS.KMS.PutKeyPolicy: instance Selector S1_0_0PutKeyPolicy
+ Network.AWS.KMS.PutKeyPolicy: instance Selector S1_0_1PutKeyPolicy
+ Network.AWS.KMS.PutKeyPolicy: instance Selector S1_0_2PutKeyPolicy
+ Network.AWS.KMS.PutKeyPolicy: instance Typeable PutKeyPolicy
+ Network.AWS.KMS.PutKeyPolicy: instance Typeable PutKeyPolicyResponse
+ Network.AWS.KMS.ReEncrypt: instance Constructor C1_0ReEncrypt
+ Network.AWS.KMS.ReEncrypt: instance Constructor C1_0ReEncryptResponse
+ Network.AWS.KMS.ReEncrypt: instance Data ReEncrypt
+ Network.AWS.KMS.ReEncrypt: instance Data ReEncryptResponse
+ Network.AWS.KMS.ReEncrypt: instance Datatype D1ReEncrypt
+ Network.AWS.KMS.ReEncrypt: instance Datatype D1ReEncryptResponse
+ Network.AWS.KMS.ReEncrypt: instance Generic ReEncrypt
+ Network.AWS.KMS.ReEncrypt: instance Generic ReEncryptResponse
+ Network.AWS.KMS.ReEncrypt: instance Selector S1_0_0ReEncrypt
+ Network.AWS.KMS.ReEncrypt: instance Selector S1_0_0ReEncryptResponse
+ Network.AWS.KMS.ReEncrypt: instance Selector S1_0_1ReEncrypt
+ Network.AWS.KMS.ReEncrypt: instance Selector S1_0_1ReEncryptResponse
+ Network.AWS.KMS.ReEncrypt: instance Selector S1_0_2ReEncrypt
+ Network.AWS.KMS.ReEncrypt: instance Selector S1_0_2ReEncryptResponse
+ Network.AWS.KMS.ReEncrypt: instance Selector S1_0_3ReEncrypt
+ Network.AWS.KMS.ReEncrypt: instance Selector S1_0_3ReEncryptResponse
+ Network.AWS.KMS.ReEncrypt: instance Selector S1_0_4ReEncrypt
+ Network.AWS.KMS.ReEncrypt: instance Typeable ReEncrypt
+ Network.AWS.KMS.ReEncrypt: instance Typeable ReEncryptResponse
+ Network.AWS.KMS.ReEncrypt: rersCiphertextBlob :: Lens' ReEncryptResponse (Maybe ByteString)
+ Network.AWS.KMS.ReEncrypt: rersKeyId :: Lens' ReEncryptResponse (Maybe Text)
+ Network.AWS.KMS.ReEncrypt: rersSourceKeyId :: Lens' ReEncryptResponse (Maybe Text)
+ Network.AWS.KMS.ReEncrypt: rersStatus :: Lens' ReEncryptResponse Int
+ Network.AWS.KMS.RetireGrant: instance Constructor C1_0RetireGrant
+ Network.AWS.KMS.RetireGrant: instance Data RetireGrant
+ Network.AWS.KMS.RetireGrant: instance Data RetireGrantResponse
+ Network.AWS.KMS.RetireGrant: instance Datatype D1RetireGrant
+ Network.AWS.KMS.RetireGrant: instance Generic RetireGrant
+ Network.AWS.KMS.RetireGrant: instance Selector S1_0_0RetireGrant
+ Network.AWS.KMS.RetireGrant: instance Selector S1_0_1RetireGrant
+ Network.AWS.KMS.RetireGrant: instance Selector S1_0_2RetireGrant
+ Network.AWS.KMS.RetireGrant: instance Typeable RetireGrant
+ Network.AWS.KMS.RetireGrant: instance Typeable RetireGrantResponse
+ Network.AWS.KMS.RevokeGrant: instance Constructor C1_0RevokeGrant
+ Network.AWS.KMS.RevokeGrant: instance Data RevokeGrant
+ Network.AWS.KMS.RevokeGrant: instance Data RevokeGrantResponse
+ Network.AWS.KMS.RevokeGrant: instance Datatype D1RevokeGrant
+ Network.AWS.KMS.RevokeGrant: instance Generic RevokeGrant
+ Network.AWS.KMS.RevokeGrant: instance Selector S1_0_0RevokeGrant
+ Network.AWS.KMS.RevokeGrant: instance Selector S1_0_1RevokeGrant
+ Network.AWS.KMS.RevokeGrant: instance Typeable RevokeGrant
+ Network.AWS.KMS.RevokeGrant: instance Typeable RevokeGrantResponse
+ Network.AWS.KMS.RevokeGrant: rGrantId :: Lens' RevokeGrant Text
+ Network.AWS.KMS.RevokeGrant: rKeyId :: Lens' RevokeGrant Text
+ Network.AWS.KMS.Types: CreateGrant :: GrantOperation
+ Network.AWS.KMS.Types: Decrypt :: GrantOperation
+ Network.AWS.KMS.Types: Encrypt :: GrantOperation
+ Network.AWS.KMS.Types: GenerateDataKey :: GrantOperation
+ Network.AWS.KMS.Types: GenerateDataKeyWithoutPlaintext :: GrantOperation
+ Network.AWS.KMS.Types: ReEncryptFrom :: GrantOperation
+ Network.AWS.KMS.Types: ReEncryptTo :: GrantOperation
+ Network.AWS.KMS.Types: RetireGrant :: GrantOperation
+ Network.AWS.KMS.Types: _AlreadyExistsException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.KMS.Types: _DependencyTimeoutException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.KMS.Types: _DisabledException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.KMS.Types: _InvalidARNException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.KMS.Types: _InvalidAliasNameException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.KMS.Types: _InvalidCiphertextException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.KMS.Types: _InvalidGrantTokenException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.KMS.Types: _InvalidKeyUsageException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.KMS.Types: _InvalidMarkerException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.KMS.Types: _KMSInternalException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.KMS.Types: _KeyUnavailableException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.KMS.Types: _LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.KMS.Types: _MalformedPolicyDocumentException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.KMS.Types: _NotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.KMS.Types: _UnsupportedOperationException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.KMS.Types: aleAliasARN :: Lens' AliasListEntry (Maybe Text)
+ Network.AWS.KMS.Types: kleKeyARN :: Lens' KeyListEntry (Maybe Text)
+ Network.AWS.KMS.Types: kmARN :: Lens' KeyMetadata (Maybe Text)
+ Network.AWS.KMS.UpdateAlias: instance Constructor C1_0UpdateAlias
+ Network.AWS.KMS.UpdateAlias: instance Data UpdateAlias
+ Network.AWS.KMS.UpdateAlias: instance Data UpdateAliasResponse
+ Network.AWS.KMS.UpdateAlias: instance Datatype D1UpdateAlias
+ Network.AWS.KMS.UpdateAlias: instance Generic UpdateAlias
+ Network.AWS.KMS.UpdateAlias: instance Selector S1_0_0UpdateAlias
+ Network.AWS.KMS.UpdateAlias: instance Selector S1_0_1UpdateAlias
+ Network.AWS.KMS.UpdateAlias: instance Typeable UpdateAlias
+ Network.AWS.KMS.UpdateAlias: instance Typeable UpdateAliasResponse
+ Network.AWS.KMS.UpdateKeyDescription: instance Constructor C1_0UpdateKeyDescription
+ Network.AWS.KMS.UpdateKeyDescription: instance Data UpdateKeyDescription
+ Network.AWS.KMS.UpdateKeyDescription: instance Data UpdateKeyDescriptionResponse
+ Network.AWS.KMS.UpdateKeyDescription: instance Datatype D1UpdateKeyDescription
+ Network.AWS.KMS.UpdateKeyDescription: instance Generic UpdateKeyDescription
+ Network.AWS.KMS.UpdateKeyDescription: instance Selector S1_0_0UpdateKeyDescription
+ Network.AWS.KMS.UpdateKeyDescription: instance Selector S1_0_1UpdateKeyDescription
+ Network.AWS.KMS.UpdateKeyDescription: instance Typeable UpdateKeyDescription
+ Network.AWS.KMS.UpdateKeyDescription: instance Typeable UpdateKeyDescriptionResponse
- Network.AWS.KMS.CreateGrant: createGrantResponse :: CreateGrantResponse
+ Network.AWS.KMS.CreateGrant: createGrantResponse :: Int -> CreateGrantResponse
- Network.AWS.KMS.CreateKey: createKeyResponse :: CreateKeyResponse
+ Network.AWS.KMS.CreateKey: createKeyResponse :: Int -> CreateKeyResponse
- Network.AWS.KMS.Decrypt: dCiphertextBlob :: Lens' Decrypt Base64
+ Network.AWS.KMS.Decrypt: dCiphertextBlob :: Lens' Decrypt ByteString
- Network.AWS.KMS.Decrypt: decrypt :: Base64 -> Decrypt
+ Network.AWS.KMS.Decrypt: decrypt :: ByteString -> Decrypt
- Network.AWS.KMS.Decrypt: decryptResponse :: DecryptResponse
+ Network.AWS.KMS.Decrypt: decryptResponse :: Int -> DecryptResponse
- Network.AWS.KMS.DescribeKey: describeKeyResponse :: DescribeKeyResponse
+ Network.AWS.KMS.DescribeKey: describeKeyResponse :: Int -> DescribeKeyResponse
- Network.AWS.KMS.Encrypt: ePlaintext :: Lens' Encrypt Base64
+ Network.AWS.KMS.Encrypt: ePlaintext :: Lens' Encrypt ByteString
- Network.AWS.KMS.Encrypt: encrypt :: Text -> Base64 -> Encrypt
+ Network.AWS.KMS.Encrypt: encrypt :: Text -> ByteString -> Encrypt
- Network.AWS.KMS.Encrypt: encryptResponse :: EncryptResponse
+ Network.AWS.KMS.Encrypt: encryptResponse :: Int -> EncryptResponse
- Network.AWS.KMS.GenerateDataKey: generateDataKeyResponse :: GenerateDataKeyResponse
+ Network.AWS.KMS.GenerateDataKey: generateDataKeyResponse :: Int -> GenerateDataKeyResponse
- Network.AWS.KMS.GenerateDataKeyWithoutPlaintext: generateDataKeyWithoutPlaintextResponse :: GenerateDataKeyWithoutPlaintextResponse
+ Network.AWS.KMS.GenerateDataKeyWithoutPlaintext: generateDataKeyWithoutPlaintextResponse :: Int -> GenerateDataKeyWithoutPlaintextResponse
- Network.AWS.KMS.GenerateRandom: generateRandomResponse :: GenerateRandomResponse
+ Network.AWS.KMS.GenerateRandom: generateRandomResponse :: Int -> GenerateRandomResponse
- Network.AWS.KMS.GetKeyPolicy: getKeyPolicyResponse :: GetKeyPolicyResponse
+ Network.AWS.KMS.GetKeyPolicy: getKeyPolicyResponse :: Int -> GetKeyPolicyResponse
- Network.AWS.KMS.GetKeyRotationStatus: getKeyRotationStatusResponse :: GetKeyRotationStatusResponse
+ Network.AWS.KMS.GetKeyRotationStatus: getKeyRotationStatusResponse :: Int -> GetKeyRotationStatusResponse
- Network.AWS.KMS.ListAliases: listAliasesResponse :: ListAliasesResponse
+ Network.AWS.KMS.ListAliases: listAliasesResponse :: Int -> ListAliasesResponse
- Network.AWS.KMS.ListGrants: listGrantsResponse :: ListGrantsResponse
+ Network.AWS.KMS.ListGrants: listGrantsResponse :: Int -> ListGrantsResponse
- Network.AWS.KMS.ListKeyPolicies: listKeyPoliciesResponse :: ListKeyPoliciesResponse
+ Network.AWS.KMS.ListKeyPolicies: listKeyPoliciesResponse :: Int -> ListKeyPoliciesResponse
- Network.AWS.KMS.ListKeys: listKeysResponse :: ListKeysResponse
+ Network.AWS.KMS.ListKeys: listKeysResponse :: Int -> ListKeysResponse
- Network.AWS.KMS.ReEncrypt: reCiphertextBlob :: Lens' ReEncrypt Base64
+ Network.AWS.KMS.ReEncrypt: reCiphertextBlob :: Lens' ReEncrypt ByteString
- Network.AWS.KMS.ReEncrypt: reEncrypt :: Base64 -> Text -> ReEncrypt
+ Network.AWS.KMS.ReEncrypt: reEncrypt :: ByteString -> Text -> ReEncrypt
- Network.AWS.KMS.ReEncrypt: reEncryptResponse :: ReEncryptResponse
+ Network.AWS.KMS.ReEncrypt: reEncryptResponse :: Int -> ReEncryptResponse

Files

README.md view
@@ -1,24 +1,103 @@ # Amazon Key Management Service SDK -> _Warning:_ This is an experimental preview release which is still under heavy development and not intended for public consumption, _caveat emptor_!-+* [Version](#version) * [Description](#description) * [Contribute](#contribute) * [Licence](#licence) ++## Version++`1.0.0`++ ## Description -Amazon Key Management Service (KMS) is a managed service that makes it easy-for you to create and control the encryption keys used to encrypt your data,-and uses Hardware Security Modules (HSMs) to protect the security of your-keys. Amazon Key Management Service is integrated with other Amazon services-including Amazon EBS, Amazon S3, and Amazon Redshift. Amazon Key Management-Service is also integrated with Amazon CloudTrail to provide you with logs of-all key usage to help meet your regulatory and compliance needs.+AWS Key Management Service +AWS Key Management Service (KMS) is an encryption and key management web+service. This guide describes the KMS actions that you can call+programmatically. For general information about KMS, see the+<http://docs.aws.amazon.com/kms/latest/developerguide/overview.html AWS Key Management Service Developer Guide>++AWS provides SDKs that consist of libraries and sample code for various+programming languages and platforms (Java, Ruby, .Net, iOS, Android,+etc.). The SDKs provide a convenient way to create programmatic access+to KMS and AWS. For example, the SDKs take care of tasks such as signing+requests (see below), managing errors, and retrying requests+automatically. For more information about the AWS SDKs, including how to+download and install them, see+<http://aws.amazon.com/tools/ Tools for Amazon Web Services>.++We recommend that you use the AWS SDKs to make programmatic API calls to+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.++__Signing Requests__++Requests must be signed by using an access key ID and a secret access+key. We strongly recommend that you do not use your AWS account access+key ID and secret key for everyday work with 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 KMS operations require+<http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html Signature Version 4>.++__Recording API Requests__++KMS supports AWS CloudTrail, a service that records 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 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+<http://docs.aws.amazon.com/awscloudtrail/latest/userguide/whatiscloudtrail.html AWS CloudTrail User Guide>++__Additional Resources__++For more information about credentials and request signing, see the+following:++-   <http://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html AWS Security Credentials>.+    This topic provides general information about the types of+    credentials used for accessing AWS.+-   <http://docs.aws.amazon.com/STS/latest/UsingSTS/ AWS Security Token Service>.+    This guide describes how to create and use temporary security+    credentials.+-   <http://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html Signing AWS API Requests>.+    This set of topics walks you through the process of signing a+    request using an access key ID and a secret access key.++__Commonly Used APIs__++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.++-   Encrypt+-   Decrypt+-   GenerateDataKey+-   GenerateDataKeyWithoutPlaintext+ Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-kms) and the [AWS API Reference](http://docs.aws.amazon.com/kms/latest/APIReference/Welcome.html). +The types from this library are intended to be used with [amazonka](http://hackage.haskell.org/package/amazonka),+which provides mechanisms for specifying AuthN/AuthZ information and sending requests.++Use of lenses is required for constructing and manipulating types.+This is due to the amount 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+[lens](http://hackage.haskell.org/package/lens) or [lens-family-core](http://hackage.haskell.org/package/lens-family-core).  ## Contribute 
amazonka-kms.cabal view
@@ -1,31 +1,105 @@ name:                  amazonka-kms-version:               0.3.6+version:               1.0.0 synopsis:              Amazon Key Management Service SDK. homepage:              https://github.com/brendanhay/amazonka license:               OtherLicense license-file:          LICENSE author:                Brendan Hay maintainer:            Brendan Hay <brendan.g.hay@gmail.com>-copyright:             Copyright (c) 2013-2014 Brendan Hay+copyright:             Copyright (c) 2013-2015 Brendan Hay category:              Network, AWS, Cloud, Distributed Computing build-type:            Simple extra-source-files:    README.md cabal-version:         >= 1.10  description:-    Amazon Key Management Service (KMS) is a managed service that makes it easy-    for you to create and control the encryption keys used to encrypt your data,-    and uses Hardware Security Modules (HSMs) to protect the security of your-    keys. Amazon Key Management Service is integrated with other Amazon services-    including Amazon EBS, Amazon S3, and Amazon Redshift. Amazon Key Management-    Service is also integrated with Amazon CloudTrail to provide you with logs of-    all key usage to help meet your regulatory and compliance needs.+    AWS Key Management Service +    AWS Key Management Service (KMS) is an encryption and key management web+    service. This guide describes the KMS actions that you can call+    programmatically. For general information about KMS, see the+    <http://docs.aws.amazon.com/kms/latest/developerguide/overview.html AWS Key Management Service Developer Guide>++    AWS provides SDKs that consist of libraries and sample code for various+    programming languages and platforms (Java, Ruby, .Net, iOS, Android,+    etc.). The SDKs provide a convenient way to create programmatic access+    to KMS and AWS. For example, the SDKs take care of tasks such as signing+    requests (see below), managing errors, and retrying requests+    automatically. For more information about the AWS SDKs, including how to+    download and install them, see+    <http://aws.amazon.com/tools/ Tools for Amazon Web Services>.++    We recommend that you use the AWS SDKs to make programmatic API calls to+    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.++    __Signing Requests__++    Requests must be signed by using an access key ID and a secret access+    key. We strongly recommend that you do not use your AWS account access+    key ID and secret key for everyday work with 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 KMS operations require+    <http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html Signature Version 4>.++    __Recording API Requests__++    KMS supports AWS CloudTrail, a service that records 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 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+    <http://docs.aws.amazon.com/awscloudtrail/latest/userguide/whatiscloudtrail.html AWS CloudTrail User Guide>++    __Additional Resources__++    For more information about credentials and request signing, see the+    following:++    -   <http://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html AWS Security Credentials>.+        This topic provides general information about the types of+        credentials used for accessing AWS.+    -   <http://docs.aws.amazon.com/STS/latest/UsingSTS/ AWS Security Token Service>.+        This guide describes how to create and use temporary security+        credentials.+    -   <http://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html Signing AWS API Requests>.+        This set of topics walks you through the process of signing a+        request using an access key ID and a secret access key.++    __Commonly Used APIs__++    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.++    -   Encrypt+    -   Decrypt+    -   GenerateDataKey+    -   GenerateDataKeyWithoutPlaintext     .-    /See:/ <http://docs.aws.amazon.com/kms/latest/APIReference/Welcome.html AWS API Reference>+    The types from this library are intended to be used with+    <http://hackage.haskell.org/package/amazonka amazonka>, which provides+    mechanisms for specifying AuthN/AuthZ information and sending requests.     .-    /Warning:/ This is an experimental preview release which is still under-    heavy development and not intended for public consumption, caveat emptor!+    Use of lenses is required for constructing and manipulating types.+    This is due to the amount 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 <http://hackage.haskell.org/package/lens lens> or+    <http://hackage.haskell.org/package/lens-family-core lens-family-core>.+    .+    See "Network.AWS.KMS" and the <http://docs.aws.amazon.com/kms/latest/APIReference/Welcome.html AWS API Reference>+    to get started.  source-repository head     type:     git@@ -66,9 +140,40 @@         , Network.AWS.KMS.Types         , Network.AWS.KMS.UpdateAlias         , Network.AWS.KMS.UpdateKeyDescription+        , Network.AWS.KMS.Waiters      other-modules:+          Network.AWS.KMS.Types.Product+        , Network.AWS.KMS.Types.Sum      build-depends:-          amazonka-core == 0.3.6.*+          amazonka-core == 1.0.0.*         , base          >= 4.7     && < 5++test-suite amazonka-kms-test+    type:              exitcode-stdio-1.0+    default-language:  Haskell2010+    hs-source-dirs:    test+    main-is:           Main.hs++    ghc-options:       -Wall -threaded++    -- This is not comprehensive if modules have manually been added.+    -- It exists to ensure cabal 'somewhat' detects test module changes.+    other-modules:+          Test.AWS.KMS+        , Test.AWS.Gen.KMS+        , Test.AWS.KMS.Internal++    build-depends:+          amazonka-core == 1.0.0+        , amazonka-test == 1.0.0+        , amazonka-kms == 1.0.0+        , base+        , bytestring+        , lens+        , tasty+        , tasty-hunit+        , text+        , time+        , unordered-containers
gen/Network/AWS/KMS.hs view
@@ -1,76 +1,335 @@+{-# OPTIONS_GHC -fno-warn-unused-imports    #-}+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | -- Module      : Network.AWS.KMS--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License     : This Source Code Form is subject to the terms of---               the Mozilla Public License, v. 2.0.---               A copy of the MPL can be found in the LICENSE file or---               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright   : (c) 2013-2015 Brendan Hay+-- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>--- Stability   : experimental+-- Stability   : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Amazon Key Management Service (KMS) is a managed service that makes it easy--- for you to create and control the encryption keys used to encrypt your data,--- and uses Hardware Security Modules (HSMs) to protect the security of your--- keys. Amazon Key Management Service is integrated with other Amazon services--- including Amazon EBS, Amazon S3, and Amazon Redshift. Amazon Key Management--- Service is also integrated with Amazon CloudTrail to provide you with logs of--- all key usage to help meet your regulatory and compliance needs.+-- AWS Key Management Service+--+-- AWS Key Management Service (KMS) is an encryption and key management web+-- service. This guide describes the KMS actions that you can call+-- programmatically. For general information about KMS, see the+-- <http://docs.aws.amazon.com/kms/latest/developerguide/overview.html AWS Key Management Service Developer Guide>+--+-- AWS provides SDKs that consist of libraries and sample code for various+-- programming languages and platforms (Java, Ruby, .Net, iOS, Android,+-- etc.). The SDKs provide a convenient way to create programmatic access+-- to KMS and AWS. For example, the SDKs take care of tasks such as signing+-- requests (see below), managing errors, and retrying requests+-- automatically. For more information about the AWS SDKs, including how to+-- download and install them, see+-- <http://aws.amazon.com/tools/ Tools for Amazon Web Services>.+--+-- We recommend that you use the AWS SDKs to make programmatic API calls to+-- 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.+--+-- __Signing Requests__+--+-- Requests must be signed by using an access key ID and a secret access+-- key. We strongly recommend that you do not use your AWS account access+-- key ID and secret key for everyday work with 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 KMS operations require+-- <http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html Signature Version 4>.+--+-- __Recording API Requests__+--+-- KMS supports AWS CloudTrail, a service that records 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 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+-- <http://docs.aws.amazon.com/awscloudtrail/latest/userguide/whatiscloudtrail.html AWS CloudTrail User Guide>+--+-- __Additional Resources__+--+-- For more information about credentials and request signing, see the+-- following:+--+-- -   <http://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html AWS Security Credentials>.+--     This topic provides general information about the types of+--     credentials used for accessing AWS.+-- -   <http://docs.aws.amazon.com/STS/latest/UsingSTS/ AWS Security Token Service>.+--     This guide describes how to create and use temporary security+--     credentials.+-- -   <http://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html Signing AWS API Requests>.+--     This set of topics walks you through the process of signing a+--     request using an access key ID and a secret access key.+--+-- __Commonly Used APIs__+--+-- 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.+--+-- -   Encrypt+-- -   Decrypt+-- -   GenerateDataKey+-- -   GenerateDataKeyWithoutPlaintext+--+-- /See:/ <http://docs.aws.amazon.com/kms/latest/APIReference/Welcome.html AWS API Reference> module Network.AWS.KMS-    ( module Network.AWS.KMS.CreateAlias-    , module Network.AWS.KMS.CreateGrant-    , module Network.AWS.KMS.CreateKey-    , module Network.AWS.KMS.Decrypt-    , module Network.AWS.KMS.DeleteAlias-    , module Network.AWS.KMS.DescribeKey-    , module Network.AWS.KMS.DisableKey+    (+    -- * Service+      KMS++    -- * Errors+    -- $errors++    -- ** InvalidMarkerException+    , _InvalidMarkerException++    -- ** InvalidKeyUsageException+    , _InvalidKeyUsageException++    -- ** UnsupportedOperationException+    , _UnsupportedOperationException++    -- ** MalformedPolicyDocumentException+    , _MalformedPolicyDocumentException++    -- ** DisabledException+    , _DisabledException++    -- ** KeyUnavailableException+    , _KeyUnavailableException++    -- ** KMSInternalException+    , _KMSInternalException++    -- ** NotFoundException+    , _NotFoundException++    -- ** InvalidAliasNameException+    , _InvalidAliasNameException++    -- ** InvalidARNException+    , _InvalidARNException++    -- ** DependencyTimeoutException+    , _DependencyTimeoutException++    -- ** InvalidGrantTokenException+    , _InvalidGrantTokenException++    -- ** InvalidCiphertextException+    , _InvalidCiphertextException++    -- ** LimitExceededException+    , _LimitExceededException++    -- ** AlreadyExistsException+    , _AlreadyExistsException++    -- * Waiters+    -- $waiters++    -- * Operations+    -- $operations++    -- ** DisableKeyRotation     , module Network.AWS.KMS.DisableKeyRotation-    , module Network.AWS.KMS.EnableKey-    , module Network.AWS.KMS.EnableKeyRotation-    , module Network.AWS.KMS.Encrypt-    , module Network.AWS.KMS.GenerateDataKey++    -- ** GenerateDataKeyWithoutPlaintext     , module Network.AWS.KMS.GenerateDataKeyWithoutPlaintext++    -- ** ListGrants+    , module Network.AWS.KMS.ListGrants++    -- ** Encrypt+    , module Network.AWS.KMS.Encrypt++    -- ** EnableKeyRotation+    , module Network.AWS.KMS.EnableKeyRotation++    -- ** CreateGrant+    , module Network.AWS.KMS.CreateGrant++    -- ** CreateAlias+    , module Network.AWS.KMS.CreateAlias++    -- ** ListAliases+    , module Network.AWS.KMS.ListAliases++    -- ** GenerateRandom     , module Network.AWS.KMS.GenerateRandom-    , module Network.AWS.KMS.GetKeyPolicy++    -- ** DisableKey+    , module Network.AWS.KMS.DisableKey++    -- ** CreateKey+    , module Network.AWS.KMS.CreateKey++    -- ** RetireGrant+    , module Network.AWS.KMS.RetireGrant++    -- ** ListKeys+    , module Network.AWS.KMS.ListKeys++    -- ** GetKeyRotationStatus     , module Network.AWS.KMS.GetKeyRotationStatus-    , module Network.AWS.KMS.ListAliases-    , module Network.AWS.KMS.ListGrants++    -- ** GenerateDataKey+    , module Network.AWS.KMS.GenerateDataKey++    -- ** DeleteAlias+    , module Network.AWS.KMS.DeleteAlias++    -- ** UpdateAlias+    , module Network.AWS.KMS.UpdateAlias++    -- ** DescribeKey+    , module Network.AWS.KMS.DescribeKey++    -- ** Decrypt+    , module Network.AWS.KMS.Decrypt++    -- ** UpdateKeyDescription+    , module Network.AWS.KMS.UpdateKeyDescription++    -- ** ReEncrypt+    , module Network.AWS.KMS.ReEncrypt++    -- ** ListKeyPolicies     , module Network.AWS.KMS.ListKeyPolicies-    , module Network.AWS.KMS.ListKeys++    -- ** EnableKey+    , module Network.AWS.KMS.EnableKey++    -- ** PutKeyPolicy     , module Network.AWS.KMS.PutKeyPolicy-    , module Network.AWS.KMS.ReEncrypt-    , module Network.AWS.KMS.RetireGrant++    -- ** RevokeGrant     , module Network.AWS.KMS.RevokeGrant-    , module Network.AWS.KMS.Types-    , module Network.AWS.KMS.UpdateAlias-    , module Network.AWS.KMS.UpdateKeyDescription++    -- ** GetKeyPolicy+    , module Network.AWS.KMS.GetKeyPolicy++    -- * Types++    -- ** DataKeySpec+    , DataKeySpec (..)++    -- ** GrantOperation+    , GrantOperation (..)++    -- ** KeyUsageType+    , KeyUsageType (..)++    -- ** AliasListEntry+    , AliasListEntry+    , aliasListEntry+    , aleTargetKeyId+    , aleAliasName+    , aleAliasARN++    -- ** GrantConstraints+    , GrantConstraints+    , grantConstraints+    , gcEncryptionContextEquals+    , gcEncryptionContextSubset++    -- ** GrantListEntry+    , GrantListEntry+    , grantListEntry+    , gleRetiringPrincipal+    , gleIssuingAccount+    , gleGrantId+    , gleConstraints+    , gleGranteePrincipal+    , gleOperations++    -- ** KeyListEntry+    , KeyListEntry+    , keyListEntry+    , kleKeyARN+    , kleKeyId++    -- ** KeyMetadata+    , KeyMetadata+    , keyMetadata+    , kmARN+    , kmEnabled+    , kmAWSAccountId+    , kmKeyUsage+    , kmCreationDate+    , kmDescription+    , kmKeyId     ) where -import Network.AWS.KMS.CreateAlias-import Network.AWS.KMS.CreateGrant-import Network.AWS.KMS.CreateKey-import Network.AWS.KMS.Decrypt-import Network.AWS.KMS.DeleteAlias-import Network.AWS.KMS.DescribeKey-import Network.AWS.KMS.DisableKey-import Network.AWS.KMS.DisableKeyRotation-import Network.AWS.KMS.EnableKey-import Network.AWS.KMS.EnableKeyRotation-import Network.AWS.KMS.Encrypt-import Network.AWS.KMS.GenerateDataKey-import Network.AWS.KMS.GenerateDataKeyWithoutPlaintext-import Network.AWS.KMS.GenerateRandom-import Network.AWS.KMS.GetKeyPolicy-import Network.AWS.KMS.GetKeyRotationStatus-import Network.AWS.KMS.ListAliases-import Network.AWS.KMS.ListGrants-import Network.AWS.KMS.ListKeyPolicies-import Network.AWS.KMS.ListKeys-import Network.AWS.KMS.PutKeyPolicy-import Network.AWS.KMS.ReEncrypt-import Network.AWS.KMS.RetireGrant-import Network.AWS.KMS.RevokeGrant-import Network.AWS.KMS.Types-import Network.AWS.KMS.UpdateAlias-import Network.AWS.KMS.UpdateKeyDescription+import           Network.AWS.KMS.CreateAlias+import           Network.AWS.KMS.CreateGrant+import           Network.AWS.KMS.CreateKey+import           Network.AWS.KMS.Decrypt+import           Network.AWS.KMS.DeleteAlias+import           Network.AWS.KMS.DescribeKey+import           Network.AWS.KMS.DisableKey+import           Network.AWS.KMS.DisableKeyRotation+import           Network.AWS.KMS.EnableKey+import           Network.AWS.KMS.EnableKeyRotation+import           Network.AWS.KMS.Encrypt+import           Network.AWS.KMS.GenerateDataKey+import           Network.AWS.KMS.GenerateDataKeyWithoutPlaintext+import           Network.AWS.KMS.GenerateRandom+import           Network.AWS.KMS.GetKeyPolicy+import           Network.AWS.KMS.GetKeyRotationStatus+import           Network.AWS.KMS.ListAliases+import           Network.AWS.KMS.ListGrants+import           Network.AWS.KMS.ListKeyPolicies+import           Network.AWS.KMS.ListKeys+import           Network.AWS.KMS.PutKeyPolicy+import           Network.AWS.KMS.ReEncrypt+import           Network.AWS.KMS.RetireGrant+import           Network.AWS.KMS.RevokeGrant+import           Network.AWS.KMS.Types+import           Network.AWS.KMS.UpdateAlias+import           Network.AWS.KMS.UpdateKeyDescription+import           Network.AWS.KMS.Waiters++{- $errors+Error matchers are designed for use with the functions provided by+<http://hackage.haskell.org/package/lens/docs/Control-Exception-Lens.html Control.Exception.Lens>.+This allows catching (and rethrowing) service specific errors returned+by 'KMS'.+-}++{- $operations+Some AWS operations return results that are incomplete and require subsequent+requests in order to obtain the entire result set. The process of sending+subsequent requests to continue where a previous request left off is called+pagination. For example, the 'ListObjects' operation of Amazon S3 returns up to+1000 objects at a time, and you must send subsequent requests with the+appropriate Marker in order to retrieve the next page of results.++Operations that have an 'AWSPager' instance can transparently perform subsequent+requests, correctly setting Markers and other request facets to iterate through+the entire result set of a truncated API operation. Operations which support+this have an additional note in the documentation.++Many operations have the ability to filter results on the server side. See the+individual operation parameters for details.+-}++{- $waiters+Waiters poll by repeatedly sending a request until some remote success condition+configured by the 'Wait' specification is fulfilled. The 'Wait' specification+determines how many attempts should be made, in addition to delay and retry strategies.+-}
gen/Network/AWS/KMS/CreateAlias.hs view
@@ -1,122 +1,132 @@-{-# LANGUAGE DataKinds                   #-}-{-# LANGUAGE DeriveGeneric               #-}-{-# LANGUAGE FlexibleInstances           #-}-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}-{-# LANGUAGE LambdaCase                  #-}-{-# LANGUAGE NoImplicitPrelude           #-}-{-# LANGUAGE OverloadedStrings           #-}-{-# LANGUAGE RecordWildCards             #-}-{-# LANGUAGE TypeFamilies                #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric      #-}+{-# LANGUAGE OverloadedStrings  #-}+{-# LANGUAGE RecordWildCards    #-}+{-# LANGUAGE TypeFamilies       #-}  {-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-} +-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | -- Module      : Network.AWS.KMS.CreateAlias--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License     : This Source Code Form is subject to the terms of---               the Mozilla Public License, v. 2.0.---               A copy of the MPL can be found in the LICENSE file or---               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright   : (c) 2013-2015 Brendan Hay+-- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>--- Stability   : experimental+-- Stability   : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Creates a display name for a customer master key. An alias can be used to--- identify a key and should be unique. The console enforces a one-to-one--- mapping between the alias and a key. An alias name can contain only--- alphanumeric characters, forward slashes (/), underscores (_), and dashes--- (-). An alias must start with the word "alias" followed by a forward slash--- (alias/). An alias that begins with "aws" after the forward slash--- (alias/aws...) is reserved by Amazon Web Services (AWS).+-- Creates a display name for a customer master key. An alias can be used+-- to identify a key and should be unique. The console enforces a+-- one-to-one mapping between the alias and a key. An alias name can+-- contain only alphanumeric characters, forward slashes (\/), underscores+-- (_), and dashes (-). An alias must start with the word \"alias\"+-- followed by a forward slash (alias\/). An alias that begins with \"aws\"+-- after the forward slash (alias\/aws...) is reserved by Amazon Web+-- Services (AWS). ----- To associate an alias with a different key, call 'UpdateAlias'.+-- To associate an alias with a different key, call UpdateAlias. -- -- Note that you cannot create or update an alias that represents a key in -- another account. ----- <http://docs.aws.amazon.com/kms/latest/APIReference/API_CreateAlias.html>+-- /See:/ <http://docs.aws.amazon.com/kms/latest/APIReference/API_CreateAlias.html AWS API Reference> for CreateAlias. module Network.AWS.KMS.CreateAlias     (-    -- * Request-      CreateAlias-    -- ** Request constructor-    , createAlias-    -- ** Request lenses+    -- * Creating a Request+      createAlias+    , CreateAlias+    -- * Request Lenses     , caAliasName     , caTargetKeyId -    -- * Response-    , CreateAliasResponse-    -- ** Response constructor+    -- * Destructuring the Response     , createAliasResponse+    , CreateAliasResponse     ) where -import Network.AWS.Data (Object)-import Network.AWS.Prelude-import Network.AWS.Request.JSON-import Network.AWS.KMS.Types-import qualified GHC.Exts+import           Network.AWS.KMS.Types+import           Network.AWS.KMS.Types.Product+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response -data CreateAlias = CreateAlias-    { _caAliasName   :: Text-    , _caTargetKeyId :: Text-    } deriving (Eq, Ord, Read, Show)+-- | /See:/ 'createAlias' smart constructor.+data CreateAlias = CreateAlias'+    { _caAliasName   :: !Text+    , _caTargetKeyId :: !Text+    } deriving (Eq,Read,Show,Data,Typeable,Generic) --- | 'CreateAlias' constructor.------ The fields accessible through corresponding lenses are:+-- | Creates a value of 'CreateAlias' with the minimum fields required to make a request. ----- * 'caAliasName' @::@ 'Text'+-- Use one of the following lenses to modify other fields as desired: ----- * 'caTargetKeyId' @::@ 'Text'+-- * 'caAliasName' ---createAlias :: Text -- ^ 'caAliasName'-            -> Text -- ^ 'caTargetKeyId'-            -> CreateAlias-createAlias p1 p2 = CreateAlias-    { _caAliasName   = p1-    , _caTargetKeyId = p2+-- * 'caTargetKeyId'+createAlias+    :: Text -- ^ 'caAliasName'+    -> Text -- ^ 'caTargetKeyId'+    -> CreateAlias+createAlias pAliasName_ pTargetKeyId_ =+    CreateAlias'+    { _caAliasName = pAliasName_+    , _caTargetKeyId = pTargetKeyId_     }  -- | String that contains the display name. The name must start with the word--- "alias" followed by a forward slash (alias/). Aliases that begin with--- "alias/AWS" are reserved.+-- \"alias\" followed by a forward slash (alias\/). Aliases that begin with+-- \"alias\/AWS\" are reserved. caAliasName :: Lens' CreateAlias Text-caAliasName = lens _caAliasName (\s a -> s { _caAliasName = a })+caAliasName = lens _caAliasName (\ s a -> s{_caAliasName = a}); --- | An identifier of the key for which you are creating the alias. This value--- cannot be another alias but can be a globally unique identifier or a fully--- specified ARN to a key.  Key ARN Example ---- arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012+-- | An identifier of the key for which you are creating the alias. This+-- value cannot be another alias but can be a globally unique identifier or+-- a fully specified ARN to a key. --+-- -   Key ARN Example -+--     arn:aws:kms:us-east-1:123456789012:key\/12345678-1234-1234-1234-123456789012+-- -   Globally Unique Key ID Example -+--     12345678-1234-1234-1234-123456789012 caTargetKeyId :: Lens' CreateAlias Text-caTargetKeyId = lens _caTargetKeyId (\s a -> s { _caTargetKeyId = a })+caTargetKeyId = lens _caTargetKeyId (\ s a -> s{_caTargetKeyId = a}); -data CreateAliasResponse = CreateAliasResponse-    deriving (Eq, Ord, Read, Show, Generic)+instance AWSRequest CreateAlias where+        type Sv CreateAlias = KMS+        type Rs CreateAlias = CreateAliasResponse+        request = postJSON+        response = receiveNull CreateAliasResponse' --- | 'CreateAliasResponse' constructor.-createAliasResponse :: CreateAliasResponse-createAliasResponse = CreateAliasResponse+instance ToHeaders CreateAlias where+        toHeaders+          = const+              (mconcat+                 ["X-Amz-Target" =#+                    ("TrentService.CreateAlias" :: ByteString),+                  "Content-Type" =#+                    ("application/x-amz-json-1.1" :: ByteString)]) +instance ToJSON CreateAlias where+        toJSON CreateAlias'{..}+          = object+              ["AliasName" .= _caAliasName,+               "TargetKeyId" .= _caTargetKeyId]+ instance ToPath CreateAlias where-    toPath = const "/"+        toPath = const "/"  instance ToQuery CreateAlias where-    toQuery = const mempty--instance ToHeaders CreateAlias--instance ToJSON CreateAlias where-    toJSON CreateAlias{..} = object-        [ "AliasName"   .= _caAliasName-        , "TargetKeyId" .= _caTargetKeyId-        ]+        toQuery = const mempty -instance AWSRequest CreateAlias where-    type Sv CreateAlias = KMS-    type Rs CreateAlias = CreateAliasResponse+-- | /See:/ 'createAliasResponse' smart constructor.+data CreateAliasResponse =+    CreateAliasResponse'+    deriving (Eq,Read,Show,Data,Typeable,Generic) -    request  = post "CreateAlias"-    response = nullResponse CreateAliasResponse+-- | Creates a value of 'CreateAliasResponse' with the minimum fields required to make a request.+--+createAliasResponse+    :: CreateAliasResponse+createAliasResponse = CreateAliasResponse'
gen/Network/AWS/KMS/CreateGrant.hs view
@@ -1,186 +1,217 @@-{-# LANGUAGE DataKinds                   #-}-{-# LANGUAGE DeriveGeneric               #-}-{-# LANGUAGE FlexibleInstances           #-}-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}-{-# LANGUAGE LambdaCase                  #-}-{-# LANGUAGE NoImplicitPrelude           #-}-{-# LANGUAGE OverloadedStrings           #-}-{-# LANGUAGE RecordWildCards             #-}-{-# LANGUAGE TypeFamilies                #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric      #-}+{-# LANGUAGE OverloadedStrings  #-}+{-# LANGUAGE RecordWildCards    #-}+{-# LANGUAGE TypeFamilies       #-}  {-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-} +-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | -- Module      : Network.AWS.KMS.CreateGrant--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License     : This Source Code Form is subject to the terms of---               the Mozilla Public License, v. 2.0.---               A copy of the MPL can be found in the LICENSE file or---               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright   : (c) 2013-2015 Brendan Hay+-- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>--- Stability   : experimental+-- Stability   : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Adds a grant to a key to specify who can access the key and under what--- conditions. Grants are alternate permission mechanisms to key policies. For--- more information about grants, see <http://docs.aws.amazon.com/kms/latest/developerguide/grants.html Grants> in the developer guide. If a grant--- is absent, access to the key is evaluated based on IAM policies attached to--- the user.  'ListGrants' 'RetireGrant' 'RevokeGrant'+-- Adds a grant to a key to specify who can access the key and under what+-- conditions. Grants are alternate permission mechanisms to key policies.+-- For more information about grants, see+-- <http://docs.aws.amazon.com/kms/latest/developerguide/grants.html Grants>+-- in the developer guide. If a grant is absent, access to the key is+-- evaluated based on IAM policies attached to the user. ----- <http://docs.aws.amazon.com/kms/latest/APIReference/API_CreateGrant.html>+-- 1.  ListGrants+-- 2.  RetireGrant+-- 3.  RevokeGrant+--+-- /See:/ <http://docs.aws.amazon.com/kms/latest/APIReference/API_CreateGrant.html AWS API Reference> for CreateGrant. module Network.AWS.KMS.CreateGrant     (-    -- * Request-      CreateGrant-    -- ** Request constructor-    , createGrant-    -- ** Request lenses+    -- * Creating a Request+      createGrant+    , CreateGrant+    -- * Request Lenses+    , cgRetiringPrincipal     , cgConstraints     , cgGrantTokens-    , cgGranteePrincipal-    , cgKeyId     , cgOperations-    , cgRetiringPrincipal+    , cgKeyId+    , cgGranteePrincipal -    -- * Response-    , CreateGrantResponse-    -- ** Response constructor+    -- * Destructuring the Response     , createGrantResponse-    -- ** Response lenses-    , cgrGrantId-    , cgrGrantToken+    , CreateGrantResponse+    -- * Response Lenses+    , cgrsGrantId+    , cgrsGrantToken+    , cgrsStatus     ) where -import Network.AWS.Data (Object)-import Network.AWS.Prelude-import Network.AWS.Request.JSON-import Network.AWS.KMS.Types-import qualified GHC.Exts+import           Network.AWS.KMS.Types+import           Network.AWS.KMS.Types.Product+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response -data CreateGrant = CreateGrant-    { _cgConstraints       :: Maybe GrantConstraints-    , _cgGrantTokens       :: List "GrantTokens" Text-    , _cgGranteePrincipal  :: Text-    , _cgKeyId             :: Text-    , _cgOperations        :: List "Operations" GrantOperation-    , _cgRetiringPrincipal :: Maybe Text-    } deriving (Eq, Read, Show)+-- | /See:/ 'createGrant' smart constructor.+data CreateGrant = CreateGrant'+    { _cgRetiringPrincipal :: !(Maybe Text)+    , _cgConstraints       :: !(Maybe GrantConstraints)+    , _cgGrantTokens       :: !(Maybe [Text])+    , _cgOperations        :: !(Maybe [GrantOperation])+    , _cgKeyId             :: !Text+    , _cgGranteePrincipal  :: !Text+    } deriving (Eq,Read,Show,Data,Typeable,Generic) --- | 'CreateGrant' constructor.------ The fields accessible through corresponding lenses are:+-- | Creates a value of 'CreateGrant' with the minimum fields required to make a request. ----- * 'cgConstraints' @::@ 'Maybe' 'GrantConstraints'+-- Use one of the following lenses to modify other fields as desired: ----- * 'cgGrantTokens' @::@ ['Text']+-- * 'cgRetiringPrincipal' ----- * 'cgGranteePrincipal' @::@ 'Text'+-- * 'cgConstraints' ----- * 'cgKeyId' @::@ 'Text'+-- * 'cgGrantTokens' ----- * 'cgOperations' @::@ ['GrantOperation']+-- * 'cgOperations' ----- * 'cgRetiringPrincipal' @::@ 'Maybe' 'Text'+-- * 'cgKeyId' ---createGrant :: Text -- ^ 'cgKeyId'-            -> Text -- ^ 'cgGranteePrincipal'-            -> CreateGrant-createGrant p1 p2 = CreateGrant-    { _cgKeyId             = p1-    , _cgGranteePrincipal  = p2-    , _cgRetiringPrincipal = Nothing-    , _cgOperations        = mempty-    , _cgConstraints       = Nothing-    , _cgGrantTokens       = mempty+-- * 'cgGranteePrincipal'+createGrant+    :: Text -- ^ 'cgKeyId'+    -> Text -- ^ 'cgGranteePrincipal'+    -> CreateGrant+createGrant pKeyId_ pGranteePrincipal_ =+    CreateGrant'+    { _cgRetiringPrincipal = Nothing+    , _cgConstraints = Nothing+    , _cgGrantTokens = Nothing+    , _cgOperations = Nothing+    , _cgKeyId = pKeyId_+    , _cgGranteePrincipal = pGranteePrincipal_     } --- | Specifies the conditions under which the actions specified by the 'Operations'--- parameter are allowed.+-- | Principal given permission to retire the grant. For more information,+-- see RetireGrant.+cgRetiringPrincipal :: Lens' CreateGrant (Maybe Text)+cgRetiringPrincipal = lens _cgRetiringPrincipal (\ s a -> s{_cgRetiringPrincipal = a});++-- | Specifies the conditions under which the actions specified by the+-- 'Operations' parameter are allowed. cgConstraints :: Lens' CreateGrant (Maybe GrantConstraints)-cgConstraints = lens _cgConstraints (\s a -> s { _cgConstraints = a })+cgConstraints = lens _cgConstraints (\ s a -> s{_cgConstraints = a}); --- | For more information, see <http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token Grant Tokens>.+-- | For more information, see+-- <http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token Grant Tokens>. cgGrantTokens :: Lens' CreateGrant [Text]-cgGrantTokens = lens _cgGrantTokens (\s a -> s { _cgGrantTokens = a }) . _List---- | Principal given permission by the grant to use the key identified by the 'keyId'--- parameter.-cgGranteePrincipal :: Lens' CreateGrant Text-cgGranteePrincipal =-    lens _cgGranteePrincipal (\s a -> s { _cgGranteePrincipal = a })+cgGrantTokens = lens _cgGrantTokens (\ s a -> s{_cgGrantTokens = a}) . _Default . _Coerce; --- | A unique identifier for the customer master key. This value can be a globally--- unique identifier or the fully specified ARN to a key.  Key ARN Example ---- arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012+-- | List of operations permitted by the grant. This can be any combination+-- of one or more of the following values: ---cgKeyId :: Lens' CreateGrant Text-cgKeyId = lens _cgKeyId (\s a -> s { _cgKeyId = a })---- | List of operations permitted by the grant. This can be any combination of one--- or more of the following values:  Decrypt Encrypt GenerateDataKey GenerateDataKeyWithoutPlaintext--- ReEncryptFrom ReEncryptTo CreateGrant RetireGrant+-- 1.  Decrypt+-- 2.  Encrypt+-- 3.  GenerateDataKey+-- 4.  GenerateDataKeyWithoutPlaintext+-- 5.  ReEncryptFrom+-- 6.  ReEncryptTo+-- 7.  CreateGrant+-- 8.  RetireGrant cgOperations :: Lens' CreateGrant [GrantOperation]-cgOperations = lens _cgOperations (\s a -> s { _cgOperations = a }) . _List+cgOperations = lens _cgOperations (\ s a -> s{_cgOperations = a}) . _Default . _Coerce; --- | Principal given permission to retire the grant. For more information, see 'RetireGrant'.-cgRetiringPrincipal :: Lens' CreateGrant (Maybe Text)-cgRetiringPrincipal =-    lens _cgRetiringPrincipal (\s a -> s { _cgRetiringPrincipal = a })+-- | A unique identifier for the customer master key. This value can be a+-- globally unique identifier or the fully specified ARN to a key.+--+-- -   Key ARN Example -+--     arn:aws:kms:us-east-1:123456789012:key\/12345678-1234-1234-1234-123456789012+-- -   Globally Unique Key ID Example -+--     12345678-1234-1234-1234-123456789012+cgKeyId :: Lens' CreateGrant Text+cgKeyId = lens _cgKeyId (\ s a -> s{_cgKeyId = a}); -data CreateGrantResponse = CreateGrantResponse-    { _cgrGrantId    :: Maybe Text-    , _cgrGrantToken :: Maybe Text-    } deriving (Eq, Ord, Read, Show)+-- | Principal given permission by the grant to use the key identified by the+-- 'keyId' parameter.+cgGranteePrincipal :: Lens' CreateGrant Text+cgGranteePrincipal = lens _cgGranteePrincipal (\ s a -> s{_cgGranteePrincipal = a}); --- | 'CreateGrantResponse' constructor.------ The fields accessible through corresponding lenses are:------ * 'cgrGrantId' @::@ 'Maybe' 'Text'------ * 'cgrGrantToken' @::@ 'Maybe' 'Text'----createGrantResponse :: CreateGrantResponse-createGrantResponse = CreateGrantResponse-    { _cgrGrantToken = Nothing-    , _cgrGrantId    = Nothing-    }+instance AWSRequest CreateGrant where+        type Sv CreateGrant = KMS+        type Rs CreateGrant = CreateGrantResponse+        request = postJSON+        response+          = receiveJSON+              (\ s h x ->+                 CreateGrantResponse' <$>+                   (x .?> "GrantId") <*> (x .?> "GrantToken") <*>+                     (pure (fromEnum s))) --- | Unique grant identifier. You can use the /GrantId/ value to revoke a grant.-cgrGrantId :: Lens' CreateGrantResponse (Maybe Text)-cgrGrantId = lens _cgrGrantId (\s a -> s { _cgrGrantId = a })+instance ToHeaders CreateGrant where+        toHeaders+          = const+              (mconcat+                 ["X-Amz-Target" =#+                    ("TrentService.CreateGrant" :: ByteString),+                  "Content-Type" =#+                    ("application/x-amz-json-1.1" :: ByteString)]) --- | For more information, see <http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token Grant Tokens>.-cgrGrantToken :: Lens' CreateGrantResponse (Maybe Text)-cgrGrantToken = lens _cgrGrantToken (\s a -> s { _cgrGrantToken = a })+instance ToJSON CreateGrant where+        toJSON CreateGrant'{..}+          = object+              ["RetiringPrincipal" .= _cgRetiringPrincipal,+               "Constraints" .= _cgConstraints,+               "GrantTokens" .= _cgGrantTokens,+               "Operations" .= _cgOperations, "KeyId" .= _cgKeyId,+               "GranteePrincipal" .= _cgGranteePrincipal]  instance ToPath CreateGrant where-    toPath = const "/"+        toPath = const "/"  instance ToQuery CreateGrant where-    toQuery = const mempty+        toQuery = const mempty -instance ToHeaders CreateGrant+-- | /See:/ 'createGrantResponse' smart constructor.+data CreateGrantResponse = CreateGrantResponse'+    { _cgrsGrantId    :: !(Maybe Text)+    , _cgrsGrantToken :: !(Maybe Text)+    , _cgrsStatus     :: !Int+    } deriving (Eq,Read,Show,Data,Typeable,Generic) -instance ToJSON CreateGrant where-    toJSON CreateGrant{..} = object-        [ "KeyId"             .= _cgKeyId-        , "GranteePrincipal"  .= _cgGranteePrincipal-        , "RetiringPrincipal" .= _cgRetiringPrincipal-        , "Operations"        .= _cgOperations-        , "Constraints"       .= _cgConstraints-        , "GrantTokens"       .= _cgGrantTokens-        ]+-- | Creates a value of 'CreateGrantResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cgrsGrantId'+--+-- * 'cgrsGrantToken'+--+-- * 'cgrsStatus'+createGrantResponse+    :: Int -- ^ 'cgrsStatus'+    -> CreateGrantResponse+createGrantResponse pStatus_ =+    CreateGrantResponse'+    { _cgrsGrantId = Nothing+    , _cgrsGrantToken = Nothing+    , _cgrsStatus = pStatus_+    } -instance AWSRequest CreateGrant where-    type Sv CreateGrant = KMS-    type Rs CreateGrant = CreateGrantResponse+-- | Unique grant identifier. You can use the /GrantId/ value to revoke a+-- grant.+cgrsGrantId :: Lens' CreateGrantResponse (Maybe Text)+cgrsGrantId = lens _cgrsGrantId (\ s a -> s{_cgrsGrantId = a}); -    request  = post "CreateGrant"-    response = jsonResponse+-- | For more information, see+-- <http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token Grant Tokens>.+cgrsGrantToken :: Lens' CreateGrantResponse (Maybe Text)+cgrsGrantToken = lens _cgrsGrantToken (\ s a -> s{_cgrsGrantToken = a}); -instance FromJSON CreateGrantResponse where-    parseJSON = withObject "CreateGrantResponse" $ \o -> CreateGrantResponse-        <$> o .:? "GrantId"-        <*> o .:? "GrantToken"+-- | The response status code.+cgrsStatus :: Lens' CreateGrantResponse Int+cgrsStatus = lens _cgrsStatus (\ s a -> s{_cgrsStatus = a});
gen/Network/AWS/KMS/CreateKey.hs view
@@ -1,137 +1,152 @@-{-# LANGUAGE DataKinds                   #-}-{-# LANGUAGE DeriveGeneric               #-}-{-# LANGUAGE FlexibleInstances           #-}-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}-{-# LANGUAGE LambdaCase                  #-}-{-# LANGUAGE NoImplicitPrelude           #-}-{-# LANGUAGE OverloadedStrings           #-}-{-# LANGUAGE RecordWildCards             #-}-{-# LANGUAGE TypeFamilies                #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric      #-}+{-# LANGUAGE OverloadedStrings  #-}+{-# LANGUAGE RecordWildCards    #-}+{-# LANGUAGE TypeFamilies       #-}  {-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-} +-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | -- Module      : Network.AWS.KMS.CreateKey--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License     : This Source Code Form is subject to the terms of---               the Mozilla Public License, v. 2.0.---               A copy of the MPL can be found in the LICENSE file or---               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright   : (c) 2013-2015 Brendan Hay+-- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>--- Stability   : experimental+-- Stability   : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Creates a customer master key. Customer master keys can be used to encrypt--- small amounts of data (less than 4K) directly, but they are most commonly--- used to encrypt or envelope data keys that are then used to encrypt customer--- data. For more information about data keys, see 'GenerateDataKey' and 'GenerateDataKeyWithoutPlaintext'.+-- Creates a customer master key. Customer master keys can be used to+-- encrypt small amounts of data (less than 4K) directly, but they are most+-- commonly used to encrypt or envelope data keys that are then used to+-- encrypt customer data. For more information about data keys, see+-- GenerateDataKey and GenerateDataKeyWithoutPlaintext. ----- <http://docs.aws.amazon.com/kms/latest/APIReference/API_CreateKey.html>+-- /See:/ <http://docs.aws.amazon.com/kms/latest/APIReference/API_CreateKey.html AWS API Reference> for CreateKey. module Network.AWS.KMS.CreateKey     (-    -- * Request-      CreateKey-    -- ** Request constructor-    , createKey-    -- ** Request lenses-    , ckDescription+    -- * Creating a Request+      createKey+    , CreateKey+    -- * Request Lenses     , ckKeyUsage     , ckPolicy+    , ckDescription -    -- * Response-    , CreateKeyResponse-    -- ** Response constructor+    -- * Destructuring the Response     , createKeyResponse-    -- ** Response lenses-    , ckrKeyMetadata+    , CreateKeyResponse+    -- * Response Lenses+    , ckrsKeyMetadata+    , ckrsStatus     ) where -import Network.AWS.Data (Object)-import Network.AWS.Prelude-import Network.AWS.Request.JSON-import Network.AWS.KMS.Types-import qualified GHC.Exts+import           Network.AWS.KMS.Types+import           Network.AWS.KMS.Types.Product+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response -data CreateKey = CreateKey-    { _ckDescription :: Maybe Text-    , _ckKeyUsage    :: Maybe KeyUsageType-    , _ckPolicy      :: Maybe Text-    } deriving (Eq, Read, Show)+-- | /See:/ 'createKey' smart constructor.+data CreateKey = CreateKey'+    { _ckKeyUsage    :: !(Maybe KeyUsageType)+    , _ckPolicy      :: !(Maybe Text)+    , _ckDescription :: !(Maybe Text)+    } deriving (Eq,Read,Show,Data,Typeable,Generic) --- | 'CreateKey' constructor.------ The fields accessible through corresponding lenses are:+-- | Creates a value of 'CreateKey' with the minimum fields required to make a request. ----- * 'ckDescription' @::@ 'Maybe' 'Text'+-- Use one of the following lenses to modify other fields as desired: ----- * 'ckKeyUsage' @::@ 'Maybe' 'KeyUsageType'+-- * 'ckKeyUsage' ----- * 'ckPolicy' @::@ 'Maybe' 'Text'+-- * 'ckPolicy' ---createKey :: CreateKey-createKey = CreateKey-    { _ckPolicy      = Nothing+-- * 'ckDescription'+createKey+    :: CreateKey+createKey =+    CreateKey'+    { _ckKeyUsage = Nothing+    , _ckPolicy = Nothing     , _ckDescription = Nothing-    , _ckKeyUsage    = Nothing     } --- | Description of the key. We recommend that you choose a description that helps--- your customer decide whether the key is appropriate for a task.-ckDescription :: Lens' CreateKey (Maybe Text)-ckDescription = lens _ckDescription (\s a -> s { _ckDescription = a })- -- | Specifies the intended use of the key. Currently this defaults to--- ENCRYPT/DECRYPT, and only symmetric encryption and decryption are supported.+-- ENCRYPT\/DECRYPT, and only symmetric encryption and decryption are+-- supported. ckKeyUsage :: Lens' CreateKey (Maybe KeyUsageType)-ckKeyUsage = lens _ckKeyUsage (\s a -> s { _ckKeyUsage = a })+ckKeyUsage = lens _ckKeyUsage (\ s a -> s{_ckKeyUsage = a}); --- | Policy to be attached to the key. This is required and delegates back to the--- account. The key is the root of trust.+-- | Policy to be attached to the key. This is required and delegates back to+-- the account. The key is the root of trust. ckPolicy :: Lens' CreateKey (Maybe Text)-ckPolicy = lens _ckPolicy (\s a -> s { _ckPolicy = a })+ckPolicy = lens _ckPolicy (\ s a -> s{_ckPolicy = a}); -newtype CreateKeyResponse = CreateKeyResponse-    { _ckrKeyMetadata :: Maybe KeyMetadata-    } deriving (Eq, Read, Show)+-- | Description of the key. We recommend that you choose a description that+-- helps your customer decide whether the key is appropriate for a task.+ckDescription :: Lens' CreateKey (Maybe Text)+ckDescription = lens _ckDescription (\ s a -> s{_ckDescription = a}); --- | 'CreateKeyResponse' constructor.------ The fields accessible through corresponding lenses are:------ * 'ckrKeyMetadata' @::@ 'Maybe' 'KeyMetadata'----createKeyResponse :: CreateKeyResponse-createKeyResponse = CreateKeyResponse-    { _ckrKeyMetadata = Nothing-    }+instance AWSRequest CreateKey where+        type Sv CreateKey = KMS+        type Rs CreateKey = CreateKeyResponse+        request = postJSON+        response+          = receiveJSON+              (\ s h x ->+                 CreateKeyResponse' <$>+                   (x .?> "KeyMetadata") <*> (pure (fromEnum s))) --- | Metadata associated with the key.-ckrKeyMetadata :: Lens' CreateKeyResponse (Maybe KeyMetadata)-ckrKeyMetadata = lens _ckrKeyMetadata (\s a -> s { _ckrKeyMetadata = a })+instance ToHeaders CreateKey where+        toHeaders+          = const+              (mconcat+                 ["X-Amz-Target" =#+                    ("TrentService.CreateKey" :: ByteString),+                  "Content-Type" =#+                    ("application/x-amz-json-1.1" :: ByteString)]) +instance ToJSON CreateKey where+        toJSON CreateKey'{..}+          = object+              ["KeyUsage" .= _ckKeyUsage, "Policy" .= _ckPolicy,+               "Description" .= _ckDescription]+ instance ToPath CreateKey where-    toPath = const "/"+        toPath = const "/"  instance ToQuery CreateKey where-    toQuery = const mempty--instance ToHeaders CreateKey+        toQuery = const mempty -instance ToJSON CreateKey where-    toJSON CreateKey{..} = object-        [ "Policy"      .= _ckPolicy-        , "Description" .= _ckDescription-        , "KeyUsage"    .= _ckKeyUsage-        ]+-- | /See:/ 'createKeyResponse' smart constructor.+data CreateKeyResponse = CreateKeyResponse'+    { _ckrsKeyMetadata :: !(Maybe KeyMetadata)+    , _ckrsStatus      :: !Int+    } deriving (Eq,Read,Show,Data,Typeable,Generic) -instance AWSRequest CreateKey where-    type Sv CreateKey = KMS-    type Rs CreateKey = CreateKeyResponse+-- | Creates a value of 'CreateKeyResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ckrsKeyMetadata'+--+-- * 'ckrsStatus'+createKeyResponse+    :: Int -- ^ 'ckrsStatus'+    -> CreateKeyResponse+createKeyResponse pStatus_ =+    CreateKeyResponse'+    { _ckrsKeyMetadata = Nothing+    , _ckrsStatus = pStatus_+    } -    request  = post "CreateKey"-    response = jsonResponse+-- | Metadata associated with the key.+ckrsKeyMetadata :: Lens' CreateKeyResponse (Maybe KeyMetadata)+ckrsKeyMetadata = lens _ckrsKeyMetadata (\ s a -> s{_ckrsKeyMetadata = a}); -instance FromJSON CreateKeyResponse where-    parseJSON = withObject "CreateKeyResponse" $ \o -> CreateKeyResponse-        <$> o .:? "KeyMetadata"+-- | The response status code.+ckrsStatus :: Lens' CreateKeyResponse Int+ckrsStatus = lens _ckrsStatus (\ s a -> s{_ckrsStatus = a});
gen/Network/AWS/KMS/Decrypt.hs view
@@ -1,158 +1,176 @@-{-# LANGUAGE DataKinds                   #-}-{-# LANGUAGE DeriveGeneric               #-}-{-# LANGUAGE FlexibleInstances           #-}-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}-{-# LANGUAGE LambdaCase                  #-}-{-# LANGUAGE NoImplicitPrelude           #-}-{-# LANGUAGE OverloadedStrings           #-}-{-# LANGUAGE RecordWildCards             #-}-{-# LANGUAGE TypeFamilies                #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric      #-}+{-# LANGUAGE OverloadedStrings  #-}+{-# LANGUAGE RecordWildCards    #-}+{-# LANGUAGE TypeFamilies       #-}  {-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-} +-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | -- Module      : Network.AWS.KMS.Decrypt--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License     : This Source Code Form is subject to the terms of---               the Mozilla Public License, v. 2.0.---               A copy of the MPL can be found in the LICENSE file or---               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright   : (c) 2013-2015 Brendan Hay+-- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>--- Stability   : experimental+-- Stability   : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Decrypts ciphertext. Ciphertext is plaintext that has been previously--- encrypted by using any of the following functions:  'GenerateDataKey' 'GenerateDataKeyWithoutPlaintext' 'Encrypt'+-- Decrypts ciphertext. Ciphertext is plaintext that has been previously+-- encrypted by using any of the following functions: --+-- -   GenerateDataKey+-- -   GenerateDataKeyWithoutPlaintext+-- -   Encrypt+-- -- Note that if a caller has been granted access permissions to all keys--- (through, for example, IAM user policies that grant 'Decrypt' 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 'Decrypt' access in an IAM user policy. Instead--- grant 'Decrypt' access only in key policies. If you must grant 'Decrypt' access--- in an IAM user policy, you should scope the resource to specific keys or to--- specific trusted accounts.+-- (through, for example, IAM user policies that grant 'Decrypt' 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 'Decrypt' access in an+-- IAM user policy. Instead grant 'Decrypt' access only in key policies. If+-- you must grant 'Decrypt' access in an IAM user policy, you should scope+-- the resource to specific keys or to specific trusted accounts. ----- <http://docs.aws.amazon.com/kms/latest/APIReference/API_Decrypt.html>+-- /See:/ <http://docs.aws.amazon.com/kms/latest/APIReference/API_Decrypt.html AWS API Reference> for Decrypt. module Network.AWS.KMS.Decrypt     (-    -- * Request-      Decrypt-    -- ** Request constructor-    , decrypt-    -- ** Request lenses-    , dCiphertextBlob+    -- * Creating a Request+      decrypt+    , Decrypt+    -- * Request Lenses     , dEncryptionContext     , dGrantTokens+    , dCiphertextBlob -    -- * Response-    , DecryptResponse-    -- ** Response constructor+    -- * Destructuring the Response     , decryptResponse-    -- ** Response lenses-    , drKeyId-    , drPlaintext+    , DecryptResponse+    -- * Response Lenses+    , drsKeyId+    , drsPlaintext+    , drsStatus     ) where -import Network.AWS.Data (Object)-import Network.AWS.Prelude-import Network.AWS.Request.JSON-import Network.AWS.KMS.Types-import qualified GHC.Exts+import           Network.AWS.KMS.Types+import           Network.AWS.KMS.Types.Product+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response -data Decrypt = Decrypt-    { _dCiphertextBlob    :: Base64-    , _dEncryptionContext :: Map Text Text-    , _dGrantTokens       :: List "GrantTokens" Text-    } deriving (Eq, Read, Show)+-- | /See:/ 'decrypt' smart constructor.+data Decrypt = Decrypt'+    { _dEncryptionContext :: !(Maybe (Map Text Text))+    , _dGrantTokens       :: !(Maybe [Text])+    , _dCiphertextBlob    :: !Base64+    } deriving (Eq,Read,Show,Data,Typeable,Generic) --- | 'Decrypt' constructor.------ The fields accessible through corresponding lenses are:+-- | Creates a value of 'Decrypt' with the minimum fields required to make a request. ----- * 'dCiphertextBlob' @::@ 'Base64'+-- Use one of the following lenses to modify other fields as desired: ----- * 'dEncryptionContext' @::@ 'HashMap' 'Text' 'Text'+-- * 'dEncryptionContext' ----- * 'dGrantTokens' @::@ ['Text']+-- * 'dGrantTokens' ---decrypt :: Base64 -- ^ 'dCiphertextBlob'-        -> Decrypt-decrypt p1 = Decrypt-    { _dCiphertextBlob    = p1-    , _dEncryptionContext = mempty-    , _dGrantTokens       = mempty+-- * 'dCiphertextBlob'+decrypt+    :: ByteString -- ^ 'dCiphertextBlob'+    -> Decrypt+decrypt pCiphertextBlob_ =+    Decrypt'+    { _dEncryptionContext = Nothing+    , _dGrantTokens = Nothing+    , _dCiphertextBlob = _Base64 # pCiphertextBlob_     } --- | Ciphertext to be decrypted. The blob includes metadata.-dCiphertextBlob :: Lens' Decrypt Base64-dCiphertextBlob = lens _dCiphertextBlob (\s a -> s { _dCiphertextBlob = a })---- | The encryption context. If this was specified in the 'Encrypt' function, it--- must be specified here or the decryption operation will fail. For more--- information, see <http://docs.aws.amazon.com/kms/latest/developerguide/encrypt-context.html Encryption Context>.+-- | The encryption context. If this was specified in the Encrypt function,+-- it must be specified here or the decryption operation will fail. For+-- more information, see+-- <http://docs.aws.amazon.com/kms/latest/developerguide/encrypt-context.html Encryption Context>. dEncryptionContext :: Lens' Decrypt (HashMap Text Text)-dEncryptionContext =-    lens _dEncryptionContext (\s a -> s { _dEncryptionContext = a })-        . _Map+dEncryptionContext = lens _dEncryptionContext (\ s a -> s{_dEncryptionContext = a}) . _Default . _Map; --- | For more information, see <http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token Grant Tokens>.+-- | For more information, see+-- <http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token Grant Tokens>. dGrantTokens :: Lens' Decrypt [Text]-dGrantTokens = lens _dGrantTokens (\s a -> s { _dGrantTokens = a }) . _List+dGrantTokens = lens _dGrantTokens (\ s a -> s{_dGrantTokens = a}) . _Default . _Coerce; -data DecryptResponse = DecryptResponse-    { _drKeyId     :: Maybe Text-    , _drPlaintext :: Maybe Base64-    } deriving (Eq, Read, Show)+-- | Ciphertext to be decrypted. The blob includes metadata.+dCiphertextBlob :: Lens' Decrypt ByteString+dCiphertextBlob = lens _dCiphertextBlob (\ s a -> s{_dCiphertextBlob = a}) . _Base64; --- | 'DecryptResponse' constructor.------ The fields accessible through corresponding lenses are:------ * 'drKeyId' @::@ 'Maybe' 'Text'------ * 'drPlaintext' @::@ 'Maybe' 'Base64'----decryptResponse :: DecryptResponse-decryptResponse = DecryptResponse-    { _drKeyId     = Nothing-    , _drPlaintext = Nothing-    }+instance AWSRequest Decrypt where+        type Sv Decrypt = KMS+        type Rs Decrypt = DecryptResponse+        request = postJSON+        response+          = receiveJSON+              (\ s h x ->+                 DecryptResponse' <$>+                   (x .?> "KeyId") <*> (x .?> "Plaintext") <*>+                     (pure (fromEnum s))) --- | ARN of the key used to perform the decryption. This value is returned if no--- errors are encountered during the operation.-drKeyId :: Lens' DecryptResponse (Maybe Text)-drKeyId = lens _drKeyId (\s a -> s { _drKeyId = a })+instance ToHeaders Decrypt where+        toHeaders+          = const+              (mconcat+                 ["X-Amz-Target" =#+                    ("TrentService.Decrypt" :: ByteString),+                  "Content-Type" =#+                    ("application/x-amz-json-1.1" :: ByteString)]) --- | Decrypted plaintext data. This value may not be returned if the customer--- master key is not available or if you didn't have permission to use it.-drPlaintext :: Lens' DecryptResponse (Maybe Base64)-drPlaintext = lens _drPlaintext (\s a -> s { _drPlaintext = a })+instance ToJSON Decrypt where+        toJSON Decrypt'{..}+          = object+              ["EncryptionContext" .= _dEncryptionContext,+               "GrantTokens" .= _dGrantTokens,+               "CiphertextBlob" .= _dCiphertextBlob]  instance ToPath Decrypt where-    toPath = const "/"+        toPath = const "/"  instance ToQuery Decrypt where-    toQuery = const mempty+        toQuery = const mempty -instance ToHeaders Decrypt+-- | /See:/ 'decryptResponse' smart constructor.+data DecryptResponse = DecryptResponse'+    { _drsKeyId     :: !(Maybe Text)+    , _drsPlaintext :: !(Maybe (Sensitive Base64))+    , _drsStatus    :: !Int+    } deriving (Eq,Read,Show,Data,Typeable,Generic) -instance ToJSON Decrypt where-    toJSON Decrypt{..} = object-        [ "CiphertextBlob"    .= _dCiphertextBlob-        , "EncryptionContext" .= _dEncryptionContext-        , "GrantTokens"       .= _dGrantTokens-        ]+-- | Creates a value of 'DecryptResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'drsKeyId'+--+-- * 'drsPlaintext'+--+-- * 'drsStatus'+decryptResponse+    :: Int -- ^ 'drsStatus'+    -> DecryptResponse+decryptResponse pStatus_ =+    DecryptResponse'+    { _drsKeyId = Nothing+    , _drsPlaintext = Nothing+    , _drsStatus = pStatus_+    } -instance AWSRequest Decrypt where-    type Sv Decrypt = KMS-    type Rs Decrypt = 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)+drsKeyId = lens _drsKeyId (\ s a -> s{_drsKeyId = a}); -    request  = post "Decrypt"-    response = jsonResponse+-- | Decrypted plaintext data. This value may not be returned if the customer+-- master key is not available or if you didn\'t have permission to use it.+drsPlaintext :: Lens' DecryptResponse (Maybe ByteString)+drsPlaintext = lens _drsPlaintext (\ s a -> s{_drsPlaintext = a}) . mapping (_Sensitive . _Base64); -instance FromJSON DecryptResponse where-    parseJSON = withObject "DecryptResponse" $ \o -> DecryptResponse-        <$> o .:? "KeyId"-        <*> o .:? "Plaintext"+-- | The response status code.+drsStatus :: Lens' DecryptResponse Int+drsStatus = lens _drsStatus (\ s a -> s{_drsStatus = a});
gen/Network/AWS/KMS/DeleteAlias.hs view
@@ -1,95 +1,102 @@-{-# LANGUAGE DataKinds                   #-}-{-# LANGUAGE DeriveGeneric               #-}-{-# LANGUAGE FlexibleInstances           #-}-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}-{-# LANGUAGE LambdaCase                  #-}-{-# LANGUAGE NoImplicitPrelude           #-}-{-# LANGUAGE OverloadedStrings           #-}-{-# LANGUAGE RecordWildCards             #-}-{-# LANGUAGE TypeFamilies                #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric      #-}+{-# LANGUAGE OverloadedStrings  #-}+{-# LANGUAGE RecordWildCards    #-}+{-# LANGUAGE TypeFamilies       #-}  {-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-} +-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | -- Module      : Network.AWS.KMS.DeleteAlias--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License     : This Source Code Form is subject to the terms of---               the Mozilla Public License, v. 2.0.---               A copy of the MPL can be found in the LICENSE file or---               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright   : (c) 2013-2015 Brendan Hay+-- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>--- Stability   : experimental+-- Stability   : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Deletes the specified alias. To associate an alias with a different key, call 'UpdateAlias'.+-- Deletes the specified alias. To associate an alias with a different key,+-- call UpdateAlias. ----- <http://docs.aws.amazon.com/kms/latest/APIReference/API_DeleteAlias.html>+-- /See:/ <http://docs.aws.amazon.com/kms/latest/APIReference/API_DeleteAlias.html AWS API Reference> for DeleteAlias. module Network.AWS.KMS.DeleteAlias     (-    -- * Request-      DeleteAlias-    -- ** Request constructor-    , deleteAlias-    -- ** Request lenses+    -- * Creating a Request+      deleteAlias+    , DeleteAlias+    -- * Request Lenses     , daAliasName -    -- * Response-    , DeleteAliasResponse-    -- ** Response constructor+    -- * Destructuring the Response     , deleteAliasResponse+    , DeleteAliasResponse     ) where -import Network.AWS.Data (Object)-import Network.AWS.Prelude-import Network.AWS.Request.JSON-import Network.AWS.KMS.Types-import qualified GHC.Exts+import           Network.AWS.KMS.Types+import           Network.AWS.KMS.Types.Product+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response -newtype DeleteAlias = DeleteAlias+-- | /See:/ 'deleteAlias' smart constructor.+newtype DeleteAlias = DeleteAlias'     { _daAliasName :: Text-    } deriving (Eq, Ord, Read, Show, Monoid, IsString)+    } deriving (Eq,Read,Show,Data,Typeable,Generic) --- | 'DeleteAlias' constructor.------ The fields accessible through corresponding lenses are:+-- | Creates a value of 'DeleteAlias' with the minimum fields required to make a request. ----- * 'daAliasName' @::@ 'Text'+-- Use one of the following lenses to modify other fields as desired: ---deleteAlias :: Text -- ^ 'daAliasName'-            -> DeleteAlias-deleteAlias p1 = DeleteAlias-    { _daAliasName = p1+-- * 'daAliasName'+deleteAlias+    :: Text -- ^ 'daAliasName'+    -> DeleteAlias+deleteAlias pAliasName_ =+    DeleteAlias'+    { _daAliasName = pAliasName_     } --- | The alias to be deleted. The name must start with the word "alias" followed--- by a forward slash (alias/). Aliases that begin with "alias/AWS" are reserved.+-- | The alias to be deleted. The name must start with the word \"alias\"+-- followed by a forward slash (alias\/). Aliases that begin with+-- \"alias\/AWS\" are reserved. daAliasName :: Lens' DeleteAlias Text-daAliasName = lens _daAliasName (\s a -> s { _daAliasName = a })+daAliasName = lens _daAliasName (\ s a -> s{_daAliasName = a}); -data DeleteAliasResponse = DeleteAliasResponse-    deriving (Eq, Ord, Read, Show, Generic)+instance AWSRequest DeleteAlias where+        type Sv DeleteAlias = KMS+        type Rs DeleteAlias = DeleteAliasResponse+        request = postJSON+        response = receiveNull DeleteAliasResponse' --- | 'DeleteAliasResponse' constructor.-deleteAliasResponse :: DeleteAliasResponse-deleteAliasResponse = DeleteAliasResponse+instance ToHeaders DeleteAlias where+        toHeaders+          = const+              (mconcat+                 ["X-Amz-Target" =#+                    ("TrentService.DeleteAlias" :: ByteString),+                  "Content-Type" =#+                    ("application/x-amz-json-1.1" :: ByteString)]) +instance ToJSON DeleteAlias where+        toJSON DeleteAlias'{..}+          = object ["AliasName" .= _daAliasName]+ instance ToPath DeleteAlias where-    toPath = const "/"+        toPath = const "/"  instance ToQuery DeleteAlias where-    toQuery = const mempty--instance ToHeaders DeleteAlias--instance ToJSON DeleteAlias where-    toJSON DeleteAlias{..} = object-        [ "AliasName" .= _daAliasName-        ]+        toQuery = const mempty -instance AWSRequest DeleteAlias where-    type Sv DeleteAlias = KMS-    type Rs DeleteAlias = DeleteAliasResponse+-- | /See:/ 'deleteAliasResponse' smart constructor.+data DeleteAliasResponse =+    DeleteAliasResponse'+    deriving (Eq,Read,Show,Data,Typeable,Generic) -    request  = post "DeleteAlias"-    response = nullResponse DeleteAliasResponse+-- | Creates a value of 'DeleteAliasResponse' with the minimum fields required to make a request.+--+deleteAliasResponse+    :: DeleteAliasResponse+deleteAliasResponse = DeleteAliasResponse'
gen/Network/AWS/KMS/DescribeKey.hs view
@@ -1,117 +1,134 @@-{-# LANGUAGE DataKinds                   #-}-{-# LANGUAGE DeriveGeneric               #-}-{-# LANGUAGE FlexibleInstances           #-}-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}-{-# LANGUAGE LambdaCase                  #-}-{-# LANGUAGE NoImplicitPrelude           #-}-{-# LANGUAGE OverloadedStrings           #-}-{-# LANGUAGE RecordWildCards             #-}-{-# LANGUAGE TypeFamilies                #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric      #-}+{-# LANGUAGE OverloadedStrings  #-}+{-# LANGUAGE RecordWildCards    #-}+{-# LANGUAGE TypeFamilies       #-}  {-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-} +-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | -- Module      : Network.AWS.KMS.DescribeKey--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License     : This Source Code Form is subject to the terms of---               the Mozilla Public License, v. 2.0.---               A copy of the MPL can be found in the LICENSE file or---               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright   : (c) 2013-2015 Brendan Hay+-- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>--- Stability   : experimental+-- Stability   : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Provides detailed information about the specified customer master key.+-- Provides detailed information about the specified customer master key. ----- <http://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html>+-- /See:/ <http://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html AWS API Reference> for DescribeKey. module Network.AWS.KMS.DescribeKey     (-    -- * Request-      DescribeKey-    -- ** Request constructor-    , describeKey-    -- ** Request lenses-    , dk1KeyId+    -- * Creating a Request+      describeKey+    , DescribeKey+    -- * Request Lenses+    , dKeyId -    -- * Response-    , DescribeKeyResponse-    -- ** Response constructor+    -- * Destructuring the Response     , describeKeyResponse-    -- ** Response lenses-    , dkrKeyMetadata+    , DescribeKeyResponse+    -- * Response Lenses+    , dkrsKeyMetadata+    , dkrsStatus     ) where -import Network.AWS.Data (Object)-import Network.AWS.Prelude-import Network.AWS.Request.JSON-import Network.AWS.KMS.Types-import qualified GHC.Exts+import           Network.AWS.KMS.Types+import           Network.AWS.KMS.Types.Product+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response -newtype DescribeKey = DescribeKey-    { _dk1KeyId :: Text-    } deriving (Eq, Ord, Read, Show, Monoid, IsString)+-- | /See:/ 'describeKey' smart constructor.+newtype DescribeKey = DescribeKey'+    { _dKeyId :: Text+    } deriving (Eq,Read,Show,Data,Typeable,Generic) --- | 'DescribeKey' constructor.------ The fields accessible through corresponding lenses are:+-- | Creates a value of 'DescribeKey' with the minimum fields required to make a request. ----- * 'dk1KeyId' @::@ 'Text'+-- Use one of the following lenses to modify other fields as desired: ---describeKey :: Text -- ^ 'dk1KeyId'-            -> DescribeKey-describeKey p1 = DescribeKey-    { _dk1KeyId = p1+-- * 'dKeyId'+describeKey+    :: Text -- ^ 'dKeyId'+    -> DescribeKey+describeKey pKeyId_ =+    DescribeKey'+    { _dKeyId = pKeyId_     } --- | A unique identifier for the customer master key. This value can be a globally--- unique identifier, a fully specified ARN to either an alias or a key, or an--- alias name prefixed by "alias/".  Key ARN Example ---- arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 Alias ARN Example - arn:aws:kms:us-east-1:123456789012:alias/MyAliasName--- Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012 Alias--- Name Example - alias/MyAliasName-dk1KeyId :: Lens' DescribeKey Text-dk1KeyId = lens _dk1KeyId (\s a -> s { _dk1KeyId = a })+-- | A unique identifier for the customer master key. This value can be a+-- globally unique identifier, a fully specified ARN to either an alias or+-- a key, or an alias name prefixed by \"alias\/\".+--+-- -   Key ARN Example -+--     arn:aws:kms:us-east-1:123456789012:key\/12345678-1234-1234-1234-123456789012+-- -   Alias ARN Example -+--     arn:aws:kms:us-east-1:123456789012:alias\/MyAliasName+-- -   Globally Unique Key ID Example -+--     12345678-1234-1234-1234-123456789012+-- -   Alias Name Example - alias\/MyAliasName+dKeyId :: Lens' DescribeKey Text+dKeyId = lens _dKeyId (\ s a -> s{_dKeyId = a}); -newtype DescribeKeyResponse = DescribeKeyResponse-    { _dkrKeyMetadata :: Maybe KeyMetadata-    } deriving (Eq, Read, Show)+instance AWSRequest DescribeKey where+        type Sv DescribeKey = KMS+        type Rs DescribeKey = DescribeKeyResponse+        request = postJSON+        response+          = receiveJSON+              (\ s h x ->+                 DescribeKeyResponse' <$>+                   (x .?> "KeyMetadata") <*> (pure (fromEnum s))) --- | 'DescribeKeyResponse' constructor.------ The fields accessible through corresponding lenses are:------ * 'dkrKeyMetadata' @::@ 'Maybe' 'KeyMetadata'----describeKeyResponse :: DescribeKeyResponse-describeKeyResponse = DescribeKeyResponse-    { _dkrKeyMetadata = Nothing-    }+instance ToHeaders DescribeKey where+        toHeaders+          = const+              (mconcat+                 ["X-Amz-Target" =#+                    ("TrentService.DescribeKey" :: ByteString),+                  "Content-Type" =#+                    ("application/x-amz-json-1.1" :: ByteString)]) --- | Metadata associated with the key.-dkrKeyMetadata :: Lens' DescribeKeyResponse (Maybe KeyMetadata)-dkrKeyMetadata = lens _dkrKeyMetadata (\s a -> s { _dkrKeyMetadata = a })+instance ToJSON DescribeKey where+        toJSON DescribeKey'{..} = object ["KeyId" .= _dKeyId]  instance ToPath DescribeKey where-    toPath = const "/"+        toPath = const "/"  instance ToQuery DescribeKey where-    toQuery = const mempty--instance ToHeaders DescribeKey+        toQuery = const mempty -instance ToJSON DescribeKey where-    toJSON DescribeKey{..} = object-        [ "KeyId" .= _dk1KeyId-        ]+-- | /See:/ 'describeKeyResponse' smart constructor.+data DescribeKeyResponse = DescribeKeyResponse'+    { _dkrsKeyMetadata :: !(Maybe KeyMetadata)+    , _dkrsStatus      :: !Int+    } deriving (Eq,Read,Show,Data,Typeable,Generic) -instance AWSRequest DescribeKey where-    type Sv DescribeKey = KMS-    type Rs DescribeKey = DescribeKeyResponse+-- | Creates a value of 'DescribeKeyResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dkrsKeyMetadata'+--+-- * 'dkrsStatus'+describeKeyResponse+    :: Int -- ^ 'dkrsStatus'+    -> DescribeKeyResponse+describeKeyResponse pStatus_ =+    DescribeKeyResponse'+    { _dkrsKeyMetadata = Nothing+    , _dkrsStatus = pStatus_+    } -    request  = post "DescribeKey"-    response = jsonResponse+-- | Metadata associated with the key.+dkrsKeyMetadata :: Lens' DescribeKeyResponse (Maybe KeyMetadata)+dkrsKeyMetadata = lens _dkrsKeyMetadata (\ s a -> s{_dkrsKeyMetadata = a}); -instance FromJSON DescribeKeyResponse where-    parseJSON = withObject "DescribeKeyResponse" $ \o -> DescribeKeyResponse-        <$> o .:? "KeyMetadata"+-- | The response status code.+dkrsStatus :: Lens' DescribeKeyResponse Int+dkrsStatus = lens _dkrsStatus (\ s a -> s{_dkrsStatus = a});
gen/Network/AWS/KMS/DisableKey.hs view
@@ -1,97 +1,104 @@-{-# LANGUAGE DataKinds                   #-}-{-# LANGUAGE DeriveGeneric               #-}-{-# LANGUAGE FlexibleInstances           #-}-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}-{-# LANGUAGE LambdaCase                  #-}-{-# LANGUAGE NoImplicitPrelude           #-}-{-# LANGUAGE OverloadedStrings           #-}-{-# LANGUAGE RecordWildCards             #-}-{-# LANGUAGE TypeFamilies                #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric      #-}+{-# LANGUAGE OverloadedStrings  #-}+{-# LANGUAGE RecordWildCards    #-}+{-# LANGUAGE TypeFamilies       #-}  {-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-} +-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | -- Module      : Network.AWS.KMS.DisableKey--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License     : This Source Code Form is subject to the terms of---               the Mozilla Public License, v. 2.0.---               A copy of the MPL can be found in the LICENSE file or---               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright   : (c) 2013-2015 Brendan Hay+-- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>--- Stability   : experimental+-- Stability   : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Marks a key as disabled, thereby preventing its use.+-- Marks a key as disabled, thereby preventing its use. ----- <http://docs.aws.amazon.com/kms/latest/APIReference/API_DisableKey.html>+-- /See:/ <http://docs.aws.amazon.com/kms/latest/APIReference/API_DisableKey.html AWS API Reference> for DisableKey. module Network.AWS.KMS.DisableKey     (-    -- * Request-      DisableKey-    -- ** Request constructor-    , disableKey-    -- ** Request lenses+    -- * Creating a Request+      disableKey+    , DisableKey+    -- * Request Lenses     , dkKeyId -    -- * Response-    , DisableKeyResponse-    -- ** Response constructor+    -- * Destructuring the Response     , disableKeyResponse+    , DisableKeyResponse     ) where -import Network.AWS.Data (Object)-import Network.AWS.Prelude-import Network.AWS.Request.JSON-import Network.AWS.KMS.Types-import qualified GHC.Exts+import           Network.AWS.KMS.Types+import           Network.AWS.KMS.Types.Product+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response -newtype DisableKey = DisableKey+-- | /See:/ 'disableKey' smart constructor.+newtype DisableKey = DisableKey'     { _dkKeyId :: Text-    } deriving (Eq, Ord, Read, Show, Monoid, IsString)+    } deriving (Eq,Read,Show,Data,Typeable,Generic) --- | 'DisableKey' constructor.------ The fields accessible through corresponding lenses are:+-- | Creates a value of 'DisableKey' with the minimum fields required to make a request. ----- * 'dkKeyId' @::@ 'Text'+-- Use one of the following lenses to modify other fields as desired: ---disableKey :: Text -- ^ 'dkKeyId'-           -> DisableKey-disableKey p1 = DisableKey-    { _dkKeyId = p1+-- * 'dkKeyId'+disableKey+    :: Text -- ^ 'dkKeyId'+    -> DisableKey+disableKey pKeyId_ =+    DisableKey'+    { _dkKeyId = pKeyId_     } --- | A unique identifier for the customer master key. This value can be a globally--- unique identifier or the fully specified ARN to a key.  Key ARN Example ---- arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012+-- | A unique identifier for the customer master key. This value can be a+-- globally unique identifier or the fully specified ARN to a key. --+-- -   Key ARN Example -+--     arn:aws:kms:us-east-1:123456789012:key\/12345678-1234-1234-1234-123456789012+-- -   Globally Unique Key ID Example -+--     12345678-1234-1234-1234-123456789012 dkKeyId :: Lens' DisableKey Text-dkKeyId = lens _dkKeyId (\s a -> s { _dkKeyId = a })+dkKeyId = lens _dkKeyId (\ s a -> s{_dkKeyId = a}); -data DisableKeyResponse = DisableKeyResponse-    deriving (Eq, Ord, Read, Show, Generic)+instance AWSRequest DisableKey where+        type Sv DisableKey = KMS+        type Rs DisableKey = DisableKeyResponse+        request = postJSON+        response = receiveNull DisableKeyResponse' --- | 'DisableKeyResponse' constructor.-disableKeyResponse :: DisableKeyResponse-disableKeyResponse = DisableKeyResponse+instance ToHeaders DisableKey where+        toHeaders+          = const+              (mconcat+                 ["X-Amz-Target" =#+                    ("TrentService.DisableKey" :: ByteString),+                  "Content-Type" =#+                    ("application/x-amz-json-1.1" :: ByteString)]) +instance ToJSON DisableKey where+        toJSON DisableKey'{..} = object ["KeyId" .= _dkKeyId]+ instance ToPath DisableKey where-    toPath = const "/"+        toPath = const "/"  instance ToQuery DisableKey where-    toQuery = const mempty--instance ToHeaders DisableKey--instance ToJSON DisableKey where-    toJSON DisableKey{..} = object-        [ "KeyId" .= _dkKeyId-        ]+        toQuery = const mempty -instance AWSRequest DisableKey where-    type Sv DisableKey = KMS-    type Rs DisableKey = DisableKeyResponse+-- | /See:/ 'disableKeyResponse' smart constructor.+data DisableKeyResponse =+    DisableKeyResponse'+    deriving (Eq,Read,Show,Data,Typeable,Generic) -    request  = post "DisableKey"-    response = nullResponse DisableKeyResponse+-- | Creates a value of 'DisableKeyResponse' with the minimum fields required to make a request.+--+disableKeyResponse+    :: DisableKeyResponse+disableKeyResponse = DisableKeyResponse'
gen/Network/AWS/KMS/DisableKeyRotation.hs view
@@ -1,97 +1,106 @@-{-# LANGUAGE DataKinds                   #-}-{-# LANGUAGE DeriveGeneric               #-}-{-# LANGUAGE FlexibleInstances           #-}-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}-{-# LANGUAGE LambdaCase                  #-}-{-# LANGUAGE NoImplicitPrelude           #-}-{-# LANGUAGE OverloadedStrings           #-}-{-# LANGUAGE RecordWildCards             #-}-{-# LANGUAGE TypeFamilies                #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric      #-}+{-# LANGUAGE OverloadedStrings  #-}+{-# LANGUAGE RecordWildCards    #-}+{-# LANGUAGE TypeFamilies       #-}  {-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-} +-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | -- Module      : Network.AWS.KMS.DisableKeyRotation--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License     : This Source Code Form is subject to the terms of---               the Mozilla Public License, v. 2.0.---               A copy of the MPL can be found in the LICENSE file or---               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright   : (c) 2013-2015 Brendan Hay+-- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>--- Stability   : experimental+-- Stability   : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Disables rotation of the specified key.+-- Disables rotation of the specified key. ----- <http://docs.aws.amazon.com/kms/latest/APIReference/API_DisableKeyRotation.html>+-- /See:/ <http://docs.aws.amazon.com/kms/latest/APIReference/API_DisableKeyRotation.html AWS API Reference> for DisableKeyRotation. module Network.AWS.KMS.DisableKeyRotation     (-    -- * Request-      DisableKeyRotation-    -- ** Request constructor-    , disableKeyRotation-    -- ** Request lenses+    -- * Creating a Request+      disableKeyRotation+    , DisableKeyRotation+    -- * Request Lenses     , dkrKeyId -    -- * Response-    , DisableKeyRotationResponse-    -- ** Response constructor+    -- * Destructuring the Response     , disableKeyRotationResponse+    , DisableKeyRotationResponse     ) where -import Network.AWS.Data (Object)-import Network.AWS.Prelude-import Network.AWS.Request.JSON-import Network.AWS.KMS.Types-import qualified GHC.Exts+import           Network.AWS.KMS.Types+import           Network.AWS.KMS.Types.Product+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response -newtype DisableKeyRotation = DisableKeyRotation+-- | /See:/ 'disableKeyRotation' smart constructor.+newtype DisableKeyRotation = DisableKeyRotation'     { _dkrKeyId :: Text-    } deriving (Eq, Ord, Read, Show, Monoid, IsString)+    } deriving (Eq,Read,Show,Data,Typeable,Generic) --- | 'DisableKeyRotation' constructor.------ The fields accessible through corresponding lenses are:+-- | Creates a value of 'DisableKeyRotation' with the minimum fields required to make a request. ----- * 'dkrKeyId' @::@ 'Text'+-- Use one of the following lenses to modify other fields as desired: ---disableKeyRotation :: Text -- ^ 'dkrKeyId'-                   -> DisableKeyRotation-disableKeyRotation p1 = DisableKeyRotation-    { _dkrKeyId = p1+-- * 'dkrKeyId'+disableKeyRotation+    :: Text -- ^ 'dkrKeyId'+    -> DisableKeyRotation+disableKeyRotation pKeyId_ =+    DisableKeyRotation'+    { _dkrKeyId = pKeyId_     } --- | A unique identifier for the customer master key. This value can be a globally--- unique identifier or the fully specified ARN to a key.  Key ARN Example ---- arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012+-- | A unique identifier for the customer master key. This value can be a+-- globally unique identifier or the fully specified ARN to a key. --+-- -   Key ARN Example -+--     arn:aws:kms:us-east-1:123456789012:key\/12345678-1234-1234-1234-123456789012+-- -   Globally Unique Key ID Example -+--     12345678-1234-1234-1234-123456789012 dkrKeyId :: Lens' DisableKeyRotation Text-dkrKeyId = lens _dkrKeyId (\s a -> s { _dkrKeyId = a })+dkrKeyId = lens _dkrKeyId (\ s a -> s{_dkrKeyId = a}); -data DisableKeyRotationResponse = DisableKeyRotationResponse-    deriving (Eq, Ord, Read, Show, Generic)+instance AWSRequest DisableKeyRotation where+        type Sv DisableKeyRotation = KMS+        type Rs DisableKeyRotation =+             DisableKeyRotationResponse+        request = postJSON+        response = receiveNull DisableKeyRotationResponse' --- | 'DisableKeyRotationResponse' constructor.-disableKeyRotationResponse :: DisableKeyRotationResponse-disableKeyRotationResponse = DisableKeyRotationResponse+instance ToHeaders DisableKeyRotation where+        toHeaders+          = const+              (mconcat+                 ["X-Amz-Target" =#+                    ("TrentService.DisableKeyRotation" :: ByteString),+                  "Content-Type" =#+                    ("application/x-amz-json-1.1" :: ByteString)]) +instance ToJSON DisableKeyRotation where+        toJSON DisableKeyRotation'{..}+          = object ["KeyId" .= _dkrKeyId]+ instance ToPath DisableKeyRotation where-    toPath = const "/"+        toPath = const "/"  instance ToQuery DisableKeyRotation where-    toQuery = const mempty--instance ToHeaders DisableKeyRotation--instance ToJSON DisableKeyRotation where-    toJSON DisableKeyRotation{..} = object-        [ "KeyId" .= _dkrKeyId-        ]+        toQuery = const mempty -instance AWSRequest DisableKeyRotation where-    type Sv DisableKeyRotation = KMS-    type Rs DisableKeyRotation = DisableKeyRotationResponse+-- | /See:/ 'disableKeyRotationResponse' smart constructor.+data DisableKeyRotationResponse =+    DisableKeyRotationResponse'+    deriving (Eq,Read,Show,Data,Typeable,Generic) -    request  = post "DisableKeyRotation"-    response = nullResponse DisableKeyRotationResponse+-- | Creates a value of 'DisableKeyRotationResponse' with the minimum fields required to make a request.+--+disableKeyRotationResponse+    :: DisableKeyRotationResponse+disableKeyRotationResponse = DisableKeyRotationResponse'
gen/Network/AWS/KMS/EnableKey.hs view
@@ -1,98 +1,105 @@-{-# LANGUAGE DataKinds                   #-}-{-# LANGUAGE DeriveGeneric               #-}-{-# LANGUAGE FlexibleInstances           #-}-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}-{-# LANGUAGE LambdaCase                  #-}-{-# LANGUAGE NoImplicitPrelude           #-}-{-# LANGUAGE OverloadedStrings           #-}-{-# LANGUAGE RecordWildCards             #-}-{-# LANGUAGE TypeFamilies                #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric      #-}+{-# LANGUAGE OverloadedStrings  #-}+{-# LANGUAGE RecordWildCards    #-}+{-# LANGUAGE TypeFamilies       #-}  {-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-} +-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | -- Module      : Network.AWS.KMS.EnableKey--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License     : This Source Code Form is subject to the terms of---               the Mozilla Public License, v. 2.0.---               A copy of the MPL can be found in the LICENSE file or---               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright   : (c) 2013-2015 Brendan Hay+-- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>--- Stability   : experimental+-- Stability   : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Marks a key as enabled, thereby permitting its use. You can have up to 25--- enabled keys at one time.+-- Marks a key as enabled, thereby permitting its use. You can have up to+-- 25 enabled keys at one time. ----- <http://docs.aws.amazon.com/kms/latest/APIReference/API_EnableKey.html>+-- /See:/ <http://docs.aws.amazon.com/kms/latest/APIReference/API_EnableKey.html AWS API Reference> for EnableKey. module Network.AWS.KMS.EnableKey     (-    -- * Request-      EnableKey-    -- ** Request constructor-    , enableKey-    -- ** Request lenses+    -- * Creating a Request+      enableKey+    , EnableKey+    -- * Request Lenses     , ekKeyId -    -- * Response-    , EnableKeyResponse-    -- ** Response constructor+    -- * Destructuring the Response     , enableKeyResponse+    , EnableKeyResponse     ) where -import Network.AWS.Data (Object)-import Network.AWS.Prelude-import Network.AWS.Request.JSON-import Network.AWS.KMS.Types-import qualified GHC.Exts+import           Network.AWS.KMS.Types+import           Network.AWS.KMS.Types.Product+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response -newtype EnableKey = EnableKey+-- | /See:/ 'enableKey' smart constructor.+newtype EnableKey = EnableKey'     { _ekKeyId :: Text-    } deriving (Eq, Ord, Read, Show, Monoid, IsString)+    } deriving (Eq,Read,Show,Data,Typeable,Generic) --- | 'EnableKey' constructor.------ The fields accessible through corresponding lenses are:+-- | Creates a value of 'EnableKey' with the minimum fields required to make a request. ----- * 'ekKeyId' @::@ 'Text'+-- Use one of the following lenses to modify other fields as desired: ---enableKey :: Text -- ^ 'ekKeyId'-          -> EnableKey-enableKey p1 = EnableKey-    { _ekKeyId = p1+-- * 'ekKeyId'+enableKey+    :: Text -- ^ 'ekKeyId'+    -> EnableKey+enableKey pKeyId_ =+    EnableKey'+    { _ekKeyId = pKeyId_     } --- | A unique identifier for the customer master key. This value can be a globally--- unique identifier or the fully specified ARN to a key.  Key ARN Example ---- arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012+-- | A unique identifier for the customer master key. This value can be a+-- globally unique identifier or the fully specified ARN to a key. --+-- -   Key ARN Example -+--     arn:aws:kms:us-east-1:123456789012:key\/12345678-1234-1234-1234-123456789012+-- -   Globally Unique Key ID Example -+--     12345678-1234-1234-1234-123456789012 ekKeyId :: Lens' EnableKey Text-ekKeyId = lens _ekKeyId (\s a -> s { _ekKeyId = a })+ekKeyId = lens _ekKeyId (\ s a -> s{_ekKeyId = a}); -data EnableKeyResponse = EnableKeyResponse-    deriving (Eq, Ord, Read, Show, Generic)+instance AWSRequest EnableKey where+        type Sv EnableKey = KMS+        type Rs EnableKey = EnableKeyResponse+        request = postJSON+        response = receiveNull EnableKeyResponse' --- | 'EnableKeyResponse' constructor.-enableKeyResponse :: EnableKeyResponse-enableKeyResponse = EnableKeyResponse+instance ToHeaders EnableKey where+        toHeaders+          = const+              (mconcat+                 ["X-Amz-Target" =#+                    ("TrentService.EnableKey" :: ByteString),+                  "Content-Type" =#+                    ("application/x-amz-json-1.1" :: ByteString)]) +instance ToJSON EnableKey where+        toJSON EnableKey'{..} = object ["KeyId" .= _ekKeyId]+ instance ToPath EnableKey where-    toPath = const "/"+        toPath = const "/"  instance ToQuery EnableKey where-    toQuery = const mempty--instance ToHeaders EnableKey--instance ToJSON EnableKey where-    toJSON EnableKey{..} = object-        [ "KeyId" .= _ekKeyId-        ]+        toQuery = const mempty -instance AWSRequest EnableKey where-    type Sv EnableKey = KMS-    type Rs EnableKey = EnableKeyResponse+-- | /See:/ 'enableKeyResponse' smart constructor.+data EnableKeyResponse =+    EnableKeyResponse'+    deriving (Eq,Read,Show,Data,Typeable,Generic) -    request  = post "EnableKey"-    response = nullResponse EnableKeyResponse+-- | Creates a value of 'EnableKeyResponse' with the minimum fields required to make a request.+--+enableKeyResponse+    :: EnableKeyResponse+enableKeyResponse = EnableKeyResponse'
gen/Network/AWS/KMS/EnableKeyRotation.hs view
@@ -1,97 +1,105 @@-{-# LANGUAGE DataKinds                   #-}-{-# LANGUAGE DeriveGeneric               #-}-{-# LANGUAGE FlexibleInstances           #-}-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}-{-# LANGUAGE LambdaCase                  #-}-{-# LANGUAGE NoImplicitPrelude           #-}-{-# LANGUAGE OverloadedStrings           #-}-{-# LANGUAGE RecordWildCards             #-}-{-# LANGUAGE TypeFamilies                #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric      #-}+{-# LANGUAGE OverloadedStrings  #-}+{-# LANGUAGE RecordWildCards    #-}+{-# LANGUAGE TypeFamilies       #-}  {-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-} +-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | -- Module      : Network.AWS.KMS.EnableKeyRotation--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License     : This Source Code Form is subject to the terms of---               the Mozilla Public License, v. 2.0.---               A copy of the MPL can be found in the LICENSE file or---               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright   : (c) 2013-2015 Brendan Hay+-- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>--- Stability   : experimental+-- Stability   : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Enables rotation of the specified customer master key.+-- Enables rotation of the specified customer master key. ----- <http://docs.aws.amazon.com/kms/latest/APIReference/API_EnableKeyRotation.html>+-- /See:/ <http://docs.aws.amazon.com/kms/latest/APIReference/API_EnableKeyRotation.html AWS API Reference> for EnableKeyRotation. module Network.AWS.KMS.EnableKeyRotation     (-    -- * Request-      EnableKeyRotation-    -- ** Request constructor-    , enableKeyRotation-    -- ** Request lenses+    -- * Creating a Request+      enableKeyRotation+    , EnableKeyRotation+    -- * Request Lenses     , ekrKeyId -    -- * Response-    , EnableKeyRotationResponse-    -- ** Response constructor+    -- * Destructuring the Response     , enableKeyRotationResponse+    , EnableKeyRotationResponse     ) where -import Network.AWS.Data (Object)-import Network.AWS.Prelude-import Network.AWS.Request.JSON-import Network.AWS.KMS.Types-import qualified GHC.Exts+import           Network.AWS.KMS.Types+import           Network.AWS.KMS.Types.Product+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response -newtype EnableKeyRotation = EnableKeyRotation+-- | /See:/ 'enableKeyRotation' smart constructor.+newtype EnableKeyRotation = EnableKeyRotation'     { _ekrKeyId :: Text-    } deriving (Eq, Ord, Read, Show, Monoid, IsString)+    } deriving (Eq,Read,Show,Data,Typeable,Generic) --- | 'EnableKeyRotation' constructor.------ The fields accessible through corresponding lenses are:+-- | Creates a value of 'EnableKeyRotation' with the minimum fields required to make a request. ----- * 'ekrKeyId' @::@ 'Text'+-- Use one of the following lenses to modify other fields as desired: ---enableKeyRotation :: Text -- ^ 'ekrKeyId'-                  -> EnableKeyRotation-enableKeyRotation p1 = EnableKeyRotation-    { _ekrKeyId = p1+-- * 'ekrKeyId'+enableKeyRotation+    :: Text -- ^ 'ekrKeyId'+    -> EnableKeyRotation+enableKeyRotation pKeyId_ =+    EnableKeyRotation'+    { _ekrKeyId = pKeyId_     } --- | A unique identifier for the customer master key. This value can be a globally--- unique identifier or the fully specified ARN to a key.  Key ARN Example ---- arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012+-- | A unique identifier for the customer master key. This value can be a+-- globally unique identifier or the fully specified ARN to a key. --+-- -   Key ARN Example -+--     arn:aws:kms:us-east-1:123456789012:key\/12345678-1234-1234-1234-123456789012+-- -   Globally Unique Key ID Example -+--     12345678-1234-1234-1234-123456789012 ekrKeyId :: Lens' EnableKeyRotation Text-ekrKeyId = lens _ekrKeyId (\s a -> s { _ekrKeyId = a })+ekrKeyId = lens _ekrKeyId (\ s a -> s{_ekrKeyId = a}); -data EnableKeyRotationResponse = EnableKeyRotationResponse-    deriving (Eq, Ord, Read, Show, Generic)+instance AWSRequest EnableKeyRotation where+        type Sv EnableKeyRotation = KMS+        type Rs EnableKeyRotation = EnableKeyRotationResponse+        request = postJSON+        response = receiveNull EnableKeyRotationResponse' --- | 'EnableKeyRotationResponse' constructor.-enableKeyRotationResponse :: EnableKeyRotationResponse-enableKeyRotationResponse = EnableKeyRotationResponse+instance ToHeaders EnableKeyRotation where+        toHeaders+          = const+              (mconcat+                 ["X-Amz-Target" =#+                    ("TrentService.EnableKeyRotation" :: ByteString),+                  "Content-Type" =#+                    ("application/x-amz-json-1.1" :: ByteString)]) +instance ToJSON EnableKeyRotation where+        toJSON EnableKeyRotation'{..}+          = object ["KeyId" .= _ekrKeyId]+ instance ToPath EnableKeyRotation where-    toPath = const "/"+        toPath = const "/"  instance ToQuery EnableKeyRotation where-    toQuery = const mempty--instance ToHeaders EnableKeyRotation--instance ToJSON EnableKeyRotation where-    toJSON EnableKeyRotation{..} = object-        [ "KeyId" .= _ekrKeyId-        ]+        toQuery = const mempty -instance AWSRequest EnableKeyRotation where-    type Sv EnableKeyRotation = KMS-    type Rs EnableKeyRotation = EnableKeyRotationResponse+-- | /See:/ 'enableKeyRotationResponse' smart constructor.+data EnableKeyRotationResponse =+    EnableKeyRotationResponse'+    deriving (Eq,Read,Show,Data,Typeable,Generic) -    request  = post "EnableKeyRotation"-    response = nullResponse EnableKeyRotationResponse+-- | Creates a value of 'EnableKeyRotationResponse' with the minimum fields required to make a request.+--+enableKeyRotationResponse+    :: EnableKeyRotationResponse+enableKeyRotationResponse = EnableKeyRotationResponse'
gen/Network/AWS/KMS/Encrypt.hs view
@@ -1,177 +1,202 @@-{-# LANGUAGE DataKinds                   #-}-{-# LANGUAGE DeriveGeneric               #-}-{-# LANGUAGE FlexibleInstances           #-}-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}-{-# LANGUAGE LambdaCase                  #-}-{-# LANGUAGE NoImplicitPrelude           #-}-{-# LANGUAGE OverloadedStrings           #-}-{-# LANGUAGE RecordWildCards             #-}-{-# LANGUAGE TypeFamilies                #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric      #-}+{-# LANGUAGE OverloadedStrings  #-}+{-# LANGUAGE RecordWildCards    #-}+{-# LANGUAGE TypeFamilies       #-}  {-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-} +-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | -- Module      : Network.AWS.KMS.Encrypt--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License     : This Source Code Form is subject to the terms of---               the Mozilla Public License, v. 2.0.---               A copy of the MPL can be found in the LICENSE file or---               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright   : (c) 2013-2015 Brendan Hay+-- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>--- Stability   : experimental+-- Stability   : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Encrypts plaintext into ciphertext by using a customer master key. The 'Encrypt'--- function has two primary use cases:  You can encrypt up to 4 KB of arbitrary--- data such as an RSA key, a database password, or other sensitive customer--- information. If you are moving encrypted data from one region to another, you--- can use this API to encrypt in the new region the plaintext data key that was--- used to encrypt the data in the original region. This provides you with an--- encrypted copy of the data key that can be decrypted in the new region and--- used there to decrypt the encrypted data.+-- Encrypts plaintext into ciphertext by using a customer master key. The+-- 'Encrypt' function has two primary use cases: ----- Unless you are moving encrypted data from one region to another, you don't--- use this function to encrypt a generated data key within a region. You--- retrieve data keys already encrypted by calling the 'GenerateDataKey' or 'GenerateDataKeyWithoutPlaintext' function. Data keys don't need to be encrypted again by calling 'Encrypt'.+-- -   You can encrypt up to 4 KB of arbitrary data such as an RSA key, a+--     database password, or other sensitive customer information.+-- -   If you are moving encrypted data from one region to another, you can+--     use this API to encrypt in the new region the plaintext data key+--     that was used to encrypt the data in the original region. This+--     provides you with an encrypted copy of the data key that can be+--     decrypted in the new region and used there to decrypt the encrypted+--     data. ----- If you want to encrypt data locally in your application, you can use the 'GenerateDataKey' function to return a plaintext data encryption key and a copy of the key--- encrypted under the customer master key (CMK) of your choosing.+-- Unless you are moving encrypted data from one region to another, you+-- don\'t use this function to encrypt a generated data key within a+-- region. You retrieve data keys already encrypted by calling the+-- GenerateDataKey or GenerateDataKeyWithoutPlaintext function. Data keys+-- don\'t need to be encrypted again by calling 'Encrypt'. ----- <http://docs.aws.amazon.com/kms/latest/APIReference/API_Encrypt.html>+-- If you want to encrypt data locally in your application, you can use the+-- 'GenerateDataKey' function to return a plaintext data encryption key and+-- a copy of the key encrypted under the customer master key (CMK) of your+-- choosing.+--+-- /See:/ <http://docs.aws.amazon.com/kms/latest/APIReference/API_Encrypt.html AWS API Reference> for Encrypt. module Network.AWS.KMS.Encrypt     (-    -- * Request-      Encrypt-    -- ** Request constructor-    , encrypt-    -- ** Request lenses+    -- * Creating a Request+      encrypt+    , Encrypt+    -- * Request Lenses     , eEncryptionContext     , eGrantTokens     , eKeyId     , ePlaintext -    -- * Response-    , EncryptResponse-    -- ** Response constructor+    -- * Destructuring the Response     , encryptResponse-    -- ** Response lenses-    , erCiphertextBlob-    , erKeyId+    , EncryptResponse+    -- * Response Lenses+    , ersKeyId+    , ersCiphertextBlob+    , ersStatus     ) where -import Network.AWS.Data (Object)-import Network.AWS.Prelude-import Network.AWS.Request.JSON-import Network.AWS.KMS.Types-import qualified GHC.Exts+import           Network.AWS.KMS.Types+import           Network.AWS.KMS.Types.Product+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response -data Encrypt = Encrypt-    { _eEncryptionContext :: Map Text Text-    , _eGrantTokens       :: List "GrantTokens" Text-    , _eKeyId             :: Text-    , _ePlaintext         :: Base64-    } deriving (Eq, Read, Show)+-- | /See:/ 'encrypt' smart constructor.+data Encrypt = Encrypt'+    { _eEncryptionContext :: !(Maybe (Map Text Text))+    , _eGrantTokens       :: !(Maybe [Text])+    , _eKeyId             :: !Text+    , _ePlaintext         :: !(Sensitive Base64)+    } deriving (Eq,Read,Show,Data,Typeable,Generic) --- | 'Encrypt' constructor.------ The fields accessible through corresponding lenses are:+-- | Creates a value of 'Encrypt' with the minimum fields required to make a request. ----- * 'eEncryptionContext' @::@ 'HashMap' 'Text' 'Text'+-- Use one of the following lenses to modify other fields as desired: ----- * 'eGrantTokens' @::@ ['Text']+-- * 'eEncryptionContext' ----- * 'eKeyId' @::@ 'Text'+-- * 'eGrantTokens' ----- * 'ePlaintext' @::@ 'Base64'+-- * 'eKeyId' ---encrypt :: Text -- ^ 'eKeyId'-        -> Base64 -- ^ 'ePlaintext'-        -> Encrypt-encrypt p1 p2 = Encrypt-    { _eKeyId             = p1-    , _ePlaintext         = p2-    , _eEncryptionContext = mempty-    , _eGrantTokens       = mempty+-- * 'ePlaintext'+encrypt+    :: Text -- ^ 'eKeyId'+    -> ByteString -- ^ 'ePlaintext'+    -> Encrypt+encrypt pKeyId_ pPlaintext_ =+    Encrypt'+    { _eEncryptionContext = Nothing+    , _eGrantTokens = Nothing+    , _eKeyId = pKeyId_+    , _ePlaintext = _Sensitive . _Base64 # pPlaintext_     } --- | 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 'Decrypt' API or decryption will fail. For more information, see <http://docs.aws.amazon.com/kms/latest/developerguide/encrypt-context.html EncryptionContext>.+-- | 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 'Decrypt' API or decryption will fail. For more information, see+-- <http://docs.aws.amazon.com/kms/latest/developerguide/encrypt-context.html Encryption Context>. eEncryptionContext :: Lens' Encrypt (HashMap Text Text)-eEncryptionContext =-    lens _eEncryptionContext (\s a -> s { _eEncryptionContext = a })-        . _Map+eEncryptionContext = lens _eEncryptionContext (\ s a -> s{_eEncryptionContext = a}) . _Default . _Map; --- | For more information, see <http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token Grant Tokens>.+-- | For more information, see+-- <http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token Grant Tokens>. eGrantTokens :: Lens' Encrypt [Text]-eGrantTokens = lens _eGrantTokens (\s a -> s { _eGrantTokens = a }) . _List+eGrantTokens = lens _eGrantTokens (\ s a -> s{_eGrantTokens = a}) . _Default . _Coerce; --- | A unique identifier for the customer master key. This value can be a globally--- unique identifier, a fully specified ARN to either an alias or a key, or an--- alias name prefixed by "alias/".  Key ARN Example ---- arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 Alias ARN Example - arn:aws:kms:us-east-1:123456789012:alias/MyAliasName--- Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012 Alias--- Name Example - alias/MyAliasName+-- | A unique identifier for the customer master key. This value can be a+-- globally unique identifier, a fully specified ARN to either an alias or+-- a key, or an alias name prefixed by \"alias\/\".+--+-- -   Key ARN Example -+--     arn:aws:kms:us-east-1:123456789012:key\/12345678-1234-1234-1234-123456789012+-- -   Alias ARN Example -+--     arn:aws:kms:us-east-1:123456789012:alias\/MyAliasName+-- -   Globally Unique Key ID Example -+--     12345678-1234-1234-1234-123456789012+-- -   Alias Name Example - alias\/MyAliasName eKeyId :: Lens' Encrypt Text-eKeyId = lens _eKeyId (\s a -> s { _eKeyId = a })+eKeyId = lens _eKeyId (\ s a -> s{_eKeyId = a});  -- | Data to be encrypted.-ePlaintext :: Lens' Encrypt Base64-ePlaintext = lens _ePlaintext (\s a -> s { _ePlaintext = a })--data EncryptResponse = EncryptResponse-    { _erCiphertextBlob :: Maybe Base64-    , _erKeyId          :: Maybe Text-    } deriving (Eq, Read, Show)+ePlaintext :: Lens' Encrypt ByteString+ePlaintext = lens _ePlaintext (\ s a -> s{_ePlaintext = a}) . _Sensitive . _Base64; --- | 'EncryptResponse' constructor.------ The fields accessible through corresponding lenses are:------ * 'erCiphertextBlob' @::@ 'Maybe' 'Base64'------ * 'erKeyId' @::@ 'Maybe' 'Text'----encryptResponse :: EncryptResponse-encryptResponse = EncryptResponse-    { _erCiphertextBlob = Nothing-    , _erKeyId          = Nothing-    }+instance AWSRequest Encrypt where+        type Sv Encrypt = KMS+        type Rs Encrypt = EncryptResponse+        request = postJSON+        response+          = receiveJSON+              (\ s h x ->+                 EncryptResponse' <$>+                   (x .?> "KeyId") <*> (x .?> "CiphertextBlob") <*>+                     (pure (fromEnum s))) --- | The encrypted plaintext. If you are using the CLI, the value is Base64--- encoded. Otherwise, it is not encoded.-erCiphertextBlob :: Lens' EncryptResponse (Maybe Base64)-erCiphertextBlob = lens _erCiphertextBlob (\s a -> s { _erCiphertextBlob = a })+instance ToHeaders Encrypt where+        toHeaders+          = const+              (mconcat+                 ["X-Amz-Target" =#+                    ("TrentService.Encrypt" :: ByteString),+                  "Content-Type" =#+                    ("application/x-amz-json-1.1" :: ByteString)]) --- | The ID of the key used during encryption.-erKeyId :: Lens' EncryptResponse (Maybe Text)-erKeyId = lens _erKeyId (\s a -> s { _erKeyId = a })+instance ToJSON Encrypt where+        toJSON Encrypt'{..}+          = object+              ["EncryptionContext" .= _eEncryptionContext,+               "GrantTokens" .= _eGrantTokens, "KeyId" .= _eKeyId,+               "Plaintext" .= _ePlaintext]  instance ToPath Encrypt where-    toPath = const "/"+        toPath = const "/"  instance ToQuery Encrypt where-    toQuery = const mempty+        toQuery = const mempty -instance ToHeaders Encrypt+-- | /See:/ 'encryptResponse' smart constructor.+data EncryptResponse = EncryptResponse'+    { _ersKeyId          :: !(Maybe Text)+    , _ersCiphertextBlob :: !(Maybe Base64)+    , _ersStatus         :: !Int+    } deriving (Eq,Read,Show,Data,Typeable,Generic) -instance ToJSON Encrypt where-    toJSON Encrypt{..} = object-        [ "KeyId"             .= _eKeyId-        , "Plaintext"         .= _ePlaintext-        , "EncryptionContext" .= _eEncryptionContext-        , "GrantTokens"       .= _eGrantTokens-        ]+-- | Creates a value of 'EncryptResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ersKeyId'+--+-- * 'ersCiphertextBlob'+--+-- * 'ersStatus'+encryptResponse+    :: Int -- ^ 'ersStatus'+    -> EncryptResponse+encryptResponse pStatus_ =+    EncryptResponse'+    { _ersKeyId = Nothing+    , _ersCiphertextBlob = Nothing+    , _ersStatus = pStatus_+    } -instance AWSRequest Encrypt where-    type Sv Encrypt = KMS-    type Rs Encrypt = EncryptResponse+-- | The ID of the key used during encryption.+ersKeyId :: Lens' EncryptResponse (Maybe Text)+ersKeyId = lens _ersKeyId (\ s a -> s{_ersKeyId = a}); -    request  = post "Encrypt"-    response = jsonResponse+-- | The encrypted plaintext. If you are using the CLI, the value is Base64+-- encoded. Otherwise, it is not encoded.+ersCiphertextBlob :: Lens' EncryptResponse (Maybe ByteString)+ersCiphertextBlob = lens _ersCiphertextBlob (\ s a -> s{_ersCiphertextBlob = a}) . mapping _Base64; -instance FromJSON EncryptResponse where-    parseJSON = withObject "EncryptResponse" $ \o -> EncryptResponse-        <$> o .:? "CiphertextBlob"-        <*> o .:? "KeyId"+-- | The response status code.+ersStatus :: Lens' EncryptResponse Int+ersStatus = lens _ersStatus (\ s a -> s{_ersStatus = a});
gen/Network/AWS/KMS/GenerateDataKey.hs view
@@ -1,222 +1,245 @@-{-# LANGUAGE DataKinds                   #-}-{-# LANGUAGE DeriveGeneric               #-}-{-# LANGUAGE FlexibleInstances           #-}-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}-{-# LANGUAGE LambdaCase                  #-}-{-# LANGUAGE NoImplicitPrelude           #-}-{-# LANGUAGE OverloadedStrings           #-}-{-# LANGUAGE RecordWildCards             #-}-{-# LANGUAGE TypeFamilies                #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric      #-}+{-# LANGUAGE OverloadedStrings  #-}+{-# LANGUAGE RecordWildCards    #-}+{-# LANGUAGE TypeFamilies       #-}  {-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-} +-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | -- Module      : Network.AWS.KMS.GenerateDataKey--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License     : This Source Code Form is subject to the terms of---               the Mozilla Public License, v. 2.0.---               A copy of the MPL can be found in the LICENSE file or---               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright   : (c) 2013-2015 Brendan Hay+-- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>--- Stability   : experimental+-- Stability   : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Generates a data key that you can use in your application to locally encrypt--- data. This call returns a plaintext version of the key in the 'Plaintext' field--- of the response object and an encrypted copy of the key in the 'CiphertextBlob'--- field. The key is encrypted by using the master key specified by the 'KeyId'--- field. To decrypt the encrypted key, pass it to the 'Decrypt' API.+-- Generates a data key that you can use in your application to locally+-- encrypt data. This call returns a plaintext version of the key in the+-- 'Plaintext' field of the response object and an encrypted copy of the+-- key in the 'CiphertextBlob' field. The key is encrypted by using the+-- master key specified by the 'KeyId' field. To decrypt the encrypted key,+-- pass it to the 'Decrypt' API. -- -- We recommend that you use the following pattern to locally encrypt data:--- call the 'GenerateDataKey' API, use the key returned in the 'Plaintext' response--- field to locally encrypt data, and then erase the plaintext data key from--- memory. Store the encrypted data key (contained in the 'CiphertextBlob' field)--- alongside of the locally encrypted data.+-- call the 'GenerateDataKey' API, use the key returned in the 'Plaintext'+-- response field to locally encrypt data, and then erase the plaintext+-- data key from memory. Store the encrypted data key (contained in the+-- 'CiphertextBlob' field) alongside of the locally encrypted data. ----- You should not call the 'Encrypt' function to re-encrypt your data keys within--- a region. 'GenerateDataKey' always returns the data key encrypted and tied to--- the customer master key that will be used to decrypt it. There is no need to--- decrypt it twice.  If you decide to use the optional 'EncryptionContext'--- parameter, you must also store the context in full or at least store enough--- information along with the encrypted data to be able to reconstruct the--- context when submitting the ciphertext to the 'Decrypt' API. It is a good--- practice to choose a context that you can reconstruct on the fly to better--- secure the ciphertext. For more information about how this parameter is used,--- see <http://docs.aws.amazon.com/kms/latest/developerguide/encrypt-context.html Encryption Context>.+-- You should not call the 'Encrypt' function to re-encrypt your data keys+-- within a region. 'GenerateDataKey' always returns the data key encrypted+-- and tied to the customer master key that will be used to decrypt it.+-- There is no need to decrypt it twice. ----- To decrypt data, pass the encrypted data key to the 'Decrypt' API. 'Decrypt'--- uses the associated master key to decrypt the encrypted data key and returns--- it as plaintext. Use the plaintext data key to locally decrypt your data and--- then erase the key from memory. You must specify the encryption context, if--- any, that you specified when you generated the key. The encryption context is--- logged by CloudTrail, and you can use this log to help track the use of--- particular data.+-- If you decide to use the optional 'EncryptionContext' parameter, you+-- must also store the context in full or at least store enough information+-- along with the encrypted data to be able to reconstruct the context when+-- submitting the ciphertext to the 'Decrypt' API. It is a good practice to+-- choose a context that you can reconstruct on the fly to better secure+-- the ciphertext. For more information about how this parameter is used,+-- see+-- <http://docs.aws.amazon.com/kms/latest/developerguide/encrypt-context.html Encryption Context>. ----- <http://docs.aws.amazon.com/kms/latest/APIReference/API_GenerateDataKey.html>+-- To decrypt data, pass the encrypted data key to the 'Decrypt' API.+-- 'Decrypt' uses the associated master key to decrypt the encrypted data+-- key and returns it as plaintext. Use the plaintext data key to locally+-- decrypt your data and then erase the key from memory. You must specify+-- the encryption context, if any, that you specified when you generated+-- the key. The encryption context is logged by CloudTrail, and you can use+-- this log to help track the use of particular data.+--+-- /See:/ <http://docs.aws.amazon.com/kms/latest/APIReference/API_GenerateDataKey.html AWS API Reference> for GenerateDataKey. module Network.AWS.KMS.GenerateDataKey     (-    -- * Request-      GenerateDataKey-    -- ** Request constructor-    , generateDataKey-    -- ** Request lenses+    -- * Creating a Request+      generateDataKey+    , GenerateDataKey+    -- * Request Lenses+    , gdkKeySpec     , gdkEncryptionContext+    , gdkNumberOfBytes     , gdkGrantTokens     , gdkKeyId-    , gdkKeySpec-    , gdkNumberOfBytes -    -- * Response-    , GenerateDataKeyResponse-    -- ** Response constructor+    -- * Destructuring the Response     , generateDataKeyResponse-    -- ** Response lenses-    , gdkrCiphertextBlob-    , gdkrKeyId-    , gdkrPlaintext+    , GenerateDataKeyResponse+    -- * Response Lenses+    , gdkrsKeyId+    , gdkrsPlaintext+    , gdkrsCiphertextBlob+    , gdkrsStatus     ) where -import Network.AWS.Data (Object)-import Network.AWS.Prelude-import Network.AWS.Request.JSON-import Network.AWS.KMS.Types-import qualified GHC.Exts+import           Network.AWS.KMS.Types+import           Network.AWS.KMS.Types.Product+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response -data GenerateDataKey = GenerateDataKey-    { _gdkEncryptionContext :: Map Text Text-    , _gdkGrantTokens       :: List "GrantTokens" Text-    , _gdkKeyId             :: Text-    , _gdkKeySpec           :: Maybe DataKeySpec-    , _gdkNumberOfBytes     :: Maybe Nat-    } deriving (Eq, Read, Show)+-- | /See:/ 'generateDataKey' smart constructor.+data GenerateDataKey = GenerateDataKey'+    { _gdkKeySpec           :: !(Maybe DataKeySpec)+    , _gdkEncryptionContext :: !(Maybe (Map Text Text))+    , _gdkNumberOfBytes     :: !(Maybe Nat)+    , _gdkGrantTokens       :: !(Maybe [Text])+    , _gdkKeyId             :: !Text+    } deriving (Eq,Read,Show,Data,Typeable,Generic) --- | 'GenerateDataKey' constructor.------ The fields accessible through corresponding lenses are:+-- | Creates a value of 'GenerateDataKey' with the minimum fields required to make a request. ----- * 'gdkEncryptionContext' @::@ 'HashMap' 'Text' 'Text'+-- Use one of the following lenses to modify other fields as desired: ----- * 'gdkGrantTokens' @::@ ['Text']+-- * 'gdkKeySpec' ----- * 'gdkKeyId' @::@ 'Text'+-- * 'gdkEncryptionContext' ----- * 'gdkKeySpec' @::@ 'Maybe' 'DataKeySpec'+-- * 'gdkNumberOfBytes' ----- * 'gdkNumberOfBytes' @::@ 'Maybe' 'Natural'+-- * 'gdkGrantTokens' ---generateDataKey :: Text -- ^ 'gdkKeyId'-                -> GenerateDataKey-generateDataKey p1 = GenerateDataKey-    { _gdkKeyId             = p1-    , _gdkEncryptionContext = mempty-    , _gdkNumberOfBytes     = Nothing-    , _gdkKeySpec           = Nothing-    , _gdkGrantTokens       = mempty+-- * 'gdkKeyId'+generateDataKey+    :: Text -- ^ 'gdkKeyId'+    -> GenerateDataKey+generateDataKey pKeyId_ =+    GenerateDataKey'+    { _gdkKeySpec = Nothing+    , _gdkEncryptionContext = Nothing+    , _gdkNumberOfBytes = Nothing+    , _gdkGrantTokens = Nothing+    , _gdkKeyId = pKeyId_     } --- | Name/value pair that contains additional data to be authenticated during the--- encryption and decryption processes that use the key. This value is logged by--- AWS CloudTrail to provide context around the data encrypted by the key.+-- | Value that identifies the encryption algorithm and key size to generate+-- a data key for. Currently this can be AES_128 or AES_256.+gdkKeySpec :: Lens' GenerateDataKey (Maybe DataKeySpec)+gdkKeySpec = lens _gdkKeySpec (\ s a -> s{_gdkKeySpec = a});++-- | Name\/value pair that contains additional data to be authenticated+-- during the encryption and decryption processes that use the key. This+-- value is logged by AWS CloudTrail to provide context around the data+-- encrypted by the key. gdkEncryptionContext :: Lens' GenerateDataKey (HashMap Text Text)-gdkEncryptionContext =-    lens _gdkEncryptionContext (\s a -> s { _gdkEncryptionContext = a })-        . _Map+gdkEncryptionContext = lens _gdkEncryptionContext (\ s a -> s{_gdkEncryptionContext = a}) . _Default . _Map; --- | For more information, see <http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token Grant Tokens>.+-- | Integer that contains the number of bytes to generate. Common values are+-- 128, 256, 512, and 1024. 1024 is the current limit. We recommend that+-- you use the 'KeySpec' parameter instead.+gdkNumberOfBytes :: Lens' GenerateDataKey (Maybe Natural)+gdkNumberOfBytes = lens _gdkNumberOfBytes (\ s a -> s{_gdkNumberOfBytes = a}) . mapping _Nat;++-- | For more information, see+-- <http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token Grant Tokens>. gdkGrantTokens :: Lens' GenerateDataKey [Text]-gdkGrantTokens = lens _gdkGrantTokens (\s a -> s { _gdkGrantTokens = a }) . _List+gdkGrantTokens = lens _gdkGrantTokens (\ s a -> s{_gdkGrantTokens = a}) . _Default . _Coerce; --- | A unique identifier for the customer master key. This value can be a globally--- unique identifier, a fully specified ARN to either an alias or a key, or an--- alias name prefixed by "alias/".  Key ARN Example ---- arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 Alias ARN Example - arn:aws:kms:us-east-1:123456789012:alias/MyAliasName--- Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012 Alias--- Name Example - alias/MyAliasName+-- | A unique identifier for the customer master key. This value can be a+-- globally unique identifier, a fully specified ARN to either an alias or+-- a key, or an alias name prefixed by \"alias\/\".+--+-- -   Key ARN Example -+--     arn:aws:kms:us-east-1:123456789012:key\/12345678-1234-1234-1234-123456789012+-- -   Alias ARN Example -+--     arn:aws:kms:us-east-1:123456789012:alias\/MyAliasName+-- -   Globally Unique Key ID Example -+--     12345678-1234-1234-1234-123456789012+-- -   Alias Name Example - alias\/MyAliasName gdkKeyId :: Lens' GenerateDataKey Text-gdkKeyId = lens _gdkKeyId (\s a -> s { _gdkKeyId = a })+gdkKeyId = lens _gdkKeyId (\ s a -> s{_gdkKeyId = a}); --- | Value that identifies the encryption algorithm and key size to generate a--- data key for. Currently this can be AES_128 or AES_256.-gdkKeySpec :: Lens' GenerateDataKey (Maybe DataKeySpec)-gdkKeySpec = lens _gdkKeySpec (\s a -> s { _gdkKeySpec = a })+instance AWSRequest GenerateDataKey where+        type Sv GenerateDataKey = KMS+        type Rs GenerateDataKey = GenerateDataKeyResponse+        request = postJSON+        response+          = receiveJSON+              (\ s h x ->+                 GenerateDataKeyResponse' <$>+                   (x .?> "KeyId") <*> (x .?> "Plaintext") <*>+                     (x .?> "CiphertextBlob")+                     <*> (pure (fromEnum s))) --- | Integer that contains the number of bytes to generate. Common values are 128,--- 256, 512, and 1024. 1024 is the current limit. We recommend that you use the 'KeySpec' parameter instead.-gdkNumberOfBytes :: Lens' GenerateDataKey (Maybe Natural)-gdkNumberOfBytes = lens _gdkNumberOfBytes (\s a -> s { _gdkNumberOfBytes = a }) . mapping _Nat+instance ToHeaders GenerateDataKey where+        toHeaders+          = const+              (mconcat+                 ["X-Amz-Target" =#+                    ("TrentService.GenerateDataKey" :: ByteString),+                  "Content-Type" =#+                    ("application/x-amz-json-1.1" :: ByteString)]) -data GenerateDataKeyResponse = GenerateDataKeyResponse-    { _gdkrCiphertextBlob :: Maybe Base64-    , _gdkrKeyId          :: Maybe Text-    , _gdkrPlaintext      :: Maybe Base64-    } deriving (Eq, Read, Show)+instance ToJSON GenerateDataKey where+        toJSON GenerateDataKey'{..}+          = object+              ["KeySpec" .= _gdkKeySpec,+               "EncryptionContext" .= _gdkEncryptionContext,+               "NumberOfBytes" .= _gdkNumberOfBytes,+               "GrantTokens" .= _gdkGrantTokens,+               "KeyId" .= _gdkKeyId] --- | 'GenerateDataKeyResponse' constructor.+instance ToPath GenerateDataKey where+        toPath = const "/"++instance ToQuery GenerateDataKey where+        toQuery = const mempty++-- | /See:/ 'generateDataKeyResponse' smart constructor.+data GenerateDataKeyResponse = GenerateDataKeyResponse'+    { _gdkrsKeyId          :: !(Maybe Text)+    , _gdkrsPlaintext      :: !(Maybe (Sensitive Base64))+    , _gdkrsCiphertextBlob :: !(Maybe Base64)+    , _gdkrsStatus         :: !Int+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'GenerateDataKeyResponse' with the minimum fields required to make a request. ----- The fields accessible through corresponding lenses are:+-- Use one of the following lenses to modify other fields as desired: ----- * 'gdkrCiphertextBlob' @::@ 'Maybe' 'Base64'+-- * 'gdkrsKeyId' ----- * 'gdkrKeyId' @::@ 'Maybe' 'Text'+-- * 'gdkrsPlaintext' ----- * 'gdkrPlaintext' @::@ 'Maybe' 'Base64'+-- * 'gdkrsCiphertextBlob' ---generateDataKeyResponse :: GenerateDataKeyResponse-generateDataKeyResponse = GenerateDataKeyResponse-    { _gdkrCiphertextBlob = Nothing-    , _gdkrPlaintext      = Nothing-    , _gdkrKeyId          = Nothing+-- * 'gdkrsStatus'+generateDataKeyResponse+    :: Int -- ^ 'gdkrsStatus'+    -> GenerateDataKeyResponse+generateDataKeyResponse pStatus_ =+    GenerateDataKeyResponse'+    { _gdkrsKeyId = Nothing+    , _gdkrsPlaintext = Nothing+    , _gdkrsCiphertextBlob = Nothing+    , _gdkrsStatus = pStatus_     } --- | Ciphertext that contains the encrypted data key. You must store the blob and--- enough information to reconstruct the encryption context so that the data--- encrypted by using the key can later be decrypted. You must provide both the--- ciphertext blob and the encryption context to the 'Decrypt' API to recover the--- plaintext data key and decrypt the object.------ If you are using the CLI, the value is Base64 encoded. Otherwise, it is not--- encoded.-gdkrCiphertextBlob :: Lens' GenerateDataKeyResponse (Maybe Base64)-gdkrCiphertextBlob =-    lens _gdkrCiphertextBlob (\s a -> s { _gdkrCiphertextBlob = a })- -- | System generated unique identifier of the key to be used to decrypt the -- encrypted copy of the data key.-gdkrKeyId :: Lens' GenerateDataKeyResponse (Maybe Text)-gdkrKeyId = lens _gdkrKeyId (\s a -> s { _gdkrKeyId = a })---- | Plaintext that contains the data key. Use this for encryption and decryption--- and then remove it from memory as soon as possible.-gdkrPlaintext :: Lens' GenerateDataKeyResponse (Maybe Base64)-gdkrPlaintext = lens _gdkrPlaintext (\s a -> s { _gdkrPlaintext = a })--instance ToPath GenerateDataKey where-    toPath = const "/"--instance ToQuery GenerateDataKey where-    toQuery = const mempty--instance ToHeaders GenerateDataKey--instance ToJSON GenerateDataKey where-    toJSON GenerateDataKey{..} = object-        [ "KeyId"             .= _gdkKeyId-        , "EncryptionContext" .= _gdkEncryptionContext-        , "NumberOfBytes"     .= _gdkNumberOfBytes-        , "KeySpec"           .= _gdkKeySpec-        , "GrantTokens"       .= _gdkGrantTokens-        ]+gdkrsKeyId :: Lens' GenerateDataKeyResponse (Maybe Text)+gdkrsKeyId = lens _gdkrsKeyId (\ s a -> s{_gdkrsKeyId = a}); -instance AWSRequest GenerateDataKey where-    type Sv GenerateDataKey = KMS-    type Rs GenerateDataKey = GenerateDataKeyResponse+-- | Plaintext that contains the data key. Use this for encryption and+-- decryption and then remove it from memory as soon as possible.+gdkrsPlaintext :: Lens' GenerateDataKeyResponse (Maybe ByteString)+gdkrsPlaintext = lens _gdkrsPlaintext (\ s a -> s{_gdkrsPlaintext = a}) . mapping (_Sensitive . _Base64); -    request  = post "GenerateDataKey"-    response = jsonResponse+-- | Ciphertext that contains the encrypted data key. You must store the blob+-- and enough information to reconstruct the encryption context so that the+-- data encrypted by using the key can later be decrypted. You must provide+-- both the ciphertext blob and the encryption context to the Decrypt API+-- to recover the plaintext data key and decrypt the object.+--+-- If you are using the CLI, the value is Base64 encoded. Otherwise, it is+-- not encoded.+gdkrsCiphertextBlob :: Lens' GenerateDataKeyResponse (Maybe ByteString)+gdkrsCiphertextBlob = lens _gdkrsCiphertextBlob (\ s a -> s{_gdkrsCiphertextBlob = a}) . mapping _Base64; -instance FromJSON GenerateDataKeyResponse where-    parseJSON = withObject "GenerateDataKeyResponse" $ \o -> GenerateDataKeyResponse-        <$> o .:? "CiphertextBlob"-        <*> o .:? "KeyId"-        <*> o .:? "Plaintext"+-- | The response status code.+gdkrsStatus :: Lens' GenerateDataKeyResponse Int+gdkrsStatus = lens _gdkrsStatus (\ s a -> s{_gdkrsStatus = a});
gen/Network/AWS/KMS/GenerateDataKeyWithoutPlaintext.hs view
@@ -1,185 +1,206 @@-{-# LANGUAGE DataKinds                   #-}-{-# LANGUAGE DeriveGeneric               #-}-{-# LANGUAGE FlexibleInstances           #-}-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}-{-# LANGUAGE LambdaCase                  #-}-{-# LANGUAGE NoImplicitPrelude           #-}-{-# LANGUAGE OverloadedStrings           #-}-{-# LANGUAGE RecordWildCards             #-}-{-# LANGUAGE TypeFamilies                #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric      #-}+{-# LANGUAGE OverloadedStrings  #-}+{-# LANGUAGE RecordWildCards    #-}+{-# LANGUAGE TypeFamilies       #-}  {-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-} +-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | -- Module      : Network.AWS.KMS.GenerateDataKeyWithoutPlaintext--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License     : This Source Code Form is subject to the terms of---               the Mozilla Public License, v. 2.0.---               A copy of the MPL can be found in the LICENSE file or---               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright   : (c) 2013-2015 Brendan Hay+-- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>--- Stability   : experimental+-- Stability   : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Returns a data key encrypted by a customer master key without the plaintext--- copy of that key. Otherwise, this API functions exactly like 'GenerateDataKey'.--- You can use this API to, for example, satisfy an audit requirement that an--- encrypted key be made available without exposing the plaintext copy of that--- key.+-- Returns a data key encrypted by a customer master key without the+-- plaintext copy of that key. Otherwise, this API functions exactly like+-- GenerateDataKey. You can use this API to, for example, satisfy an audit+-- requirement that an encrypted key be made available without exposing the+-- plaintext copy of that key. ----- <http://docs.aws.amazon.com/kms/latest/APIReference/API_GenerateDataKeyWithoutPlaintext.html>+-- /See:/ <http://docs.aws.amazon.com/kms/latest/APIReference/API_GenerateDataKeyWithoutPlaintext.html AWS API Reference> for GenerateDataKeyWithoutPlaintext. module Network.AWS.KMS.GenerateDataKeyWithoutPlaintext     (-    -- * Request-      GenerateDataKeyWithoutPlaintext-    -- ** Request constructor-    , generateDataKeyWithoutPlaintext-    -- ** Request lenses+    -- * Creating a Request+      generateDataKeyWithoutPlaintext+    , GenerateDataKeyWithoutPlaintext+    -- * Request Lenses+    , gdkwpKeySpec     , gdkwpEncryptionContext+    , gdkwpNumberOfBytes     , gdkwpGrantTokens     , gdkwpKeyId-    , gdkwpKeySpec-    , gdkwpNumberOfBytes -    -- * Response-    , GenerateDataKeyWithoutPlaintextResponse-    -- ** Response constructor+    -- * Destructuring the Response     , generateDataKeyWithoutPlaintextResponse-    -- ** Response lenses-    , gdkwprCiphertextBlob-    , gdkwprKeyId+    , GenerateDataKeyWithoutPlaintextResponse+    -- * Response Lenses+    , gdkwprsKeyId+    , gdkwprsCiphertextBlob+    , gdkwprsStatus     ) where -import Network.AWS.Data (Object)-import Network.AWS.Prelude-import Network.AWS.Request.JSON-import Network.AWS.KMS.Types-import qualified GHC.Exts+import           Network.AWS.KMS.Types+import           Network.AWS.KMS.Types.Product+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response -data GenerateDataKeyWithoutPlaintext = GenerateDataKeyWithoutPlaintext-    { _gdkwpEncryptionContext :: Map Text Text-    , _gdkwpGrantTokens       :: List "GrantTokens" Text-    , _gdkwpKeyId             :: Text-    , _gdkwpKeySpec           :: Maybe DataKeySpec-    , _gdkwpNumberOfBytes     :: Maybe Nat-    } deriving (Eq, Read, Show)+-- | /See:/ 'generateDataKeyWithoutPlaintext' smart constructor.+data GenerateDataKeyWithoutPlaintext = GenerateDataKeyWithoutPlaintext'+    { _gdkwpKeySpec           :: !(Maybe DataKeySpec)+    , _gdkwpEncryptionContext :: !(Maybe (Map Text Text))+    , _gdkwpNumberOfBytes     :: !(Maybe Nat)+    , _gdkwpGrantTokens       :: !(Maybe [Text])+    , _gdkwpKeyId             :: !Text+    } deriving (Eq,Read,Show,Data,Typeable,Generic) --- | 'GenerateDataKeyWithoutPlaintext' constructor.------ The fields accessible through corresponding lenses are:+-- | Creates a value of 'GenerateDataKeyWithoutPlaintext' with the minimum fields required to make a request. ----- * 'gdkwpEncryptionContext' @::@ 'HashMap' 'Text' 'Text'+-- Use one of the following lenses to modify other fields as desired: ----- * 'gdkwpGrantTokens' @::@ ['Text']+-- * 'gdkwpKeySpec' ----- * 'gdkwpKeyId' @::@ 'Text'+-- * 'gdkwpEncryptionContext' ----- * 'gdkwpKeySpec' @::@ 'Maybe' 'DataKeySpec'+-- * 'gdkwpNumberOfBytes' ----- * 'gdkwpNumberOfBytes' @::@ 'Maybe' 'Natural'+-- * 'gdkwpGrantTokens' ---generateDataKeyWithoutPlaintext :: Text -- ^ 'gdkwpKeyId'-                                -> GenerateDataKeyWithoutPlaintext-generateDataKeyWithoutPlaintext p1 = GenerateDataKeyWithoutPlaintext-    { _gdkwpKeyId             = p1-    , _gdkwpEncryptionContext = mempty-    , _gdkwpKeySpec           = Nothing-    , _gdkwpNumberOfBytes     = Nothing-    , _gdkwpGrantTokens       = mempty+-- * 'gdkwpKeyId'+generateDataKeyWithoutPlaintext+    :: Text -- ^ 'gdkwpKeyId'+    -> GenerateDataKeyWithoutPlaintext+generateDataKeyWithoutPlaintext pKeyId_ =+    GenerateDataKeyWithoutPlaintext'+    { _gdkwpKeySpec = Nothing+    , _gdkwpEncryptionContext = Nothing+    , _gdkwpNumberOfBytes = Nothing+    , _gdkwpGrantTokens = Nothing+    , _gdkwpKeyId = pKeyId_     } --- | Name:value pair that contains additional data to be authenticated during the--- encryption and decryption processes.+-- | Value that identifies the encryption algorithm and key size. Currently+-- this can be AES_128 or AES_256.+gdkwpKeySpec :: Lens' GenerateDataKeyWithoutPlaintext (Maybe DataKeySpec)+gdkwpKeySpec = lens _gdkwpKeySpec (\ s a -> s{_gdkwpKeySpec = a});++-- | Name:value pair that contains additional data to be authenticated during+-- the encryption and decryption processes. gdkwpEncryptionContext :: Lens' GenerateDataKeyWithoutPlaintext (HashMap Text Text)-gdkwpEncryptionContext =-    lens _gdkwpEncryptionContext (\s a -> s { _gdkwpEncryptionContext = a })-        . _Map+gdkwpEncryptionContext = lens _gdkwpEncryptionContext (\ s a -> s{_gdkwpEncryptionContext = a}) . _Default . _Map; --- | For more information, see <http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token Grant Tokens>.+-- | Integer that contains the number of bytes to generate. Common values are+-- 128, 256, 512, 1024 and so on. We recommend that you use the 'KeySpec'+-- parameter instead.+gdkwpNumberOfBytes :: Lens' GenerateDataKeyWithoutPlaintext (Maybe Natural)+gdkwpNumberOfBytes = lens _gdkwpNumberOfBytes (\ s a -> s{_gdkwpNumberOfBytes = a}) . mapping _Nat;++-- | For more information, see+-- <http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token Grant Tokens>. gdkwpGrantTokens :: Lens' GenerateDataKeyWithoutPlaintext [Text]-gdkwpGrantTokens = lens _gdkwpGrantTokens (\s a -> s { _gdkwpGrantTokens = a }) . _List+gdkwpGrantTokens = lens _gdkwpGrantTokens (\ s a -> s{_gdkwpGrantTokens = a}) . _Default . _Coerce; --- | A unique identifier for the customer master key. This value can be a globally--- unique identifier, a fully specified ARN to either an alias or a key, or an--- alias name prefixed by "alias/".  Key ARN Example ---- arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 Alias ARN Example - arn:aws:kms:us-east-1:123456789012:alias/MyAliasName--- Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012 Alias--- Name Example - alias/MyAliasName+-- | A unique identifier for the customer master key. This value can be a+-- globally unique identifier, a fully specified ARN to either an alias or+-- a key, or an alias name prefixed by \"alias\/\".+--+-- -   Key ARN Example -+--     arn:aws:kms:us-east-1:123456789012:key\/12345678-1234-1234-1234-123456789012+-- -   Alias ARN Example -+--     arn:aws:kms:us-east-1:123456789012:alias\/MyAliasName+-- -   Globally Unique Key ID Example -+--     12345678-1234-1234-1234-123456789012+-- -   Alias Name Example - alias\/MyAliasName gdkwpKeyId :: Lens' GenerateDataKeyWithoutPlaintext Text-gdkwpKeyId = lens _gdkwpKeyId (\s a -> s { _gdkwpKeyId = a })+gdkwpKeyId = lens _gdkwpKeyId (\ s a -> s{_gdkwpKeyId = a}); --- | Value that identifies the encryption algorithm and key size. Currently this--- can be AES_128 or AES_256.-gdkwpKeySpec :: Lens' GenerateDataKeyWithoutPlaintext (Maybe DataKeySpec)-gdkwpKeySpec = lens _gdkwpKeySpec (\s a -> s { _gdkwpKeySpec = a })+instance AWSRequest GenerateDataKeyWithoutPlaintext+         where+        type Sv GenerateDataKeyWithoutPlaintext = KMS+        type Rs GenerateDataKeyWithoutPlaintext =+             GenerateDataKeyWithoutPlaintextResponse+        request = postJSON+        response+          = receiveJSON+              (\ s h x ->+                 GenerateDataKeyWithoutPlaintextResponse' <$>+                   (x .?> "KeyId") <*> (x .?> "CiphertextBlob") <*>+                     (pure (fromEnum s))) --- | Integer that contains the number of bytes to generate. Common values are 128,--- 256, 512, 1024 and so on. We recommend that you use the 'KeySpec' parameter--- instead.-gdkwpNumberOfBytes :: Lens' GenerateDataKeyWithoutPlaintext (Maybe Natural)-gdkwpNumberOfBytes =-    lens _gdkwpNumberOfBytes (\s a -> s { _gdkwpNumberOfBytes = a })-        . mapping _Nat+instance ToHeaders GenerateDataKeyWithoutPlaintext+         where+        toHeaders+          = const+              (mconcat+                 ["X-Amz-Target" =#+                    ("TrentService.GenerateDataKeyWithoutPlaintext" ::+                       ByteString),+                  "Content-Type" =#+                    ("application/x-amz-json-1.1" :: ByteString)]) -data GenerateDataKeyWithoutPlaintextResponse = GenerateDataKeyWithoutPlaintextResponse-    { _gdkwprCiphertextBlob :: Maybe Base64-    , _gdkwprKeyId          :: Maybe Text-    } deriving (Eq, Read, Show)+instance ToJSON GenerateDataKeyWithoutPlaintext where+        toJSON GenerateDataKeyWithoutPlaintext'{..}+          = object+              ["KeySpec" .= _gdkwpKeySpec,+               "EncryptionContext" .= _gdkwpEncryptionContext,+               "NumberOfBytes" .= _gdkwpNumberOfBytes,+               "GrantTokens" .= _gdkwpGrantTokens,+               "KeyId" .= _gdkwpKeyId] --- | 'GenerateDataKeyWithoutPlaintextResponse' constructor.+instance ToPath GenerateDataKeyWithoutPlaintext where+        toPath = const "/"++instance ToQuery GenerateDataKeyWithoutPlaintext+         where+        toQuery = const mempty++-- | /See:/ 'generateDataKeyWithoutPlaintextResponse' smart constructor.+data GenerateDataKeyWithoutPlaintextResponse = GenerateDataKeyWithoutPlaintextResponse'+    { _gdkwprsKeyId          :: !(Maybe Text)+    , _gdkwprsCiphertextBlob :: !(Maybe Base64)+    , _gdkwprsStatus         :: !Int+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'GenerateDataKeyWithoutPlaintextResponse' with the minimum fields required to make a request. ----- The fields accessible through corresponding lenses are:+-- Use one of the following lenses to modify other fields as desired: ----- * 'gdkwprCiphertextBlob' @::@ 'Maybe' 'Base64'+-- * 'gdkwprsKeyId' ----- * 'gdkwprKeyId' @::@ 'Maybe' 'Text'+-- * 'gdkwprsCiphertextBlob' ---generateDataKeyWithoutPlaintextResponse :: GenerateDataKeyWithoutPlaintextResponse-generateDataKeyWithoutPlaintextResponse = GenerateDataKeyWithoutPlaintextResponse-    { _gdkwprCiphertextBlob = Nothing-    , _gdkwprKeyId          = Nothing+-- * 'gdkwprsStatus'+generateDataKeyWithoutPlaintextResponse+    :: Int -- ^ 'gdkwprsStatus'+    -> GenerateDataKeyWithoutPlaintextResponse+generateDataKeyWithoutPlaintextResponse pStatus_ =+    GenerateDataKeyWithoutPlaintextResponse'+    { _gdkwprsKeyId = Nothing+    , _gdkwprsCiphertextBlob = Nothing+    , _gdkwprsStatus = pStatus_     } --- | Ciphertext that contains the wrapped data key. You must store the blob and--- encryption context so that the key can be used in a future decrypt operation.------ If you are using the CLI, the value is Base64 encoded. Otherwise, it is not--- encoded.-gdkwprCiphertextBlob :: Lens' GenerateDataKeyWithoutPlaintextResponse (Maybe Base64)-gdkwprCiphertextBlob =-    lens _gdkwprCiphertextBlob (\s a -> s { _gdkwprCiphertextBlob = a })- -- | System generated unique identifier of the key to be used to decrypt the -- encrypted copy of the data key.-gdkwprKeyId :: Lens' GenerateDataKeyWithoutPlaintextResponse (Maybe Text)-gdkwprKeyId = lens _gdkwprKeyId (\s a -> s { _gdkwprKeyId = a })--instance ToPath GenerateDataKeyWithoutPlaintext where-    toPath = const "/"--instance ToQuery GenerateDataKeyWithoutPlaintext where-    toQuery = const mempty--instance ToHeaders GenerateDataKeyWithoutPlaintext--instance ToJSON GenerateDataKeyWithoutPlaintext where-    toJSON GenerateDataKeyWithoutPlaintext{..} = object-        [ "KeyId"             .= _gdkwpKeyId-        , "EncryptionContext" .= _gdkwpEncryptionContext-        , "KeySpec"           .= _gdkwpKeySpec-        , "NumberOfBytes"     .= _gdkwpNumberOfBytes-        , "GrantTokens"       .= _gdkwpGrantTokens-        ]--instance AWSRequest GenerateDataKeyWithoutPlaintext where-    type Sv GenerateDataKeyWithoutPlaintext = KMS-    type Rs GenerateDataKeyWithoutPlaintext = GenerateDataKeyWithoutPlaintextResponse+gdkwprsKeyId :: Lens' GenerateDataKeyWithoutPlaintextResponse (Maybe Text)+gdkwprsKeyId = lens _gdkwprsKeyId (\ s a -> s{_gdkwprsKeyId = a}); -    request  = post "GenerateDataKeyWithoutPlaintext"-    response = jsonResponse+-- | Ciphertext that contains the wrapped data key. You must store the blob+-- and encryption context so that the key can be used in a future decrypt+-- operation.+--+-- If you are using the CLI, the value is Base64 encoded. Otherwise, it is+-- not encoded.+gdkwprsCiphertextBlob :: Lens' GenerateDataKeyWithoutPlaintextResponse (Maybe ByteString)+gdkwprsCiphertextBlob = lens _gdkwprsCiphertextBlob (\ s a -> s{_gdkwprsCiphertextBlob = a}) . mapping _Base64; -instance FromJSON GenerateDataKeyWithoutPlaintextResponse where-    parseJSON = withObject "GenerateDataKeyWithoutPlaintextResponse" $ \o -> GenerateDataKeyWithoutPlaintextResponse-        <$> o .:? "CiphertextBlob"-        <*> o .:? "KeyId"+-- | The response status code.+gdkwprsStatus :: Lens' GenerateDataKeyWithoutPlaintextResponse Int+gdkwprsStatus = lens _gdkwprsStatus (\ s a -> s{_gdkwprsStatus = a});
gen/Network/AWS/KMS/GenerateRandom.hs view
@@ -1,112 +1,125 @@-{-# LANGUAGE DataKinds                   #-}-{-# LANGUAGE DeriveGeneric               #-}-{-# LANGUAGE FlexibleInstances           #-}-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}-{-# LANGUAGE LambdaCase                  #-}-{-# LANGUAGE NoImplicitPrelude           #-}-{-# LANGUAGE OverloadedStrings           #-}-{-# LANGUAGE RecordWildCards             #-}-{-# LANGUAGE TypeFamilies                #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric      #-}+{-# LANGUAGE OverloadedStrings  #-}+{-# LANGUAGE RecordWildCards    #-}+{-# LANGUAGE TypeFamilies       #-}  {-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-} +-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | -- Module      : Network.AWS.KMS.GenerateRandom--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License     : This Source Code Form is subject to the terms of---               the Mozilla Public License, v. 2.0.---               A copy of the MPL can be found in the LICENSE file or---               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright   : (c) 2013-2015 Brendan Hay+-- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>--- Stability   : experimental+-- Stability   : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Generates an unpredictable byte string.+-- Generates an unpredictable byte string. ----- <http://docs.aws.amazon.com/kms/latest/APIReference/API_GenerateRandom.html>+-- /See:/ <http://docs.aws.amazon.com/kms/latest/APIReference/API_GenerateRandom.html AWS API Reference> for GenerateRandom. module Network.AWS.KMS.GenerateRandom     (-    -- * Request-      GenerateRandom-    -- ** Request constructor-    , generateRandom-    -- ** Request lenses+    -- * Creating a Request+      generateRandom+    , GenerateRandom+    -- * Request Lenses     , grNumberOfBytes -    -- * Response-    , GenerateRandomResponse-    -- ** Response constructor+    -- * Destructuring the Response     , generateRandomResponse-    -- ** Response lenses-    , grrPlaintext+    , GenerateRandomResponse+    -- * Response Lenses+    , grrsPlaintext+    , grrsStatus     ) where -import Network.AWS.Data (Object)-import Network.AWS.Prelude-import Network.AWS.Request.JSON-import Network.AWS.KMS.Types-import qualified GHC.Exts+import           Network.AWS.KMS.Types+import           Network.AWS.KMS.Types.Product+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response -newtype GenerateRandom = GenerateRandom+-- | /See:/ 'generateRandom' smart constructor.+newtype GenerateRandom = GenerateRandom'     { _grNumberOfBytes :: Maybe Nat-    } deriving (Eq, Ord, Read, Show)+    } deriving (Eq,Read,Show,Data,Typeable,Generic) --- | 'GenerateRandom' constructor.------ The fields accessible through corresponding lenses are:+-- | Creates a value of 'GenerateRandom' with the minimum fields required to make a request. ----- * 'grNumberOfBytes' @::@ 'Maybe' 'Natural'+-- Use one of the following lenses to modify other fields as desired: ---generateRandom :: GenerateRandom-generateRandom = GenerateRandom+-- * 'grNumberOfBytes'+generateRandom+    :: GenerateRandom+generateRandom =+    GenerateRandom'     { _grNumberOfBytes = Nothing     } --- | Integer that contains the number of bytes to generate. Common values are 128,--- 256, 512, 1024 and so on. The current limit is 1024 bytes.+-- | Integer that contains the number of bytes to generate. Common values are+-- 128, 256, 512, 1024 and so on. The current limit is 1024 bytes. grNumberOfBytes :: Lens' GenerateRandom (Maybe Natural)-grNumberOfBytes = lens _grNumberOfBytes (\s a -> s { _grNumberOfBytes = a }) . mapping _Nat+grNumberOfBytes = lens _grNumberOfBytes (\ s a -> s{_grNumberOfBytes = a}) . mapping _Nat; -newtype GenerateRandomResponse = GenerateRandomResponse-    { _grrPlaintext :: Maybe Base64-    } deriving (Eq, Read, Show)+instance AWSRequest GenerateRandom where+        type Sv GenerateRandom = KMS+        type Rs GenerateRandom = GenerateRandomResponse+        request = postJSON+        response+          = receiveJSON+              (\ s h x ->+                 GenerateRandomResponse' <$>+                   (x .?> "Plaintext") <*> (pure (fromEnum s))) --- | 'GenerateRandomResponse' constructor.------ The fields accessible through corresponding lenses are:------ * 'grrPlaintext' @::@ 'Maybe' 'Base64'----generateRandomResponse :: GenerateRandomResponse-generateRandomResponse = GenerateRandomResponse-    { _grrPlaintext = Nothing-    }+instance ToHeaders GenerateRandom where+        toHeaders+          = const+              (mconcat+                 ["X-Amz-Target" =#+                    ("TrentService.GenerateRandom" :: ByteString),+                  "Content-Type" =#+                    ("application/x-amz-json-1.1" :: ByteString)]) --- | Plaintext that contains the unpredictable byte string.-grrPlaintext :: Lens' GenerateRandomResponse (Maybe Base64)-grrPlaintext = lens _grrPlaintext (\s a -> s { _grrPlaintext = a })+instance ToJSON GenerateRandom where+        toJSON GenerateRandom'{..}+          = object ["NumberOfBytes" .= _grNumberOfBytes]  instance ToPath GenerateRandom where-    toPath = const "/"+        toPath = const "/"  instance ToQuery GenerateRandom where-    toQuery = const mempty--instance ToHeaders GenerateRandom+        toQuery = const mempty -instance ToJSON GenerateRandom where-    toJSON GenerateRandom{..} = object-        [ "NumberOfBytes" .= _grNumberOfBytes-        ]+-- | /See:/ 'generateRandomResponse' smart constructor.+data GenerateRandomResponse = GenerateRandomResponse'+    { _grrsPlaintext :: !(Maybe (Sensitive Base64))+    , _grrsStatus    :: !Int+    } deriving (Eq,Read,Show,Data,Typeable,Generic) -instance AWSRequest GenerateRandom where-    type Sv GenerateRandom = KMS-    type Rs GenerateRandom = GenerateRandomResponse+-- | Creates a value of 'GenerateRandomResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'grrsPlaintext'+--+-- * 'grrsStatus'+generateRandomResponse+    :: Int -- ^ 'grrsStatus'+    -> GenerateRandomResponse+generateRandomResponse pStatus_ =+    GenerateRandomResponse'+    { _grrsPlaintext = Nothing+    , _grrsStatus = pStatus_+    } -    request  = post "GenerateRandom"-    response = jsonResponse+-- | Plaintext that contains the unpredictable byte string.+grrsPlaintext :: Lens' GenerateRandomResponse (Maybe ByteString)+grrsPlaintext = lens _grrsPlaintext (\ s a -> s{_grrsPlaintext = a}) . mapping (_Sensitive . _Base64); -instance FromJSON GenerateRandomResponse where-    parseJSON = withObject "GenerateRandomResponse" $ \o -> GenerateRandomResponse-        <$> o .:? "Plaintext"+-- | The response status code.+grrsStatus :: Lens' GenerateRandomResponse Int+grrsStatus = lens _grrsStatus (\ s a -> s{_grrsStatus = a});
gen/Network/AWS/KMS/GetKeyPolicy.hs view
@@ -1,127 +1,144 @@-{-# LANGUAGE DataKinds                   #-}-{-# LANGUAGE DeriveGeneric               #-}-{-# LANGUAGE FlexibleInstances           #-}-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}-{-# LANGUAGE LambdaCase                  #-}-{-# LANGUAGE NoImplicitPrelude           #-}-{-# LANGUAGE OverloadedStrings           #-}-{-# LANGUAGE RecordWildCards             #-}-{-# LANGUAGE TypeFamilies                #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric      #-}+{-# LANGUAGE OverloadedStrings  #-}+{-# LANGUAGE RecordWildCards    #-}+{-# LANGUAGE TypeFamilies       #-}  {-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-} +-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | -- Module      : Network.AWS.KMS.GetKeyPolicy--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License     : This Source Code Form is subject to the terms of---               the Mozilla Public License, v. 2.0.---               A copy of the MPL can be found in the LICENSE file or---               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright   : (c) 2013-2015 Brendan Hay+-- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>--- Stability   : experimental+-- Stability   : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Retrieves a policy attached to the specified key.+-- Retrieves a policy attached to the specified key. ----- <http://docs.aws.amazon.com/kms/latest/APIReference/API_GetKeyPolicy.html>+-- /See:/ <http://docs.aws.amazon.com/kms/latest/APIReference/API_GetKeyPolicy.html AWS API Reference> for GetKeyPolicy. module Network.AWS.KMS.GetKeyPolicy     (-    -- * Request-      GetKeyPolicy-    -- ** Request constructor-    , getKeyPolicy-    -- ** Request lenses+    -- * Creating a Request+      getKeyPolicy+    , GetKeyPolicy+    -- * Request Lenses     , gkpKeyId     , gkpPolicyName -    -- * Response-    , GetKeyPolicyResponse-    -- ** Response constructor+    -- * Destructuring the Response     , getKeyPolicyResponse-    -- ** Response lenses-    , gkprPolicy+    , GetKeyPolicyResponse+    -- * Response Lenses+    , gkprsPolicy+    , gkprsStatus     ) where -import Network.AWS.Data (Object)-import Network.AWS.Prelude-import Network.AWS.Request.JSON-import Network.AWS.KMS.Types-import qualified GHC.Exts+import           Network.AWS.KMS.Types+import           Network.AWS.KMS.Types.Product+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response -data GetKeyPolicy = GetKeyPolicy-    { _gkpKeyId      :: Text-    , _gkpPolicyName :: Text-    } deriving (Eq, Ord, Read, Show)+-- | /See:/ 'getKeyPolicy' smart constructor.+data GetKeyPolicy = GetKeyPolicy'+    { _gkpKeyId      :: !Text+    , _gkpPolicyName :: !Text+    } deriving (Eq,Read,Show,Data,Typeable,Generic) --- | 'GetKeyPolicy' constructor.------ The fields accessible through corresponding lenses are:+-- | Creates a value of 'GetKeyPolicy' with the minimum fields required to make a request. ----- * 'gkpKeyId' @::@ 'Text'+-- Use one of the following lenses to modify other fields as desired: ----- * 'gkpPolicyName' @::@ 'Text'+-- * 'gkpKeyId' ---getKeyPolicy :: Text -- ^ 'gkpKeyId'-             -> Text -- ^ 'gkpPolicyName'-             -> GetKeyPolicy-getKeyPolicy p1 p2 = GetKeyPolicy-    { _gkpKeyId      = p1-    , _gkpPolicyName = p2+-- * 'gkpPolicyName'+getKeyPolicy+    :: Text -- ^ 'gkpKeyId'+    -> Text -- ^ 'gkpPolicyName'+    -> GetKeyPolicy+getKeyPolicy pKeyId_ pPolicyName_ =+    GetKeyPolicy'+    { _gkpKeyId = pKeyId_+    , _gkpPolicyName = pPolicyName_     } --- | A unique identifier for the customer master key. This value can be a globally--- unique identifier or the fully specified ARN to a key.  Key ARN Example ---- arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012+-- | A unique identifier for the customer master key. This value can be a+-- globally unique identifier or the fully specified ARN to a key. --+-- -   Key ARN Example -+--     arn:aws:kms:us-east-1:123456789012:key\/12345678-1234-1234-1234-123456789012+-- -   Globally Unique Key ID Example -+--     12345678-1234-1234-1234-123456789012 gkpKeyId :: Lens' GetKeyPolicy Text-gkpKeyId = lens _gkpKeyId (\s a -> s { _gkpKeyId = a })+gkpKeyId = lens _gkpKeyId (\ s a -> s{_gkpKeyId = a});  -- | String that contains the name of the policy. Currently, this must be--- "default". Policy names can be discovered by calling 'ListKeyPolicies'.+-- \"default\". Policy names can be discovered by calling ListKeyPolicies. gkpPolicyName :: Lens' GetKeyPolicy Text-gkpPolicyName = lens _gkpPolicyName (\s a -> s { _gkpPolicyName = a })+gkpPolicyName = lens _gkpPolicyName (\ s a -> s{_gkpPolicyName = a}); -newtype GetKeyPolicyResponse = GetKeyPolicyResponse-    { _gkprPolicy :: Maybe Text-    } deriving (Eq, Ord, Read, Show, Monoid)+instance AWSRequest GetKeyPolicy where+        type Sv GetKeyPolicy = KMS+        type Rs GetKeyPolicy = GetKeyPolicyResponse+        request = postJSON+        response+          = receiveJSON+              (\ s h x ->+                 GetKeyPolicyResponse' <$>+                   (x .?> "Policy") <*> (pure (fromEnum s))) --- | 'GetKeyPolicyResponse' constructor.------ The fields accessible through corresponding lenses are:------ * 'gkprPolicy' @::@ 'Maybe' 'Text'----getKeyPolicyResponse :: GetKeyPolicyResponse-getKeyPolicyResponse = GetKeyPolicyResponse-    { _gkprPolicy = Nothing-    }+instance ToHeaders GetKeyPolicy where+        toHeaders+          = const+              (mconcat+                 ["X-Amz-Target" =#+                    ("TrentService.GetKeyPolicy" :: ByteString),+                  "Content-Type" =#+                    ("application/x-amz-json-1.1" :: ByteString)]) --- | A policy document in JSON format.-gkprPolicy :: Lens' GetKeyPolicyResponse (Maybe Text)-gkprPolicy = lens _gkprPolicy (\s a -> s { _gkprPolicy = a })+instance ToJSON GetKeyPolicy where+        toJSON GetKeyPolicy'{..}+          = object+              ["KeyId" .= _gkpKeyId,+               "PolicyName" .= _gkpPolicyName]  instance ToPath GetKeyPolicy where-    toPath = const "/"+        toPath = const "/"  instance ToQuery GetKeyPolicy where-    toQuery = const mempty--instance ToHeaders GetKeyPolicy+        toQuery = const mempty -instance ToJSON GetKeyPolicy where-    toJSON GetKeyPolicy{..} = object-        [ "KeyId"      .= _gkpKeyId-        , "PolicyName" .= _gkpPolicyName-        ]+-- | /See:/ 'getKeyPolicyResponse' smart constructor.+data GetKeyPolicyResponse = GetKeyPolicyResponse'+    { _gkprsPolicy :: !(Maybe Text)+    , _gkprsStatus :: !Int+    } deriving (Eq,Read,Show,Data,Typeable,Generic) -instance AWSRequest GetKeyPolicy where-    type Sv GetKeyPolicy = KMS-    type Rs GetKeyPolicy = GetKeyPolicyResponse+-- | Creates a value of 'GetKeyPolicyResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gkprsPolicy'+--+-- * 'gkprsStatus'+getKeyPolicyResponse+    :: Int -- ^ 'gkprsStatus'+    -> GetKeyPolicyResponse+getKeyPolicyResponse pStatus_ =+    GetKeyPolicyResponse'+    { _gkprsPolicy = Nothing+    , _gkprsStatus = pStatus_+    } -    request  = post "GetKeyPolicy"-    response = jsonResponse+-- | A policy document in JSON format.+gkprsPolicy :: Lens' GetKeyPolicyResponse (Maybe Text)+gkprsPolicy = lens _gkprsPolicy (\ s a -> s{_gkprsPolicy = a}); -instance FromJSON GetKeyPolicyResponse where-    parseJSON = withObject "GetKeyPolicyResponse" $ \o -> GetKeyPolicyResponse-        <$> o .:? "Policy"+-- | The response status code.+gkprsStatus :: Lens' GetKeyPolicyResponse Int+gkprsStatus = lens _gkprsStatus (\ s a -> s{_gkprsStatus = a});
gen/Network/AWS/KMS/GetKeyRotationStatus.hs view
@@ -1,117 +1,133 @@-{-# LANGUAGE DataKinds                   #-}-{-# LANGUAGE DeriveGeneric               #-}-{-# LANGUAGE FlexibleInstances           #-}-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}-{-# LANGUAGE LambdaCase                  #-}-{-# LANGUAGE NoImplicitPrelude           #-}-{-# LANGUAGE OverloadedStrings           #-}-{-# LANGUAGE RecordWildCards             #-}-{-# LANGUAGE TypeFamilies                #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric      #-}+{-# LANGUAGE OverloadedStrings  #-}+{-# LANGUAGE RecordWildCards    #-}+{-# LANGUAGE TypeFamilies       #-}  {-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-} +-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | -- Module      : Network.AWS.KMS.GetKeyRotationStatus--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License     : This Source Code Form is subject to the terms of---               the Mozilla Public License, v. 2.0.---               A copy of the MPL can be found in the LICENSE file or---               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright   : (c) 2013-2015 Brendan Hay+-- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>--- Stability   : experimental+-- Stability   : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Retrieves a Boolean value that indicates whether key rotation is enabled for--- the specified key.+-- Retrieves a Boolean value that indicates whether key rotation is enabled+-- for the specified key. ----- <http://docs.aws.amazon.com/kms/latest/APIReference/API_GetKeyRotationStatus.html>+-- /See:/ <http://docs.aws.amazon.com/kms/latest/APIReference/API_GetKeyRotationStatus.html AWS API Reference> for GetKeyRotationStatus. module Network.AWS.KMS.GetKeyRotationStatus     (-    -- * Request-      GetKeyRotationStatus-    -- ** Request constructor-    , getKeyRotationStatus-    -- ** Request lenses+    -- * Creating a Request+      getKeyRotationStatus+    , GetKeyRotationStatus+    -- * Request Lenses     , gkrsKeyId -    -- * Response-    , GetKeyRotationStatusResponse-    -- ** Response constructor+    -- * Destructuring the Response     , getKeyRotationStatusResponse-    -- ** Response lenses-    , gkrsrKeyRotationEnabled+    , GetKeyRotationStatusResponse+    -- * Response Lenses+    , gkrsrsKeyRotationEnabled+    , gkrsrsStatus     ) where -import Network.AWS.Data (Object)-import Network.AWS.Prelude-import Network.AWS.Request.JSON-import Network.AWS.KMS.Types-import qualified GHC.Exts+import           Network.AWS.KMS.Types+import           Network.AWS.KMS.Types.Product+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response -newtype GetKeyRotationStatus = GetKeyRotationStatus+-- | /See:/ 'getKeyRotationStatus' smart constructor.+newtype GetKeyRotationStatus = GetKeyRotationStatus'     { _gkrsKeyId :: Text-    } deriving (Eq, Ord, Read, Show, Monoid, IsString)+    } deriving (Eq,Read,Show,Data,Typeable,Generic) --- | 'GetKeyRotationStatus' constructor.------ The fields accessible through corresponding lenses are:+-- | Creates a value of 'GetKeyRotationStatus' with the minimum fields required to make a request. ----- * 'gkrsKeyId' @::@ 'Text'+-- Use one of the following lenses to modify other fields as desired: ---getKeyRotationStatus :: Text -- ^ 'gkrsKeyId'-                     -> GetKeyRotationStatus-getKeyRotationStatus p1 = GetKeyRotationStatus-    { _gkrsKeyId = p1+-- * 'gkrsKeyId'+getKeyRotationStatus+    :: Text -- ^ 'gkrsKeyId'+    -> GetKeyRotationStatus+getKeyRotationStatus pKeyId_ =+    GetKeyRotationStatus'+    { _gkrsKeyId = pKeyId_     } --- | A unique identifier for the customer master key. This value can be a globally--- unique identifier or the fully specified ARN to a key.  Key ARN Example ---- arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012+-- | A unique identifier for the customer master key. This value can be a+-- globally unique identifier or the fully specified ARN to a key. --+-- -   Key ARN Example -+--     arn:aws:kms:us-east-1:123456789012:key\/12345678-1234-1234-1234-123456789012+-- -   Globally Unique Key ID Example -+--     12345678-1234-1234-1234-123456789012 gkrsKeyId :: Lens' GetKeyRotationStatus Text-gkrsKeyId = lens _gkrsKeyId (\s a -> s { _gkrsKeyId = a })+gkrsKeyId = lens _gkrsKeyId (\ s a -> s{_gkrsKeyId = a}); -newtype GetKeyRotationStatusResponse = GetKeyRotationStatusResponse-    { _gkrsrKeyRotationEnabled :: Maybe Bool-    } deriving (Eq, Ord, Read, Show)+instance AWSRequest GetKeyRotationStatus where+        type Sv GetKeyRotationStatus = KMS+        type Rs GetKeyRotationStatus =+             GetKeyRotationStatusResponse+        request = postJSON+        response+          = receiveJSON+              (\ s h x ->+                 GetKeyRotationStatusResponse' <$>+                   (x .?> "KeyRotationEnabled") <*> (pure (fromEnum s))) --- | 'GetKeyRotationStatusResponse' constructor.------ The fields accessible through corresponding lenses are:------ * 'gkrsrKeyRotationEnabled' @::@ 'Maybe' 'Bool'----getKeyRotationStatusResponse :: GetKeyRotationStatusResponse-getKeyRotationStatusResponse = GetKeyRotationStatusResponse-    { _gkrsrKeyRotationEnabled = Nothing-    }+instance ToHeaders GetKeyRotationStatus where+        toHeaders+          = const+              (mconcat+                 ["X-Amz-Target" =#+                    ("TrentService.GetKeyRotationStatus" :: ByteString),+                  "Content-Type" =#+                    ("application/x-amz-json-1.1" :: ByteString)]) --- | A Boolean value that specifies whether key rotation is enabled.-gkrsrKeyRotationEnabled :: Lens' GetKeyRotationStatusResponse (Maybe Bool)-gkrsrKeyRotationEnabled =-    lens _gkrsrKeyRotationEnabled (\s a -> s { _gkrsrKeyRotationEnabled = a })+instance ToJSON GetKeyRotationStatus where+        toJSON GetKeyRotationStatus'{..}+          = object ["KeyId" .= _gkrsKeyId]  instance ToPath GetKeyRotationStatus where-    toPath = const "/"+        toPath = const "/"  instance ToQuery GetKeyRotationStatus where-    toQuery = const mempty--instance ToHeaders GetKeyRotationStatus+        toQuery = const mempty -instance ToJSON GetKeyRotationStatus where-    toJSON GetKeyRotationStatus{..} = object-        [ "KeyId" .= _gkrsKeyId-        ]+-- | /See:/ 'getKeyRotationStatusResponse' smart constructor.+data GetKeyRotationStatusResponse = GetKeyRotationStatusResponse'+    { _gkrsrsKeyRotationEnabled :: !(Maybe Bool)+    , _gkrsrsStatus             :: !Int+    } deriving (Eq,Read,Show,Data,Typeable,Generic) -instance AWSRequest GetKeyRotationStatus where-    type Sv GetKeyRotationStatus = KMS-    type Rs GetKeyRotationStatus = GetKeyRotationStatusResponse+-- | Creates a value of 'GetKeyRotationStatusResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gkrsrsKeyRotationEnabled'+--+-- * 'gkrsrsStatus'+getKeyRotationStatusResponse+    :: Int -- ^ 'gkrsrsStatus'+    -> GetKeyRotationStatusResponse+getKeyRotationStatusResponse pStatus_ =+    GetKeyRotationStatusResponse'+    { _gkrsrsKeyRotationEnabled = Nothing+    , _gkrsrsStatus = pStatus_+    } -    request  = post "GetKeyRotationStatus"-    response = jsonResponse+-- | A Boolean value that specifies whether key rotation is enabled.+gkrsrsKeyRotationEnabled :: Lens' GetKeyRotationStatusResponse (Maybe Bool)+gkrsrsKeyRotationEnabled = lens _gkrsrsKeyRotationEnabled (\ s a -> s{_gkrsrsKeyRotationEnabled = a}); -instance FromJSON GetKeyRotationStatusResponse where-    parseJSON = withObject "GetKeyRotationStatusResponse" $ \o -> GetKeyRotationStatusResponse-        <$> o .:? "KeyRotationEnabled"+-- | The response status code.+gkrsrsStatus :: Lens' GetKeyRotationStatusResponse Int+gkrsrsStatus = lens _gkrsrsStatus (\ s a -> s{_gkrsrsStatus = a});
gen/Network/AWS/KMS/ListAliases.hs view
@@ -1,148 +1,164 @@-{-# LANGUAGE DataKinds                   #-}-{-# LANGUAGE DeriveGeneric               #-}-{-# LANGUAGE FlexibleInstances           #-}-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}-{-# LANGUAGE LambdaCase                  #-}-{-# LANGUAGE NoImplicitPrelude           #-}-{-# LANGUAGE OverloadedStrings           #-}-{-# LANGUAGE RecordWildCards             #-}-{-# LANGUAGE TypeFamilies                #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric      #-}+{-# LANGUAGE OverloadedStrings  #-}+{-# LANGUAGE RecordWildCards    #-}+{-# LANGUAGE TypeFamilies       #-}  {-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-} +-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | -- Module      : Network.AWS.KMS.ListAliases--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License     : This Source Code Form is subject to the terms of---               the Mozilla Public License, v. 2.0.---               A copy of the MPL can be found in the LICENSE file or---               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright   : (c) 2013-2015 Brendan Hay+-- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>--- Stability   : experimental+-- Stability   : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Lists all of the key aliases in the account.+-- Lists all of the key aliases in the account. ----- <http://docs.aws.amazon.com/kms/latest/APIReference/API_ListAliases.html>+-- /See:/ <http://docs.aws.amazon.com/kms/latest/APIReference/API_ListAliases.html AWS API Reference> for ListAliases. module Network.AWS.KMS.ListAliases     (-    -- * Request-      ListAliases-    -- ** Request constructor-    , listAliases-    -- ** Request lenses-    , laLimit+    -- * Creating a Request+      listAliases+    , ListAliases+    -- * Request Lenses     , laMarker+    , laLimit -    -- * Response-    , ListAliasesResponse-    -- ** Response constructor+    -- * Destructuring the Response     , listAliasesResponse-    -- ** Response lenses-    , larAliases-    , larNextMarker-    , larTruncated+    , ListAliasesResponse+    -- * Response Lenses+    , larsTruncated+    , larsAliases+    , larsNextMarker+    , larsStatus     ) where -import Network.AWS.Data (Object)-import Network.AWS.Prelude-import Network.AWS.Request.JSON-import Network.AWS.KMS.Types-import qualified GHC.Exts+import           Network.AWS.KMS.Types+import           Network.AWS.KMS.Types.Product+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response -data ListAliases = ListAliases-    { _laLimit  :: Maybe Nat-    , _laMarker :: Maybe Text-    } deriving (Eq, Ord, Read, Show)+-- | /See:/ 'listAliases' smart constructor.+data ListAliases = ListAliases'+    { _laMarker :: !(Maybe Text)+    , _laLimit  :: !(Maybe Nat)+    } deriving (Eq,Read,Show,Data,Typeable,Generic) --- | 'ListAliases' constructor.------ The fields accessible through corresponding lenses are:+-- | Creates a value of 'ListAliases' with the minimum fields required to make a request. ----- * 'laLimit' @::@ 'Maybe' 'Natural'+-- Use one of the following lenses to modify other fields as desired: ----- * 'laMarker' @::@ 'Maybe' 'Text'+-- * 'laMarker' ---listAliases :: ListAliases-listAliases = ListAliases-    { _laLimit  = Nothing-    , _laMarker = Nothing+-- * 'laLimit'+listAliases+    :: ListAliases+listAliases =+    ListAliases'+    { _laMarker = Nothing+    , _laLimit = Nothing     } --- | Specify this parameter when paginating results to indicate the maximum number--- of aliases you want in each response. If there are additional aliases beyond--- the maximum you specify, the 'Truncated' response element will be set to 'true.'+-- | Use this parameter when paginating results, and only in a subsequent+-- request after you\'ve received a response where the results are+-- truncated. Set it to the value of the 'NextMarker' element in the+-- response you just received.+laMarker :: Lens' ListAliases (Maybe Text)+laMarker = lens _laMarker (\ s a -> s{_laMarker = a});++-- | Specify this parameter when paginating results to indicate the maximum+-- number of aliases you want in each response. If there are additional+-- aliases beyond the maximum you specify, the 'Truncated' response element+-- will be set to 'true.' laLimit :: Lens' ListAliases (Maybe Natural)-laLimit = lens _laLimit (\s a -> s { _laLimit = a }) . mapping _Nat+laLimit = lens _laLimit (\ s a -> s{_laLimit = a}) . mapping _Nat; --- | Use this parameter when paginating results, and only in a subsequent request--- after you've received a response where the results are truncated. Set it to--- the value of the 'NextMarker' element in the response you just received.-laMarker :: Lens' ListAliases (Maybe Text)-laMarker = lens _laMarker (\s a -> s { _laMarker = a })+instance AWSRequest ListAliases where+        type Sv ListAliases = KMS+        type Rs ListAliases = ListAliasesResponse+        request = postJSON+        response+          = receiveJSON+              (\ s h x ->+                 ListAliasesResponse' <$>+                   (x .?> "Truncated") <*> (x .?> "Aliases" .!@ mempty)+                     <*> (x .?> "NextMarker")+                     <*> (pure (fromEnum s))) -data ListAliasesResponse = ListAliasesResponse-    { _larAliases    :: List "Aliases" AliasListEntry-    , _larNextMarker :: Maybe Text-    , _larTruncated  :: Maybe Bool-    } deriving (Eq, Read, Show)+instance ToHeaders ListAliases where+        toHeaders+          = const+              (mconcat+                 ["X-Amz-Target" =#+                    ("TrentService.ListAliases" :: ByteString),+                  "Content-Type" =#+                    ("application/x-amz-json-1.1" :: ByteString)]) --- | 'ListAliasesResponse' constructor.+instance ToJSON ListAliases where+        toJSON ListAliases'{..}+          = object ["Marker" .= _laMarker, "Limit" .= _laLimit]++instance ToPath ListAliases where+        toPath = const "/"++instance ToQuery ListAliases where+        toQuery = const mempty++-- | /See:/ 'listAliasesResponse' smart constructor.+data ListAliasesResponse = ListAliasesResponse'+    { _larsTruncated  :: !(Maybe Bool)+    , _larsAliases    :: !(Maybe [AliasListEntry])+    , _larsNextMarker :: !(Maybe Text)+    , _larsStatus     :: !Int+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ListAliasesResponse' with the minimum fields required to make a request. ----- The fields accessible through corresponding lenses are:+-- Use one of the following lenses to modify other fields as desired: ----- * 'larAliases' @::@ ['AliasListEntry']+-- * 'larsTruncated' ----- * 'larNextMarker' @::@ 'Maybe' 'Text'+-- * 'larsAliases' ----- * 'larTruncated' @::@ 'Maybe' 'Bool'+-- * 'larsNextMarker' ---listAliasesResponse :: ListAliasesResponse-listAliasesResponse = ListAliasesResponse-    { _larAliases    = mempty-    , _larNextMarker = Nothing-    , _larTruncated  = Nothing+-- * 'larsStatus'+listAliasesResponse+    :: Int -- ^ 'larsStatus'+    -> ListAliasesResponse+listAliasesResponse pStatus_ =+    ListAliasesResponse'+    { _larsTruncated = Nothing+    , _larsAliases = Nothing+    , _larsNextMarker = Nothing+    , _larsStatus = pStatus_     } --- | A list of key aliases in the user's account.-larAliases :: Lens' ListAliasesResponse [AliasListEntry]-larAliases = lens _larAliases (\s a -> s { _larAliases = a }) . _List---- | If 'Truncated' is true, this value is present and contains the value to use for--- the 'Marker' request parameter in a subsequent pagination request.-larNextMarker :: Lens' ListAliasesResponse (Maybe Text)-larNextMarker = lens _larNextMarker (\s a -> s { _larNextMarker = a })- -- | A flag that indicates whether there are more items in the list. If your--- results were truncated, you can make a subsequent pagination request using--- the 'Marker' request parameter to retrieve more aliases in the list.-larTruncated :: Lens' ListAliasesResponse (Maybe Bool)-larTruncated = lens _larTruncated (\s a -> s { _larTruncated = a })--instance ToPath ListAliases where-    toPath = const "/"--instance ToQuery ListAliases where-    toQuery = const mempty--instance ToHeaders ListAliases--instance ToJSON ListAliases where-    toJSON ListAliases{..} = object-        [ "Limit"  .= _laLimit-        , "Marker" .= _laMarker-        ]+-- results were truncated, you can make a subsequent pagination request+-- using the 'Marker' request parameter to retrieve more aliases in the+-- list.+larsTruncated :: Lens' ListAliasesResponse (Maybe Bool)+larsTruncated = lens _larsTruncated (\ s a -> s{_larsTruncated = a}); -instance AWSRequest ListAliases where-    type Sv ListAliases = KMS-    type Rs ListAliases = ListAliasesResponse+-- | A list of key aliases in the user\'s account.+larsAliases :: Lens' ListAliasesResponse [AliasListEntry]+larsAliases = lens _larsAliases (\ s a -> s{_larsAliases = a}) . _Default . _Coerce; -    request  = post "ListAliases"-    response = jsonResponse+-- | If 'Truncated' is true, this value is present and contains the value to+-- use for the 'Marker' request parameter in a subsequent pagination+-- request.+larsNextMarker :: Lens' ListAliasesResponse (Maybe Text)+larsNextMarker = lens _larsNextMarker (\ s a -> s{_larsNextMarker = a}); -instance FromJSON ListAliasesResponse where-    parseJSON = withObject "ListAliasesResponse" $ \o -> ListAliasesResponse-        <$> o .:? "Aliases" .!= mempty-        <*> o .:? "NextMarker"-        <*> o .:? "Truncated"+-- | The response status code.+larsStatus :: Lens' ListAliasesResponse Int+larsStatus = lens _larsStatus (\ s a -> s{_larsStatus = a});
gen/Network/AWS/KMS/ListGrants.hs view
@@ -1,163 +1,182 @@-{-# LANGUAGE DataKinds                   #-}-{-# LANGUAGE DeriveGeneric               #-}-{-# LANGUAGE FlexibleInstances           #-}-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}-{-# LANGUAGE LambdaCase                  #-}-{-# LANGUAGE NoImplicitPrelude           #-}-{-# LANGUAGE OverloadedStrings           #-}-{-# LANGUAGE RecordWildCards             #-}-{-# LANGUAGE TypeFamilies                #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric      #-}+{-# LANGUAGE OverloadedStrings  #-}+{-# LANGUAGE RecordWildCards    #-}+{-# LANGUAGE TypeFamilies       #-}  {-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-} +-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | -- Module      : Network.AWS.KMS.ListGrants--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License     : This Source Code Form is subject to the terms of---               the Mozilla Public License, v. 2.0.---               A copy of the MPL can be found in the LICENSE file or---               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright   : (c) 2013-2015 Brendan Hay+-- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>--- Stability   : experimental+-- Stability   : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | List the grants for a specified key.+-- List the grants for a specified key. ----- <http://docs.aws.amazon.com/kms/latest/APIReference/API_ListGrants.html>+-- /See:/ <http://docs.aws.amazon.com/kms/latest/APIReference/API_ListGrants.html AWS API Reference> for ListGrants. module Network.AWS.KMS.ListGrants     (-    -- * Request-      ListGrants-    -- ** Request constructor-    , listGrants-    -- ** Request lenses-    , lgKeyId-    , lgLimit+    -- * Creating a Request+      listGrants+    , ListGrants+    -- * Request Lenses     , lgMarker+    , lgLimit+    , lgKeyId -    -- * Response-    , ListGrantsResponse-    -- ** Response constructor+    -- * Destructuring the Response     , listGrantsResponse-    -- ** Response lenses-    , lgrGrants-    , lgrNextMarker-    , lgrTruncated+    , ListGrantsResponse+    -- * Response Lenses+    , lgrsTruncated+    , lgrsGrants+    , lgrsNextMarker+    , lgrsStatus     ) where -import Network.AWS.Data (Object)-import Network.AWS.Prelude-import Network.AWS.Request.JSON-import Network.AWS.KMS.Types-import qualified GHC.Exts+import           Network.AWS.KMS.Types+import           Network.AWS.KMS.Types.Product+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response -data ListGrants = ListGrants-    { _lgKeyId  :: Text-    , _lgLimit  :: Maybe Nat-    , _lgMarker :: Maybe Text-    } deriving (Eq, Ord, Read, Show)+-- | /See:/ 'listGrants' smart constructor.+data ListGrants = ListGrants'+    { _lgMarker :: !(Maybe Text)+    , _lgLimit  :: !(Maybe Nat)+    , _lgKeyId  :: !Text+    } deriving (Eq,Read,Show,Data,Typeable,Generic) --- | 'ListGrants' constructor.------ The fields accessible through corresponding lenses are:+-- | Creates a value of 'ListGrants' with the minimum fields required to make a request. ----- * 'lgKeyId' @::@ 'Text'+-- Use one of the following lenses to modify other fields as desired: ----- * 'lgLimit' @::@ 'Maybe' 'Natural'+-- * 'lgMarker' ----- * 'lgMarker' @::@ 'Maybe' 'Text'+-- * 'lgLimit' ---listGrants :: Text -- ^ 'lgKeyId'-           -> ListGrants-listGrants p1 = ListGrants-    { _lgKeyId  = p1-    , _lgLimit  = Nothing-    , _lgMarker = Nothing+-- * 'lgKeyId'+listGrants+    :: Text -- ^ 'lgKeyId'+    -> ListGrants+listGrants pKeyId_ =+    ListGrants'+    { _lgMarker = Nothing+    , _lgLimit = Nothing+    , _lgKeyId = pKeyId_     } --- | A unique identifier for the customer master key. This value can be a globally--- unique identifier or the fully specified ARN to a key.  Key ARN Example ---- arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012+-- | Use this parameter only when paginating results, and only in a+-- subsequent request after you\'ve received a response where the results+-- are truncated. Set it to the value of the 'NextMarker' in the response+-- you just received.+lgMarker :: Lens' ListGrants (Maybe Text)+lgMarker = lens _lgMarker (\ s a -> s{_lgMarker = a});++-- | Specify this parameter only when paginating results to indicate the+-- maximum number of grants you want listed in the response. If there are+-- additional grants beyond the maximum you specify, the 'Truncated'+-- response element will be set to 'true.'+lgLimit :: Lens' ListGrants (Maybe Natural)+lgLimit = lens _lgLimit (\ s a -> s{_lgLimit = a}) . mapping _Nat;++-- | A unique identifier for the customer master key. This value can be a+-- globally unique identifier or the fully specified ARN to a key. --+-- -   Key ARN Example -+--     arn:aws:kms:us-east-1:123456789012:key\/12345678-1234-1234-1234-123456789012+-- -   Globally Unique Key ID Example -+--     12345678-1234-1234-1234-123456789012 lgKeyId :: Lens' ListGrants Text-lgKeyId = lens _lgKeyId (\s a -> s { _lgKeyId = a })+lgKeyId = lens _lgKeyId (\ s a -> s{_lgKeyId = a}); --- | Specify this parameter only when paginating results to indicate the maximum--- number of grants you want listed in the response. If there are additional--- grants beyond the maximum you specify, the 'Truncated' response element will be--- set to 'true.'-lgLimit :: Lens' ListGrants (Maybe Natural)-lgLimit = lens _lgLimit (\s a -> s { _lgLimit = a }) . mapping _Nat+instance AWSRequest ListGrants where+        type Sv ListGrants = KMS+        type Rs ListGrants = ListGrantsResponse+        request = postJSON+        response+          = receiveJSON+              (\ s h x ->+                 ListGrantsResponse' <$>+                   (x .?> "Truncated") <*> (x .?> "Grants" .!@ mempty)+                     <*> (x .?> "NextMarker")+                     <*> (pure (fromEnum s))) --- | Use this parameter only when paginating results, and only in a subsequent--- request after you've received a response where the results are truncated. Set--- it to the value of the 'NextMarker' in the response you just received.-lgMarker :: Lens' ListGrants (Maybe Text)-lgMarker = lens _lgMarker (\s a -> s { _lgMarker = a })+instance ToHeaders ListGrants where+        toHeaders+          = const+              (mconcat+                 ["X-Amz-Target" =#+                    ("TrentService.ListGrants" :: ByteString),+                  "Content-Type" =#+                    ("application/x-amz-json-1.1" :: ByteString)]) -data ListGrantsResponse = ListGrantsResponse-    { _lgrGrants     :: List "Grants" GrantListEntry-    , _lgrNextMarker :: Maybe Text-    , _lgrTruncated  :: Maybe Bool-    } deriving (Eq, Read, Show)+instance ToJSON ListGrants where+        toJSON ListGrants'{..}+          = object+              ["Marker" .= _lgMarker, "Limit" .= _lgLimit,+               "KeyId" .= _lgKeyId] --- | 'ListGrantsResponse' constructor.+instance ToPath ListGrants where+        toPath = const "/"++instance ToQuery ListGrants where+        toQuery = const mempty++-- | /See:/ 'listGrantsResponse' smart constructor.+data ListGrantsResponse = ListGrantsResponse'+    { _lgrsTruncated  :: !(Maybe Bool)+    , _lgrsGrants     :: !(Maybe [GrantListEntry])+    , _lgrsNextMarker :: !(Maybe Text)+    , _lgrsStatus     :: !Int+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ListGrantsResponse' with the minimum fields required to make a request. ----- The fields accessible through corresponding lenses are:+-- Use one of the following lenses to modify other fields as desired: ----- * 'lgrGrants' @::@ ['GrantListEntry']+-- * 'lgrsTruncated' ----- * 'lgrNextMarker' @::@ 'Maybe' 'Text'+-- * 'lgrsGrants' ----- * 'lgrTruncated' @::@ 'Maybe' 'Bool'+-- * 'lgrsNextMarker' ---listGrantsResponse :: ListGrantsResponse-listGrantsResponse = ListGrantsResponse-    { _lgrGrants     = mempty-    , _lgrNextMarker = Nothing-    , _lgrTruncated  = Nothing+-- * 'lgrsStatus'+listGrantsResponse+    :: Int -- ^ 'lgrsStatus'+    -> ListGrantsResponse+listGrantsResponse pStatus_ =+    ListGrantsResponse'+    { _lgrsTruncated = Nothing+    , _lgrsGrants = Nothing+    , _lgrsNextMarker = Nothing+    , _lgrsStatus = pStatus_     } --- | A list of grants.-lgrGrants :: Lens' ListGrantsResponse [GrantListEntry]-lgrGrants = lens _lgrGrants (\s a -> s { _lgrGrants = a }) . _List---- | If 'Truncated' is true, this value is present and contains the value to use for--- the 'Marker' request parameter in a subsequent pagination request.-lgrNextMarker :: Lens' ListGrantsResponse (Maybe Text)-lgrNextMarker = lens _lgrNextMarker (\s a -> s { _lgrNextMarker = a })- -- | A flag that indicates whether there are more items in the list. If your--- results were truncated, you can make a subsequent pagination request using--- the 'Marker' request parameter to retrieve more grants in the list.-lgrTruncated :: Lens' ListGrantsResponse (Maybe Bool)-lgrTruncated = lens _lgrTruncated (\s a -> s { _lgrTruncated = a })--instance ToPath ListGrants where-    toPath = const "/"--instance ToQuery ListGrants where-    toQuery = const mempty--instance ToHeaders ListGrants--instance ToJSON ListGrants where-    toJSON ListGrants{..} = object-        [ "KeyId"  .= _lgKeyId-        , "Limit"  .= _lgLimit-        , "Marker" .= _lgMarker-        ]+-- results were truncated, you can make a subsequent pagination request+-- using the 'Marker' request parameter to retrieve more grants in the+-- list.+lgrsTruncated :: Lens' ListGrantsResponse (Maybe Bool)+lgrsTruncated = lens _lgrsTruncated (\ s a -> s{_lgrsTruncated = a}); -instance AWSRequest ListGrants where-    type Sv ListGrants = KMS-    type Rs ListGrants = ListGrantsResponse+-- | A list of grants.+lgrsGrants :: Lens' ListGrantsResponse [GrantListEntry]+lgrsGrants = lens _lgrsGrants (\ s a -> s{_lgrsGrants = a}) . _Default . _Coerce; -    request  = post "ListGrants"-    response = jsonResponse+-- | If 'Truncated' is true, this value is present and contains the value to+-- use for the 'Marker' request parameter in a subsequent pagination+-- request.+lgrsNextMarker :: Lens' ListGrantsResponse (Maybe Text)+lgrsNextMarker = lens _lgrsNextMarker (\ s a -> s{_lgrsNextMarker = a}); -instance FromJSON ListGrantsResponse where-    parseJSON = withObject "ListGrantsResponse" $ \o -> ListGrantsResponse-        <$> o .:? "Grants" .!= mempty-        <*> o .:? "NextMarker"-        <*> o .:? "Truncated"+-- | The response status code.+lgrsStatus :: Lens' ListGrantsResponse Int+lgrsStatus = lens _lgrsStatus (\ s a -> s{_lgrsStatus = a});
gen/Network/AWS/KMS/ListKeyPolicies.hs view
@@ -1,166 +1,188 @@-{-# LANGUAGE DataKinds                   #-}-{-# LANGUAGE DeriveGeneric               #-}-{-# LANGUAGE FlexibleInstances           #-}-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}-{-# LANGUAGE LambdaCase                  #-}-{-# LANGUAGE NoImplicitPrelude           #-}-{-# LANGUAGE OverloadedStrings           #-}-{-# LANGUAGE RecordWildCards             #-}-{-# LANGUAGE TypeFamilies                #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric      #-}+{-# LANGUAGE OverloadedStrings  #-}+{-# LANGUAGE RecordWildCards    #-}+{-# LANGUAGE TypeFamilies       #-}  {-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-} +-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | -- Module      : Network.AWS.KMS.ListKeyPolicies--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License     : This Source Code Form is subject to the terms of---               the Mozilla Public License, v. 2.0.---               A copy of the MPL can be found in the LICENSE file or---               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright   : (c) 2013-2015 Brendan Hay+-- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>--- Stability   : experimental+-- Stability   : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Retrieves a list of policies attached to a key.+-- Retrieves a list of policies attached to a key. ----- <http://docs.aws.amazon.com/kms/latest/APIReference/API_ListKeyPolicies.html>+-- /See:/ <http://docs.aws.amazon.com/kms/latest/APIReference/API_ListKeyPolicies.html AWS API Reference> for ListKeyPolicies. module Network.AWS.KMS.ListKeyPolicies     (-    -- * Request-      ListKeyPolicies-    -- ** Request constructor-    , listKeyPolicies-    -- ** Request lenses-    , lkpKeyId-    , lkpLimit+    -- * Creating a Request+      listKeyPolicies+    , ListKeyPolicies+    -- * Request Lenses     , lkpMarker+    , lkpLimit+    , lkpKeyId -    -- * Response-    , ListKeyPoliciesResponse-    -- ** Response constructor+    -- * Destructuring the Response     , listKeyPoliciesResponse-    -- ** Response lenses-    , lkprNextMarker-    , lkprPolicyNames-    , lkprTruncated+    , ListKeyPoliciesResponse+    -- * Response Lenses+    , lkprsPolicyNames+    , lkprsTruncated+    , lkprsNextMarker+    , lkprsStatus     ) where -import Network.AWS.Data (Object)-import Network.AWS.Prelude-import Network.AWS.Request.JSON-import Network.AWS.KMS.Types-import qualified GHC.Exts+import           Network.AWS.KMS.Types+import           Network.AWS.KMS.Types.Product+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response -data ListKeyPolicies = ListKeyPolicies-    { _lkpKeyId  :: Text-    , _lkpLimit  :: Maybe Nat-    , _lkpMarker :: Maybe Text-    } deriving (Eq, Ord, Read, Show)+-- | /See:/ 'listKeyPolicies' smart constructor.+data ListKeyPolicies = ListKeyPolicies'+    { _lkpMarker :: !(Maybe Text)+    , _lkpLimit  :: !(Maybe Nat)+    , _lkpKeyId  :: !Text+    } deriving (Eq,Read,Show,Data,Typeable,Generic) --- | 'ListKeyPolicies' constructor.------ The fields accessible through corresponding lenses are:+-- | Creates a value of 'ListKeyPolicies' with the minimum fields required to make a request. ----- * 'lkpKeyId' @::@ 'Text'+-- Use one of the following lenses to modify other fields as desired: ----- * 'lkpLimit' @::@ 'Maybe' 'Natural'+-- * 'lkpMarker' ----- * 'lkpMarker' @::@ 'Maybe' 'Text'+-- * 'lkpLimit' ---listKeyPolicies :: Text -- ^ 'lkpKeyId'-                -> ListKeyPolicies-listKeyPolicies p1 = ListKeyPolicies-    { _lkpKeyId  = p1-    , _lkpLimit  = Nothing-    , _lkpMarker = Nothing+-- * 'lkpKeyId'+listKeyPolicies+    :: Text -- ^ 'lkpKeyId'+    -> ListKeyPolicies+listKeyPolicies pKeyId_ =+    ListKeyPolicies'+    { _lkpMarker = Nothing+    , _lkpLimit = Nothing+    , _lkpKeyId = pKeyId_     } --- | A unique identifier for the customer master key. This value can be a globally--- unique identifier, a fully specified ARN to either an alias or a key, or an--- alias name prefixed by "alias/".  Key ARN Example ---- arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 Alias ARN Example - arn:aws:kms:us-east-1:123456789012:alias/MyAliasName--- Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012 Alias--- Name Example - alias/MyAliasName-lkpKeyId :: Lens' ListKeyPolicies Text-lkpKeyId = lens _lkpKeyId (\s a -> s { _lkpKeyId = a })---- | Specify this parameter only when paginating results to indicate the maximum--- number of policies you want listed in the response. If there are additional--- policies beyond the maximum you specify, the 'Truncated' response element will--- be set to 'true.'-lkpLimit :: Lens' ListKeyPolicies (Maybe Natural)-lkpLimit = lens _lkpLimit (\s a -> s { _lkpLimit = a }) . mapping _Nat---- | Use this parameter only when paginating results, and only in a subsequent--- request after you've received a response where the results are truncated. Set--- it to the value of the 'NextMarker' in the response you just received.+-- | Use this parameter only when paginating results, and only in a+-- subsequent request after you\'ve received a response where the results+-- are truncated. Set it to the value of the 'NextMarker' in the response+-- you just received. lkpMarker :: Lens' ListKeyPolicies (Maybe Text)-lkpMarker = lens _lkpMarker (\s a -> s { _lkpMarker = a })+lkpMarker = lens _lkpMarker (\ s a -> s{_lkpMarker = a}); -data ListKeyPoliciesResponse = ListKeyPoliciesResponse-    { _lkprNextMarker  :: Maybe Text-    , _lkprPolicyNames :: List "PolicyNames" Text-    , _lkprTruncated   :: Maybe Bool-    } deriving (Eq, Ord, Read, Show)+-- | Specify this parameter only when paginating results to indicate the+-- maximum number of policies you want listed in the response. If there are+-- additional policies beyond the maximum you specify, the 'Truncated'+-- response element will be set to 'true.'+lkpLimit :: Lens' ListKeyPolicies (Maybe Natural)+lkpLimit = lens _lkpLimit (\ s a -> s{_lkpLimit = a}) . mapping _Nat; --- | 'ListKeyPoliciesResponse' constructor.------ The fields accessible through corresponding lenses are:------ * 'lkprNextMarker' @::@ 'Maybe' 'Text'------ * 'lkprPolicyNames' @::@ ['Text']------ * 'lkprTruncated' @::@ 'Maybe' 'Bool'+-- | A unique identifier for the customer master key. This value can be a+-- globally unique identifier, a fully specified ARN to either an alias or+-- a key, or an alias name prefixed by \"alias\/\". ---listKeyPoliciesResponse :: ListKeyPoliciesResponse-listKeyPoliciesResponse = ListKeyPoliciesResponse-    { _lkprPolicyNames = mempty-    , _lkprNextMarker  = Nothing-    , _lkprTruncated   = Nothing-    }+-- -   Key ARN Example -+--     arn:aws:kms:us-east-1:123456789012:key\/12345678-1234-1234-1234-123456789012+-- -   Alias ARN Example -+--     arn:aws:kms:us-east-1:123456789012:alias\/MyAliasName+-- -   Globally Unique Key ID Example -+--     12345678-1234-1234-1234-123456789012+-- -   Alias Name Example - alias\/MyAliasName+lkpKeyId :: Lens' ListKeyPolicies Text+lkpKeyId = lens _lkpKeyId (\ s a -> s{_lkpKeyId = a}); --- | If 'Truncated' is true, this value is present and contains the value to use for--- the 'Marker' request parameter in a subsequent pagination request.-lkprNextMarker :: Lens' ListKeyPoliciesResponse (Maybe Text)-lkprNextMarker = lens _lkprNextMarker (\s a -> s { _lkprNextMarker = a })+instance AWSRequest ListKeyPolicies where+        type Sv ListKeyPolicies = KMS+        type Rs ListKeyPolicies = ListKeyPoliciesResponse+        request = postJSON+        response+          = receiveJSON+              (\ s h x ->+                 ListKeyPoliciesResponse' <$>+                   (x .?> "PolicyNames" .!@ mempty) <*>+                     (x .?> "Truncated")+                     <*> (x .?> "NextMarker")+                     <*> (pure (fromEnum s))) --- | A list of policy names. Currently, there is only one policy and it is named--- "Default".-lkprPolicyNames :: Lens' ListKeyPoliciesResponse [Text]-lkprPolicyNames = lens _lkprPolicyNames (\s a -> s { _lkprPolicyNames = a }) . _List+instance ToHeaders ListKeyPolicies where+        toHeaders+          = const+              (mconcat+                 ["X-Amz-Target" =#+                    ("TrentService.ListKeyPolicies" :: ByteString),+                  "Content-Type" =#+                    ("application/x-amz-json-1.1" :: ByteString)]) --- | A flag that indicates whether there are more items in the list. If your--- results were truncated, you can make a subsequent pagination request using--- the 'Marker' request parameter to retrieve more policies in the list.-lkprTruncated :: Lens' ListKeyPoliciesResponse (Maybe Bool)-lkprTruncated = lens _lkprTruncated (\s a -> s { _lkprTruncated = a })+instance ToJSON ListKeyPolicies where+        toJSON ListKeyPolicies'{..}+          = object+              ["Marker" .= _lkpMarker, "Limit" .= _lkpLimit,+               "KeyId" .= _lkpKeyId]  instance ToPath ListKeyPolicies where-    toPath = const "/"+        toPath = const "/"  instance ToQuery ListKeyPolicies where-    toQuery = const mempty+        toQuery = const mempty -instance ToHeaders ListKeyPolicies+-- | /See:/ 'listKeyPoliciesResponse' smart constructor.+data ListKeyPoliciesResponse = ListKeyPoliciesResponse'+    { _lkprsPolicyNames :: !(Maybe [Text])+    , _lkprsTruncated   :: !(Maybe Bool)+    , _lkprsNextMarker  :: !(Maybe Text)+    , _lkprsStatus      :: !Int+    } deriving (Eq,Read,Show,Data,Typeable,Generic) -instance ToJSON ListKeyPolicies where-    toJSON ListKeyPolicies{..} = object-        [ "KeyId"  .= _lkpKeyId-        , "Limit"  .= _lkpLimit-        , "Marker" .= _lkpMarker-        ]+-- | Creates a value of 'ListKeyPoliciesResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lkprsPolicyNames'+--+-- * 'lkprsTruncated'+--+-- * 'lkprsNextMarker'+--+-- * 'lkprsStatus'+listKeyPoliciesResponse+    :: Int -- ^ 'lkprsStatus'+    -> ListKeyPoliciesResponse+listKeyPoliciesResponse pStatus_ =+    ListKeyPoliciesResponse'+    { _lkprsPolicyNames = Nothing+    , _lkprsTruncated = Nothing+    , _lkprsNextMarker = Nothing+    , _lkprsStatus = pStatus_+    } -instance AWSRequest ListKeyPolicies where-    type Sv ListKeyPolicies = KMS-    type Rs ListKeyPolicies = ListKeyPoliciesResponse+-- | A list of policy names. Currently, there is only one policy and it is+-- named \"Default\".+lkprsPolicyNames :: Lens' ListKeyPoliciesResponse [Text]+lkprsPolicyNames = lens _lkprsPolicyNames (\ s a -> s{_lkprsPolicyNames = a}) . _Default . _Coerce; -    request  = post "ListKeyPolicies"-    response = jsonResponse+-- | A flag that indicates whether there are more items in the list. If your+-- results were truncated, you can make a subsequent pagination request+-- using the 'Marker' request parameter to retrieve more policies in the+-- list.+lkprsTruncated :: Lens' ListKeyPoliciesResponse (Maybe Bool)+lkprsTruncated = lens _lkprsTruncated (\ s a -> s{_lkprsTruncated = a}); -instance FromJSON ListKeyPoliciesResponse where-    parseJSON = withObject "ListKeyPoliciesResponse" $ \o -> ListKeyPoliciesResponse-        <$> o .:? "NextMarker"-        <*> o .:? "PolicyNames" .!= mempty-        <*> o .:? "Truncated"+-- | If 'Truncated' is true, this value is present and contains the value to+-- use for the 'Marker' request parameter in a subsequent pagination+-- request.+lkprsNextMarker :: Lens' ListKeyPoliciesResponse (Maybe Text)+lkprsNextMarker = lens _lkprsNextMarker (\ s a -> s{_lkprsNextMarker = a});++-- | The response status code.+lkprsStatus :: Lens' ListKeyPoliciesResponse Int+lkprsStatus = lens _lkprsStatus (\ s a -> s{_lkprsStatus = a});
gen/Network/AWS/KMS/ListKeys.hs view
@@ -1,148 +1,163 @@-{-# LANGUAGE DataKinds                   #-}-{-# LANGUAGE DeriveGeneric               #-}-{-# LANGUAGE FlexibleInstances           #-}-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}-{-# LANGUAGE LambdaCase                  #-}-{-# LANGUAGE NoImplicitPrelude           #-}-{-# LANGUAGE OverloadedStrings           #-}-{-# LANGUAGE RecordWildCards             #-}-{-# LANGUAGE TypeFamilies                #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric      #-}+{-# LANGUAGE OverloadedStrings  #-}+{-# LANGUAGE RecordWildCards    #-}+{-# LANGUAGE TypeFamilies       #-}  {-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-} +-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | -- Module      : Network.AWS.KMS.ListKeys--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License     : This Source Code Form is subject to the terms of---               the Mozilla Public License, v. 2.0.---               A copy of the MPL can be found in the LICENSE file or---               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright   : (c) 2013-2015 Brendan Hay+-- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>--- Stability   : experimental+-- Stability   : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Lists the customer master keys.+-- Lists the customer master keys. ----- <http://docs.aws.amazon.com/kms/latest/APIReference/API_ListKeys.html>+-- /See:/ <http://docs.aws.amazon.com/kms/latest/APIReference/API_ListKeys.html AWS API Reference> for ListKeys. module Network.AWS.KMS.ListKeys     (-    -- * Request-      ListKeys-    -- ** Request constructor-    , listKeys-    -- ** Request lenses-    , lkLimit+    -- * Creating a Request+      listKeys+    , ListKeys+    -- * Request Lenses     , lkMarker+    , lkLimit -    -- * Response-    , ListKeysResponse-    -- ** Response constructor+    -- * Destructuring the Response     , listKeysResponse-    -- ** Response lenses-    , lkrKeys-    , lkrNextMarker-    , lkrTruncated+    , ListKeysResponse+    -- * Response Lenses+    , lkrsTruncated+    , lkrsKeys+    , lkrsNextMarker+    , lkrsStatus     ) where -import Network.AWS.Data (Object)-import Network.AWS.Prelude-import Network.AWS.Request.JSON-import Network.AWS.KMS.Types-import qualified GHC.Exts+import           Network.AWS.KMS.Types+import           Network.AWS.KMS.Types.Product+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response -data ListKeys = ListKeys-    { _lkLimit  :: Maybe Nat-    , _lkMarker :: Maybe Text-    } deriving (Eq, Ord, Read, Show)+-- | /See:/ 'listKeys' smart constructor.+data ListKeys = ListKeys'+    { _lkMarker :: !(Maybe Text)+    , _lkLimit  :: !(Maybe Nat)+    } deriving (Eq,Read,Show,Data,Typeable,Generic) --- | 'ListKeys' constructor.------ The fields accessible through corresponding lenses are:+-- | Creates a value of 'ListKeys' with the minimum fields required to make a request. ----- * 'lkLimit' @::@ 'Maybe' 'Natural'+-- Use one of the following lenses to modify other fields as desired: ----- * 'lkMarker' @::@ 'Maybe' 'Text'+-- * 'lkMarker' ---listKeys :: ListKeys-listKeys = ListKeys-    { _lkLimit  = Nothing-    , _lkMarker = Nothing+-- * 'lkLimit'+listKeys+    :: ListKeys+listKeys =+    ListKeys'+    { _lkMarker = Nothing+    , _lkLimit = Nothing     } --- | Specify this parameter only when paginating results to indicate the maximum--- number of keys you want listed in the response. If there are additional keys--- beyond the maximum you specify, the 'Truncated' response element will be set to 'true.'+-- | Use this parameter only when paginating results, and only in a+-- subsequent request after you\'ve received a response where the results+-- are truncated. Set it to the value of the 'NextMarker' in the response+-- you just received.+lkMarker :: Lens' ListKeys (Maybe Text)+lkMarker = lens _lkMarker (\ s a -> s{_lkMarker = a});++-- | Specify this parameter only when paginating results to indicate the+-- maximum number of keys you want listed in the response. If there are+-- additional keys beyond the maximum you specify, the 'Truncated' response+-- element will be set to 'true.' lkLimit :: Lens' ListKeys (Maybe Natural)-lkLimit = lens _lkLimit (\s a -> s { _lkLimit = a }) . mapping _Nat+lkLimit = lens _lkLimit (\ s a -> s{_lkLimit = a}) . mapping _Nat; --- | Use this parameter only when paginating results, and only in a subsequent--- request after you've received a response where the results are truncated. Set--- it to the value of the 'NextMarker' in the response you just received.-lkMarker :: Lens' ListKeys (Maybe Text)-lkMarker = lens _lkMarker (\s a -> s { _lkMarker = a })+instance AWSRequest ListKeys where+        type Sv ListKeys = KMS+        type Rs ListKeys = ListKeysResponse+        request = postJSON+        response+          = receiveJSON+              (\ s h x ->+                 ListKeysResponse' <$>+                   (x .?> "Truncated") <*> (x .?> "Keys" .!@ mempty) <*>+                     (x .?> "NextMarker")+                     <*> (pure (fromEnum s))) -data ListKeysResponse = ListKeysResponse-    { _lkrKeys       :: List "Keys" KeyListEntry-    , _lkrNextMarker :: Maybe Text-    , _lkrTruncated  :: Maybe Bool-    } deriving (Eq, Read, Show)+instance ToHeaders ListKeys where+        toHeaders+          = const+              (mconcat+                 ["X-Amz-Target" =#+                    ("TrentService.ListKeys" :: ByteString),+                  "Content-Type" =#+                    ("application/x-amz-json-1.1" :: ByteString)]) --- | 'ListKeysResponse' constructor.+instance ToJSON ListKeys where+        toJSON ListKeys'{..}+          = object ["Marker" .= _lkMarker, "Limit" .= _lkLimit]++instance ToPath ListKeys where+        toPath = const "/"++instance ToQuery ListKeys where+        toQuery = const mempty++-- | /See:/ 'listKeysResponse' smart constructor.+data ListKeysResponse = ListKeysResponse'+    { _lkrsTruncated  :: !(Maybe Bool)+    , _lkrsKeys       :: !(Maybe [KeyListEntry])+    , _lkrsNextMarker :: !(Maybe Text)+    , _lkrsStatus     :: !Int+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ListKeysResponse' with the minimum fields required to make a request. ----- The fields accessible through corresponding lenses are:+-- Use one of the following lenses to modify other fields as desired: ----- * 'lkrKeys' @::@ ['KeyListEntry']+-- * 'lkrsTruncated' ----- * 'lkrNextMarker' @::@ 'Maybe' 'Text'+-- * 'lkrsKeys' ----- * 'lkrTruncated' @::@ 'Maybe' 'Bool'+-- * 'lkrsNextMarker' ---listKeysResponse :: ListKeysResponse-listKeysResponse = ListKeysResponse-    { _lkrKeys       = mempty-    , _lkrNextMarker = Nothing-    , _lkrTruncated  = Nothing+-- * 'lkrsStatus'+listKeysResponse+    :: Int -- ^ 'lkrsStatus'+    -> ListKeysResponse+listKeysResponse pStatus_ =+    ListKeysResponse'+    { _lkrsTruncated = Nothing+    , _lkrsKeys = Nothing+    , _lkrsNextMarker = Nothing+    , _lkrsStatus = pStatus_     } --- | A list of keys.-lkrKeys :: Lens' ListKeysResponse [KeyListEntry]-lkrKeys = lens _lkrKeys (\s a -> s { _lkrKeys = a }) . _List---- | If 'Truncated' is true, this value is present and contains the value to use for--- the 'Marker' request parameter in a subsequent pagination request.-lkrNextMarker :: Lens' ListKeysResponse (Maybe Text)-lkrNextMarker = lens _lkrNextMarker (\s a -> s { _lkrNextMarker = a })- -- | A flag that indicates whether there are more items in the list. If your--- results were truncated, you can make a subsequent pagination request using--- the 'Marker' request parameter to retrieve more keys in the list.-lkrTruncated :: Lens' ListKeysResponse (Maybe Bool)-lkrTruncated = lens _lkrTruncated (\s a -> s { _lkrTruncated = a })--instance ToPath ListKeys where-    toPath = const "/"--instance ToQuery ListKeys where-    toQuery = const mempty--instance ToHeaders ListKeys--instance ToJSON ListKeys where-    toJSON ListKeys{..} = object-        [ "Limit"  .= _lkLimit-        , "Marker" .= _lkMarker-        ]+-- results were truncated, you can make a subsequent pagination request+-- using the 'Marker' request parameter to retrieve more keys in the list.+lkrsTruncated :: Lens' ListKeysResponse (Maybe Bool)+lkrsTruncated = lens _lkrsTruncated (\ s a -> s{_lkrsTruncated = a}); -instance AWSRequest ListKeys where-    type Sv ListKeys = KMS-    type Rs ListKeys = ListKeysResponse+-- | A list of keys.+lkrsKeys :: Lens' ListKeysResponse [KeyListEntry]+lkrsKeys = lens _lkrsKeys (\ s a -> s{_lkrsKeys = a}) . _Default . _Coerce; -    request  = post "ListKeys"-    response = jsonResponse+-- | If 'Truncated' is true, this value is present and contains the value to+-- use for the 'Marker' request parameter in a subsequent pagination+-- request.+lkrsNextMarker :: Lens' ListKeysResponse (Maybe Text)+lkrsNextMarker = lens _lkrsNextMarker (\ s a -> s{_lkrsNextMarker = a}); -instance FromJSON ListKeysResponse where-    parseJSON = withObject "ListKeysResponse" $ \o -> ListKeysResponse-        <$> o .:? "Keys" .!= mempty-        <*> o .:? "NextMarker"-        <*> o .:? "Truncated"+-- | The response status code.+lkrsStatus :: Lens' ListKeysResponse Int+lkrsStatus = lens _lkrsStatus (\ s a -> s{_lkrsStatus = a});
gen/Network/AWS/KMS/PutKeyPolicy.hs view
@@ -1,120 +1,129 @@-{-# LANGUAGE DataKinds                   #-}-{-# LANGUAGE DeriveGeneric               #-}-{-# LANGUAGE FlexibleInstances           #-}-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}-{-# LANGUAGE LambdaCase                  #-}-{-# LANGUAGE NoImplicitPrelude           #-}-{-# LANGUAGE OverloadedStrings           #-}-{-# LANGUAGE RecordWildCards             #-}-{-# LANGUAGE TypeFamilies                #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric      #-}+{-# LANGUAGE OverloadedStrings  #-}+{-# LANGUAGE RecordWildCards    #-}+{-# LANGUAGE TypeFamilies       #-}  {-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-} +-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | -- Module      : Network.AWS.KMS.PutKeyPolicy--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License     : This Source Code Form is subject to the terms of---               the Mozilla Public License, v. 2.0.---               A copy of the MPL can be found in the LICENSE file or---               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright   : (c) 2013-2015 Brendan Hay+-- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>--- Stability   : experimental+-- Stability   : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Attaches a policy to the specified key.+-- Attaches a policy to the specified key. ----- <http://docs.aws.amazon.com/kms/latest/APIReference/API_PutKeyPolicy.html>+-- /See:/ <http://docs.aws.amazon.com/kms/latest/APIReference/API_PutKeyPolicy.html AWS API Reference> for PutKeyPolicy. module Network.AWS.KMS.PutKeyPolicy     (-    -- * Request-      PutKeyPolicy-    -- ** Request constructor-    , putKeyPolicy-    -- ** Request lenses+    -- * Creating a Request+      putKeyPolicy+    , PutKeyPolicy+    -- * Request Lenses     , pkpKeyId-    , pkpPolicy     , pkpPolicyName+    , pkpPolicy -    -- * Response-    , PutKeyPolicyResponse-    -- ** Response constructor+    -- * Destructuring the Response     , putKeyPolicyResponse+    , PutKeyPolicyResponse     ) where -import Network.AWS.Data (Object)-import Network.AWS.Prelude-import Network.AWS.Request.JSON-import Network.AWS.KMS.Types-import qualified GHC.Exts+import           Network.AWS.KMS.Types+import           Network.AWS.KMS.Types.Product+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response -data PutKeyPolicy = PutKeyPolicy-    { _pkpKeyId      :: Text-    , _pkpPolicy     :: Text-    , _pkpPolicyName :: Text-    } deriving (Eq, Ord, Read, Show)+-- | /See:/ 'putKeyPolicy' smart constructor.+data PutKeyPolicy = PutKeyPolicy'+    { _pkpKeyId      :: !Text+    , _pkpPolicyName :: !Text+    , _pkpPolicy     :: !Text+    } deriving (Eq,Read,Show,Data,Typeable,Generic) --- | 'PutKeyPolicy' constructor.------ The fields accessible through corresponding lenses are:+-- | Creates a value of 'PutKeyPolicy' with the minimum fields required to make a request. ----- * 'pkpKeyId' @::@ 'Text'+-- Use one of the following lenses to modify other fields as desired: ----- * 'pkpPolicy' @::@ 'Text'+-- * 'pkpKeyId' ----- * 'pkpPolicyName' @::@ 'Text'+-- * 'pkpPolicyName' ---putKeyPolicy :: Text -- ^ 'pkpKeyId'-             -> Text -- ^ 'pkpPolicyName'-             -> Text -- ^ 'pkpPolicy'-             -> PutKeyPolicy-putKeyPolicy p1 p2 p3 = PutKeyPolicy-    { _pkpKeyId      = p1-    , _pkpPolicyName = p2-    , _pkpPolicy     = p3+-- * 'pkpPolicy'+putKeyPolicy+    :: Text -- ^ 'pkpKeyId'+    -> Text -- ^ 'pkpPolicyName'+    -> Text -- ^ 'pkpPolicy'+    -> PutKeyPolicy+putKeyPolicy pKeyId_ pPolicyName_ pPolicy_ =+    PutKeyPolicy'+    { _pkpKeyId = pKeyId_+    , _pkpPolicyName = pPolicyName_+    , _pkpPolicy = pPolicy_     } --- | A unique identifier for the customer master key. This value can be a globally--- unique identifier or the fully specified ARN to a key.  Key ARN Example ---- arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012+-- | A unique identifier for the customer master key. This value can be a+-- globally unique identifier or the fully specified ARN to a key. --+-- -   Key ARN Example -+--     arn:aws:kms:us-east-1:123456789012:key\/12345678-1234-1234-1234-123456789012+-- -   Globally Unique Key ID Example -+--     12345678-1234-1234-1234-123456789012 pkpKeyId :: Lens' PutKeyPolicy Text-pkpKeyId = lens _pkpKeyId (\s a -> s { _pkpKeyId = a })+pkpKeyId = lens _pkpKeyId (\ s a -> s{_pkpKeyId = a}); +-- | Name of the policy to be attached. Currently, the only supported name is+-- \"default\".+pkpPolicyName :: Lens' PutKeyPolicy Text+pkpPolicyName = lens _pkpPolicyName (\ s a -> s{_pkpPolicyName = a});+ -- | The policy, in JSON format, to be attached to the key. pkpPolicy :: Lens' PutKeyPolicy Text-pkpPolicy = lens _pkpPolicy (\s a -> s { _pkpPolicy = a })+pkpPolicy = lens _pkpPolicy (\ s a -> s{_pkpPolicy = a}); --- | Name of the policy to be attached. Currently, the only supported name is--- "default".-pkpPolicyName :: Lens' PutKeyPolicy Text-pkpPolicyName = lens _pkpPolicyName (\s a -> s { _pkpPolicyName = a })+instance AWSRequest PutKeyPolicy where+        type Sv PutKeyPolicy = KMS+        type Rs PutKeyPolicy = PutKeyPolicyResponse+        request = postJSON+        response = receiveNull PutKeyPolicyResponse' -data PutKeyPolicyResponse = PutKeyPolicyResponse-    deriving (Eq, Ord, Read, Show, Generic)+instance ToHeaders PutKeyPolicy where+        toHeaders+          = const+              (mconcat+                 ["X-Amz-Target" =#+                    ("TrentService.PutKeyPolicy" :: ByteString),+                  "Content-Type" =#+                    ("application/x-amz-json-1.1" :: ByteString)]) --- | 'PutKeyPolicyResponse' constructor.-putKeyPolicyResponse :: PutKeyPolicyResponse-putKeyPolicyResponse = PutKeyPolicyResponse+instance ToJSON PutKeyPolicy where+        toJSON PutKeyPolicy'{..}+          = object+              ["KeyId" .= _pkpKeyId,+               "PolicyName" .= _pkpPolicyName,+               "Policy" .= _pkpPolicy]  instance ToPath PutKeyPolicy where-    toPath = const "/"+        toPath = const "/"  instance ToQuery PutKeyPolicy where-    toQuery = const mempty--instance ToHeaders PutKeyPolicy--instance ToJSON PutKeyPolicy where-    toJSON PutKeyPolicy{..} = object-        [ "KeyId"      .= _pkpKeyId-        , "PolicyName" .= _pkpPolicyName-        , "Policy"     .= _pkpPolicy-        ]+        toQuery = const mempty -instance AWSRequest PutKeyPolicy where-    type Sv PutKeyPolicy = KMS-    type Rs PutKeyPolicy = PutKeyPolicyResponse+-- | /See:/ 'putKeyPolicyResponse' smart constructor.+data PutKeyPolicyResponse =+    PutKeyPolicyResponse'+    deriving (Eq,Read,Show,Data,Typeable,Generic) -    request  = post "PutKeyPolicy"-    response = nullResponse PutKeyPolicyResponse+-- | Creates a value of 'PutKeyPolicyResponse' with the minimum fields required to make a request.+--+putKeyPolicyResponse+    :: PutKeyPolicyResponse+putKeyPolicyResponse = PutKeyPolicyResponse'
gen/Network/AWS/KMS/ReEncrypt.hs view
@@ -1,198 +1,215 @@-{-# LANGUAGE DataKinds                   #-}-{-# LANGUAGE DeriveGeneric               #-}-{-# LANGUAGE FlexibleInstances           #-}-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}-{-# LANGUAGE LambdaCase                  #-}-{-# LANGUAGE NoImplicitPrelude           #-}-{-# LANGUAGE OverloadedStrings           #-}-{-# LANGUAGE RecordWildCards             #-}-{-# LANGUAGE TypeFamilies                #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric      #-}+{-# LANGUAGE OverloadedStrings  #-}+{-# LANGUAGE RecordWildCards    #-}+{-# LANGUAGE TypeFamilies       #-}  {-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-} +-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | -- Module      : Network.AWS.KMS.ReEncrypt--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License     : This Source Code Form is subject to the terms of---               the Mozilla Public License, v. 2.0.---               A copy of the MPL can be found in the LICENSE file or---               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright   : (c) 2013-2015 Brendan Hay+-- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>--- Stability   : experimental+-- Stability   : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Encrypts data on the server side with a new customer master key without+-- Encrypts data on the server side with a new customer master key without -- exposing the plaintext of the data on the client side. The data is first--- decrypted and then encrypted. This operation can also be used to change the--- encryption context of a ciphertext.+-- decrypted and then encrypted. This operation can also be used to change+-- the encryption context of a ciphertext. ----- Unlike other actions, 'ReEncrypt' is authorized twice - once as 'ReEncryptFrom'--- on the source key and once as 'ReEncryptTo' on the destination key. We--- therefore recommend that you include the '"action":"kms:ReEncrypt*"' statement--- in your key policies to permit re-encryption from or to the key. The--- statement is included automatically when you authorize use of the key through--- the console but must be included manually when you set a policy by using the 'PutKeyPolicy' function.+-- Unlike other actions, 'ReEncrypt' is authorized twice - once as+-- 'ReEncryptFrom' on the source key and once as 'ReEncryptTo' on the+-- destination key. We therefore recommend that you include the+-- '\"action\":\"kms:ReEncrypt*\"' statement in your key policies to permit+-- re-encryption from or to the key. The statement is included+-- automatically when you authorize use of the key through the console but+-- must be included manually when you set a policy by using the+-- PutKeyPolicy function. ----- <http://docs.aws.amazon.com/kms/latest/APIReference/API_ReEncrypt.html>+-- /See:/ <http://docs.aws.amazon.com/kms/latest/APIReference/API_ReEncrypt.html AWS API Reference> for ReEncrypt. module Network.AWS.KMS.ReEncrypt     (-    -- * Request-      ReEncrypt-    -- ** Request constructor-    , reEncrypt-    -- ** Request lenses-    , reCiphertextBlob+    -- * Creating a Request+      reEncrypt+    , ReEncrypt+    -- * Request Lenses     , reDestinationEncryptionContext-    , reDestinationKeyId-    , reGrantTokens     , reSourceEncryptionContext+    , reGrantTokens+    , reCiphertextBlob+    , reDestinationKeyId -    -- * Response-    , ReEncryptResponse-    -- ** Response constructor+    -- * Destructuring the Response     , reEncryptResponse-    -- ** Response lenses-    , rerCiphertextBlob-    , rerKeyId-    , rerSourceKeyId+    , ReEncryptResponse+    -- * Response Lenses+    , rersSourceKeyId+    , rersKeyId+    , rersCiphertextBlob+    , rersStatus     ) where -import Network.AWS.Data (Object)-import Network.AWS.Prelude-import Network.AWS.Request.JSON-import Network.AWS.KMS.Types-import qualified GHC.Exts+import           Network.AWS.KMS.Types+import           Network.AWS.KMS.Types.Product+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response -data ReEncrypt = ReEncrypt-    { _reCiphertextBlob               :: Base64-    , _reDestinationEncryptionContext :: Map Text Text-    , _reDestinationKeyId             :: Text-    , _reGrantTokens                  :: List "GrantTokens" Text-    , _reSourceEncryptionContext      :: Map Text Text-    } deriving (Eq, Read, Show)+-- | /See:/ 'reEncrypt' smart constructor.+data ReEncrypt = ReEncrypt'+    { _reDestinationEncryptionContext :: !(Maybe (Map Text Text))+    , _reSourceEncryptionContext      :: !(Maybe (Map Text Text))+    , _reGrantTokens                  :: !(Maybe [Text])+    , _reCiphertextBlob               :: !Base64+    , _reDestinationKeyId             :: !Text+    } deriving (Eq,Read,Show,Data,Typeable,Generic) --- | 'ReEncrypt' constructor.------ The fields accessible through corresponding lenses are:+-- | Creates a value of 'ReEncrypt' with the minimum fields required to make a request. ----- * 'reCiphertextBlob' @::@ 'Base64'+-- Use one of the following lenses to modify other fields as desired: ----- * 'reDestinationEncryptionContext' @::@ 'HashMap' 'Text' 'Text'+-- * 'reDestinationEncryptionContext' ----- * 'reDestinationKeyId' @::@ 'Text'+-- * 'reSourceEncryptionContext' ----- * 'reGrantTokens' @::@ ['Text']+-- * 'reGrantTokens' ----- * 'reSourceEncryptionContext' @::@ 'HashMap' 'Text' 'Text'+-- * 'reCiphertextBlob' ---reEncrypt :: Base64 -- ^ 'reCiphertextBlob'-          -> Text -- ^ 'reDestinationKeyId'-          -> ReEncrypt-reEncrypt p1 p2 = ReEncrypt-    { _reCiphertextBlob               = p1-    , _reDestinationKeyId             = p2-    , _reSourceEncryptionContext      = mempty-    , _reDestinationEncryptionContext = mempty-    , _reGrantTokens                  = mempty+-- * 'reDestinationKeyId'+reEncrypt+    :: ByteString -- ^ 'reCiphertextBlob'+    -> Text -- ^ 'reDestinationKeyId'+    -> ReEncrypt+reEncrypt pCiphertextBlob_ pDestinationKeyId_ =+    ReEncrypt'+    { _reDestinationEncryptionContext = Nothing+    , _reSourceEncryptionContext = Nothing+    , _reGrantTokens = Nothing+    , _reCiphertextBlob = _Base64 # pCiphertextBlob_+    , _reDestinationKeyId = pDestinationKeyId_     } --- | Ciphertext of the data to re-encrypt.-reCiphertextBlob :: Lens' ReEncrypt Base64-reCiphertextBlob = lens _reCiphertextBlob (\s a -> s { _reCiphertextBlob = a })- -- | Encryption context to be used when the data is re-encrypted. reDestinationEncryptionContext :: Lens' ReEncrypt (HashMap Text Text)-reDestinationEncryptionContext =-    lens _reDestinationEncryptionContext-        (\s a -> s { _reDestinationEncryptionContext = a })-            . _Map+reDestinationEncryptionContext = lens _reDestinationEncryptionContext (\ s a -> s{_reDestinationEncryptionContext = a}) . _Default . _Map; --- | A unique identifier for the customer master key used to re-encrypt the data.--- This value can be a globally unique identifier, a fully specified ARN to--- either an alias or a key, or an alias name prefixed by "alias/".  Key ARN--- Example ---- arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 Alias ARN Example - arn:aws:kms:us-east-1:123456789012:alias/MyAliasName--- Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012 Alias--- Name Example - alias/MyAliasName-reDestinationKeyId :: Lens' ReEncrypt Text-reDestinationKeyId =-    lens _reDestinationKeyId (\s a -> s { _reDestinationKeyId = a })+-- | Encryption context used to encrypt and decrypt the data specified in the+-- 'CiphertextBlob' parameter.+reSourceEncryptionContext :: Lens' ReEncrypt (HashMap Text Text)+reSourceEncryptionContext = lens _reSourceEncryptionContext (\ s a -> s{_reSourceEncryptionContext = a}) . _Default . _Map; --- | For more information, see <http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token Grant Tokens>.+-- | For more information, see+-- <http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token Grant Tokens>. reGrantTokens :: Lens' ReEncrypt [Text]-reGrantTokens = lens _reGrantTokens (\s a -> s { _reGrantTokens = a }) . _List---- | Encryption context used to encrypt and decrypt the data specified in the 'CiphertextBlob' parameter.-reSourceEncryptionContext :: Lens' ReEncrypt (HashMap Text Text)-reSourceEncryptionContext =-    lens _reSourceEncryptionContext-        (\s a -> s { _reSourceEncryptionContext = a })-            . _Map+reGrantTokens = lens _reGrantTokens (\ s a -> s{_reGrantTokens = a}) . _Default . _Coerce; -data ReEncryptResponse = ReEncryptResponse-    { _rerCiphertextBlob :: Maybe Base64-    , _rerKeyId          :: Maybe Text-    , _rerSourceKeyId    :: Maybe Text-    } deriving (Eq, Read, Show)+-- | Ciphertext of the data to re-encrypt.+reCiphertextBlob :: Lens' ReEncrypt ByteString+reCiphertextBlob = lens _reCiphertextBlob (\ s a -> s{_reCiphertextBlob = a}) . _Base64; --- | 'ReEncryptResponse' constructor.------ The fields accessible through corresponding lenses are:------ * 'rerCiphertextBlob' @::@ 'Maybe' 'Base64'------ * 'rerKeyId' @::@ 'Maybe' 'Text'------ * 'rerSourceKeyId' @::@ 'Maybe' 'Text'+-- | A unique identifier for the customer master key used to re-encrypt the+-- data. This value can be a globally unique identifier, a fully specified+-- ARN to either an alias or a key, or an alias name prefixed by+-- \"alias\/\". ---reEncryptResponse :: ReEncryptResponse-reEncryptResponse = ReEncryptResponse-    { _rerCiphertextBlob = Nothing-    , _rerSourceKeyId    = Nothing-    , _rerKeyId          = Nothing-    }+-- -   Key ARN Example -+--     arn:aws:kms:us-east-1:123456789012:key\/12345678-1234-1234-1234-123456789012+-- -   Alias ARN Example -+--     arn:aws:kms:us-east-1:123456789012:alias\/MyAliasName+-- -   Globally Unique Key ID Example -+--     12345678-1234-1234-1234-123456789012+-- -   Alias Name Example - alias\/MyAliasName+reDestinationKeyId :: Lens' ReEncrypt Text+reDestinationKeyId = lens _reDestinationKeyId (\ s a -> s{_reDestinationKeyId = a}); --- | The re-encrypted data. If you are using the CLI, the value is Base64 encoded.--- Otherwise, it is not encoded.-rerCiphertextBlob :: Lens' ReEncryptResponse (Maybe Base64)-rerCiphertextBlob =-    lens _rerCiphertextBlob (\s a -> s { _rerCiphertextBlob = a })+instance AWSRequest ReEncrypt where+        type Sv ReEncrypt = KMS+        type Rs ReEncrypt = ReEncryptResponse+        request = postJSON+        response+          = receiveJSON+              (\ s h x ->+                 ReEncryptResponse' <$>+                   (x .?> "SourceKeyId") <*> (x .?> "KeyId") <*>+                     (x .?> "CiphertextBlob")+                     <*> (pure (fromEnum s))) --- | Unique identifier of the key used to re-encrypt the data.-rerKeyId :: Lens' ReEncryptResponse (Maybe Text)-rerKeyId = lens _rerKeyId (\s a -> s { _rerKeyId = a })+instance ToHeaders ReEncrypt where+        toHeaders+          = const+              (mconcat+                 ["X-Amz-Target" =#+                    ("TrentService.ReEncrypt" :: ByteString),+                  "Content-Type" =#+                    ("application/x-amz-json-1.1" :: ByteString)]) --- | Unique identifier of the key used to originally encrypt the data.-rerSourceKeyId :: Lens' ReEncryptResponse (Maybe Text)-rerSourceKeyId = lens _rerSourceKeyId (\s a -> s { _rerSourceKeyId = a })+instance ToJSON ReEncrypt where+        toJSON ReEncrypt'{..}+          = object+              ["DestinationEncryptionContext" .=+                 _reDestinationEncryptionContext,+               "SourceEncryptionContext" .=+                 _reSourceEncryptionContext,+               "GrantTokens" .= _reGrantTokens,+               "CiphertextBlob" .= _reCiphertextBlob,+               "DestinationKeyId" .= _reDestinationKeyId]  instance ToPath ReEncrypt where-    toPath = const "/"+        toPath = const "/"  instance ToQuery ReEncrypt where-    toQuery = const mempty+        toQuery = const mempty -instance ToHeaders ReEncrypt+-- | /See:/ 'reEncryptResponse' smart constructor.+data ReEncryptResponse = ReEncryptResponse'+    { _rersSourceKeyId    :: !(Maybe Text)+    , _rersKeyId          :: !(Maybe Text)+    , _rersCiphertextBlob :: !(Maybe Base64)+    , _rersStatus         :: !Int+    } deriving (Eq,Read,Show,Data,Typeable,Generic) -instance ToJSON ReEncrypt where-    toJSON ReEncrypt{..} = object-        [ "CiphertextBlob"               .= _reCiphertextBlob-        , "SourceEncryptionContext"      .= _reSourceEncryptionContext-        , "DestinationKeyId"             .= _reDestinationKeyId-        , "DestinationEncryptionContext" .= _reDestinationEncryptionContext-        , "GrantTokens"                  .= _reGrantTokens-        ]+-- | Creates a value of 'ReEncryptResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'rersSourceKeyId'+--+-- * 'rersKeyId'+--+-- * 'rersCiphertextBlob'+--+-- * 'rersStatus'+reEncryptResponse+    :: Int -- ^ 'rersStatus'+    -> ReEncryptResponse+reEncryptResponse pStatus_ =+    ReEncryptResponse'+    { _rersSourceKeyId = Nothing+    , _rersKeyId = Nothing+    , _rersCiphertextBlob = Nothing+    , _rersStatus = pStatus_+    } -instance AWSRequest ReEncrypt where-    type Sv ReEncrypt = KMS-    type Rs ReEncrypt = ReEncryptResponse+-- | Unique identifier of the key used to originally encrypt the data.+rersSourceKeyId :: Lens' ReEncryptResponse (Maybe Text)+rersSourceKeyId = lens _rersSourceKeyId (\ s a -> s{_rersSourceKeyId = a}); -    request  = post "ReEncrypt"-    response = jsonResponse+-- | Unique identifier of the key used to re-encrypt the data.+rersKeyId :: Lens' ReEncryptResponse (Maybe Text)+rersKeyId = lens _rersKeyId (\ s a -> s{_rersKeyId = a}); -instance FromJSON ReEncryptResponse where-    parseJSON = withObject "ReEncryptResponse" $ \o -> ReEncryptResponse-        <$> o .:? "CiphertextBlob"-        <*> o .:? "KeyId"-        <*> o .:? "SourceKeyId"+-- | The re-encrypted data. If you are using the CLI, the value is Base64+-- encoded. Otherwise, it is not encoded.+rersCiphertextBlob :: Lens' ReEncryptResponse (Maybe ByteString)+rersCiphertextBlob = lens _rersCiphertextBlob (\ s a -> s{_rersCiphertextBlob = a}) . mapping _Base64;++-- | The response status code.+rersStatus :: Lens' ReEncryptResponse Int+rersStatus = lens _rersStatus (\ s a -> s{_rersStatus = a});
gen/Network/AWS/KMS/RetireGrant.hs view
@@ -1,127 +1,142 @@-{-# LANGUAGE DataKinds                   #-}-{-# LANGUAGE DeriveGeneric               #-}-{-# LANGUAGE FlexibleInstances           #-}-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}-{-# LANGUAGE LambdaCase                  #-}-{-# LANGUAGE NoImplicitPrelude           #-}-{-# LANGUAGE OverloadedStrings           #-}-{-# LANGUAGE RecordWildCards             #-}-{-# LANGUAGE TypeFamilies                #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric      #-}+{-# LANGUAGE OverloadedStrings  #-}+{-# LANGUAGE RecordWildCards    #-}+{-# LANGUAGE TypeFamilies       #-}  {-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-} +-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | -- Module      : Network.AWS.KMS.RetireGrant--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License     : This Source Code Form is subject to the terms of---               the Mozilla Public License, v. 2.0.---               A copy of the MPL can be found in the LICENSE file or---               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright   : (c) 2013-2015 Brendan Hay+-- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>--- Stability   : experimental+-- Stability   : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Retires a grant. You can retire a grant when you're done using it to clean--- up. You should revoke a grant when you intend to actively deny operations--- that depend on it. The following are permitted to call this API:  The account--- that created the grant The 'RetiringPrincipal', if present The 'GranteePrincipal', if--- 'RetireGrant' is a grantee operation  The grant to retire must be identified by--- its grant token or by a combination of the key ARN and the grant ID. A grant--- token is a unique variable-length base64-encoded string. A grant ID is a 64--- character unique identifier of a grant. Both are returned by the 'CreateGrant'+-- Retires a grant. You can retire a grant when you\'re done using it to+-- clean up. You should revoke a grant when you intend to actively deny+-- operations that depend on it. The following are permitted to call this+-- API:+--+-- -   The account that created the grant+-- -   The 'RetiringPrincipal', if present+-- -   The 'GranteePrincipal', if 'RetireGrant' is a grantee operation+--+-- The grant to retire must be identified by its grant token or by a+-- combination of the key ARN and the grant ID. A grant token is a unique+-- variable-length base64-encoded string. A grant ID is a 64 character+-- unique identifier of a grant. Both are returned by the 'CreateGrant' -- function. ----- <http://docs.aws.amazon.com/kms/latest/APIReference/API_RetireGrant.html>+-- /See:/ <http://docs.aws.amazon.com/kms/latest/APIReference/API_RetireGrant.html AWS API Reference> for RetireGrant. module Network.AWS.KMS.RetireGrant     (-    -- * Request-      RetireGrant-    -- ** Request constructor-    , retireGrant-    -- ** Request lenses+    -- * Creating a Request+      retireGrant+    , RetireGrant+    -- * Request Lenses+    , rgKeyId     , rgGrantId     , rgGrantToken-    , rgKeyId -    -- * Response-    , RetireGrantResponse-    -- ** Response constructor+    -- * Destructuring the Response     , retireGrantResponse+    , RetireGrantResponse     ) where -import Network.AWS.Data (Object)-import Network.AWS.Prelude-import Network.AWS.Request.JSON-import Network.AWS.KMS.Types-import qualified GHC.Exts+import           Network.AWS.KMS.Types+import           Network.AWS.KMS.Types.Product+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response -data RetireGrant = RetireGrant-    { _rgGrantId    :: Maybe Text-    , _rgGrantToken :: Maybe Text-    , _rgKeyId      :: Maybe Text-    } deriving (Eq, Ord, Read, Show)+-- | /See:/ 'retireGrant' smart constructor.+data RetireGrant = RetireGrant'+    { _rgKeyId      :: !(Maybe Text)+    , _rgGrantId    :: !(Maybe Text)+    , _rgGrantToken :: !(Maybe Text)+    } deriving (Eq,Read,Show,Data,Typeable,Generic) --- | 'RetireGrant' constructor.------ The fields accessible through corresponding lenses are:+-- | Creates a value of 'RetireGrant' with the minimum fields required to make a request. ----- * 'rgGrantId' @::@ 'Maybe' 'Text'+-- Use one of the following lenses to modify other fields as desired: ----- * 'rgGrantToken' @::@ 'Maybe' 'Text'+-- * 'rgKeyId' ----- * 'rgKeyId' @::@ 'Maybe' 'Text'+-- * 'rgGrantId' ---retireGrant :: RetireGrant-retireGrant = RetireGrant-    { _rgGrantToken = Nothing-    , _rgKeyId      = Nothing-    , _rgGrantId    = Nothing+-- * 'rgGrantToken'+retireGrant+    :: RetireGrant+retireGrant =+    RetireGrant'+    { _rgKeyId = Nothing+    , _rgGrantId = Nothing+    , _rgGrantToken = Nothing     } --- | Unique identifier of the grant to be retired. The grant ID is returned by--- the 'CreateGrant' function.  Grant ID Example ---- 0123456789012345678901234567890123456789012345678901234567890123+-- | A unique identifier for the customer master key associated with the+-- grant. This value can be a globally unique identifier or a fully+-- specified ARN of the key.+--+-- -   Key ARN Example -+--     arn:aws:kms:us-east-1:123456789012:key\/12345678-1234-1234-1234-123456789012+-- -   Globally Unique Key ID Example -+--     12345678-1234-1234-1234-123456789012+rgKeyId :: Lens' RetireGrant (Maybe Text)+rgKeyId = lens _rgKeyId (\ s a -> s{_rgKeyId = a});++-- | Unique identifier of the grant to be retired. The grant ID is returned+-- by the 'CreateGrant' function.+--+-- -   Grant ID Example -+--     0123456789012345678901234567890123456789012345678901234567890123 rgGrantId :: Lens' RetireGrant (Maybe Text)-rgGrantId = lens _rgGrantId (\s a -> s { _rgGrantId = a })+rgGrantId = lens _rgGrantId (\ s a -> s{_rgGrantId = a});  -- | Token that identifies the grant to be retired. rgGrantToken :: Lens' RetireGrant (Maybe Text)-rgGrantToken = lens _rgGrantToken (\s a -> s { _rgGrantToken = a })+rgGrantToken = lens _rgGrantToken (\ s a -> s{_rgGrantToken = a}); --- | A unique identifier for the customer master key associated with the grant.--- This value can be a globally unique identifier or a fully specified ARN of--- the key.  Key ARN Example ---- arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012----rgKeyId :: Lens' RetireGrant (Maybe Text)-rgKeyId = lens _rgKeyId (\s a -> s { _rgKeyId = a })+instance AWSRequest RetireGrant where+        type Sv RetireGrant = KMS+        type Rs RetireGrant = RetireGrantResponse+        request = postJSON+        response = receiveNull RetireGrantResponse' -data RetireGrantResponse = RetireGrantResponse-    deriving (Eq, Ord, Read, Show, Generic)+instance ToHeaders RetireGrant where+        toHeaders+          = const+              (mconcat+                 ["X-Amz-Target" =#+                    ("TrentService.RetireGrant" :: ByteString),+                  "Content-Type" =#+                    ("application/x-amz-json-1.1" :: ByteString)]) --- | 'RetireGrantResponse' constructor.-retireGrantResponse :: RetireGrantResponse-retireGrantResponse = RetireGrantResponse+instance ToJSON RetireGrant where+        toJSON RetireGrant'{..}+          = object+              ["KeyId" .= _rgKeyId, "GrantId" .= _rgGrantId,+               "GrantToken" .= _rgGrantToken]  instance ToPath RetireGrant where-    toPath = const "/"+        toPath = const "/"  instance ToQuery RetireGrant where-    toQuery = const mempty--instance ToHeaders RetireGrant--instance ToJSON RetireGrant where-    toJSON RetireGrant{..} = object-        [ "GrantToken" .= _rgGrantToken-        , "KeyId"      .= _rgKeyId-        , "GrantId"    .= _rgGrantId-        ]+        toQuery = const mempty -instance AWSRequest RetireGrant where-    type Sv RetireGrant = KMS-    type Rs RetireGrant = RetireGrantResponse+-- | /See:/ 'retireGrantResponse' smart constructor.+data RetireGrantResponse =+    RetireGrantResponse'+    deriving (Eq,Read,Show,Data,Typeable,Generic) -    request  = post "RetireGrant"-    response = nullResponse RetireGrantResponse+-- | Creates a value of 'RetireGrantResponse' with the minimum fields required to make a request.+--+retireGrantResponse+    :: RetireGrantResponse+retireGrantResponse = RetireGrantResponse'
gen/Network/AWS/KMS/RevokeGrant.hs view
@@ -1,110 +1,117 @@-{-# LANGUAGE DataKinds                   #-}-{-# LANGUAGE DeriveGeneric               #-}-{-# LANGUAGE FlexibleInstances           #-}-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}-{-# LANGUAGE LambdaCase                  #-}-{-# LANGUAGE NoImplicitPrelude           #-}-{-# LANGUAGE OverloadedStrings           #-}-{-# LANGUAGE RecordWildCards             #-}-{-# LANGUAGE TypeFamilies                #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric      #-}+{-# LANGUAGE OverloadedStrings  #-}+{-# LANGUAGE RecordWildCards    #-}+{-# LANGUAGE TypeFamilies       #-}  {-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-} +-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | -- Module      : Network.AWS.KMS.RevokeGrant--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License     : This Source Code Form is subject to the terms of---               the Mozilla Public License, v. 2.0.---               A copy of the MPL can be found in the LICENSE file or---               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright   : (c) 2013-2015 Brendan Hay+-- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>--- Stability   : experimental+-- Stability   : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Revokes a grant. You can revoke a grant to actively deny operations that+-- Revokes a grant. You can revoke a grant to actively deny operations that -- depend on it. ----- <http://docs.aws.amazon.com/kms/latest/APIReference/API_RevokeGrant.html>+-- /See:/ <http://docs.aws.amazon.com/kms/latest/APIReference/API_RevokeGrant.html AWS API Reference> for RevokeGrant. module Network.AWS.KMS.RevokeGrant     (-    -- * Request-      RevokeGrant-    -- ** Request constructor-    , revokeGrant-    -- ** Request lenses-    , rg1GrantId-    , rg1KeyId+    -- * Creating a Request+      revokeGrant+    , RevokeGrant+    -- * Request Lenses+    , rKeyId+    , rGrantId -    -- * Response-    , RevokeGrantResponse-    -- ** Response constructor+    -- * Destructuring the Response     , revokeGrantResponse+    , RevokeGrantResponse     ) where -import Network.AWS.Data (Object)-import Network.AWS.Prelude-import Network.AWS.Request.JSON-import Network.AWS.KMS.Types-import qualified GHC.Exts+import           Network.AWS.KMS.Types+import           Network.AWS.KMS.Types.Product+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response -data RevokeGrant = RevokeGrant-    { _rg1GrantId :: Text-    , _rg1KeyId   :: Text-    } deriving (Eq, Ord, Read, Show)+-- | /See:/ 'revokeGrant' smart constructor.+data RevokeGrant = RevokeGrant'+    { _rKeyId   :: !Text+    , _rGrantId :: !Text+    } deriving (Eq,Read,Show,Data,Typeable,Generic) --- | 'RevokeGrant' constructor.------ The fields accessible through corresponding lenses are:+-- | Creates a value of 'RevokeGrant' with the minimum fields required to make a request. ----- * 'rg1GrantId' @::@ 'Text'+-- Use one of the following lenses to modify other fields as desired: ----- * 'rg1KeyId' @::@ 'Text'+-- * 'rKeyId' ---revokeGrant :: Text -- ^ 'rg1KeyId'-            -> Text -- ^ 'rg1GrantId'-            -> RevokeGrant-revokeGrant p1 p2 = RevokeGrant-    { _rg1KeyId   = p1-    , _rg1GrantId = p2+-- * 'rGrantId'+revokeGrant+    :: Text -- ^ 'rKeyId'+    -> Text -- ^ 'rGrantId'+    -> RevokeGrant+revokeGrant pKeyId_ pGrantId_ =+    RevokeGrant'+    { _rKeyId = pKeyId_+    , _rGrantId = pGrantId_     } +-- | A unique identifier for the customer master key associated with the+-- grant. This value can be a globally unique identifier or the fully+-- specified ARN to a key.+--+-- -   Key ARN Example -+--     arn:aws:kms:us-east-1:123456789012:key\/12345678-1234-1234-1234-123456789012+-- -   Globally Unique Key ID Example -+--     12345678-1234-1234-1234-123456789012+rKeyId :: Lens' RevokeGrant Text+rKeyId = lens _rKeyId (\ s a -> s{_rKeyId = a});+ -- | Identifier of the grant to be revoked.-rg1GrantId :: Lens' RevokeGrant Text-rg1GrantId = lens _rg1GrantId (\s a -> s { _rg1GrantId = a })+rGrantId :: Lens' RevokeGrant Text+rGrantId = lens _rGrantId (\ s a -> s{_rGrantId = a}); --- | A unique identifier for the customer master key associated with the grant.--- This value can be a globally unique identifier or the fully specified ARN to--- a key.  Key ARN Example ---- arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012----rg1KeyId :: Lens' RevokeGrant Text-rg1KeyId = lens _rg1KeyId (\s a -> s { _rg1KeyId = a })+instance AWSRequest RevokeGrant where+        type Sv RevokeGrant = KMS+        type Rs RevokeGrant = RevokeGrantResponse+        request = postJSON+        response = receiveNull RevokeGrantResponse' -data RevokeGrantResponse = RevokeGrantResponse-    deriving (Eq, Ord, Read, Show, Generic)+instance ToHeaders RevokeGrant where+        toHeaders+          = const+              (mconcat+                 ["X-Amz-Target" =#+                    ("TrentService.RevokeGrant" :: ByteString),+                  "Content-Type" =#+                    ("application/x-amz-json-1.1" :: ByteString)]) --- | 'RevokeGrantResponse' constructor.-revokeGrantResponse :: RevokeGrantResponse-revokeGrantResponse = RevokeGrantResponse+instance ToJSON RevokeGrant where+        toJSON RevokeGrant'{..}+          = object ["KeyId" .= _rKeyId, "GrantId" .= _rGrantId]  instance ToPath RevokeGrant where-    toPath = const "/"+        toPath = const "/"  instance ToQuery RevokeGrant where-    toQuery = const mempty--instance ToHeaders RevokeGrant--instance ToJSON RevokeGrant where-    toJSON RevokeGrant{..} = object-        [ "KeyId"   .= _rg1KeyId-        , "GrantId" .= _rg1GrantId-        ]+        toQuery = const mempty -instance AWSRequest RevokeGrant where-    type Sv RevokeGrant = KMS-    type Rs RevokeGrant = RevokeGrantResponse+-- | /See:/ 'revokeGrantResponse' smart constructor.+data RevokeGrantResponse =+    RevokeGrantResponse'+    deriving (Eq,Read,Show,Data,Typeable,Generic) -    request  = post "RevokeGrant"-    response = nullResponse RevokeGrantResponse+-- | Creates a value of 'RevokeGrantResponse' with the minimum fields required to make a request.+--+revokeGrantResponse+    :: RevokeGrantResponse+revokeGrantResponse = RevokeGrantResponse'
gen/Network/AWS/KMS/Types.hs view
@@ -1,531 +1,202 @@-{-# LANGUAGE DataKinds                   #-}-{-# LANGUAGE DeriveGeneric               #-}-{-# LANGUAGE FlexibleInstances           #-}-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}-{-# LANGUAGE LambdaCase                  #-}-{-# LANGUAGE NoImplicitPrelude           #-}-{-# LANGUAGE OverloadedStrings           #-}-{-# LANGUAGE RecordWildCards             #-}-{-# LANGUAGE TypeFamilies                #-}-{-# LANGUAGE ViewPatterns                #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE TypeFamilies      #-} -{-# OPTIONS_GHC -fno-warn-unused-imports #-}+-- Derived from AWS service descriptions, licensed under Apache 2.0. +-- | -- Module      : Network.AWS.KMS.Types--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License     : This Source Code Form is subject to the terms of---               the Mozilla Public License, v. 2.0.---               A copy of the MPL can be found in the LICENSE file or---               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright   : (c) 2013-2015 Brendan Hay+-- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>--- Stability   : experimental+-- Stability   : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.- module Network.AWS.KMS.Types     (     -- * Service       KMS-    -- ** Error-    , JSONError -    -- * KeyUsageType-    , KeyUsageType (..)--    -- * KeyMetadata-    , KeyMetadata-    , keyMetadata-    , kmAWSAccountId-    , kmArn-    , kmCreationDate-    , kmDescription-    , kmEnabled-    , kmKeyId-    , kmKeyUsage+    -- * Errors+    , _InvalidMarkerException+    , _InvalidKeyUsageException+    , _UnsupportedOperationException+    , _MalformedPolicyDocumentException+    , _DisabledException+    , _KeyUnavailableException+    , _KMSInternalException+    , _NotFoundException+    , _InvalidAliasNameException+    , _InvalidARNException+    , _DependencyTimeoutException+    , _InvalidGrantTokenException+    , _InvalidCiphertextException+    , _LimitExceededException+    , _AlreadyExistsException      -- * DataKeySpec     , DataKeySpec (..) -    -- * GrantConstraints-    , GrantConstraints-    , grantConstraints-    , gcEncryptionContextEquals-    , gcEncryptionContextSubset+    -- * GrantOperation+    , GrantOperation (..) +    -- * KeyUsageType+    , KeyUsageType (..)+     -- * AliasListEntry     , AliasListEntry     , aliasListEntry-    , aleAliasArn-    , aleAliasName     , aleTargetKeyId+    , aleAliasName+    , aleAliasARN +    -- * GrantConstraints+    , GrantConstraints+    , grantConstraints+    , gcEncryptionContextEquals+    , gcEncryptionContextSubset+     -- * GrantListEntry     , GrantListEntry     , grantListEntry-    , gleConstraints+    , gleRetiringPrincipal+    , gleIssuingAccount     , gleGrantId+    , gleConstraints     , gleGranteePrincipal-    , gleIssuingAccount     , gleOperations-    , gleRetiringPrincipal -    -- * GrantOperation-    , GrantOperation (..)-     -- * KeyListEntry     , KeyListEntry     , keyListEntry-    , kleKeyArn+    , kleKeyARN     , kleKeyId++    -- * KeyMetadata+    , KeyMetadata+    , keyMetadata+    , kmARN+    , kmEnabled+    , kmAWSAccountId+    , kmKeyUsage+    , kmCreationDate+    , kmDescription+    , kmKeyId     ) where -import Network.AWS.Prelude-import Network.AWS.Signing-import qualified GHC.Exts+import           Network.AWS.KMS.Types.Product+import           Network.AWS.KMS.Types.Sum+import           Network.AWS.Prelude+import           Network.AWS.Sign.V4 --- | Version @2014-11-01@ of the Amazon Key Management Service service.+-- | Version @2014-11-01@ of the Amazon Key Management Service SDK. data KMS  instance AWSService KMS where     type Sg KMS = V4-    type Er KMS = JSONError--    service = service'+    service = const svc       where-        service' :: Service KMS-        service' = Service-            { _svcAbbrev       = "KMS"-            , _svcPrefix       = "kms"-            , _svcVersion      = "2014-11-01"-            , _svcTargetPrefix = Just "TrentService"-            , _svcJSONVersion  = Just "1.1"-            , _svcHandle       = handle-            , _svcRetry        = retry+        svc =+            Service+            { _svcAbbrev = "KMS"+            , _svcPrefix = "kms"+            , _svcVersion = "2014-11-01"+            , _svcEndpoint = defaultEndpoint svc+            , _svcTimeout = Just 70+            , _svcStatus = statusSuccess+            , _svcError = parseJSONError+            , _svcRetry = retry             }--        handle :: Status-               -> Maybe (LazyByteString -> ServiceError JSONError)-        handle = jsonError statusSuccess service'--        retry :: Retry KMS-        retry = Exponential-            { _retryBase     = 0.05-            , _retryGrowth   = 2+        retry =+            Exponential+            { _retryBase = 5.0e-2+            , _retryGrowth = 2             , _retryAttempts = 5-            , _retryCheck    = check+            , _retryCheck = check             }--        check :: Status-              -> JSONError-              -> Bool-        check (statusCode -> s) (awsErrorCode -> e)-            | s == 500  = True -- General Server Error-            | s == 509  = True -- Limit Exceeded-            | s == 503  = True -- Service Unavailable-            | otherwise = False--data KeyUsageType-    = EncryptDecrypt -- ^ ENCRYPT_DECRYPT-      deriving (Eq, Ord, Read, Show, Generic, Enum)--instance Hashable KeyUsageType--instance FromText KeyUsageType where-    parser = takeLowerText >>= \case-        "encrypt_decrypt" -> pure EncryptDecrypt-        e                 -> fail $-            "Failure parsing KeyUsageType from " ++ show e--instance ToText KeyUsageType where-    toText EncryptDecrypt = "ENCRYPT_DECRYPT"--instance ToByteString KeyUsageType-instance ToHeader     KeyUsageType-instance ToQuery      KeyUsageType--instance FromJSON KeyUsageType where-    parseJSON = parseJSONText "KeyUsageType"--instance ToJSON KeyUsageType where-    toJSON = toJSONText--data KeyMetadata = KeyMetadata-    { _kmAWSAccountId :: Maybe Text-    , _kmArn          :: Maybe Text-    , _kmCreationDate :: Maybe POSIX-    , _kmDescription  :: Maybe Text-    , _kmEnabled      :: Maybe Bool-    , _kmKeyId        :: Text-    , _kmKeyUsage     :: Maybe KeyUsageType-    } deriving (Eq, Read, Show)---- | 'KeyMetadata' constructor.------ The fields accessible through corresponding lenses are:------ * 'kmAWSAccountId' @::@ 'Maybe' 'Text'------ * 'kmArn' @::@ 'Maybe' 'Text'------ * 'kmCreationDate' @::@ 'Maybe' 'UTCTime'------ * 'kmDescription' @::@ 'Maybe' 'Text'------ * 'kmEnabled' @::@ 'Maybe' 'Bool'------ * 'kmKeyId' @::@ 'Text'------ * 'kmKeyUsage' @::@ 'Maybe' 'KeyUsageType'----keyMetadata :: Text -- ^ 'kmKeyId'-            -> KeyMetadata-keyMetadata p1 = KeyMetadata-    { _kmKeyId        = p1-    , _kmAWSAccountId = Nothing-    , _kmArn          = Nothing-    , _kmCreationDate = Nothing-    , _kmEnabled      = Nothing-    , _kmDescription  = Nothing-    , _kmKeyUsage     = Nothing-    }---- | Account ID number.-kmAWSAccountId :: Lens' KeyMetadata (Maybe Text)-kmAWSAccountId = lens _kmAWSAccountId (\s a -> s { _kmAWSAccountId = a })---- | Key ARN (Amazon Resource Name).-kmArn :: Lens' KeyMetadata (Maybe Text)-kmArn = lens _kmArn (\s a -> s { _kmArn = a })---- | Date the key was created.-kmCreationDate :: Lens' KeyMetadata (Maybe UTCTime)-kmCreationDate = lens _kmCreationDate (\s a -> s { _kmCreationDate = a }) . mapping _Time---- | The description of the key.-kmDescription :: Lens' KeyMetadata (Maybe Text)-kmDescription = lens _kmDescription (\s a -> s { _kmDescription = a })---- | Value that specifies whether the key is enabled.-kmEnabled :: Lens' KeyMetadata (Maybe Bool)-kmEnabled = lens _kmEnabled (\s a -> s { _kmEnabled = a })---- | Unique identifier for the key.-kmKeyId :: Lens' KeyMetadata Text-kmKeyId = lens _kmKeyId (\s a -> s { _kmKeyId = a })---- | A value that specifies what operation(s) the key can perform.-kmKeyUsage :: Lens' KeyMetadata (Maybe KeyUsageType)-kmKeyUsage = lens _kmKeyUsage (\s a -> s { _kmKeyUsage = a })--instance FromJSON KeyMetadata where-    parseJSON = withObject "KeyMetadata" $ \o -> KeyMetadata-        <$> o .:? "AWSAccountId"-        <*> o .:? "Arn"-        <*> o .:? "CreationDate"-        <*> o .:? "Description"-        <*> o .:? "Enabled"-        <*> o .:  "KeyId"-        <*> o .:? "KeyUsage"--instance ToJSON KeyMetadata where-    toJSON KeyMetadata{..} = object-        [ "AWSAccountId" .= _kmAWSAccountId-        , "KeyId"        .= _kmKeyId-        , "Arn"          .= _kmArn-        , "CreationDate" .= _kmCreationDate-        , "Enabled"      .= _kmEnabled-        , "Description"  .= _kmDescription-        , "KeyUsage"     .= _kmKeyUsage-        ]--data DataKeySpec-    = AES128 -- ^ AES_128-    | AES256 -- ^ AES_256-      deriving (Eq, Ord, Read, Show, Generic, Enum)--instance Hashable DataKeySpec--instance FromText DataKeySpec where-    parser = takeLowerText >>= \case-        "aes_128" -> pure AES128-        "aes_256" -> pure AES256-        e         -> fail $-            "Failure parsing DataKeySpec from " ++ show e--instance ToText DataKeySpec where-    toText = \case-        AES128 -> "AES_128"-        AES256 -> "AES_256"--instance ToByteString DataKeySpec-instance ToHeader     DataKeySpec-instance ToQuery      DataKeySpec--instance FromJSON DataKeySpec where-    parseJSON = parseJSONText "DataKeySpec"--instance ToJSON DataKeySpec where-    toJSON = toJSONText--data GrantConstraints = GrantConstraints-    { _gcEncryptionContextEquals :: Map Text Text-    , _gcEncryptionContextSubset :: Map Text Text-    } deriving (Eq, Read, Show)---- | 'GrantConstraints' constructor.------ The fields accessible through corresponding lenses are:------ * 'gcEncryptionContextEquals' @::@ 'HashMap' 'Text' 'Text'------ * 'gcEncryptionContextSubset' @::@ 'HashMap' 'Text' 'Text'----grantConstraints :: GrantConstraints-grantConstraints = GrantConstraints-    { _gcEncryptionContextSubset = mempty-    , _gcEncryptionContextEquals = mempty-    }---- | The constraint contains additional key/value pairs that serve to further--- limit the grant.-gcEncryptionContextEquals :: Lens' GrantConstraints (HashMap Text Text)-gcEncryptionContextEquals =-    lens _gcEncryptionContextEquals-        (\s a -> s { _gcEncryptionContextEquals = a })-            . _Map---- | The constraint equals the full encryption context.-gcEncryptionContextSubset :: Lens' GrantConstraints (HashMap Text Text)-gcEncryptionContextSubset =-    lens _gcEncryptionContextSubset-        (\s a -> s { _gcEncryptionContextSubset = a })-            . _Map--instance FromJSON GrantConstraints where-    parseJSON = withObject "GrantConstraints" $ \o -> GrantConstraints-        <$> o .:? "EncryptionContextEquals" .!= mempty-        <*> o .:? "EncryptionContextSubset" .!= mempty--instance ToJSON GrantConstraints where-    toJSON GrantConstraints{..} = object-        [ "EncryptionContextSubset" .= _gcEncryptionContextSubset-        , "EncryptionContextEquals" .= _gcEncryptionContextEquals-        ]--data AliasListEntry = AliasListEntry-    { _aleAliasArn    :: Maybe Text-    , _aleAliasName   :: Maybe Text-    , _aleTargetKeyId :: Maybe Text-    } deriving (Eq, Ord, Read, Show)---- | 'AliasListEntry' constructor.------ The fields accessible through corresponding lenses are:------ * 'aleAliasArn' @::@ 'Maybe' 'Text'------ * 'aleAliasName' @::@ 'Maybe' 'Text'------ * 'aleTargetKeyId' @::@ 'Maybe' 'Text'----aliasListEntry :: AliasListEntry-aliasListEntry = AliasListEntry-    { _aleAliasName   = Nothing-    , _aleAliasArn    = Nothing-    , _aleTargetKeyId = Nothing-    }---- | String that contains the key ARN.-aleAliasArn :: Lens' AliasListEntry (Maybe Text)-aleAliasArn = lens _aleAliasArn (\s a -> s { _aleAliasArn = a })---- | String that contains the alias.-aleAliasName :: Lens' AliasListEntry (Maybe Text)-aleAliasName = lens _aleAliasName (\s a -> s { _aleAliasName = a })---- | String that contains the key identifier pointed to by the alias.-aleTargetKeyId :: Lens' AliasListEntry (Maybe Text)-aleTargetKeyId = lens _aleTargetKeyId (\s a -> s { _aleTargetKeyId = a })--instance FromJSON AliasListEntry where-    parseJSON = withObject "AliasListEntry" $ \o -> AliasListEntry-        <$> o .:? "AliasArn"-        <*> o .:? "AliasName"-        <*> o .:? "TargetKeyId"--instance ToJSON AliasListEntry where-    toJSON AliasListEntry{..} = object-        [ "AliasName"   .= _aleAliasName-        , "AliasArn"    .= _aleAliasArn-        , "TargetKeyId" .= _aleTargetKeyId-        ]--data GrantListEntry = GrantListEntry-    { _gleConstraints       :: Maybe GrantConstraints-    , _gleGrantId           :: Maybe Text-    , _gleGranteePrincipal  :: Maybe Text-    , _gleIssuingAccount    :: Maybe Text-    , _gleOperations        :: List "Operations" GrantOperation-    , _gleRetiringPrincipal :: Maybe Text-    } deriving (Eq, Read, Show)---- | 'GrantListEntry' constructor.------ The fields accessible through corresponding lenses are:------ * 'gleConstraints' @::@ 'Maybe' 'GrantConstraints'------ * 'gleGrantId' @::@ 'Maybe' 'Text'------ * 'gleGranteePrincipal' @::@ 'Maybe' 'Text'------ * 'gleIssuingAccount' @::@ 'Maybe' 'Text'------ * 'gleOperations' @::@ ['GrantOperation']------ * 'gleRetiringPrincipal' @::@ 'Maybe' 'Text'----grantListEntry :: GrantListEntry-grantListEntry = GrantListEntry-    { _gleGrantId           = Nothing-    , _gleGranteePrincipal  = Nothing-    , _gleRetiringPrincipal = Nothing-    , _gleIssuingAccount    = Nothing-    , _gleOperations        = mempty-    , _gleConstraints       = Nothing-    }---- | Specifies the conditions under which the actions specified by the 'Operations'--- parameter are allowed.-gleConstraints :: Lens' GrantListEntry (Maybe GrantConstraints)-gleConstraints = lens _gleConstraints (\s a -> s { _gleConstraints = a })---- | Unique grant identifier.-gleGrantId :: Lens' GrantListEntry (Maybe Text)-gleGrantId = lens _gleGrantId (\s a -> s { _gleGrantId = a })---- | The principal that receives the grant permission.-gleGranteePrincipal :: Lens' GrantListEntry (Maybe Text)-gleGranteePrincipal =-    lens _gleGranteePrincipal (\s a -> s { _gleGranteePrincipal = a })---- | The account under which the grant was issued.-gleIssuingAccount :: Lens' GrantListEntry (Maybe Text)-gleIssuingAccount =-    lens _gleIssuingAccount (\s a -> s { _gleIssuingAccount = a })---- | List of operations permitted by the grant. This can be any combination of one--- or more of the following values:  Decrypt Encrypt GenerateDataKey GenerateDataKeyWithoutPlaintext--- ReEncryptFrom ReEncryptTo CreateGrant-gleOperations :: Lens' GrantListEntry [GrantOperation]-gleOperations = lens _gleOperations (\s a -> s { _gleOperations = a }) . _List---- | The principal that can retire the account.-gleRetiringPrincipal :: Lens' GrantListEntry (Maybe Text)-gleRetiringPrincipal =-    lens _gleRetiringPrincipal (\s a -> s { _gleRetiringPrincipal = a })+        check e+          | has (hasCode "ThrottlingException" . hasStatus 400) e =+              Just "throttling_exception"+          | has (hasCode "Throttling" . hasStatus 400) e = Just "throttling"+          | has (hasStatus 503) e = Just "service_unavailable"+          | has (hasStatus 500) e = Just "general_server_error"+          | has (hasStatus 509) e = Just "limit_exceeded"+          | otherwise = Nothing -instance FromJSON GrantListEntry where-    parseJSON = withObject "GrantListEntry" $ \o -> GrantListEntry-        <$> o .:? "Constraints"-        <*> o .:? "GrantId"-        <*> o .:? "GranteePrincipal"-        <*> o .:? "IssuingAccount"-        <*> o .:? "Operations" .!= mempty-        <*> o .:? "RetiringPrincipal"+-- | 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+_InvalidMarkerException =+    _ServiceError . hasStatus 400 . hasCode "InvalidMarker" -instance ToJSON GrantListEntry where-    toJSON GrantListEntry{..} = object-        [ "GrantId"           .= _gleGrantId-        , "GranteePrincipal"  .= _gleGranteePrincipal-        , "RetiringPrincipal" .= _gleRetiringPrincipal-        , "IssuingAccount"    .= _gleIssuingAccount-        , "Operations"        .= _gleOperations-        , "Constraints"       .= _gleConstraints-        ]+-- | The request was rejected because the specified KeySpec parameter is not+-- valid. The currently supported value is ENCRYPT\/DECRYPT.+_InvalidKeyUsageException :: AsError a => Getting (First ServiceError) a ServiceError+_InvalidKeyUsageException =+    _ServiceError . hasStatus 400 . hasCode "InvalidKeyUsage" -data GrantOperation-    = GOCreateGrant                     -- ^ CreateGrant-    | GODecrypt                         -- ^ Decrypt-    | GOEncrypt                         -- ^ Encrypt-    | GOGenerateDataKey                 -- ^ GenerateDataKey-    | GOGenerateDataKeyWithoutPlaintext -- ^ GenerateDataKeyWithoutPlaintext-    | GOReEncryptFrom                   -- ^ ReEncryptFrom-    | GOReEncryptTo                     -- ^ ReEncryptTo-    | GORetireGrant                     -- ^ RetireGrant-      deriving (Eq, Ord, Read, Show, Generic, Enum)+-- | The request was rejected because a specified parameter is not supported.+_UnsupportedOperationException :: AsError a => Getting (First ServiceError) a ServiceError+_UnsupportedOperationException =+    _ServiceError . hasStatus 400 . hasCode "UnsupportedOperation" -instance Hashable GrantOperation+-- | The request was rejected because the specified policy is not+-- syntactically or semantically correct.+_MalformedPolicyDocumentException :: AsError a => Getting (First ServiceError) a ServiceError+_MalformedPolicyDocumentException =+    _ServiceError . hasStatus 400 . hasCode "MalformedPolicyDocument" -instance FromText GrantOperation where-    parser = takeLowerText >>= \case-        "creategrant"                     -> pure GOCreateGrant-        "decrypt"                         -> pure GODecrypt-        "encrypt"                         -> pure GOEncrypt-        "generatedatakey"                 -> pure GOGenerateDataKey-        "generatedatakeywithoutplaintext" -> pure GOGenerateDataKeyWithoutPlaintext-        "reencryptfrom"                   -> pure GOReEncryptFrom-        "reencryptto"                     -> pure GOReEncryptTo-        "retiregrant"                     -> pure GORetireGrant-        e                                 -> fail $-            "Failure parsing GrantOperation from " ++ show e+-- | A request was rejected because the specified key was marked as disabled.+_DisabledException :: AsError a => Getting (First ServiceError) a ServiceError+_DisabledException = _ServiceError . hasStatus 409 . hasCode "Disabled" -instance ToText GrantOperation where-    toText = \case-        GOCreateGrant                     -> "CreateGrant"-        GODecrypt                         -> "Decrypt"-        GOEncrypt                         -> "Encrypt"-        GOGenerateDataKey                 -> "GenerateDataKey"-        GOGenerateDataKeyWithoutPlaintext -> "GenerateDataKeyWithoutPlaintext"-        GOReEncryptFrom                   -> "ReEncryptFrom"-        GOReEncryptTo                     -> "ReEncryptTo"-        GORetireGrant                     -> "RetireGrant"+-- | The request was rejected because the key was disabled, not found, or+-- otherwise not available.+_KeyUnavailableException :: AsError a => Getting (First ServiceError) a ServiceError+_KeyUnavailableException =+    _ServiceError . hasStatus 500 . hasCode "KeyUnavailable" -instance ToByteString GrantOperation-instance ToHeader     GrantOperation-instance ToQuery      GrantOperation+-- | The request was rejected because an internal exception occurred. This+-- error can be retried.+_KMSInternalException :: AsError a => Getting (First ServiceError) a ServiceError+_KMSInternalException = _ServiceError . hasStatus 500 . hasCode "KMSInternal" -instance FromJSON GrantOperation where-    parseJSON = parseJSONText "GrantOperation"+-- | The request was rejected because the specified entity or resource could+-- not be found.+_NotFoundException :: AsError a => Getting (First ServiceError) a ServiceError+_NotFoundException = _ServiceError . hasStatus 404 . hasCode "NotFound" -instance ToJSON GrantOperation where-    toJSON = toJSONText+-- | The request was rejected because the specified alias name is not valid.+_InvalidAliasNameException :: AsError a => Getting (First ServiceError) a ServiceError+_InvalidAliasNameException =+    _ServiceError . hasStatus 400 . hasCode "InvalidAliasName" -data KeyListEntry = KeyListEntry-    { _kleKeyArn :: Maybe Text-    , _kleKeyId  :: Maybe Text-    } deriving (Eq, Ord, Read, Show)+-- | The request was rejected because a specified ARN was not valid.+_InvalidARNException :: AsError a => Getting (First ServiceError) a ServiceError+_InvalidARNException = _ServiceError . hasStatus 400 . hasCode "InvalidArn" --- | 'KeyListEntry' constructor.------ The fields accessible through corresponding lenses are:------ * 'kleKeyArn' @::@ 'Maybe' 'Text'------ * 'kleKeyId' @::@ 'Maybe' 'Text'----keyListEntry :: KeyListEntry-keyListEntry = KeyListEntry-    { _kleKeyId  = Nothing-    , _kleKeyArn = Nothing-    }+-- | The system timed out while trying to fulfill the request.+_DependencyTimeoutException :: AsError a => Getting (First ServiceError) a ServiceError+_DependencyTimeoutException =+    _ServiceError . hasStatus 503 . hasCode "DependencyTimeout" --- | ARN of the key.-kleKeyArn :: Lens' KeyListEntry (Maybe Text)-kleKeyArn = lens _kleKeyArn (\s a -> s { _kleKeyArn = a })+-- | A grant token provided as part of the request is invalid.+_InvalidGrantTokenException :: AsError a => Getting (First ServiceError) a ServiceError+_InvalidGrantTokenException =+    _ServiceError . hasStatus 400 . hasCode "InvalidGrantToken" --- | Unique identifier of the key.-kleKeyId :: Lens' KeyListEntry (Maybe Text)-kleKeyId = lens _kleKeyId (\s a -> s { _kleKeyId = a })+-- | The request was rejected because the specified ciphertext has been+-- corrupted or is otherwise invalid.+_InvalidCiphertextException :: AsError a => Getting (First ServiceError) a ServiceError+_InvalidCiphertextException =+    _ServiceError . hasStatus 400 . hasCode "InvalidCiphertext" -instance FromJSON KeyListEntry where-    parseJSON = withObject "KeyListEntry" $ \o -> KeyListEntry-        <$> o .:? "KeyArn"-        <*> o .:? "KeyId"+-- | The request was rejected because a quota was exceeded.+_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError+_LimitExceededException =+    _ServiceError . hasStatus 400 . hasCode "LimitExceeded" -instance ToJSON KeyListEntry where-    toJSON KeyListEntry{..} = object-        [ "KeyId"  .= _kleKeyId-        , "KeyArn" .= _kleKeyArn-        ]+-- | The request was rejected because it attempted to create a resource that+-- already exists.+_AlreadyExistsException :: AsError a => Getting (First ServiceError) a ServiceError+_AlreadyExistsException =+    _ServiceError . hasStatus 400 . hasCode "AlreadyExists"
+ gen/Network/AWS/KMS/Types/Product.hs view
@@ -0,0 +1,324 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric      #-}+{-# LANGUAGE OverloadedStrings  #-}+{-# LANGUAGE RecordWildCards    #-}+{-# LANGUAGE TypeFamilies       #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Network.AWS.KMS.Types.Product+-- Copyright   : (c) 2013-2015 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.KMS.Types.Product where++import           Network.AWS.KMS.Types.Sum+import           Network.AWS.Prelude++-- | Contains information about an alias.+--+-- /See:/ 'aliasListEntry' smart constructor.+data AliasListEntry = AliasListEntry'+    { _aleTargetKeyId :: !(Maybe Text)+    , _aleAliasName   :: !(Maybe Text)+    , _aleAliasARN    :: !(Maybe Text)+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'AliasListEntry' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'aleTargetKeyId'+--+-- * 'aleAliasName'+--+-- * 'aleAliasARN'+aliasListEntry+    :: AliasListEntry+aliasListEntry =+    AliasListEntry'+    { _aleTargetKeyId = Nothing+    , _aleAliasName = Nothing+    , _aleAliasARN = Nothing+    }++-- | String that contains the key identifier pointed to by the alias.+aleTargetKeyId :: Lens' AliasListEntry (Maybe Text)+aleTargetKeyId = lens _aleTargetKeyId (\ s a -> s{_aleTargetKeyId = a});++-- | String that contains the alias.+aleAliasName :: Lens' AliasListEntry (Maybe Text)+aleAliasName = lens _aleAliasName (\ s a -> s{_aleAliasName = a});++-- | String that contains the key ARN.+aleAliasARN :: Lens' AliasListEntry (Maybe Text)+aleAliasARN = lens _aleAliasARN (\ s a -> s{_aleAliasARN = a});++instance FromJSON AliasListEntry where+        parseJSON+          = withObject "AliasListEntry"+              (\ x ->+                 AliasListEntry' <$>+                   (x .:? "TargetKeyId") <*> (x .:? "AliasName") <*>+                     (x .:? "AliasArn"))++-- | Contains constraints on the grant.+--+-- /See:/ 'grantConstraints' smart constructor.+data GrantConstraints = GrantConstraints'+    { _gcEncryptionContextEquals :: !(Maybe (Map Text Text))+    , _gcEncryptionContextSubset :: !(Maybe (Map Text Text))+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'GrantConstraints' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gcEncryptionContextEquals'+--+-- * 'gcEncryptionContextSubset'+grantConstraints+    :: GrantConstraints+grantConstraints =+    GrantConstraints'+    { _gcEncryptionContextEquals = Nothing+    , _gcEncryptionContextSubset = Nothing+    }++-- | The constraint contains additional key\/value pairs that serve to+-- further limit the grant.+gcEncryptionContextEquals :: Lens' GrantConstraints (HashMap Text Text)+gcEncryptionContextEquals = lens _gcEncryptionContextEquals (\ s a -> s{_gcEncryptionContextEquals = a}) . _Default . _Map;++-- | The constraint equals the full encryption context.+gcEncryptionContextSubset :: Lens' GrantConstraints (HashMap Text Text)+gcEncryptionContextSubset = lens _gcEncryptionContextSubset (\ s a -> s{_gcEncryptionContextSubset = a}) . _Default . _Map;++instance FromJSON GrantConstraints where+        parseJSON+          = withObject "GrantConstraints"+              (\ x ->+                 GrantConstraints' <$>+                   (x .:? "EncryptionContextEquals" .!= mempty) <*>+                     (x .:? "EncryptionContextSubset" .!= mempty))++instance ToJSON GrantConstraints where+        toJSON GrantConstraints'{..}+          = object+              ["EncryptionContextEquals" .=+                 _gcEncryptionContextEquals,+               "EncryptionContextSubset" .=+                 _gcEncryptionContextSubset]++-- | Contains information about each entry in the grant list.+--+-- /See:/ 'grantListEntry' smart constructor.+data GrantListEntry = GrantListEntry'+    { _gleRetiringPrincipal :: !(Maybe Text)+    , _gleIssuingAccount    :: !(Maybe Text)+    , _gleGrantId           :: !(Maybe Text)+    , _gleConstraints       :: !(Maybe GrantConstraints)+    , _gleGranteePrincipal  :: !(Maybe Text)+    , _gleOperations        :: !(Maybe [GrantOperation])+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'GrantListEntry' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gleRetiringPrincipal'+--+-- * 'gleIssuingAccount'+--+-- * 'gleGrantId'+--+-- * 'gleConstraints'+--+-- * 'gleGranteePrincipal'+--+-- * 'gleOperations'+grantListEntry+    :: GrantListEntry+grantListEntry =+    GrantListEntry'+    { _gleRetiringPrincipal = Nothing+    , _gleIssuingAccount = Nothing+    , _gleGrantId = Nothing+    , _gleConstraints = Nothing+    , _gleGranteePrincipal = Nothing+    , _gleOperations = Nothing+    }++-- | The principal that can retire the account.+gleRetiringPrincipal :: Lens' GrantListEntry (Maybe Text)+gleRetiringPrincipal = lens _gleRetiringPrincipal (\ s a -> s{_gleRetiringPrincipal = a});++-- | The account under which the grant was issued.+gleIssuingAccount :: Lens' GrantListEntry (Maybe Text)+gleIssuingAccount = lens _gleIssuingAccount (\ s a -> s{_gleIssuingAccount = a});++-- | Unique grant identifier.+gleGrantId :: Lens' GrantListEntry (Maybe Text)+gleGrantId = lens _gleGrantId (\ s a -> s{_gleGrantId = a});++-- | Specifies the conditions under which the actions specified by the+-- 'Operations' parameter are allowed.+gleConstraints :: Lens' GrantListEntry (Maybe GrantConstraints)+gleConstraints = lens _gleConstraints (\ s a -> s{_gleConstraints = a});++-- | The principal that receives the grant permission.+gleGranteePrincipal :: Lens' GrantListEntry (Maybe Text)+gleGranteePrincipal = lens _gleGranteePrincipal (\ s a -> s{_gleGranteePrincipal = a});++-- | List of operations permitted by the grant. This can be any combination+-- of one or more of the following values:+--+-- 1.  Decrypt+-- 2.  Encrypt+-- 3.  GenerateDataKey+-- 4.  GenerateDataKeyWithoutPlaintext+-- 5.  ReEncryptFrom+-- 6.  ReEncryptTo+-- 7.  CreateGrant+gleOperations :: Lens' GrantListEntry [GrantOperation]+gleOperations = lens _gleOperations (\ s a -> s{_gleOperations = a}) . _Default . _Coerce;++instance FromJSON GrantListEntry where+        parseJSON+          = withObject "GrantListEntry"+              (\ x ->+                 GrantListEntry' <$>+                   (x .:? "RetiringPrincipal") <*>+                     (x .:? "IssuingAccount")+                     <*> (x .:? "GrantId")+                     <*> (x .:? "Constraints")+                     <*> (x .:? "GranteePrincipal")+                     <*> (x .:? "Operations" .!= mempty))++-- | Contains information about each entry in the key list.+--+-- /See:/ 'keyListEntry' smart constructor.+data KeyListEntry = KeyListEntry'+    { _kleKeyARN :: !(Maybe Text)+    , _kleKeyId  :: !(Maybe Text)+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'KeyListEntry' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'kleKeyARN'+--+-- * 'kleKeyId'+keyListEntry+    :: KeyListEntry+keyListEntry =+    KeyListEntry'+    { _kleKeyARN = Nothing+    , _kleKeyId = Nothing+    }++-- | ARN of the key.+kleKeyARN :: Lens' KeyListEntry (Maybe Text)+kleKeyARN = lens _kleKeyARN (\ s a -> s{_kleKeyARN = a});++-- | Unique identifier of the key.+kleKeyId :: Lens' KeyListEntry (Maybe Text)+kleKeyId = lens _kleKeyId (\ s a -> s{_kleKeyId = a});++instance FromJSON KeyListEntry where+        parseJSON+          = withObject "KeyListEntry"+              (\ x ->+                 KeyListEntry' <$>+                   (x .:? "KeyArn") <*> (x .:? "KeyId"))++-- | Contains metadata associated with a specific key.+--+-- /See:/ 'keyMetadata' smart constructor.+data KeyMetadata = KeyMetadata'+    { _kmARN          :: !(Maybe Text)+    , _kmEnabled      :: !(Maybe Bool)+    , _kmAWSAccountId :: !(Maybe Text)+    , _kmKeyUsage     :: !(Maybe KeyUsageType)+    , _kmCreationDate :: !(Maybe POSIX)+    , _kmDescription  :: !(Maybe Text)+    , _kmKeyId        :: !Text+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'KeyMetadata' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'kmARN'+--+-- * 'kmEnabled'+--+-- * 'kmAWSAccountId'+--+-- * 'kmKeyUsage'+--+-- * 'kmCreationDate'+--+-- * 'kmDescription'+--+-- * 'kmKeyId'+keyMetadata+    :: Text -- ^ 'kmKeyId'+    -> KeyMetadata+keyMetadata pKeyId_ =+    KeyMetadata'+    { _kmARN = Nothing+    , _kmEnabled = Nothing+    , _kmAWSAccountId = Nothing+    , _kmKeyUsage = Nothing+    , _kmCreationDate = Nothing+    , _kmDescription = Nothing+    , _kmKeyId = pKeyId_+    }++-- | Key ARN (Amazon Resource Name).+kmARN :: Lens' KeyMetadata (Maybe Text)+kmARN = lens _kmARN (\ s a -> s{_kmARN = a});++-- | Value that specifies whether the key is enabled.+kmEnabled :: Lens' KeyMetadata (Maybe Bool)+kmEnabled = lens _kmEnabled (\ s a -> s{_kmEnabled = a});++-- | Account ID number.+kmAWSAccountId :: Lens' KeyMetadata (Maybe Text)+kmAWSAccountId = lens _kmAWSAccountId (\ s a -> s{_kmAWSAccountId = a});++-- | A value that specifies what operation(s) the key can perform.+kmKeyUsage :: Lens' KeyMetadata (Maybe KeyUsageType)+kmKeyUsage = lens _kmKeyUsage (\ s a -> s{_kmKeyUsage = a});++-- | Date the key was created.+kmCreationDate :: Lens' KeyMetadata (Maybe UTCTime)+kmCreationDate = lens _kmCreationDate (\ s a -> s{_kmCreationDate = a}) . mapping _Time;++-- | The description of the key.+kmDescription :: Lens' KeyMetadata (Maybe Text)+kmDescription = lens _kmDescription (\ s a -> s{_kmDescription = a});++-- | Unique identifier for the key.+kmKeyId :: Lens' KeyMetadata Text+kmKeyId = lens _kmKeyId (\ s a -> s{_kmKeyId = a});++instance FromJSON KeyMetadata where+        parseJSON+          = withObject "KeyMetadata"+              (\ x ->+                 KeyMetadata' <$>+                   (x .:? "Arn") <*> (x .:? "Enabled") <*>+                     (x .:? "AWSAccountId")+                     <*> (x .:? "KeyUsage")+                     <*> (x .:? "CreationDate")+                     <*> (x .:? "Description")+                     <*> (x .: "KeyId"))
+ gen/Network/AWS/KMS/Types/Sum.hs view
@@ -0,0 +1,116 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric      #-}+{-# LANGUAGE LambdaCase         #-}+{-# LANGUAGE OverloadedStrings  #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Network.AWS.KMS.Types.Sum+-- Copyright   : (c) 2013-2015 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.KMS.Types.Sum where++import           Network.AWS.Prelude++data DataKeySpec+    = AES128+    | AES256+    deriving (Eq,Ord,Read,Show,Enum,Data,Typeable,Generic)++instance FromText DataKeySpec where+    parser = takeLowerText >>= \case+        "aes_128" -> pure AES128+        "aes_256" -> pure AES256+        e -> fromTextError $ "Failure parsing DataKeySpec from value: '" <> e+           <> "'. Accepted values: aes_128, aes_256"++instance ToText DataKeySpec where+    toText = \case+        AES128 -> "aes_128"+        AES256 -> "aes_256"++instance Hashable     DataKeySpec+instance ToByteString DataKeySpec+instance ToQuery      DataKeySpec+instance ToHeader     DataKeySpec++instance ToJSON DataKeySpec where+    toJSON = toJSONText++data GrantOperation+    = CreateGrant+    | Decrypt+    | Encrypt+    | GenerateDataKey+    | GenerateDataKeyWithoutPlaintext+    | ReEncryptFrom+    | ReEncryptTo+    | RetireGrant+    deriving (Eq,Ord,Read,Show,Enum,Data,Typeable,Generic)++instance FromText GrantOperation where+    parser = takeLowerText >>= \case+        "creategrant" -> pure CreateGrant+        "decrypt" -> pure Decrypt+        "encrypt" -> pure Encrypt+        "generatedatakey" -> pure GenerateDataKey+        "generatedatakeywithoutplaintext" -> pure GenerateDataKeyWithoutPlaintext+        "reencryptfrom" -> pure ReEncryptFrom+        "reencryptto" -> pure ReEncryptTo+        "retiregrant" -> pure RetireGrant+        e -> fromTextError $ "Failure parsing GrantOperation from value: '" <> e+           <> "'. Accepted values: creategrant, decrypt, encrypt, generatedatakey, generatedatakeywithoutplaintext, reencryptfrom, reencryptto, retiregrant"++instance ToText GrantOperation where+    toText = \case+        CreateGrant -> "creategrant"+        Decrypt -> "decrypt"+        Encrypt -> "encrypt"+        GenerateDataKey -> "generatedatakey"+        GenerateDataKeyWithoutPlaintext -> "generatedatakeywithoutplaintext"+        ReEncryptFrom -> "reencryptfrom"+        ReEncryptTo -> "reencryptto"+        RetireGrant -> "retiregrant"++instance Hashable     GrantOperation+instance ToByteString GrantOperation+instance ToQuery      GrantOperation+instance ToHeader     GrantOperation++instance ToJSON GrantOperation where+    toJSON = toJSONText++instance FromJSON GrantOperation where+    parseJSON = parseJSONText "GrantOperation"++data KeyUsageType =+    EncryptDecrypt+    deriving (Eq,Ord,Read,Show,Enum,Data,Typeable,Generic)++instance FromText KeyUsageType where+    parser = takeLowerText >>= \case+        "encrypt_decrypt" -> pure EncryptDecrypt+        e -> fromTextError $ "Failure parsing KeyUsageType from value: '" <> e+           <> "'. Accepted values: encrypt_decrypt"++instance ToText KeyUsageType where+    toText = \case+        EncryptDecrypt -> "encrypt_decrypt"++instance Hashable     KeyUsageType+instance ToByteString KeyUsageType+instance ToQuery      KeyUsageType+instance ToHeader     KeyUsageType++instance ToJSON KeyUsageType where+    toJSON = toJSONText++instance FromJSON KeyUsageType where+    parseJSON = parseJSONText "KeyUsageType"
gen/Network/AWS/KMS/UpdateAlias.hs view
@@ -1,123 +1,133 @@-{-# LANGUAGE DataKinds                   #-}-{-# LANGUAGE DeriveGeneric               #-}-{-# LANGUAGE FlexibleInstances           #-}-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}-{-# LANGUAGE LambdaCase                  #-}-{-# LANGUAGE NoImplicitPrelude           #-}-{-# LANGUAGE OverloadedStrings           #-}-{-# LANGUAGE RecordWildCards             #-}-{-# LANGUAGE TypeFamilies                #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric      #-}+{-# LANGUAGE OverloadedStrings  #-}+{-# LANGUAGE RecordWildCards    #-}+{-# LANGUAGE TypeFamilies       #-}  {-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-} +-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | -- Module      : Network.AWS.KMS.UpdateAlias--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License     : This Source Code Form is subject to the terms of---               the Mozilla Public License, v. 2.0.---               A copy of the MPL can be found in the LICENSE file or---               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright   : (c) 2013-2015 Brendan Hay+-- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>--- Stability   : experimental+-- Stability   : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Updates an alias to associate it with a different key.+-- Updates an alias to associate it with a different key. ----- An alias name can contain only alphanumeric characters, forward slashes (/),--- underscores (_), and dashes (-). An alias must start with the word "alias"--- followed by a forward slash (alias/). An alias that begins with "aws" after--- the forward slash (alias/aws...) is reserved by Amazon Web Services (AWS).+-- An alias name can contain only alphanumeric characters, forward slashes+-- (\/), underscores (_), and dashes (-). An alias must start with the word+-- \"alias\" followed by a forward slash (alias\/). An alias that begins+-- with \"aws\" after the forward slash (alias\/aws...) is reserved by+-- Amazon Web Services (AWS). ----- An alias is not a property of a key. Therefore, an alias can be associated--- with and disassociated from an existing key without changing the properties--- of the key.+-- An alias is not a property of a key. Therefore, an alias can be+-- associated with and disassociated from an existing key without changing+-- the properties of the key. -- -- Note that you cannot create or update an alias that represents a key in -- another account. ----- <http://docs.aws.amazon.com/kms/latest/APIReference/API_UpdateAlias.html>+-- /See:/ <http://docs.aws.amazon.com/kms/latest/APIReference/API_UpdateAlias.html AWS API Reference> for UpdateAlias. module Network.AWS.KMS.UpdateAlias     (-    -- * Request-      UpdateAlias-    -- ** Request constructor-    , updateAlias-    -- ** Request lenses+    -- * Creating a Request+      updateAlias+    , UpdateAlias+    -- * Request Lenses     , uaAliasName     , uaTargetKeyId -    -- * Response-    , UpdateAliasResponse-    -- ** Response constructor+    -- * Destructuring the Response     , updateAliasResponse+    , UpdateAliasResponse     ) where -import Network.AWS.Data (Object)-import Network.AWS.Prelude-import Network.AWS.Request.JSON-import Network.AWS.KMS.Types-import qualified GHC.Exts+import           Network.AWS.KMS.Types+import           Network.AWS.KMS.Types.Product+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response -data UpdateAlias = UpdateAlias-    { _uaAliasName   :: Text-    , _uaTargetKeyId :: Text-    } deriving (Eq, Ord, Read, Show)+-- | /See:/ 'updateAlias' smart constructor.+data UpdateAlias = UpdateAlias'+    { _uaAliasName   :: !Text+    , _uaTargetKeyId :: !Text+    } deriving (Eq,Read,Show,Data,Typeable,Generic) --- | 'UpdateAlias' constructor.------ The fields accessible through corresponding lenses are:+-- | Creates a value of 'UpdateAlias' with the minimum fields required to make a request. ----- * 'uaAliasName' @::@ 'Text'+-- Use one of the following lenses to modify other fields as desired: ----- * 'uaTargetKeyId' @::@ 'Text'+-- * 'uaAliasName' ---updateAlias :: Text -- ^ 'uaAliasName'-            -> Text -- ^ 'uaTargetKeyId'-            -> UpdateAlias-updateAlias p1 p2 = UpdateAlias-    { _uaAliasName   = p1-    , _uaTargetKeyId = p2+-- * 'uaTargetKeyId'+updateAlias+    :: Text -- ^ 'uaAliasName'+    -> Text -- ^ 'uaTargetKeyId'+    -> UpdateAlias+updateAlias pAliasName_ pTargetKeyId_ =+    UpdateAlias'+    { _uaAliasName = pAliasName_+    , _uaTargetKeyId = pTargetKeyId_     } --- | String that contains the name of the alias to be modifed. The name must start--- with the word "alias" followed by a forward slash (alias/). Aliases that--- begin with "alias/AWS" are reserved.+-- | String that contains the name of the alias to be modifed. The name must+-- start with the word \"alias\" followed by a forward slash (alias\/).+-- Aliases that begin with \"alias\/AWS\" are reserved. uaAliasName :: Lens' UpdateAlias Text-uaAliasName = lens _uaAliasName (\s a -> s { _uaAliasName = a })+uaAliasName = lens _uaAliasName (\ s a -> s{_uaAliasName = a}); --- | Unique identifier of the customer master key to be associated with the alias.--- This value can be a globally unique identifier or the fully specified ARN of--- a key.  Key ARN Example ---- arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012+-- | Unique identifier of the customer master key to be associated with the+-- alias. This value can be a globally unique identifier or the fully+-- specified ARN of a key. --+-- -   Key ARN Example -+--     arn:aws:kms:us-east-1:123456789012:key\/12345678-1234-1234-1234-123456789012+-- -   Globally Unique Key ID Example -+--     12345678-1234-1234-1234-123456789012 uaTargetKeyId :: Lens' UpdateAlias Text-uaTargetKeyId = lens _uaTargetKeyId (\s a -> s { _uaTargetKeyId = a })+uaTargetKeyId = lens _uaTargetKeyId (\ s a -> s{_uaTargetKeyId = a}); -data UpdateAliasResponse = UpdateAliasResponse-    deriving (Eq, Ord, Read, Show, Generic)+instance AWSRequest UpdateAlias where+        type Sv UpdateAlias = KMS+        type Rs UpdateAlias = UpdateAliasResponse+        request = postJSON+        response = receiveNull UpdateAliasResponse' --- | 'UpdateAliasResponse' constructor.-updateAliasResponse :: UpdateAliasResponse-updateAliasResponse = UpdateAliasResponse+instance ToHeaders UpdateAlias where+        toHeaders+          = const+              (mconcat+                 ["X-Amz-Target" =#+                    ("TrentService.UpdateAlias" :: ByteString),+                  "Content-Type" =#+                    ("application/x-amz-json-1.1" :: ByteString)]) +instance ToJSON UpdateAlias where+        toJSON UpdateAlias'{..}+          = object+              ["AliasName" .= _uaAliasName,+               "TargetKeyId" .= _uaTargetKeyId]+ instance ToPath UpdateAlias where-    toPath = const "/"+        toPath = const "/"  instance ToQuery UpdateAlias where-    toQuery = const mempty--instance ToHeaders UpdateAlias--instance ToJSON UpdateAlias where-    toJSON UpdateAlias{..} = object-        [ "AliasName"   .= _uaAliasName-        , "TargetKeyId" .= _uaTargetKeyId-        ]+        toQuery = const mempty -instance AWSRequest UpdateAlias where-    type Sv UpdateAlias = KMS-    type Rs UpdateAlias = UpdateAliasResponse+-- | /See:/ 'updateAliasResponse' smart constructor.+data UpdateAliasResponse =+    UpdateAliasResponse'+    deriving (Eq,Read,Show,Data,Typeable,Generic) -    request  = post "UpdateAlias"-    response = nullResponse UpdateAliasResponse+-- | Creates a value of 'UpdateAliasResponse' with the minimum fields required to make a request.+--+updateAliasResponse+    :: UpdateAliasResponse+updateAliasResponse = UpdateAliasResponse'
gen/Network/AWS/KMS/UpdateKeyDescription.hs view
@@ -1,108 +1,118 @@-{-# LANGUAGE DataKinds                   #-}-{-# LANGUAGE DeriveGeneric               #-}-{-# LANGUAGE FlexibleInstances           #-}-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}-{-# LANGUAGE LambdaCase                  #-}-{-# LANGUAGE NoImplicitPrelude           #-}-{-# LANGUAGE OverloadedStrings           #-}-{-# LANGUAGE RecordWildCards             #-}-{-# LANGUAGE TypeFamilies                #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric      #-}+{-# LANGUAGE OverloadedStrings  #-}+{-# LANGUAGE RecordWildCards    #-}+{-# LANGUAGE TypeFamilies       #-}  {-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-} +-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | -- Module      : Network.AWS.KMS.UpdateKeyDescription--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>--- License     : This Source Code Form is subject to the terms of---               the Mozilla Public License, v. 2.0.---               A copy of the MPL can be found in the LICENSE file or---               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Copyright   : (c) 2013-2015 Brendan Hay+-- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>--- Stability   : experimental+-- Stability   : auto-generated -- Portability : non-portable (GHC extensions) ----- Derived from AWS service descriptions, licensed under Apache 2.0.---- | Updates the description of a key.+-- Updates the description of a key. ----- <http://docs.aws.amazon.com/kms/latest/APIReference/API_UpdateKeyDescription.html>+-- /See:/ <http://docs.aws.amazon.com/kms/latest/APIReference/API_UpdateKeyDescription.html AWS API Reference> for UpdateKeyDescription. module Network.AWS.KMS.UpdateKeyDescription     (-    -- * Request-      UpdateKeyDescription-    -- ** Request constructor-    , updateKeyDescription-    -- ** Request lenses-    , ukdDescription+    -- * Creating a Request+      updateKeyDescription+    , UpdateKeyDescription+    -- * Request Lenses     , ukdKeyId+    , ukdDescription -    -- * Response-    , UpdateKeyDescriptionResponse-    -- ** Response constructor+    -- * Destructuring the Response     , updateKeyDescriptionResponse+    , UpdateKeyDescriptionResponse     ) where -import Network.AWS.Data (Object)-import Network.AWS.Prelude-import Network.AWS.Request.JSON-import Network.AWS.KMS.Types-import qualified GHC.Exts+import           Network.AWS.KMS.Types+import           Network.AWS.KMS.Types.Product+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response -data UpdateKeyDescription = UpdateKeyDescription-    { _ukdDescription :: Text-    , _ukdKeyId       :: Text-    } deriving (Eq, Ord, Read, Show)+-- | /See:/ 'updateKeyDescription' smart constructor.+data UpdateKeyDescription = UpdateKeyDescription'+    { _ukdKeyId       :: !Text+    , _ukdDescription :: !Text+    } deriving (Eq,Read,Show,Data,Typeable,Generic) --- | 'UpdateKeyDescription' constructor.------ The fields accessible through corresponding lenses are:+-- | Creates a value of 'UpdateKeyDescription' with the minimum fields required to make a request. ----- * 'ukdDescription' @::@ 'Text'+-- Use one of the following lenses to modify other fields as desired: ----- * 'ukdKeyId' @::@ 'Text'+-- * 'ukdKeyId' ---updateKeyDescription :: Text -- ^ 'ukdKeyId'-                     -> Text -- ^ 'ukdDescription'-                     -> UpdateKeyDescription-updateKeyDescription p1 p2 = UpdateKeyDescription-    { _ukdKeyId       = p1-    , _ukdDescription = p2+-- * 'ukdDescription'+updateKeyDescription+    :: Text -- ^ 'ukdKeyId'+    -> Text -- ^ 'ukdDescription'+    -> UpdateKeyDescription+updateKeyDescription pKeyId_ pDescription_ =+    UpdateKeyDescription'+    { _ukdKeyId = pKeyId_+    , _ukdDescription = pDescription_     } +-- | A unique identifier for the customer master key. This value can be a+-- globally unique identifier or the fully specified ARN to a key.+--+-- -   Key ARN Example -+--     arn:aws:kms:us-east-1:123456789012:key\/12345678-1234-1234-1234-123456789012+-- -   Globally Unique Key ID Example -+--     12345678-1234-1234-1234-123456789012+ukdKeyId :: Lens' UpdateKeyDescription Text+ukdKeyId = lens _ukdKeyId (\ s a -> s{_ukdKeyId = a});+ -- | New description for the key. ukdDescription :: Lens' UpdateKeyDescription Text-ukdDescription = lens _ukdDescription (\s a -> s { _ukdDescription = a })+ukdDescription = lens _ukdDescription (\ s a -> s{_ukdDescription = a}); --- | A unique identifier for the customer master key. This value can be a globally--- unique identifier or the fully specified ARN to a key.  Key ARN Example ---- arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012----ukdKeyId :: Lens' UpdateKeyDescription Text-ukdKeyId = lens _ukdKeyId (\s a -> s { _ukdKeyId = a })+instance AWSRequest UpdateKeyDescription where+        type Sv UpdateKeyDescription = KMS+        type Rs UpdateKeyDescription =+             UpdateKeyDescriptionResponse+        request = postJSON+        response = receiveNull UpdateKeyDescriptionResponse' -data UpdateKeyDescriptionResponse = UpdateKeyDescriptionResponse-    deriving (Eq, Ord, Read, Show, Generic)+instance ToHeaders UpdateKeyDescription where+        toHeaders+          = const+              (mconcat+                 ["X-Amz-Target" =#+                    ("TrentService.UpdateKeyDescription" :: ByteString),+                  "Content-Type" =#+                    ("application/x-amz-json-1.1" :: ByteString)]) --- | 'UpdateKeyDescriptionResponse' constructor.-updateKeyDescriptionResponse :: UpdateKeyDescriptionResponse-updateKeyDescriptionResponse = UpdateKeyDescriptionResponse+instance ToJSON UpdateKeyDescription where+        toJSON UpdateKeyDescription'{..}+          = object+              ["KeyId" .= _ukdKeyId,+               "Description" .= _ukdDescription]  instance ToPath UpdateKeyDescription where-    toPath = const "/"+        toPath = const "/"  instance ToQuery UpdateKeyDescription where-    toQuery = const mempty--instance ToHeaders UpdateKeyDescription--instance ToJSON UpdateKeyDescription where-    toJSON UpdateKeyDescription{..} = object-        [ "KeyId"       .= _ukdKeyId-        , "Description" .= _ukdDescription-        ]+        toQuery = const mempty -instance AWSRequest UpdateKeyDescription where-    type Sv UpdateKeyDescription = KMS-    type Rs UpdateKeyDescription = UpdateKeyDescriptionResponse+-- | /See:/ 'updateKeyDescriptionResponse' smart constructor.+data UpdateKeyDescriptionResponse =+    UpdateKeyDescriptionResponse'+    deriving (Eq,Read,Show,Data,Typeable,Generic) -    request  = post "UpdateKeyDescription"-    response = nullResponse UpdateKeyDescriptionResponse+-- | Creates a value of 'UpdateKeyDescriptionResponse' with the minimum fields required to make a request.+--+updateKeyDescriptionResponse+    :: UpdateKeyDescriptionResponse+updateKeyDescriptionResponse = UpdateKeyDescriptionResponse'
+ gen/Network/AWS/KMS/Waiters.hs view
@@ -0,0 +1,20 @@+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE TypeFamilies      #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Network.AWS.KMS.Waiters+-- Copyright   : (c) 2013-2015 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.KMS.Waiters where++import           Network.AWS.KMS.Types+import           Network.AWS.Prelude+import           Network.AWS.Waiter
+ test/Main.hs view
@@ -0,0 +1,21 @@+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module      : Main+-- Copyright   : (c) 2013-2015 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Main (main) where++import Test.Tasty+import Test.AWS.KMS+import Test.AWS.KMS.Internal++main :: IO ()+main = defaultMain $ testGroup "KMS"+    [ testGroup "tests"    tests+    , testGroup "fixtures" fixtures+    ]
+ test/Test/AWS/Gen/KMS.hs view
@@ -0,0 +1,481 @@+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-orphans        #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Test.AWS.Gen.KMS+-- Copyright   : (c) 2013-2015 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Test.AWS.Gen.KMS where++import Data.Proxy+import Test.AWS.Fixture+import Test.AWS.Prelude+import Test.Tasty+import Network.AWS.KMS+import Test.AWS.KMS.Internal++-- Auto-generated: the actual test selection needs to be manually placed into+-- the top-level so that real test data can be incrementally added.+--+-- This commented snippet is what the entire set should look like:++-- fixtures :: TestTree+-- fixtures =+--     [ testGroup "request"+--         [ testDisableKeyRotation $+--             disableKeyRotation+--+--         , testGenerateDataKeyWithoutPlaintext $+--             generateDataKeyWithoutPlaintext+--+--         , testListGrants $+--             listGrants+--+--         , testEncrypt $+--             encrypt+--+--         , testEnableKeyRotation $+--             enableKeyRotation+--+--         , testCreateGrant $+--             createGrant+--+--         , testCreateAlias $+--             createAlias+--+--         , testListAliases $+--             listAliases+--+--         , testGenerateRandom $+--             generateRandom+--+--         , testDisableKey $+--             disableKey+--+--         , testCreateKey $+--             createKey+--+--         , testRetireGrant $+--             retireGrant+--+--         , testListKeys $+--             listKeys+--+--         , testGetKeyRotationStatus $+--             getKeyRotationStatus+--+--         , testGenerateDataKey $+--             generateDataKey+--+--         , testDeleteAlias $+--             deleteAlias+--+--         , testUpdateAlias $+--             updateAlias+--+--         , testDescribeKey $+--             describeKey+--+--         , testDecrypt $+--             decrypt+--+--         , testUpdateKeyDescription $+--             updateKeyDescription+--+--         , testReEncrypt $+--             reEncrypt+--+--         , testListKeyPolicies $+--             listKeyPolicies+--+--         , testEnableKey $+--             enableKey+--+--         , testPutKeyPolicy $+--             putKeyPolicy+--+--         , testRevokeGrant $+--             revokeGrant+--+--         , testGetKeyPolicy $+--             getKeyPolicy+--+--           ]++--     , testGroup "response"+--         [ testDisableKeyRotationResponse $+--             disableKeyRotationResponse+--+--         , testGenerateDataKeyWithoutPlaintextResponse $+--             generateDataKeyWithoutPlaintextResponse+--+--         , testListGrantsResponse $+--             listGrantsResponse+--+--         , testEncryptResponse $+--             encryptResponse+--+--         , testEnableKeyRotationResponse $+--             enableKeyRotationResponse+--+--         , testCreateGrantResponse $+--             createGrantResponse+--+--         , testCreateAliasResponse $+--             createAliasResponse+--+--         , testListAliasesResponse $+--             listAliasesResponse+--+--         , testGenerateRandomResponse $+--             generateRandomResponse+--+--         , testDisableKeyResponse $+--             disableKeyResponse+--+--         , testCreateKeyResponse $+--             createKeyResponse+--+--         , testRetireGrantResponse $+--             retireGrantResponse+--+--         , testListKeysResponse $+--             listKeysResponse+--+--         , testGetKeyRotationStatusResponse $+--             getKeyRotationStatusResponse+--+--         , testGenerateDataKeyResponse $+--             generateDataKeyResponse+--+--         , testDeleteAliasResponse $+--             deleteAliasResponse+--+--         , testUpdateAliasResponse $+--             updateAliasResponse+--+--         , testDescribeKeyResponse $+--             describeKeyResponse+--+--         , testDecryptResponse $+--             decryptResponse+--+--         , testUpdateKeyDescriptionResponse $+--             updateKeyDescriptionResponse+--+--         , testReEncryptResponse $+--             reEncryptResponse+--+--         , testListKeyPoliciesResponse $+--             listKeyPoliciesResponse+--+--         , testEnableKeyResponse $+--             enableKeyResponse+--+--         , testPutKeyPolicyResponse $+--             putKeyPolicyResponse+--+--         , testRevokeGrantResponse $+--             revokeGrantResponse+--+--         , testGetKeyPolicyResponse $+--             getKeyPolicyResponse+--+--           ]+--     ]++-- Requests++testDisableKeyRotation :: DisableKeyRotation -> TestTree+testDisableKeyRotation = req+    "DisableKeyRotation"+    "fixture/DisableKeyRotation"++testGenerateDataKeyWithoutPlaintext :: GenerateDataKeyWithoutPlaintext -> TestTree+testGenerateDataKeyWithoutPlaintext = req+    "GenerateDataKeyWithoutPlaintext"+    "fixture/GenerateDataKeyWithoutPlaintext"++testListGrants :: ListGrants -> TestTree+testListGrants = req+    "ListGrants"+    "fixture/ListGrants"++testEncrypt :: Encrypt -> TestTree+testEncrypt = req+    "Encrypt"+    "fixture/Encrypt"++testEnableKeyRotation :: EnableKeyRotation -> TestTree+testEnableKeyRotation = req+    "EnableKeyRotation"+    "fixture/EnableKeyRotation"++testCreateGrant :: CreateGrant -> TestTree+testCreateGrant = req+    "CreateGrant"+    "fixture/CreateGrant"++testCreateAlias :: CreateAlias -> TestTree+testCreateAlias = req+    "CreateAlias"+    "fixture/CreateAlias"++testListAliases :: ListAliases -> TestTree+testListAliases = req+    "ListAliases"+    "fixture/ListAliases"++testGenerateRandom :: GenerateRandom -> TestTree+testGenerateRandom = req+    "GenerateRandom"+    "fixture/GenerateRandom"++testDisableKey :: DisableKey -> TestTree+testDisableKey = req+    "DisableKey"+    "fixture/DisableKey"++testCreateKey :: CreateKey -> TestTree+testCreateKey = req+    "CreateKey"+    "fixture/CreateKey"++testRetireGrant :: RetireGrant -> TestTree+testRetireGrant = req+    "RetireGrant"+    "fixture/RetireGrant"++testListKeys :: ListKeys -> TestTree+testListKeys = req+    "ListKeys"+    "fixture/ListKeys"++testGetKeyRotationStatus :: GetKeyRotationStatus -> TestTree+testGetKeyRotationStatus = req+    "GetKeyRotationStatus"+    "fixture/GetKeyRotationStatus"++testGenerateDataKey :: GenerateDataKey -> TestTree+testGenerateDataKey = req+    "GenerateDataKey"+    "fixture/GenerateDataKey"++testDeleteAlias :: DeleteAlias -> TestTree+testDeleteAlias = req+    "DeleteAlias"+    "fixture/DeleteAlias"++testUpdateAlias :: UpdateAlias -> TestTree+testUpdateAlias = req+    "UpdateAlias"+    "fixture/UpdateAlias"++testDescribeKey :: DescribeKey -> TestTree+testDescribeKey = req+    "DescribeKey"+    "fixture/DescribeKey"++testDecrypt :: Decrypt -> TestTree+testDecrypt = req+    "Decrypt"+    "fixture/Decrypt"++testUpdateKeyDescription :: UpdateKeyDescription -> TestTree+testUpdateKeyDescription = req+    "UpdateKeyDescription"+    "fixture/UpdateKeyDescription"++testReEncrypt :: ReEncrypt -> TestTree+testReEncrypt = req+    "ReEncrypt"+    "fixture/ReEncrypt"++testListKeyPolicies :: ListKeyPolicies -> TestTree+testListKeyPolicies = req+    "ListKeyPolicies"+    "fixture/ListKeyPolicies"++testEnableKey :: EnableKey -> TestTree+testEnableKey = req+    "EnableKey"+    "fixture/EnableKey"++testPutKeyPolicy :: PutKeyPolicy -> TestTree+testPutKeyPolicy = req+    "PutKeyPolicy"+    "fixture/PutKeyPolicy"++testRevokeGrant :: RevokeGrant -> TestTree+testRevokeGrant = req+    "RevokeGrant"+    "fixture/RevokeGrant"++testGetKeyPolicy :: GetKeyPolicy -> TestTree+testGetKeyPolicy = req+    "GetKeyPolicy"+    "fixture/GetKeyPolicy"++-- Responses++testDisableKeyRotationResponse :: DisableKeyRotationResponse -> TestTree+testDisableKeyRotationResponse = res+    "DisableKeyRotationResponse"+    "fixture/DisableKeyRotationResponse"+    (Proxy :: Proxy DisableKeyRotation)++testGenerateDataKeyWithoutPlaintextResponse :: GenerateDataKeyWithoutPlaintextResponse -> TestTree+testGenerateDataKeyWithoutPlaintextResponse = res+    "GenerateDataKeyWithoutPlaintextResponse"+    "fixture/GenerateDataKeyWithoutPlaintextResponse"+    (Proxy :: Proxy GenerateDataKeyWithoutPlaintext)++testListGrantsResponse :: ListGrantsResponse -> TestTree+testListGrantsResponse = res+    "ListGrantsResponse"+    "fixture/ListGrantsResponse"+    (Proxy :: Proxy ListGrants)++testEncryptResponse :: EncryptResponse -> TestTree+testEncryptResponse = res+    "EncryptResponse"+    "fixture/EncryptResponse"+    (Proxy :: Proxy Encrypt)++testEnableKeyRotationResponse :: EnableKeyRotationResponse -> TestTree+testEnableKeyRotationResponse = res+    "EnableKeyRotationResponse"+    "fixture/EnableKeyRotationResponse"+    (Proxy :: Proxy EnableKeyRotation)++testCreateGrantResponse :: CreateGrantResponse -> TestTree+testCreateGrantResponse = res+    "CreateGrantResponse"+    "fixture/CreateGrantResponse"+    (Proxy :: Proxy CreateGrant)++testCreateAliasResponse :: CreateAliasResponse -> TestTree+testCreateAliasResponse = res+    "CreateAliasResponse"+    "fixture/CreateAliasResponse"+    (Proxy :: Proxy CreateAlias)++testListAliasesResponse :: ListAliasesResponse -> TestTree+testListAliasesResponse = res+    "ListAliasesResponse"+    "fixture/ListAliasesResponse"+    (Proxy :: Proxy ListAliases)++testGenerateRandomResponse :: GenerateRandomResponse -> TestTree+testGenerateRandomResponse = res+    "GenerateRandomResponse"+    "fixture/GenerateRandomResponse"+    (Proxy :: Proxy GenerateRandom)++testDisableKeyResponse :: DisableKeyResponse -> TestTree+testDisableKeyResponse = res+    "DisableKeyResponse"+    "fixture/DisableKeyResponse"+    (Proxy :: Proxy DisableKey)++testCreateKeyResponse :: CreateKeyResponse -> TestTree+testCreateKeyResponse = res+    "CreateKeyResponse"+    "fixture/CreateKeyResponse"+    (Proxy :: Proxy CreateKey)++testRetireGrantResponse :: RetireGrantResponse -> TestTree+testRetireGrantResponse = res+    "RetireGrantResponse"+    "fixture/RetireGrantResponse"+    (Proxy :: Proxy RetireGrant)++testListKeysResponse :: ListKeysResponse -> TestTree+testListKeysResponse = res+    "ListKeysResponse"+    "fixture/ListKeysResponse"+    (Proxy :: Proxy ListKeys)++testGetKeyRotationStatusResponse :: GetKeyRotationStatusResponse -> TestTree+testGetKeyRotationStatusResponse = res+    "GetKeyRotationStatusResponse"+    "fixture/GetKeyRotationStatusResponse"+    (Proxy :: Proxy GetKeyRotationStatus)++testGenerateDataKeyResponse :: GenerateDataKeyResponse -> TestTree+testGenerateDataKeyResponse = res+    "GenerateDataKeyResponse"+    "fixture/GenerateDataKeyResponse"+    (Proxy :: Proxy GenerateDataKey)++testDeleteAliasResponse :: DeleteAliasResponse -> TestTree+testDeleteAliasResponse = res+    "DeleteAliasResponse"+    "fixture/DeleteAliasResponse"+    (Proxy :: Proxy DeleteAlias)++testUpdateAliasResponse :: UpdateAliasResponse -> TestTree+testUpdateAliasResponse = res+    "UpdateAliasResponse"+    "fixture/UpdateAliasResponse"+    (Proxy :: Proxy UpdateAlias)++testDescribeKeyResponse :: DescribeKeyResponse -> TestTree+testDescribeKeyResponse = res+    "DescribeKeyResponse"+    "fixture/DescribeKeyResponse"+    (Proxy :: Proxy DescribeKey)++testDecryptResponse :: DecryptResponse -> TestTree+testDecryptResponse = res+    "DecryptResponse"+    "fixture/DecryptResponse"+    (Proxy :: Proxy Decrypt)++testUpdateKeyDescriptionResponse :: UpdateKeyDescriptionResponse -> TestTree+testUpdateKeyDescriptionResponse = res+    "UpdateKeyDescriptionResponse"+    "fixture/UpdateKeyDescriptionResponse"+    (Proxy :: Proxy UpdateKeyDescription)++testReEncryptResponse :: ReEncryptResponse -> TestTree+testReEncryptResponse = res+    "ReEncryptResponse"+    "fixture/ReEncryptResponse"+    (Proxy :: Proxy ReEncrypt)++testListKeyPoliciesResponse :: ListKeyPoliciesResponse -> TestTree+testListKeyPoliciesResponse = res+    "ListKeyPoliciesResponse"+    "fixture/ListKeyPoliciesResponse"+    (Proxy :: Proxy ListKeyPolicies)++testEnableKeyResponse :: EnableKeyResponse -> TestTree+testEnableKeyResponse = res+    "EnableKeyResponse"+    "fixture/EnableKeyResponse"+    (Proxy :: Proxy EnableKey)++testPutKeyPolicyResponse :: PutKeyPolicyResponse -> TestTree+testPutKeyPolicyResponse = res+    "PutKeyPolicyResponse"+    "fixture/PutKeyPolicyResponse"+    (Proxy :: Proxy PutKeyPolicy)++testRevokeGrantResponse :: RevokeGrantResponse -> TestTree+testRevokeGrantResponse = res+    "RevokeGrantResponse"+    "fixture/RevokeGrantResponse"+    (Proxy :: Proxy RevokeGrant)++testGetKeyPolicyResponse :: GetKeyPolicyResponse -> TestTree+testGetKeyPolicyResponse = res+    "GetKeyPolicyResponse"+    "fixture/GetKeyPolicyResponse"+    (Proxy :: Proxy GetKeyPolicy)
+ test/Test/AWS/KMS.hs view
@@ -0,0 +1,26 @@+{-# LANGUAGE OverloadedStrings #-}++-- Module      : Test.AWS.KMS+-- Copyright   : (c) 2013-2015 Brendan Hay+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)++module Test.AWS.KMS+    ( tests+    , fixtures+    ) where++import           Network.AWS.KMS+import           Test.AWS.Gen.KMS+import           Test.Tasty++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/AWS/KMS/Internal.hs view
@@ -0,0 +1,16 @@+{-# LANGUAGE OverloadedStrings #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Test.AWS.KMS.Internal+-- Copyright   : (c) 2013-2015 Brendan Hay+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)++module Test.AWS.KMS.Internal where++import Test.AWS.Prelude