Skip to content

Type definitions#

Index > KMS > Type definitions

Auto-generated documentation for KMS type annotations stubs module mypy-boto3-kms.

BlobTypeDef#

# BlobTypeDef definition

BlobTypeDef = Union[
    str,
    bytes,
    IO[Any],
    StreamingBody,
]

TimestampTypeDef#

# TimestampTypeDef definition

TimestampTypeDef = Union[
    datetime,
    str,
]

AliasListEntryTypeDef#

# AliasListEntryTypeDef definition

class AliasListEntryTypeDef(TypedDict):
    AliasName: NotRequired[str],
    AliasArn: NotRequired[str],
    TargetKeyId: NotRequired[str],
    CreationDate: NotRequired[datetime],
    LastUpdatedDate: NotRequired[datetime],

CancelKeyDeletionRequestRequestTypeDef#

# CancelKeyDeletionRequestRequestTypeDef definition

class CancelKeyDeletionRequestRequestTypeDef(TypedDict):
    KeyId: str,

ResponseMetadataTypeDef#

# ResponseMetadataTypeDef definition

class ResponseMetadataTypeDef(TypedDict):
    RequestId: str,
    HTTPStatusCode: int,
    HTTPHeaders: Dict[str, str],
    RetryAttempts: int,
    HostId: NotRequired[str],

ConnectCustomKeyStoreRequestRequestTypeDef#

# ConnectCustomKeyStoreRequestRequestTypeDef definition

class ConnectCustomKeyStoreRequestRequestTypeDef(TypedDict):
    CustomKeyStoreId: str,

CreateAliasRequestRequestTypeDef#

# CreateAliasRequestRequestTypeDef definition

class CreateAliasRequestRequestTypeDef(TypedDict):
    AliasName: str,
    TargetKeyId: str,

XksProxyAuthenticationCredentialTypeTypeDef#

# XksProxyAuthenticationCredentialTypeTypeDef definition

class XksProxyAuthenticationCredentialTypeTypeDef(TypedDict):
    AccessKeyId: str,
    RawSecretAccessKey: str,

GrantConstraintsTypeDef#

# GrantConstraintsTypeDef definition

class GrantConstraintsTypeDef(TypedDict):
    EncryptionContextSubset: NotRequired[Mapping[str, str]],
    EncryptionContextEquals: NotRequired[Mapping[str, str]],

TagTypeDef#

# TagTypeDef definition

class TagTypeDef(TypedDict):
    TagKey: str,
    TagValue: str,

XksProxyConfigurationTypeTypeDef#

# XksProxyConfigurationTypeTypeDef definition

class XksProxyConfigurationTypeTypeDef(TypedDict):
    Connectivity: NotRequired[XksProxyConnectivityTypeType],  # (1)
    AccessKeyId: NotRequired[str],
    UriEndpoint: NotRequired[str],
    UriPath: NotRequired[str],
    VpcEndpointServiceName: NotRequired[str],
  1. See XksProxyConnectivityTypeType

DeleteAliasRequestRequestTypeDef#

# DeleteAliasRequestRequestTypeDef definition

class DeleteAliasRequestRequestTypeDef(TypedDict):
    AliasName: str,

DeleteCustomKeyStoreRequestRequestTypeDef#

# DeleteCustomKeyStoreRequestRequestTypeDef definition

class DeleteCustomKeyStoreRequestRequestTypeDef(TypedDict):
    CustomKeyStoreId: str,

DeleteImportedKeyMaterialRequestRequestTypeDef#

# DeleteImportedKeyMaterialRequestRequestTypeDef definition

class DeleteImportedKeyMaterialRequestRequestTypeDef(TypedDict):
    KeyId: str,

PaginatorConfigTypeDef#

# PaginatorConfigTypeDef definition

class PaginatorConfigTypeDef(TypedDict):
    MaxItems: NotRequired[int],
    PageSize: NotRequired[int],
    StartingToken: NotRequired[str],

DescribeCustomKeyStoresRequestRequestTypeDef#

# DescribeCustomKeyStoresRequestRequestTypeDef definition

class DescribeCustomKeyStoresRequestRequestTypeDef(TypedDict):
    CustomKeyStoreId: NotRequired[str],
    CustomKeyStoreName: NotRequired[str],
    Limit: NotRequired[int],
    Marker: NotRequired[str],

DescribeKeyRequestRequestTypeDef#

# DescribeKeyRequestRequestTypeDef definition

class DescribeKeyRequestRequestTypeDef(TypedDict):
    KeyId: str,
    GrantTokens: NotRequired[Sequence[str]],

DisableKeyRequestRequestTypeDef#

# DisableKeyRequestRequestTypeDef definition

class DisableKeyRequestRequestTypeDef(TypedDict):
    KeyId: str,

DisableKeyRotationRequestRequestTypeDef#

# DisableKeyRotationRequestRequestTypeDef definition

class DisableKeyRotationRequestRequestTypeDef(TypedDict):
    KeyId: str,

DisconnectCustomKeyStoreRequestRequestTypeDef#

# DisconnectCustomKeyStoreRequestRequestTypeDef definition

class DisconnectCustomKeyStoreRequestRequestTypeDef(TypedDict):
    CustomKeyStoreId: str,

EnableKeyRequestRequestTypeDef#

# EnableKeyRequestRequestTypeDef definition

class EnableKeyRequestRequestTypeDef(TypedDict):
    KeyId: str,

EnableKeyRotationRequestRequestTypeDef#

# EnableKeyRotationRequestRequestTypeDef definition

class EnableKeyRotationRequestRequestTypeDef(TypedDict):
    KeyId: str,
    RotationPeriodInDays: NotRequired[int],

