Skip to content

Typed dictionaries#

Index > KMS > Typed dictionaries

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

AliasListEntryTypeDef#

# AliasListEntryTypeDef usage example

from mypy_boto3_kms.type_defs import AliasListEntryTypeDef

def get_value() -> AliasListEntryTypeDef:
    return {
        "AliasName": ...,
    }
# AliasListEntryTypeDef definition

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

CancelKeyDeletionRequestRequestTypeDef#

# CancelKeyDeletionRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import CancelKeyDeletionRequestRequestTypeDef

def get_value() -> CancelKeyDeletionRequestRequestTypeDef:
    return {
        "KeyId": ...,
    }
# CancelKeyDeletionRequestRequestTypeDef definition

class CancelKeyDeletionRequestRequestTypeDef(TypedDict):
    KeyId: str,

CancelKeyDeletionResponseTypeDef#

# CancelKeyDeletionResponseTypeDef usage example

from mypy_boto3_kms.type_defs import CancelKeyDeletionResponseTypeDef

def get_value() -> CancelKeyDeletionResponseTypeDef:
    return {
        "KeyId": ...,
        "ResponseMetadata": ...,
    }
# CancelKeyDeletionResponseTypeDef definition

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

ConnectCustomKeyStoreRequestRequestTypeDef#

# ConnectCustomKeyStoreRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import ConnectCustomKeyStoreRequestRequestTypeDef

def get_value() -> ConnectCustomKeyStoreRequestRequestTypeDef:
    return {
        "CustomKeyStoreId": ...,
    }
# ConnectCustomKeyStoreRequestRequestTypeDef definition

class ConnectCustomKeyStoreRequestRequestTypeDef(TypedDict):
    CustomKeyStoreId: str,

CreateAliasRequestRequestTypeDef#

# CreateAliasRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import CreateAliasRequestRequestTypeDef

def get_value() -> CreateAliasRequestRequestTypeDef:
    return {
        "AliasName": ...,
        "TargetKeyId": ...,
    }
# CreateAliasRequestRequestTypeDef definition

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

XksProxyAuthenticationCredentialTypeTypeDef#

# XksProxyAuthenticationCredentialTypeTypeDef usage example

from mypy_boto3_kms.type_defs import XksProxyAuthenticationCredentialTypeTypeDef

def get_value() -> XksProxyAuthenticationCredentialTypeTypeDef:
    return {
        "AccessKeyId": ...,
        "RawSecretAccessKey": ...,
    }
# XksProxyAuthenticationCredentialTypeTypeDef definition

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

CreateCustomKeyStoreResponseTypeDef#

# CreateCustomKeyStoreResponseTypeDef usage example

from mypy_boto3_kms.type_defs import CreateCustomKeyStoreResponseTypeDef

def get_value() -> CreateCustomKeyStoreResponseTypeDef:
    return {
        "CustomKeyStoreId": ...,
        "ResponseMetadata": ...,
    }
# CreateCustomKeyStoreResponseTypeDef definition

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

GrantConstraintsTypeDef#

# GrantConstraintsTypeDef usage example

from mypy_boto3_kms.type_defs import GrantConstraintsTypeDef

def get_value() -> GrantConstraintsTypeDef:
    return {
        "EncryptionContextSubset": ...,
    }
# GrantConstraintsTypeDef definition

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

CreateGrantResponseTypeDef#

# CreateGrantResponseTypeDef usage example

from mypy_boto3_kms.type_defs import CreateGrantResponseTypeDef

def get_value() -> CreateGrantResponseTypeDef:
    return {
        "GrantToken": ...,
        "GrantId": ...,
        "ResponseMetadata": ...,
    }
# CreateGrantResponseTypeDef definition

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

TagTypeDef#

# TagTypeDef usage example

from mypy_boto3_kms.type_defs import TagTypeDef

def get_value() -> TagTypeDef:
    return {
        "TagKey": ...,
        "TagValue": ...,
    }
# TagTypeDef definition

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

XksProxyConfigurationTypeTypeDef#

# XksProxyConfigurationTypeTypeDef usage example

from mypy_boto3_kms.type_defs import XksProxyConfigurationTypeTypeDef

def get_value() -> XksProxyConfigurationTypeTypeDef:
    return {
        "Connectivity": ...,
    }
# XksProxyConfigurationTypeTypeDef definition

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

RecipientInfoTypeDef#

# RecipientInfoTypeDef usage example

from mypy_boto3_kms.type_defs import RecipientInfoTypeDef

def get_value() -> RecipientInfoTypeDef:
    return {
        "KeyEncryptionAlgorithm": ...,
    }
# RecipientInfoTypeDef definition

class RecipientInfoTypeDef(TypedDict):
    KeyEncryptionAlgorithm: NotRequired[KeyEncryptionMechanismType],  # (1)
    AttestationDocument: NotRequired[Union[str, bytes, IO[Any], StreamingBody]],
  1. See KeyEncryptionMechanismType

DecryptResponseTypeDef#

# DecryptResponseTypeDef usage example

from mypy_boto3_kms.type_defs import DecryptResponseTypeDef

def get_value() -> DecryptResponseTypeDef:
    return {
        "KeyId": ...,
        "Plaintext": ...,
        "EncryptionAlgorithm": ...,
        "CiphertextForRecipient": ...,
        "ResponseMetadata": ...,
    }
# DecryptResponseTypeDef definition

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

DeleteAliasRequestRequestTypeDef#

# DeleteAliasRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import DeleteAliasRequestRequestTypeDef

def get_value() -> DeleteAliasRequestRequestTypeDef:
    return {
        "AliasName": ...,
    }
