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,
]

GrantConstraintsUnionTypeDef#

# GrantConstraintsUnionTypeDef definition

GrantConstraintsUnionTypeDef = Union[
    GrantConstraintsTypeDef,  # (1)
    GrantConstraintsExtraOutputTypeDef,  # (2)
]
  1. See GrantConstraintsTypeDef
  2. See GrantConstraintsExtraOutputTypeDef

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]],

GrantConstraintsExtraOutputTypeDef#

# GrantConstraintsExtraOutputTypeDef definition

class GrantConstraintsExtraOutputTypeDef(TypedDict):
    EncryptionContextSubset: NotRequired[Dict[str, str]],
    EncryptionContextEquals: NotRequired[Dict[str, 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],