GenerateDataKeyPairWithoutPlaintextRequestRequestTypeDef#

# GenerateDataKeyPairWithoutPlaintextRequestRequestTypeDef definition

class GenerateDataKeyPairWithoutPlaintextRequestRequestTypeDef(TypedDict):
    KeyId: str,
    KeyPairSpec: DataKeyPairSpecType,  # (1)
    EncryptionContext: NotRequired[Mapping[str, str]],
    GrantTokens: NotRequired[Sequence[str]],
    DryRun: NotRequired[bool],
  1. See DataKeyPairSpecType

GenerateDataKeyWithoutPlaintextRequestRequestTypeDef#

# GenerateDataKeyWithoutPlaintextRequestRequestTypeDef definition

class GenerateDataKeyWithoutPlaintextRequestRequestTypeDef(TypedDict):
    KeyId: str,
    EncryptionContext: NotRequired[Mapping[str, str]],
    KeySpec: NotRequired[DataKeySpecType],  # (1)
    NumberOfBytes: NotRequired[int],
    GrantTokens: NotRequired[Sequence[str]],
    DryRun: NotRequired[bool],
  1. See DataKeySpecType

GetKeyPolicyRequestRequestTypeDef#

# GetKeyPolicyRequestRequestTypeDef definition

class GetKeyPolicyRequestRequestTypeDef(TypedDict):
    KeyId: str,
    PolicyName: NotRequired[str],

GetKeyRotationStatusRequestRequestTypeDef#

# GetKeyRotationStatusRequestRequestTypeDef definition

class GetKeyRotationStatusRequestRequestTypeDef(TypedDict):
    KeyId: str,

GetParametersForImportRequestRequestTypeDef#

# GetParametersForImportRequestRequestTypeDef definition

class GetParametersForImportRequestRequestTypeDef(TypedDict):
    KeyId: str,
    WrappingAlgorithm: AlgorithmSpecType,  # (1)
    WrappingKeySpec: WrappingKeySpecType,  # (2)
  1. See AlgorithmSpecType
  2. See WrappingKeySpecType

GetPublicKeyRequestRequestTypeDef#

# GetPublicKeyRequestRequestTypeDef definition

class GetPublicKeyRequestRequestTypeDef(TypedDict):
    KeyId: str,
    GrantTokens: NotRequired[Sequence[str]],

GrantConstraintsOutputTypeDef#

# GrantConstraintsOutputTypeDef definition

class GrantConstraintsOutputTypeDef(TypedDict):
    EncryptionContextSubset: NotRequired[Dict[str, str]],
    EncryptionContextEquals: NotRequired[Dict[str, str]],

KeyListEntryTypeDef#

# KeyListEntryTypeDef definition

class KeyListEntryTypeDef(TypedDict):
    KeyId: NotRequired[str],
    KeyArn: NotRequired[str],

XksKeyConfigurationTypeTypeDef#

# XksKeyConfigurationTypeTypeDef definition

class XksKeyConfigurationTypeTypeDef(TypedDict):
    Id: NotRequired[str],

ListAliasesRequestRequestTypeDef#

# ListAliasesRequestRequestTypeDef definition

class ListAliasesRequestRequestTypeDef(TypedDict):
    KeyId: NotRequired[str],
    Limit: NotRequired[int],
    Marker: NotRequired[str],

ListGrantsRequestRequestTypeDef#

# ListGrantsRequestRequestTypeDef definition

class ListGrantsRequestRequestTypeDef(TypedDict):
    KeyId: str,
    Limit: NotRequired[int],
    Marker: NotRequired[str],
    GrantId: NotRequired[str],
    GranteePrincipal: NotRequired[str],

ListKeyPoliciesRequestRequestTypeDef#

# ListKeyPoliciesRequestRequestTypeDef definition

class ListKeyPoliciesRequestRequestTypeDef(TypedDict):
    KeyId: str,
    Limit: NotRequired[int],
    Marker: NotRequired[str],

ListKeyRotationsRequestRequestTypeDef#

# ListKeyRotationsRequestRequestTypeDef definition

class ListKeyRotationsRequestRequestTypeDef(TypedDict):
    KeyId: str,
    Limit: NotRequired[int],
    Marker: NotRequired[str],

RotationsListEntryTypeDef#

# RotationsListEntryTypeDef definition

class RotationsListEntryTypeDef(TypedDict):
    KeyId: NotRequired[str],
    RotationDate: NotRequired[datetime],
    RotationType: NotRequired[RotationTypeType],  # (1)
  1. See RotationTypeType

ListKeysRequestRequestTypeDef#

# ListKeysRequestRequestTypeDef definition

class ListKeysRequestRequestTypeDef(TypedDict):
    Limit: NotRequired[int],
    Marker: NotRequired[str],

ListResourceTagsRequestRequestTypeDef#

# ListResourceTagsRequestRequestTypeDef definition

class ListResourceTagsRequestRequestTypeDef(TypedDict):
    KeyId: str,
    Limit: NotRequired[int],
    Marker: NotRequired[str],

ListRetirableGrantsRequestRequestTypeDef#

# ListRetirableGrantsRequestRequestTypeDef definition

class ListRetirableGrantsRequestRequestTypeDef(TypedDict):
    RetiringPrincipal: str,
    Limit: NotRequired[int],
    Marker: NotRequired[str],

MultiRegionKeyTypeDef#

# MultiRegionKeyTypeDef definition

class MultiRegionKeyTypeDef(TypedDict):
    Arn: NotRequired[str],
    Region: NotRequired[str],

PutKeyPolicyRequestRequestTypeDef#