# DeleteAliasRequestRequestTypeDef definition

class DeleteAliasRequestRequestTypeDef(TypedDict):
    AliasName: str,

DeleteCustomKeyStoreRequestRequestTypeDef#

# DeleteCustomKeyStoreRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import DeleteCustomKeyStoreRequestRequestTypeDef

def get_value() -> DeleteCustomKeyStoreRequestRequestTypeDef:
    return {
        "CustomKeyStoreId": ...,
    }
# DeleteCustomKeyStoreRequestRequestTypeDef definition

class DeleteCustomKeyStoreRequestRequestTypeDef(TypedDict):
    CustomKeyStoreId: str,

DeleteImportedKeyMaterialRequestRequestTypeDef#

# DeleteImportedKeyMaterialRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import DeleteImportedKeyMaterialRequestRequestTypeDef

def get_value() -> DeleteImportedKeyMaterialRequestRequestTypeDef:
    return {
        "KeyId": ...,
    }
# DeleteImportedKeyMaterialRequestRequestTypeDef definition

class DeleteImportedKeyMaterialRequestRequestTypeDef(TypedDict):
    KeyId: str,

DescribeCustomKeyStoresRequestDescribeCustomKeyStoresPaginateTypeDef#

# DescribeCustomKeyStoresRequestDescribeCustomKeyStoresPaginateTypeDef usage example

from mypy_boto3_kms.type_defs import DescribeCustomKeyStoresRequestDescribeCustomKeyStoresPaginateTypeDef

def get_value() -> DescribeCustomKeyStoresRequestDescribeCustomKeyStoresPaginateTypeDef:
    return {
        "CustomKeyStoreId": ...,
    }
# DescribeCustomKeyStoresRequestDescribeCustomKeyStoresPaginateTypeDef definition

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

DescribeCustomKeyStoresRequestRequestTypeDef#

# DescribeCustomKeyStoresRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import DescribeCustomKeyStoresRequestRequestTypeDef

def get_value() -> DescribeCustomKeyStoresRequestRequestTypeDef:
    return {
        "CustomKeyStoreId": ...,
    }
# DescribeCustomKeyStoresRequestRequestTypeDef definition

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

DescribeKeyRequestRequestTypeDef#

# DescribeKeyRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import DescribeKeyRequestRequestTypeDef

def get_value() -> DescribeKeyRequestRequestTypeDef:
    return {
        "KeyId": ...,
    }
# DescribeKeyRequestRequestTypeDef definition

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

DisableKeyRequestRequestTypeDef#

# DisableKeyRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import DisableKeyRequestRequestTypeDef

def get_value() -> DisableKeyRequestRequestTypeDef:
    return {
        "KeyId": ...,
    }
# DisableKeyRequestRequestTypeDef definition

class DisableKeyRequestRequestTypeDef(TypedDict):
    KeyId: str,

DisableKeyRotationRequestRequestTypeDef#

# DisableKeyRotationRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import DisableKeyRotationRequestRequestTypeDef

def get_value() -> DisableKeyRotationRequestRequestTypeDef:
    return {
        "KeyId": ...,
    }
# DisableKeyRotationRequestRequestTypeDef definition

class DisableKeyRotationRequestRequestTypeDef(TypedDict):
    KeyId: str,

DisconnectCustomKeyStoreRequestRequestTypeDef#

# DisconnectCustomKeyStoreRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import DisconnectCustomKeyStoreRequestRequestTypeDef

def get_value() -> DisconnectCustomKeyStoreRequestRequestTypeDef:
    return {
        "CustomKeyStoreId": ...,
    }
# DisconnectCustomKeyStoreRequestRequestTypeDef definition

class DisconnectCustomKeyStoreRequestRequestTypeDef(TypedDict):
    CustomKeyStoreId: str,

EmptyResponseMetadataTypeDef#

# EmptyResponseMetadataTypeDef usage example

from mypy_boto3_kms.type_defs import EmptyResponseMetadataTypeDef

def get_value() -> EmptyResponseMetadataTypeDef:
    return {
        "ResponseMetadata": ...,
    }
# EmptyResponseMetadataTypeDef definition

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

EnableKeyRequestRequestTypeDef#

# EnableKeyRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import EnableKeyRequestRequestTypeDef

def get_value() -> EnableKeyRequestRequestTypeDef:
    return {
        "KeyId": ...,
    }
# EnableKeyRequestRequestTypeDef definition

class EnableKeyRequestRequestTypeDef(TypedDict):
    KeyId: str,

EnableKeyRotationRequestRequestTypeDef#

# EnableKeyRotationRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import EnableKeyRotationRequestRequestTypeDef

def get_value() -> EnableKeyRotationRequestRequestTypeDef:
    return {
        "KeyId": ...,
    }
# EnableKeyRotationRequestRequestTypeDef definition

class EnableKeyRotationRequestRequestTypeDef(TypedDict):
    KeyId: str,

EncryptRequestRequestTypeDef#

# EncryptRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import EncryptRequestRequestTypeDef

def get_value() -> EncryptRequestRequestTypeDef:
    return {
        "KeyId": ...,
        "Plaintext": ...,
    }
# EncryptRequestRequestTypeDef definition

class EncryptRequestRequestTypeDef(TypedDict):
    KeyId: str,
    Plaintext: Union[str, bytes, IO[Any], StreamingBody],
    EncryptionContext: NotRequired[Mapping[str, str]],
    GrantTokens: NotRequired[Sequence[str]],
    EncryptionAlgorithm: NotRequired[EncryptionAlgorithmSpecType],  # (1)
  1. See EncryptionAlgorithmSpecType

EncryptResponseTypeDef#

# EncryptResponseTypeDef usage example

from mypy_boto3_kms.type_defs import EncryptResponseTypeDef

def get_value() -> EncryptResponseTypeDef:
    return {
        "CiphertextBlob": ...,
        "KeyId": ...,
        "EncryptionAlgorithm": ...,
        "ResponseMetadata": ...,
    }
# EncryptResponseTypeDef definition

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

GenerateDataKeyPairResponseTypeDef#

# GenerateDataKeyPairResponseTypeDef usage example

from mypy_boto3_kms.type_defs import GenerateDataKeyPairResponseTypeDef

def get_value() -> GenerateDataKeyPairResponseTypeDef:
    return {
        "PrivateKeyCiphertextBlob": ...,
        "PrivateKeyPlaintext": ...,
        "PublicKey": ...,
        "KeyId": ...,
        "KeyPairSpec": ...,
        "CiphertextForRecipient": ...,
        "ResponseMetadata": ...,
    }
# 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

GenerateDataKeyPairWithoutPlaintextRequestRequestTypeDef#

# GenerateDataKeyPairWithoutPlaintextRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import GenerateDataKeyPairWithoutPlaintextRequestRequestTypeDef

def get_value() -> GenerateDataKeyPairWithoutPlaintextRequestRequestTypeDef:
    return {
        "KeyId": ...,
        "KeyPairSpec": ...,
    }
# GenerateDataKeyPairWithoutPlaintextRequestRequestTypeDef definition

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

GenerateDataKeyPairWithoutPlaintextResponseTypeDef#

# GenerateDataKeyPairWithoutPlaintextResponseTypeDef usage example

from mypy_boto3_kms.type_defs import GenerateDataKeyPairWithoutPlaintextResponseTypeDef

def get_value() -> GenerateDataKeyPairWithoutPlaintextResponseTypeDef:
    return {
        "PrivateKeyCiphertextBlob": ...,
        "PublicKey": ...,
        "KeyId": ...,
        "KeyPairSpec": ...,
        "ResponseMetadata": ...,
    }
# 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 usage example

from mypy_boto3_kms.type_defs import GenerateDataKeyResponseTypeDef

def get_value() -> GenerateDataKeyResponseTypeDef:
    return {
        "CiphertextBlob": ...,
        "Plaintext": ...,
        "KeyId": ...,
        "CiphertextForRecipient": ...,
        "ResponseMetadata": ...,
    }
# GenerateDataKeyResponseTypeDef definition

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

GenerateDataKeyWithoutPlaintextRequestRequestTypeDef#

# GenerateDataKeyWithoutPlaintextRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import GenerateDataKeyWithoutPlaintextRequestRequestTypeDef

def get_value() -> GenerateDataKeyWithoutPlaintextRequestRequestTypeDef:
    return {
        "KeyId": ...,
    }
# GenerateDataKeyWithoutPlaintextRequestRequestTypeDef definition

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

GenerateDataKeyWithoutPlaintextResponseTypeDef#

# GenerateDataKeyWithoutPlaintextResponseTypeDef usage example

from mypy_boto3_kms.type_defs import GenerateDataKeyWithoutPlaintextResponseTypeDef

def get_value() -> GenerateDataKeyWithoutPlaintextResponseTypeDef:
    return {
        "CiphertextBlob": ...,
        "KeyId": ...,
        "ResponseMetadata": ...,
    }
# GenerateDataKeyWithoutPlaintextResponseTypeDef definition

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

GenerateMacRequestRequestTypeDef#

# GenerateMacRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import GenerateMacRequestRequestTypeDef

def get_value() -> GenerateMacRequestRequestTypeDef:
    return {
        "Message": ...,
        "KeyId": ...,
        "MacAlgorithm": ...,
    }
# GenerateMacRequestRequestTypeDef definition

class GenerateMacRequestRequestTypeDef(TypedDict):
    Message: Union[str, bytes, IO[Any], StreamingBody],
    KeyId: str,
    MacAlgorithm: MacAlgorithmSpecType,  # (1)
    GrantTokens: NotRequired[Sequence[str]],
  1. See MacAlgorithmSpecType

GenerateMacResponseTypeDef#

# GenerateMacResponseTypeDef usage example

from mypy_boto3_kms.type_defs import GenerateMacResponseTypeDef

def get_value() -> GenerateMacResponseTypeDef:
    return {
        "Mac": ...,
        "MacAlgorithm": ...,
        "KeyId": ...,
        "ResponseMetadata": ...,
    }
# GenerateMacResponseTypeDef definition

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

GenerateRandomResponseTypeDef#

# GenerateRandomResponseTypeDef usage example

from mypy_boto3_kms.type_defs import GenerateRandomResponseTypeDef

def get_value() -> GenerateRandomResponseTypeDef:
    return {
        "Plaintext": ...,
        "CiphertextForRecipient": ...,
        "ResponseMetadata": ...,
    }
# GenerateRandomResponseTypeDef definition

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

GetKeyPolicyRequestRequestTypeDef#

# GetKeyPolicyRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import GetKeyPolicyRequestRequestTypeDef

def get_value() -> GetKeyPolicyRequestRequestTypeDef:
    return {
        "KeyId": ...,
        "PolicyName": ...,
    }
# GetKeyPolicyRequestRequestTypeDef definition

class GetKeyPolicyRequestRequestTypeDef(TypedDict):
    KeyId: str,
    PolicyName: str,

GetKeyPolicyResponseTypeDef#

# GetKeyPolicyResponseTypeDef usage example