# PutKeyPolicyRequestRequestTypeDef definition

class PutKeyPolicyRequestRequestTypeDef(TypedDict):
    KeyId: str,
    Policy: str,
    PolicyName: NotRequired[str],
    BypassPolicyLockoutSafetyCheck: NotRequired[bool],

RetireGrantRequestRequestTypeDef#

# RetireGrantRequestRequestTypeDef definition

class RetireGrantRequestRequestTypeDef(TypedDict):
    GrantToken: NotRequired[str],
    KeyId: NotRequired[str],
    GrantId: NotRequired[str],
    DryRun: NotRequired[bool],

RevokeGrantRequestRequestTypeDef#

# RevokeGrantRequestRequestTypeDef definition

class RevokeGrantRequestRequestTypeDef(TypedDict):
    KeyId: str,
    GrantId: str,
    DryRun: NotRequired[bool],

RotateKeyOnDemandRequestRequestTypeDef#

# RotateKeyOnDemandRequestRequestTypeDef definition

class RotateKeyOnDemandRequestRequestTypeDef(TypedDict):
    KeyId: str,

ScheduleKeyDeletionRequestRequestTypeDef#

# ScheduleKeyDeletionRequestRequestTypeDef definition

class ScheduleKeyDeletionRequestRequestTypeDef(TypedDict):
    KeyId: str,
    PendingWindowInDays: NotRequired[int],

UntagResourceRequestRequestTypeDef#

# UntagResourceRequestRequestTypeDef definition

class UntagResourceRequestRequestTypeDef(TypedDict):
    KeyId: str,
    TagKeys: Sequence[str],

UpdateAliasRequestRequestTypeDef#

# UpdateAliasRequestRequestTypeDef definition

class UpdateAliasRequestRequestTypeDef(TypedDict):
    AliasName: str,
    TargetKeyId: str,

UpdateKeyDescriptionRequestRequestTypeDef#

# UpdateKeyDescriptionRequestRequestTypeDef definition

class UpdateKeyDescriptionRequestRequestTypeDef(TypedDict):
    KeyId: str,
    Description: str,

UpdatePrimaryRegionRequestRequestTypeDef#

# UpdatePrimaryRegionRequestRequestTypeDef definition

class UpdatePrimaryRegionRequestRequestTypeDef(TypedDict):
    KeyId: str,
    PrimaryRegion: str,

EncryptRequestRequestTypeDef#

# EncryptRequestRequestTypeDef definition

class EncryptRequestRequestTypeDef(TypedDict):
    KeyId: str,
    Plaintext: BlobTypeDef,
    EncryptionContext: NotRequired[Mapping[str, str]],
    GrantTokens: NotRequired[Sequence[str]],
    EncryptionAlgorithm: NotRequired[EncryptionAlgorithmSpecType],  # (1)
    DryRun: NotRequired[bool],
  1. See EncryptionAlgorithmSpecType

GenerateMacRequestRequestTypeDef#

# GenerateMacRequestRequestTypeDef definition

class GenerateMacRequestRequestTypeDef(TypedDict):
    Message: BlobTypeDef,
    KeyId: str,
    MacAlgorithm: MacAlgorithmSpecType,  # (1)
    GrantTokens: NotRequired[Sequence[str]],
    DryRun: NotRequired[bool],
  1. See MacAlgorithmSpecType

ReEncryptRequestRequestTypeDef#

# ReEncryptRequestRequestTypeDef definition

class ReEncryptRequestRequestTypeDef(TypedDict):
    CiphertextBlob: BlobTypeDef,
    DestinationKeyId: str,
    SourceEncryptionContext: NotRequired[Mapping[str, str]],
    SourceKeyId: NotRequired[str],
    DestinationEncryptionContext: NotRequired[Mapping[str, str]],
    SourceEncryptionAlgorithm: NotRequired[EncryptionAlgorithmSpecType],  # (1)
    DestinationEncryptionAlgorithm: NotRequired[EncryptionAlgorithmSpecType],  # (1)
    GrantTokens: NotRequired[Sequence[str]],
    DryRun: NotRequired[bool],
  1. See EncryptionAlgorithmSpecType
  2. See EncryptionAlgorithmSpecType

RecipientInfoTypeDef#

# RecipientInfoTypeDef definition

class RecipientInfoTypeDef(TypedDict):
    KeyEncryptionAlgorithm: NotRequired[KeyEncryptionMechanismType],  # (1)
    AttestationDocument: NotRequired[BlobTypeDef],
  1. See KeyEncryptionMechanismType

SignRequestRequestTypeDef#

# SignRequestRequestTypeDef definition

class SignRequestRequestTypeDef(TypedDict):
    KeyId: str,
    Message: BlobTypeDef,
    SigningAlgorithm: SigningAlgorithmSpecType,  # (1)
    MessageType: NotRequired[MessageTypeType],  # (2)
    GrantTokens: NotRequired[Sequence[str]],
    DryRun: NotRequired[bool],
  1. See SigningAlgorithmSpecType
  2. See MessageTypeType

VerifyMacRequestRequestTypeDef#

# VerifyMacRequestRequestTypeDef definition

class VerifyMacRequestRequestTypeDef(TypedDict):
    Message: BlobTypeDef,
    KeyId: str,
    MacAlgorithm: MacAlgorithmSpecType,  # (1)
    Mac: BlobTypeDef,
    GrantTokens: NotRequired[Sequence[str]],
    DryRun: NotRequired[bool],
  1. See MacAlgorithmSpecType

VerifyRequestRequestTypeDef#

# VerifyRequestRequestTypeDef definition