from mypy_boto3_kms.type_defs import GetKeyPolicyResponseTypeDef

def get_value() -> GetKeyPolicyResponseTypeDef:
    return {
        "Policy": ...,
        "ResponseMetadata": ...,
    }
# GetKeyPolicyResponseTypeDef definition

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

GetKeyRotationStatusRequestRequestTypeDef#

# GetKeyRotationStatusRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import GetKeyRotationStatusRequestRequestTypeDef

def get_value() -> GetKeyRotationStatusRequestRequestTypeDef:
    return {
        "KeyId": ...,
    }
# GetKeyRotationStatusRequestRequestTypeDef definition

class GetKeyRotationStatusRequestRequestTypeDef(TypedDict):
    KeyId: str,

GetKeyRotationStatusResponseTypeDef#

# GetKeyRotationStatusResponseTypeDef usage example

from mypy_boto3_kms.type_defs import GetKeyRotationStatusResponseTypeDef

def get_value() -> GetKeyRotationStatusResponseTypeDef:
    return {
        "KeyRotationEnabled": ...,
        "ResponseMetadata": ...,
    }
# GetKeyRotationStatusResponseTypeDef definition

class GetKeyRotationStatusResponseTypeDef(TypedDict):
    KeyRotationEnabled: bool,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

GetParametersForImportRequestRequestTypeDef#

# GetParametersForImportRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import GetParametersForImportRequestRequestTypeDef

def get_value() -> GetParametersForImportRequestRequestTypeDef:
    return {
        "KeyId": ...,
        "WrappingAlgorithm": ...,
        "WrappingKeySpec": ...,
    }
# GetParametersForImportRequestRequestTypeDef definition

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

GetParametersForImportResponseTypeDef#

# GetParametersForImportResponseTypeDef usage example

from mypy_boto3_kms.type_defs import GetParametersForImportResponseTypeDef

def get_value() -> GetParametersForImportResponseTypeDef:
    return {
        "KeyId": ...,
        "ImportToken": ...,
        "PublicKey": ...,
        "ParametersValidTo": ...,
        "ResponseMetadata": ...,
    }
# GetParametersForImportResponseTypeDef definition

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

GetPublicKeyRequestRequestTypeDef#

# GetPublicKeyRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import GetPublicKeyRequestRequestTypeDef

def get_value() -> GetPublicKeyRequestRequestTypeDef:
    return {
        "KeyId": ...,
    }
# GetPublicKeyRequestRequestTypeDef definition

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

GetPublicKeyResponseTypeDef#

# GetPublicKeyResponseTypeDef usage example

from mypy_boto3_kms.type_defs import GetPublicKeyResponseTypeDef

def get_value() -> GetPublicKeyResponseTypeDef:
    return {
        "KeyId": ...,
        "PublicKey": ...,
        "CustomerMasterKeySpec": ...,
        "KeySpec": ...,
        "KeyUsage": ...,
        "EncryptionAlgorithms": ...,
        "SigningAlgorithms": ...,
        "ResponseMetadata": ...,
    }
# 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)
    ResponseMetadata: ResponseMetadataTypeDef,  # (6)
  1. See CustomerMasterKeySpecType
  2. See KeySpecType
  3. See KeyUsageTypeType
  4. See EncryptionAlgorithmSpecType
  5. See SigningAlgorithmSpecType
  6. See ResponseMetadataTypeDef

ImportKeyMaterialRequestRequestTypeDef#

# ImportKeyMaterialRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import ImportKeyMaterialRequestRequestTypeDef

def get_value() -> ImportKeyMaterialRequestRequestTypeDef:
    return {
        "KeyId": ...,
        "ImportToken": ...,
        "EncryptedKeyMaterial": ...,
    }
# ImportKeyMaterialRequestRequestTypeDef definition

class ImportKeyMaterialRequestRequestTypeDef(TypedDict):
    KeyId: str,
    ImportToken: Union[str, bytes, IO[Any], StreamingBody],
    EncryptedKeyMaterial: Union[str, bytes, IO[Any], StreamingBody],
    ValidTo: NotRequired[Union[datetime, str]],
    ExpirationModel: NotRequired[ExpirationModelTypeType],  # (1)
  1. See ExpirationModelTypeType

KeyListEntryTypeDef#

# KeyListEntryTypeDef usage example

from mypy_boto3_kms.type_defs import KeyListEntryTypeDef

def get_value() -> KeyListEntryTypeDef:
    return {
        "KeyId": ...,
    }
# KeyListEntryTypeDef definition

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

XksKeyConfigurationTypeTypeDef#

# XksKeyConfigurationTypeTypeDef usage example

from mypy_boto3_kms.type_defs import XksKeyConfigurationTypeTypeDef

def get_value() -> XksKeyConfigurationTypeTypeDef:
    return {
        "Id": ...,
    }
# XksKeyConfigurationTypeTypeDef definition

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

ListAliasesRequestListAliasesPaginateTypeDef#

# ListAliasesRequestListAliasesPaginateTypeDef usage example

from mypy_boto3_kms.type_defs import ListAliasesRequestListAliasesPaginateTypeDef

def get_value() -> ListAliasesRequestListAliasesPaginateTypeDef:
    return {
        "KeyId": ...,
    }
# ListAliasesRequestListAliasesPaginateTypeDef definition

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

ListAliasesRequestRequestTypeDef#

# ListAliasesRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import ListAliasesRequestRequestTypeDef

def get_value() -> ListAliasesRequestRequestTypeDef:
    return {
        "KeyId": ...,
    }
# ListAliasesRequestRequestTypeDef definition

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