class VerifyRequestRequestTypeDef(TypedDict):
    KeyId: str,
    Message: BlobTypeDef,
    Signature: BlobTypeDef,
    SigningAlgorithm: SigningAlgorithmSpecType,  # (1)
    MessageType: NotRequired[MessageTypeType],  # (2)
    GrantTokens: NotRequired[Sequence[str]],
    DryRun: NotRequired[bool],
  1. See SigningAlgorithmSpecType
  2. See MessageTypeType

CancelKeyDeletionResponseTypeDef#

# CancelKeyDeletionResponseTypeDef definition

class CancelKeyDeletionResponseTypeDef(TypedDict):
    KeyId: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

CreateCustomKeyStoreResponseTypeDef#

# CreateCustomKeyStoreResponseTypeDef definition

class CreateCustomKeyStoreResponseTypeDef(TypedDict):
    CustomKeyStoreId: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

CreateGrantResponseTypeDef#

# CreateGrantResponseTypeDef definition

class CreateGrantResponseTypeDef(TypedDict):
    GrantToken: str,
    GrantId: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

DecryptResponseTypeDef#

# DecryptResponseTypeDef definition

class DecryptResponseTypeDef(TypedDict):
    KeyId: str,
    Plaintext: bytes,
    EncryptionAlgorithm: EncryptionAlgorithmSpecType,  # (1)
    CiphertextForRecipient: bytes,
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See EncryptionAlgorithmSpecType
  2. See ResponseMetadataTypeDef

DeriveSharedSecretResponseTypeDef#

# DeriveSharedSecretResponseTypeDef definition

class DeriveSharedSecretResponseTypeDef(TypedDict):
    KeyId: str,
    SharedSecret: bytes,
    CiphertextForRecipient: bytes,
    KeyAgreementAlgorithm: KeyAgreementAlgorithmSpecType,  # (1)
    KeyOrigin: OriginTypeType,  # (2)
    ResponseMetadata: ResponseMetadataTypeDef,  # (3)
  1. See KeyAgreementAlgorithmSpecType
  2. See OriginTypeType
  3. See ResponseMetadataTypeDef

EmptyResponseMetadataTypeDef#

# EmptyResponseMetadataTypeDef definition

class EmptyResponseMetadataTypeDef(TypedDict):
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

EncryptResponseTypeDef#

# EncryptResponseTypeDef definition

class EncryptResponseTypeDef(TypedDict):
    CiphertextBlob: bytes,
    KeyId: str,
    EncryptionAlgorithm: EncryptionAlgorithmSpecType,  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See EncryptionAlgorithmSpecType
  2. See ResponseMetadataTypeDef

GenerateDataKeyPairResponseTypeDef#

# GenerateDataKeyPairResponseTypeDef definition

class GenerateDataKeyPairResponseTypeDef(TypedDict):
    PrivateKeyCiphertextBlob: bytes,
    PrivateKeyPlaintext: bytes,
    PublicKey: bytes,
    KeyId: str,
    KeyPairSpec: DataKeyPairSpecType,  # (1)
    CiphertextForRecipient: bytes,
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See DataKeyPairSpecType
  2. See ResponseMetadataTypeDef

GenerateDataKeyPairWithoutPlaintextResponseTypeDef#

# GenerateDataKeyPairWithoutPlaintextResponseTypeDef definition

class GenerateDataKeyPairWithoutPlaintextResponseTypeDef(TypedDict):
    PrivateKeyCiphertextBlob: bytes,
    PublicKey: bytes,
    KeyId: str,
    KeyPairSpec: DataKeyPairSpecType,  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See DataKeyPairSpecType
  2. See ResponseMetadataTypeDef

GenerateDataKeyResponseTypeDef#

# GenerateDataKeyResponseTypeDef definition

class GenerateDataKeyResponseTypeDef(TypedDict):
    CiphertextBlob: bytes,
    Plaintext: bytes,
    KeyId: str,
    CiphertextForRecipient: bytes,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

GenerateDataKeyWithoutPlaintextResponseTypeDef#

# GenerateDataKeyWithoutPlaintextResponseTypeDef definition

class GenerateDataKeyWithoutPlaintextResponseTypeDef(TypedDict):
    CiphertextBlob: bytes,
    KeyId: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

GenerateMacResponseTypeDef#

# GenerateMacResponseTypeDef definition

class GenerateMacResponseTypeDef(TypedDict):
    Mac: bytes,
    MacAlgorithm: MacAlgorithmSpecType,  # (1)
    KeyId: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See MacAlgorithmSpecType
  2. See ResponseMetadataTypeDef

GenerateRandomResponseTypeDef#

# GenerateRandomResponseTypeDef definition

class GenerateRandomResponseTypeDef(TypedDict):
    Plaintext: bytes,
    CiphertextForRecipient: bytes,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

GetKeyPolicyResponseTypeDef#

# GetKeyPolicyResponseTypeDef definition

class GetKeyPolicyResponseTypeDef(TypedDict):
    Policy: str,
    PolicyName: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

GetKeyRotationStatusResponseTypeDef#

# GetKeyRotationStatusResponseTypeDef definition

class GetKeyRotationStatusResponseTypeDef(TypedDict):
    KeyRotationEnabled: bool,
    KeyId: str,
    RotationPeriodInDays: int,
    NextRotationDate: datetime,
    OnDemandRotationStartDate: datetime,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

GetParametersForImportResponseTypeDef#

# GetParametersForImportResponseTypeDef definition

class GetParametersForImportResponseTypeDef(TypedDict):
    KeyId: str,
    ImportToken: bytes,
    PublicKey: bytes,
    ParametersValidTo: datetime,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

GetPublicKeyResponseTypeDef#

# GetPublicKeyResponseTypeDef definition

class GetPublicKeyResponseTypeDef(TypedDict):
    KeyId: str,
    PublicKey: bytes,
    CustomerMasterKeySpec: CustomerMasterKeySpecType,  # (1)
    KeySpec: KeySpecType,  # (2)
    KeyUsage: KeyUsageTypeType,  # (3)
    EncryptionAlgorithms: List[EncryptionAlgorithmSpecType],  # (4)
    SigningAlgorithms: List[SigningAlgorithmSpecType],  # (5)
    KeyAgreementAlgorithms: List[KeyAgreementAlgorithmSpecType],  # (6)
    ResponseMetadata: ResponseMetadataTypeDef,  # (7)
  1. See CustomerMasterKeySpecType
  2. See KeySpecType
  3. See KeyUsageTypeType
  4. See EncryptionAlgorithmSpecType
  5. See SigningAlgorithmSpecType
  6. See KeyAgreementAlgorithmSpecType
  7. See ResponseMetadataTypeDef

ListAliasesResponseTypeDef#

# ListAliasesResponseTypeDef definition

class ListAliasesResponseTypeDef(TypedDict):
    Aliases: List[AliasListEntryTypeDef],  # (1)
    NextMarker: str,
    Truncated: bool,
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See AliasListEntryTypeDef
  2. See ResponseMetadataTypeDef

ListKeyPoliciesResponseTypeDef#

# ListKeyPoliciesResponseTypeDef definition

class ListKeyPoliciesResponseTypeDef(TypedDict):
    PolicyNames: List[str],
    NextMarker: str,
    Truncated: bool,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

ReEncryptResponseTypeDef#

# ReEncryptResponseTypeDef definition

class ReEncryptResponseTypeDef(TypedDict):
    CiphertextBlob: bytes,
    SourceKeyId: str,
    KeyId: str,
    SourceEncryptionAlgorithm: EncryptionAlgorithmSpecType,  # (1)
    DestinationEncryptionAlgorithm: EncryptionAlgorithmSpecType,  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (3)
  1. See EncryptionAlgorithmSpecType
  2. See EncryptionAlgorithmSpecType
  3. See ResponseMetadataTypeDef

RotateKeyOnDemandResponseTypeDef#

# RotateKeyOnDemandResponseTypeDef definition

class RotateKeyOnDemandResponseTypeDef(TypedDict):
    KeyId: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

ScheduleKeyDeletionResponseTypeDef#

# ScheduleKeyDeletionResponseTypeDef definition

class ScheduleKeyDeletionResponseTypeDef(TypedDict):
    KeyId: str,
    DeletionDate: datetime,
    KeyState: KeyStateType,  # (1)
    PendingWindowInDays: int,
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See KeyStateType
  2. See ResponseMetadataTypeDef

SignResponseTypeDef#

# SignResponseTypeDef definition

class SignResponseTypeDef(TypedDict):
    KeyId: str,
    Signature: bytes,
    SigningAlgorithm: SigningAlgorithmSpecType,  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See SigningAlgorithmSpecType
  2. See ResponseMetadataTypeDef

VerifyMacResponseTypeDef#

# VerifyMacResponseTypeDef definition

class VerifyMacResponseTypeDef(TypedDict):
    KeyId: str,
    MacValid: bool,
    MacAlgorithm: MacAlgorithmSpecType,  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See MacAlgorithmSpecType
  2. See ResponseMetadataTypeDef

VerifyResponseTypeDef#

# VerifyResponseTypeDef definition

class VerifyResponseTypeDef(TypedDict):
    KeyId: str,
    SignatureValid: bool,
    SigningAlgorithm: SigningAlgorithmSpecType,  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See SigningAlgorithmSpecType
  2. See ResponseMetadataTypeDef

CreateCustomKeyStoreRequestRequestTypeDef#

# CreateCustomKeyStoreRequestRequestTypeDef definition

class CreateCustomKeyStoreRequestRequestTypeDef(TypedDict):
    CustomKeyStoreName: str,
    CloudHsmClusterId: NotRequired[str],
    TrustAnchorCertificate: NotRequired[str],
    KeyStorePassword: NotRequired[str],
    CustomKeyStoreType: NotRequired[CustomKeyStoreTypeType],  # (1)
    XksProxyUriEndpoint: NotRequired[str],
    XksProxyUriPath: NotRequired[str],
    XksProxyVpcEndpointServiceName: NotRequired[str],
    XksProxyAuthenticationCredential: NotRequired[XksProxyAuthenticationCredentialTypeTypeDef],  # (2)
    XksProxyConnectivity: NotRequired[XksProxyConnectivityTypeType],  # (3)
  1. See CustomKeyStoreTypeType
  2. See XksProxyAuthenticationCredentialTypeTypeDef
  3. See XksProxyConnectivityTypeType

UpdateCustomKeyStoreRequestRequestTypeDef#

# UpdateCustomKeyStoreRequestRequestTypeDef definition

class UpdateCustomKeyStoreRequestRequestTypeDef(TypedDict):
    CustomKeyStoreId: str,
    NewCustomKeyStoreName: NotRequired[str],
    KeyStorePassword: NotRequired[str],
    CloudHsmClusterId: NotRequired[str],
    XksProxyUriEndpoint: NotRequired[str],
    XksProxyUriPath: NotRequired[str],
    XksProxyVpcEndpointServiceName: NotRequired[str],
    XksProxyAuthenticationCredential: NotRequired[XksProxyAuthenticationCredentialTypeTypeDef],  # (1)
    XksProxyConnectivity: NotRequired[XksProxyConnectivityTypeType],  # (2)
  1. See XksProxyAuthenticationCredentialTypeTypeDef
  2. See XksProxyConnectivityTypeType