ListGrantsRequestListGrantsPaginateTypeDef#

# ListGrantsRequestListGrantsPaginateTypeDef usage example

from mypy_boto3_kms.type_defs import ListGrantsRequestListGrantsPaginateTypeDef

def get_value() -> ListGrantsRequestListGrantsPaginateTypeDef:
    return {
        "KeyId": ...,
    }
# ListGrantsRequestListGrantsPaginateTypeDef definition

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

ListGrantsRequestRequestTypeDef#

# ListGrantsRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import ListGrantsRequestRequestTypeDef

def get_value() -> ListGrantsRequestRequestTypeDef:
    return {
        "KeyId": ...,
    }
# ListGrantsRequestRequestTypeDef definition

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

ListKeyPoliciesRequestListKeyPoliciesPaginateTypeDef#

# ListKeyPoliciesRequestListKeyPoliciesPaginateTypeDef usage example

from mypy_boto3_kms.type_defs import ListKeyPoliciesRequestListKeyPoliciesPaginateTypeDef

def get_value() -> ListKeyPoliciesRequestListKeyPoliciesPaginateTypeDef:
    return {
        "KeyId": ...,
    }
# ListKeyPoliciesRequestListKeyPoliciesPaginateTypeDef definition

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

ListKeyPoliciesRequestRequestTypeDef#

# ListKeyPoliciesRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import ListKeyPoliciesRequestRequestTypeDef

def get_value() -> ListKeyPoliciesRequestRequestTypeDef:
    return {
        "KeyId": ...,
    }
# ListKeyPoliciesRequestRequestTypeDef definition

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

ListKeyPoliciesResponseTypeDef#

# ListKeyPoliciesResponseTypeDef usage example

from mypy_boto3_kms.type_defs import ListKeyPoliciesResponseTypeDef

def get_value() -> ListKeyPoliciesResponseTypeDef:
    return {
        "PolicyNames": ...,
        "NextMarker": ...,
        "Truncated": ...,
        "ResponseMetadata": ...,
    }
# ListKeyPoliciesResponseTypeDef definition

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

ListKeysRequestListKeysPaginateTypeDef#

# ListKeysRequestListKeysPaginateTypeDef usage example

from mypy_boto3_kms.type_defs import ListKeysRequestListKeysPaginateTypeDef

def get_value() -> ListKeysRequestListKeysPaginateTypeDef:
    return {
        "PaginationConfig": ...,
    }
# ListKeysRequestListKeysPaginateTypeDef definition

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

ListKeysRequestRequestTypeDef#

# ListKeysRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import ListKeysRequestRequestTypeDef

def get_value() -> ListKeysRequestRequestTypeDef:
    return {
        "Limit": ...,
    }
# ListKeysRequestRequestTypeDef definition

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

ListResourceTagsRequestListResourceTagsPaginateTypeDef#

# ListResourceTagsRequestListResourceTagsPaginateTypeDef usage example

from mypy_boto3_kms.type_defs import ListResourceTagsRequestListResourceTagsPaginateTypeDef

def get_value() -> ListResourceTagsRequestListResourceTagsPaginateTypeDef:
    return {
        "KeyId": ...,
    }
# ListResourceTagsRequestListResourceTagsPaginateTypeDef definition

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

ListResourceTagsRequestRequestTypeDef#

# ListResourceTagsRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import ListResourceTagsRequestRequestTypeDef

def get_value() -> ListResourceTagsRequestRequestTypeDef:
    return {
        "KeyId": ...,
    }
# ListResourceTagsRequestRequestTypeDef definition

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

ListRetirableGrantsRequestListRetirableGrantsPaginateTypeDef#

# ListRetirableGrantsRequestListRetirableGrantsPaginateTypeDef usage example

from mypy_boto3_kms.type_defs import ListRetirableGrantsRequestListRetirableGrantsPaginateTypeDef

def get_value() -> ListRetirableGrantsRequestListRetirableGrantsPaginateTypeDef:
    return {
        "RetiringPrincipal": ...,
    }
# ListRetirableGrantsRequestListRetirableGrantsPaginateTypeDef definition

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

ListRetirableGrantsRequestRequestTypeDef#

# ListRetirableGrantsRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import ListRetirableGrantsRequestRequestTypeDef

def get_value() -> ListRetirableGrantsRequestRequestTypeDef:
    return {
        "RetiringPrincipal": ...,
    }
# ListRetirableGrantsRequestRequestTypeDef definition

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

MultiRegionKeyTypeDef#

# MultiRegionKeyTypeDef usage example

from mypy_boto3_kms.type_defs import MultiRegionKeyTypeDef

def get_value() -> MultiRegionKeyTypeDef:
    return {
        "Arn": ...,
    }
# MultiRegionKeyTypeDef definition

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

PaginatorConfigTypeDef#

# PaginatorConfigTypeDef usage example

from mypy_boto3_kms.type_defs import PaginatorConfigTypeDef

def get_value() -> PaginatorConfigTypeDef:
    return {
        "MaxItems": ...,
    }
# PaginatorConfigTypeDef definition

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

PutKeyPolicyRequestRequestTypeDef#

# PutKeyPolicyRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import PutKeyPolicyRequestRequestTypeDef

def get_value() -> PutKeyPolicyRequestRequestTypeDef:
    return {
        "KeyId": ...,
        "PolicyName": ...,
        "Policy": ...,
    }
# PutKeyPolicyRequestRequestTypeDef definition

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

ReEncryptRequestRequestTypeDef#

# ReEncryptRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import ReEncryptRequestRequestTypeDef