CreateGrantRequestRequestTypeDef#

# CreateGrantRequestRequestTypeDef definition

class CreateGrantRequestRequestTypeDef(TypedDict):
    KeyId: str,
    GranteePrincipal: str,
    Operations: Sequence[GrantOperationType],  # (1)
    RetiringPrincipal: NotRequired[str],
    Constraints: NotRequired[GrantConstraintsTypeDef],  # (2)
    GrantTokens: NotRequired[Sequence[str]],
    Name: NotRequired[str],
    DryRun: NotRequired[bool],
  1. See GrantOperationType
  2. See GrantConstraintsTypeDef

CreateKeyRequestRequestTypeDef#

# CreateKeyRequestRequestTypeDef definition

class CreateKeyRequestRequestTypeDef(TypedDict):
    Policy: NotRequired[str],
    Description: NotRequired[str],
    KeyUsage: NotRequired[KeyUsageTypeType],  # (1)
    CustomerMasterKeySpec: NotRequired[CustomerMasterKeySpecType],  # (2)
    KeySpec: NotRequired[KeySpecType],  # (3)
    Origin: NotRequired[OriginTypeType],  # (4)
    CustomKeyStoreId: NotRequired[str],
    BypassPolicyLockoutSafetyCheck: NotRequired[bool],
    Tags: NotRequired[Sequence[TagTypeDef]],  # (5)
    MultiRegion: NotRequired[bool],
    XksKeyId: NotRequired[str],
  1. See KeyUsageTypeType
  2. See CustomerMasterKeySpecType
  3. See KeySpecType
  4. See OriginTypeType
  5. See TagTypeDef

ListResourceTagsResponseTypeDef#

# ListResourceTagsResponseTypeDef definition

class ListResourceTagsResponseTypeDef(TypedDict):
    Tags: List[TagTypeDef],  # (1)
    NextMarker: str,
    Truncated: bool,
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See TagTypeDef
  2. See ResponseMetadataTypeDef

ReplicateKeyRequestRequestTypeDef#

# ReplicateKeyRequestRequestTypeDef definition

class ReplicateKeyRequestRequestTypeDef(TypedDict):
    KeyId: str,
    ReplicaRegion: str,
    Policy: NotRequired[str],
    BypassPolicyLockoutSafetyCheck: NotRequired[bool],
    Description: NotRequired[str],
    Tags: NotRequired[Sequence[TagTypeDef]],  # (1)
  1. See TagTypeDef

TagResourceRequestRequestTypeDef#

# TagResourceRequestRequestTypeDef definition

class TagResourceRequestRequestTypeDef(TypedDict):
    KeyId: str,
    Tags: Sequence[TagTypeDef],  # (1)
  1. See TagTypeDef

CustomKeyStoresListEntryTypeDef#

# CustomKeyStoresListEntryTypeDef definition

class CustomKeyStoresListEntryTypeDef(TypedDict):
    CustomKeyStoreId: NotRequired[str],
    CustomKeyStoreName: NotRequired[str],
    CloudHsmClusterId: NotRequired[str],
    TrustAnchorCertificate: NotRequired[str],
    ConnectionState: NotRequired[ConnectionStateTypeType],  # (1)
    ConnectionErrorCode: NotRequired[ConnectionErrorCodeTypeType],  # (2)
    CreationDate: NotRequired[datetime],
    CustomKeyStoreType: NotRequired[CustomKeyStoreTypeType],  # (3)
    XksProxyConfiguration: NotRequired[XksProxyConfigurationTypeTypeDef],  # (4)
  1. See ConnectionStateTypeType
  2. See ConnectionErrorCodeTypeType
  3. See CustomKeyStoreTypeType
  4. See XksProxyConfigurationTypeTypeDef

DescribeCustomKeyStoresRequestDescribeCustomKeyStoresPaginateTypeDef#

# DescribeCustomKeyStoresRequestDescribeCustomKeyStoresPaginateTypeDef definition

class DescribeCustomKeyStoresRequestDescribeCustomKeyStoresPaginateTypeDef(TypedDict):
    CustomKeyStoreId: NotRequired[str],
    CustomKeyStoreName: NotRequired[str],
    PaginationConfig: NotRequired[PaginatorConfigTypeDef],  # (1)
  1. See PaginatorConfigTypeDef

ListAliasesRequestListAliasesPaginateTypeDef#

# ListAliasesRequestListAliasesPaginateTypeDef definition

class ListAliasesRequestListAliasesPaginateTypeDef(TypedDict):
    KeyId: NotRequired[str],
    PaginationConfig: NotRequired[PaginatorConfigTypeDef],  # (1)
  1. See PaginatorConfigTypeDef

ListGrantsRequestListGrantsPaginateTypeDef#

# ListGrantsRequestListGrantsPaginateTypeDef definition

class ListGrantsRequestListGrantsPaginateTypeDef(TypedDict):
    KeyId: str,
    GrantId: NotRequired[str],
    GranteePrincipal: NotRequired[str],
    PaginationConfig: NotRequired[PaginatorConfigTypeDef],  # (1)
  1. See PaginatorConfigTypeDef

ListKeyPoliciesRequestListKeyPoliciesPaginateTypeDef#

# ListKeyPoliciesRequestListKeyPoliciesPaginateTypeDef definition

class ListKeyPoliciesRequestListKeyPoliciesPaginateTypeDef(TypedDict):
    KeyId: str,
    PaginationConfig: NotRequired[PaginatorConfigTypeDef],  # (1)
  1. See PaginatorConfigTypeDef

ListKeyRotationsRequestListKeyRotationsPaginateTypeDef#

# ListKeyRotationsRequestListKeyRotationsPaginateTypeDef definition

class ListKeyRotationsRequestListKeyRotationsPaginateTypeDef(TypedDict):
    KeyId: str,
    PaginationConfig: NotRequired[PaginatorConfigTypeDef],  # (1)
  1. See PaginatorConfigTypeDef

ListKeysRequestListKeysPaginateTypeDef#

# ListKeysRequestListKeysPaginateTypeDef definition

class ListKeysRequestListKeysPaginateTypeDef(TypedDict):
    PaginationConfig: NotRequired[PaginatorConfigTypeDef],  # (1)
  1. See PaginatorConfigTypeDef

ListResourceTagsRequestListResourceTagsPaginateTypeDef#

# ListResourceTagsRequestListResourceTagsPaginateTypeDef definition

class ListResourceTagsRequestListResourceTagsPaginateTypeDef(TypedDict):
    KeyId: str,
    PaginationConfig: NotRequired[PaginatorConfigTypeDef],  # (1)
  1. See PaginatorConfigTypeDef

ListRetirableGrantsRequestListRetirableGrantsPaginateTypeDef#

# ListRetirableGrantsRequestListRetirableGrantsPaginateTypeDef definition

class ListRetirableGrantsRequestListRetirableGrantsPaginateTypeDef(TypedDict):
    RetiringPrincipal: str,
    PaginationConfig: NotRequired[PaginatorConfigTypeDef],  # (1)
  1. See PaginatorConfigTypeDef

GrantListEntryTypeDef#

# GrantListEntryTypeDef definition

class GrantListEntryTypeDef(TypedDict):
    KeyId: NotRequired[str],
    GrantId: NotRequired[str],
    Name: NotRequired[str],
    CreationDate: NotRequired[datetime],
    GranteePrincipal: NotRequired[str],
    RetiringPrincipal: NotRequired[str],
    IssuingAccount: NotRequired[str],
    Operations: NotRequired[List[GrantOperationType]],  # (1)
    Constraints: NotRequired[GrantConstraintsOutputTypeDef],  # (2)
  1. See GrantOperationType
  2. See GrantConstraintsOutputTypeDef

ImportKeyMaterialRequestRequestTypeDef#

# ImportKeyMaterialRequestRequestTypeDef definition

class ImportKeyMaterialRequestRequestTypeDef(TypedDict):
    KeyId: str,
    ImportToken: BlobTypeDef,
    EncryptedKeyMaterial: BlobTypeDef,
    ValidTo: NotRequired[TimestampTypeDef],
    ExpirationModel: NotRequired[ExpirationModelTypeType],  # (1)
  1. See ExpirationModelTypeType

ListKeysResponseTypeDef#

# ListKeysResponseTypeDef definition

class ListKeysResponseTypeDef(TypedDict):
    Keys: List[KeyListEntryTypeDef],  # (1)
    NextMarker: str,
    Truncated: bool,
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See KeyListEntryTypeDef
  2. See ResponseMetadataTypeDef

ListKeyRotationsResponseTypeDef#

# ListKeyRotationsResponseTypeDef definition

class ListKeyRotationsResponseTypeDef(TypedDict):
    Rotations: List[RotationsListEntryTypeDef],  # (1)
    NextMarker: str,
    Truncated: bool,
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See RotationsListEntryTypeDef
  2. See ResponseMetadataTypeDef

MultiRegionConfigurationTypeDef#

# MultiRegionConfigurationTypeDef definition

class MultiRegionConfigurationTypeDef(TypedDict):
    MultiRegionKeyType: NotRequired[MultiRegionKeyTypeType],  # (1)
    PrimaryKey: NotRequired[MultiRegionKeyTypeDef],  # (2)
    ReplicaKeys: NotRequired[List[MultiRegionKeyTypeDef]],  # (3)
  1. See MultiRegionKeyTypeType
  2. See MultiRegionKeyTypeDef
  3. See MultiRegionKeyTypeDef

DecryptRequestRequestTypeDef#

# DecryptRequestRequestTypeDef definition

class DecryptRequestRequestTypeDef(TypedDict):
    CiphertextBlob: BlobTypeDef,
    EncryptionContext: NotRequired[Mapping[str, str]],
    GrantTokens: NotRequired[Sequence[str]],
    KeyId: NotRequired[str],
    EncryptionAlgorithm: NotRequired[EncryptionAlgorithmSpecType],  # (1)
    Recipient: NotRequired[RecipientInfoTypeDef],  # (2)
    DryRun: NotRequired[bool],
  1. See EncryptionAlgorithmSpecType
  2. See RecipientInfoTypeDef

DeriveSharedSecretRequestRequestTypeDef#

# DeriveSharedSecretRequestRequestTypeDef definition

class DeriveSharedSecretRequestRequestTypeDef(TypedDict):
    KeyId: str,
    KeyAgreementAlgorithm: KeyAgreementAlgorithmSpecType,  # (1)
    PublicKey: BlobTypeDef,
    GrantTokens: NotRequired[Sequence[str]],
    DryRun: NotRequired[bool],
    Recipient: NotRequired[RecipientInfoTypeDef],  # (2)
  1. See KeyAgreementAlgorithmSpecType
  2. See RecipientInfoTypeDef

GenerateDataKeyPairRequestRequestTypeDef#

# GenerateDataKeyPairRequestRequestTypeDef definition