def get_value() -> ReEncryptRequestRequestTypeDef:
    return {
        "CiphertextBlob": ...,
        "DestinationKeyId": ...,
    }
# ReEncryptRequestRequestTypeDef definition

class ReEncryptRequestRequestTypeDef(TypedDict):
    CiphertextBlob: Union[str, bytes, IO[Any], StreamingBody],
    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]],
  1. See EncryptionAlgorithmSpecType
  2. See EncryptionAlgorithmSpecType

ReEncryptResponseTypeDef#

# ReEncryptResponseTypeDef usage example

from mypy_boto3_kms.type_defs import ReEncryptResponseTypeDef

def get_value() -> ReEncryptResponseTypeDef:
    return {
        "CiphertextBlob": ...,
        "SourceKeyId": ...,
        "KeyId": ...,
        "SourceEncryptionAlgorithm": ...,
        "DestinationEncryptionAlgorithm": ...,
        "ResponseMetadata": ...,
    }
# 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

ResponseMetadataTypeDef#

# ResponseMetadataTypeDef usage example

from mypy_boto3_kms.type_defs import ResponseMetadataTypeDef

def get_value() -> ResponseMetadataTypeDef:
    return {
        "RequestId": ...,
        "HostId": ...,
        "HTTPStatusCode": ...,
        "HTTPHeaders": ...,
        "RetryAttempts": ...,
    }
# ResponseMetadataTypeDef definition

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

RetireGrantRequestRequestTypeDef#

# RetireGrantRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import RetireGrantRequestRequestTypeDef

def get_value() -> RetireGrantRequestRequestTypeDef:
    return {
        "GrantToken": ...,
    }
# RetireGrantRequestRequestTypeDef definition

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

RevokeGrantRequestRequestTypeDef#

# RevokeGrantRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import RevokeGrantRequestRequestTypeDef

def get_value() -> RevokeGrantRequestRequestTypeDef:
    return {
        "KeyId": ...,
        "GrantId": ...,
    }
# RevokeGrantRequestRequestTypeDef definition

class RevokeGrantRequestRequestTypeDef(TypedDict):
    KeyId: str,
    GrantId: str,

ScheduleKeyDeletionRequestRequestTypeDef#

# ScheduleKeyDeletionRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import ScheduleKeyDeletionRequestRequestTypeDef

def get_value() -> ScheduleKeyDeletionRequestRequestTypeDef:
    return {
        "KeyId": ...,
    }
# ScheduleKeyDeletionRequestRequestTypeDef definition

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

ScheduleKeyDeletionResponseTypeDef#

# ScheduleKeyDeletionResponseTypeDef usage example

from mypy_boto3_kms.type_defs import ScheduleKeyDeletionResponseTypeDef

def get_value() -> ScheduleKeyDeletionResponseTypeDef:
    return {
        "KeyId": ...,
        "DeletionDate": ...,
        "KeyState": ...,
        "PendingWindowInDays": ...,
        "ResponseMetadata": ...,
    }
# ScheduleKeyDeletionResponseTypeDef definition

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

SignRequestRequestTypeDef#

# SignRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import SignRequestRequestTypeDef

def get_value() -> SignRequestRequestTypeDef:
    return {
        "KeyId": ...,
        "Message": ...,
        "SigningAlgorithm": ...,
    }
# SignRequestRequestTypeDef definition

class SignRequestRequestTypeDef(TypedDict):
    KeyId: str,
    Message: Union[str, bytes, IO[Any], StreamingBody],
    SigningAlgorithm: SigningAlgorithmSpecType,  # (1)
    MessageType: NotRequired[MessageTypeType],  # (2)
    GrantTokens: NotRequired[Sequence[str]],
  1. See SigningAlgorithmSpecType
  2. See MessageTypeType

SignResponseTypeDef#

# SignResponseTypeDef usage example

from mypy_boto3_kms.type_defs import SignResponseTypeDef

def get_value() -> SignResponseTypeDef:
    return {
        "KeyId": ...,
        "Signature": ...,
        "SigningAlgorithm": ...,
        "ResponseMetadata": ...,
    }
# SignResponseTypeDef definition

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

UntagResourceRequestRequestTypeDef#

# UntagResourceRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import UntagResourceRequestRequestTypeDef

def get_value() -> UntagResourceRequestRequestTypeDef:
    return {
        "KeyId": ...,
        "TagKeys": ...,
    }
# UntagResourceRequestRequestTypeDef definition

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

UpdateAliasRequestRequestTypeDef#

# UpdateAliasRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import UpdateAliasRequestRequestTypeDef

def get_value() -> UpdateAliasRequestRequestTypeDef:
    return {
        "AliasName": ...,
        "TargetKeyId": ...,
    }
# UpdateAliasRequestRequestTypeDef definition

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

UpdateKeyDescriptionRequestRequestTypeDef#

# UpdateKeyDescriptionRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import UpdateKeyDescriptionRequestRequestTypeDef

def get_value() -> UpdateKeyDescriptionRequestRequestTypeDef:
    return {
        "KeyId": ...,
        "Description": ...,
    }
# UpdateKeyDescriptionRequestRequestTypeDef definition

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

UpdatePrimaryRegionRequestRequestTypeDef#

# UpdatePrimaryRegionRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import UpdatePrimaryRegionRequestRequestTypeDef

def get_value() -> UpdatePrimaryRegionRequestRequestTypeDef:
    return {
        "KeyId": ...,
        "PrimaryRegion": ...,
    }
# UpdatePrimaryRegionRequestRequestTypeDef definition

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

VerifyMacRequestRequestTypeDef#

# VerifyMacRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import VerifyMacRequestRequestTypeDef

def get_value() -> VerifyMacRequestRequestTypeDef:
    return {
        "Message": ...,
        "KeyId": ...,
        "MacAlgorithm": ...,
        "Mac": ...,
    }
# VerifyMacRequestRequestTypeDef definition

class VerifyMacRequestRequestTypeDef(TypedDict):
    Message: Union[str, bytes, IO[Any], StreamingBody],
    KeyId: str,
    MacAlgorithm: MacAlgorithmSpecType,  # (1)
    Mac: Union[str, bytes, IO[Any], StreamingBody],
    GrantTokens: NotRequired[Sequence[str]],
  1. See MacAlgorithmSpecType

VerifyMacResponseTypeDef#

# VerifyMacResponseTypeDef usage example

from mypy_boto3_kms.type_defs import VerifyMacResponseTypeDef

def get_value() -> VerifyMacResponseTypeDef:
    return {
        "KeyId": ...,
        "MacValid": ...,
        "MacAlgorithm": ...,
        "ResponseMetadata": ...,
    }
# VerifyMacResponseTypeDef definition

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

VerifyRequestRequestTypeDef#

# VerifyRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import VerifyRequestRequestTypeDef

def get_value() -> VerifyRequestRequestTypeDef:
    return {
        "KeyId": ...,
        "Message": ...,
        "Signature": ...,
        "SigningAlgorithm": ...,
    }
# VerifyRequestRequestTypeDef definition

class VerifyRequestRequestTypeDef(TypedDict):
    KeyId: str,
    Message: Union[str, bytes, IO[Any], StreamingBody],
    Signature: Union[str, bytes, IO[Any], StreamingBody],
    SigningAlgorithm: SigningAlgorithmSpecType,  # (1)
    MessageType: NotRequired[MessageTypeType],  # (2)
    GrantTokens: NotRequired[Sequence[str]],
  1. See SigningAlgorithmSpecType
  2. See MessageTypeType

VerifyResponseTypeDef#

# VerifyResponseTypeDef usage example

from mypy_boto3_kms.type_defs import VerifyResponseTypeDef

def get_value() -> VerifyResponseTypeDef:
    return {
        "KeyId": ...,
        "SignatureValid": ...,
        "SigningAlgorithm": ...,
        "ResponseMetadata": ...,
    }
# VerifyResponseTypeDef definition

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

ListAliasesResponseTypeDef#

# ListAliasesResponseTypeDef usage example

from mypy_boto3_kms.type_defs import ListAliasesResponseTypeDef

def get_value() -> ListAliasesResponseTypeDef:
    return {
        "Aliases": ...,
        "NextMarker": ...,
        "Truncated": ...,
        "ResponseMetadata": ...,
    }
# ListAliasesResponseTypeDef definition

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

CreateCustomKeyStoreRequestRequestTypeDef#

# CreateCustomKeyStoreRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import CreateCustomKeyStoreRequestRequestTypeDef

def get_value() -> CreateCustomKeyStoreRequestRequestTypeDef:
    return {
        "CustomKeyStoreName": ...,
    }
# 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 usage example

from mypy_boto3_kms.type_defs import UpdateCustomKeyStoreRequestRequestTypeDef

def get_value() -> UpdateCustomKeyStoreRequestRequestTypeDef:
    return {
        "CustomKeyStoreId": ...,
    }
# 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 usage example

from mypy_boto3_kms.type_defs import CreateGrantRequestRequestTypeDef

def get_value() -> CreateGrantRequestRequestTypeDef:
    return {
        "KeyId": ...,
        "GranteePrincipal": ...,
        "Operations": ...,
    }
# 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],
  1. See GrantOperationType
  2. See GrantConstraintsTypeDef

GrantListEntryTypeDef#

# GrantListEntryTypeDef usage example

from mypy_boto3_kms.type_defs import GrantListEntryTypeDef

def get_value() -> GrantListEntryTypeDef:
    return {
        "KeyId": ...,
    }
# 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[GrantConstraintsTypeDef],  # (2)
  1. See GrantOperationType
  2. See GrantConstraintsTypeDef

CreateKeyRequestRequestTypeDef#

# CreateKeyRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import CreateKeyRequestRequestTypeDef

def get_value() -> CreateKeyRequestRequestTypeDef:
    return {
        "Policy": ...,
    }
# 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 usage example

from mypy_boto3_kms.type_defs import ListResourceTagsResponseTypeDef

def get_value() -> ListResourceTagsResponseTypeDef:
    return {
        "Tags": ...,
        "NextMarker": ...,
        "Truncated": ...,
        "ResponseMetadata": ...,
    }
# ListResourceTagsResponseTypeDef definition

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

ReplicateKeyRequestRequestTypeDef#

# ReplicateKeyRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import ReplicateKeyRequestRequestTypeDef

def get_value() -> ReplicateKeyRequestRequestTypeDef:
    return {
        "KeyId": ...,
        "ReplicaRegion": ...,
    }
# 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 usage example

from mypy_boto3_kms.type_defs import TagResourceRequestRequestTypeDef

def get_value() -> TagResourceRequestRequestTypeDef:
    return {
        "KeyId": ...,
        "Tags": ...,
    }
# TagResourceRequestRequestTypeDef definition

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

CustomKeyStoresListEntryTypeDef#

# CustomKeyStoresListEntryTypeDef usage example

from mypy_boto3_kms.type_defs import CustomKeyStoresListEntryTypeDef

def get_value() -> CustomKeyStoresListEntryTypeDef:
    return {
        "CustomKeyStoreId": ...,
    }
# 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