class GenerateDataKeyPairRequestRequestTypeDef(TypedDict):
    KeyId: str,
    KeyPairSpec: DataKeyPairSpecType,  # (1)
    EncryptionContext: NotRequired[Mapping[str, str]],
    GrantTokens: NotRequired[Sequence[str]],
    Recipient: NotRequired[RecipientInfoTypeDef],  # (2)
    DryRun: NotRequired[bool],
  1. See DataKeyPairSpecType
  2. See RecipientInfoTypeDef

GenerateDataKeyRequestRequestTypeDef#

# GenerateDataKeyRequestRequestTypeDef definition

class GenerateDataKeyRequestRequestTypeDef(TypedDict):
    KeyId: str,
    EncryptionContext: NotRequired[Mapping[str, str]],
    NumberOfBytes: NotRequired[int],
    KeySpec: NotRequired[DataKeySpecType],  # (1)
    GrantTokens: NotRequired[Sequence[str]],
    Recipient: NotRequired[RecipientInfoTypeDef],  # (2)
    DryRun: NotRequired[bool],
  1. See DataKeySpecType
  2. See RecipientInfoTypeDef

GenerateRandomRequestRequestTypeDef#

# GenerateRandomRequestRequestTypeDef definition

class GenerateRandomRequestRequestTypeDef(TypedDict):
    NumberOfBytes: NotRequired[int],
    CustomKeyStoreId: NotRequired[str],
    Recipient: NotRequired[RecipientInfoTypeDef],  # (1)
  1. See RecipientInfoTypeDef

DescribeCustomKeyStoresResponseTypeDef#

# DescribeCustomKeyStoresResponseTypeDef definition

class DescribeCustomKeyStoresResponseTypeDef(TypedDict):
    CustomKeyStores: List[CustomKeyStoresListEntryTypeDef],  # (1)
    NextMarker: str,
    Truncated: bool,
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See CustomKeyStoresListEntryTypeDef
  2. See ResponseMetadataTypeDef

ListGrantsResponseTypeDef#

# ListGrantsResponseTypeDef definition

class ListGrantsResponseTypeDef(TypedDict):
    Grants: List[GrantListEntryTypeDef],  # (1)
    NextMarker: str,
    Truncated: bool,
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See GrantListEntryTypeDef
  2. See ResponseMetadataTypeDef

KeyMetadataTypeDef#

# KeyMetadataTypeDef definition

class KeyMetadataTypeDef(TypedDict):
    KeyId: str,
    AWSAccountId: NotRequired[str],
    Arn: NotRequired[str],
    CreationDate: NotRequired[datetime],
    Enabled: NotRequired[bool],
    Description: NotRequired[str],
    KeyUsage: NotRequired[KeyUsageTypeType],  # (1)
    KeyState: NotRequired[KeyStateType],  # (2)
    DeletionDate: NotRequired[datetime],
    ValidTo: NotRequired[datetime],
    Origin: NotRequired[OriginTypeType],  # (3)
    CustomKeyStoreId: NotRequired[str],
    CloudHsmClusterId: NotRequired[str],
    ExpirationModel: NotRequired[ExpirationModelTypeType],  # (4)
    KeyManager: NotRequired[KeyManagerTypeType],  # (5)
    CustomerMasterKeySpec: NotRequired[CustomerMasterKeySpecType],  # (6)
    KeySpec: NotRequired[KeySpecType],  # (7)
    EncryptionAlgorithms: NotRequired[List[EncryptionAlgorithmSpecType]],  # (8)
    SigningAlgorithms: NotRequired[List[SigningAlgorithmSpecType]],  # (9)
    KeyAgreementAlgorithms: NotRequired[List[KeyAgreementAlgorithmSpecType]],  # (10)
    MultiRegion: NotRequired[bool],
    MultiRegionConfiguration: NotRequired[MultiRegionConfigurationTypeDef],  # (11)
    PendingDeletionWindowInDays: NotRequired[int],
    MacAlgorithms: NotRequired[List[MacAlgorithmSpecType]],  # (12)
    XksKeyConfiguration: NotRequired[XksKeyConfigurationTypeTypeDef],  # (13)
  1. See KeyUsageTypeType
  2. See KeyStateType
  3. See OriginTypeType
  4. See ExpirationModelTypeType
  5. See KeyManagerTypeType
  6. See CustomerMasterKeySpecType
  7. See KeySpecType
  8. See EncryptionAlgorithmSpecType
  9. See SigningAlgorithmSpecType
  10. See KeyAgreementAlgorithmSpecType
  11. See MultiRegionConfigurationTypeDef
  12. See MacAlgorithmSpecType
  13. See XksKeyConfigurationTypeTypeDef

CreateKeyResponseTypeDef#

# CreateKeyResponseTypeDef definition

class CreateKeyResponseTypeDef(TypedDict):
    KeyMetadata: KeyMetadataTypeDef,  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See KeyMetadataTypeDef
  2. See ResponseMetadataTypeDef

DescribeKeyResponseTypeDef#

# DescribeKeyResponseTypeDef definition

class DescribeKeyResponseTypeDef(TypedDict):
    KeyMetadata: KeyMetadataTypeDef,  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See KeyMetadataTypeDef
  2. See ResponseMetadataTypeDef

ReplicateKeyResponseTypeDef#

# ReplicateKeyResponseTypeDef definition

class ReplicateKeyResponseTypeDef(TypedDict):
    ReplicaKeyMetadata: KeyMetadataTypeDef,  # (1)
    ReplicaPolicy: str,
    ReplicaTags: List[TagTypeDef],  # (2)
    ResponseMetadata: ResponseMetadataTypeDef,  # (3)
  1. See KeyMetadataTypeDef
  2. See TagTypeDef
  3. See ResponseMetadataTypeDef