DecryptRequestRequestTypeDef#

# DecryptRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import DecryptRequestRequestTypeDef

def get_value() -> DecryptRequestRequestTypeDef:
    return {
        "CiphertextBlob": ...,
    }
# DecryptRequestRequestTypeDef definition

class DecryptRequestRequestTypeDef(TypedDict):
    CiphertextBlob: Union[str, bytes, IO[Any], StreamingBody],
    EncryptionContext: NotRequired[Mapping[str, str]],
    GrantTokens: NotRequired[Sequence[str]],
    KeyId: NotRequired[str],
    EncryptionAlgorithm: NotRequired[EncryptionAlgorithmSpecType],  # (1)
    Recipient: NotRequired[RecipientInfoTypeDef],  # (2)
  1. See EncryptionAlgorithmSpecType
  2. See RecipientInfoTypeDef

GenerateDataKeyPairRequestRequestTypeDef#

# GenerateDataKeyPairRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import GenerateDataKeyPairRequestRequestTypeDef

def get_value() -> GenerateDataKeyPairRequestRequestTypeDef:
    return {
        "KeyId": ...,
        "KeyPairSpec": ...,
    }
# GenerateDataKeyPairRequestRequestTypeDef definition

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

GenerateDataKeyRequestRequestTypeDef#

# GenerateDataKeyRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import GenerateDataKeyRequestRequestTypeDef

def get_value() -> GenerateDataKeyRequestRequestTypeDef:
    return {
        "KeyId": ...,
    }
# 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)
  1. See DataKeySpecType
  2. See RecipientInfoTypeDef

GenerateRandomRequestRequestTypeDef#

# GenerateRandomRequestRequestTypeDef usage example

from mypy_boto3_kms.type_defs import GenerateRandomRequestRequestTypeDef

def get_value() -> GenerateRandomRequestRequestTypeDef:
    return {
        "NumberOfBytes": ...,
    }
# GenerateRandomRequestRequestTypeDef definition

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

ListKeysResponseTypeDef#

# ListKeysResponseTypeDef usage example

from mypy_boto3_kms.type_defs import ListKeysResponseTypeDef

def get_value() -> ListKeysResponseTypeDef:
    return {
        "Keys": ...,
        "NextMarker": ...,
        "Truncated": ...,
        "ResponseMetadata": ...,
    }
# ListKeysResponseTypeDef definition

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

MultiRegionConfigurationTypeDef#

# MultiRegionConfigurationTypeDef usage example

from mypy_boto3_kms.type_defs import MultiRegionConfigurationTypeDef

def get_value() -> MultiRegionConfigurationTypeDef:
    return {
        "MultiRegionKeyType": ...,
    }
# 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

ListGrantsResponseTypeDef#

# ListGrantsResponseTypeDef usage example

from mypy_boto3_kms.type_defs import ListGrantsResponseTypeDef

def get_value() -> ListGrantsResponseTypeDef:
    return {
        "Grants": ...,
        "NextMarker": ...,
        "Truncated": ...,
        "ResponseMetadata": ...,
    }
# ListGrantsResponseTypeDef definition

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

DescribeCustomKeyStoresResponseTypeDef#

# DescribeCustomKeyStoresResponseTypeDef usage example

from mypy_boto3_kms.type_defs import DescribeCustomKeyStoresResponseTypeDef

def get_value() -> DescribeCustomKeyStoresResponseTypeDef:
    return {
        "CustomKeyStores": ...,
        "NextMarker": ...,
        "Truncated": ...,
        "ResponseMetadata": ...,
    }
# DescribeCustomKeyStoresResponseTypeDef definition

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

KeyMetadataTypeDef#

# KeyMetadataTypeDef usage example

from mypy_boto3_kms.type_defs import KeyMetadataTypeDef

def get_value() -> KeyMetadataTypeDef:
    return {
        "KeyId": ...,
    }
# 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)
    MultiRegion: NotRequired[bool],
    MultiRegionConfiguration: NotRequired[MultiRegionConfigurationTypeDef],  # (10)
    PendingDeletionWindowInDays: NotRequired[int],
    MacAlgorithms: NotRequired[List[MacAlgorithmSpecType]],  # (11)
    XksKeyConfiguration: NotRequired[XksKeyConfigurationTypeTypeDef],  # (12)
  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 MultiRegionConfigurationTypeDef
  11. See MacAlgorithmSpecType
  12. See XksKeyConfigurationTypeTypeDef

CreateKeyResponseTypeDef#

# CreateKeyResponseTypeDef usage example

from mypy_boto3_kms.type_defs import CreateKeyResponseTypeDef

def get_value() -> CreateKeyResponseTypeDef:
    return {
        "KeyMetadata": ...,
        "ResponseMetadata": ...,
    }
# CreateKeyResponseTypeDef definition

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

DescribeKeyResponseTypeDef#

# DescribeKeyResponseTypeDef usage example

from mypy_boto3_kms.type_defs import DescribeKeyResponseTypeDef

def get_value() -> DescribeKeyResponseTypeDef:
    return {
        "KeyMetadata": ...,
        "ResponseMetadata": ...,
    }
# DescribeKeyResponseTypeDef definition

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

ReplicateKeyResponseTypeDef#

# ReplicateKeyResponseTypeDef usage example

from mypy_boto3_kms.type_defs import ReplicateKeyResponseTypeDef

def get_value() -> ReplicateKeyResponseTypeDef:
    return {
        "ReplicaKeyMetadata": ...,
        "ReplicaPolicy": ...,
        "ReplicaTags": ...,
        "ResponseMetadata": ...,
    }
# 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