Skip to content

Type definitions#

Index > SecretsManager > Type definitions

Auto-generated documentation for SecretsManager type annotations stubs module mypy-boto3-secretsmanager.

BlobTypeDef#

# BlobTypeDef definition

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

APIErrorTypeTypeDef#

# APIErrorTypeTypeDef definition

class APIErrorTypeTypeDef(TypedDict):
    SecretId: NotRequired[str],
    ErrorCode: NotRequired[str],
    Message: NotRequired[str],

FilterTypeDef#

# FilterTypeDef definition

class FilterTypeDef(TypedDict):
    Key: NotRequired[FilterNameStringTypeType],  # (1)
    Values: NotRequired[Sequence[str]],
  1. See FilterNameStringTypeType

ResponseMetadataTypeDef#

# ResponseMetadataTypeDef definition

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

SecretValueEntryTypeDef#

# SecretValueEntryTypeDef definition

class SecretValueEntryTypeDef(TypedDict):
    ARN: NotRequired[str],
    Name: NotRequired[str],
    VersionId: NotRequired[str],
    SecretBinary: NotRequired[bytes],
    SecretString: NotRequired[str],
    VersionStages: NotRequired[List[str]],
    CreatedDate: NotRequired[datetime],

CancelRotateSecretRequestRequestTypeDef#

# CancelRotateSecretRequestRequestTypeDef definition

class CancelRotateSecretRequestRequestTypeDef(TypedDict):
    SecretId: str,

ReplicaRegionTypeTypeDef#

# ReplicaRegionTypeTypeDef definition

class ReplicaRegionTypeTypeDef(TypedDict):
    Region: NotRequired[str],
    KmsKeyId: NotRequired[str],

TagTypeDef#

# TagTypeDef definition

class TagTypeDef(TypedDict):
    Key: NotRequired[str],
    Value: NotRequired[str],

ReplicationStatusTypeTypeDef#

# ReplicationStatusTypeTypeDef definition

class ReplicationStatusTypeTypeDef(TypedDict):
    Region: NotRequired[str],
    KmsKeyId: NotRequired[str],
    Status: NotRequired[StatusTypeType],  # (1)
    StatusMessage: NotRequired[str],
    LastAccessedDate: NotRequired[datetime],
  1. See StatusTypeType

DeleteResourcePolicyRequestRequestTypeDef#

# DeleteResourcePolicyRequestRequestTypeDef definition

class DeleteResourcePolicyRequestRequestTypeDef(TypedDict):
    SecretId: str,

DeleteSecretRequestRequestTypeDef#

# DeleteSecretRequestRequestTypeDef definition

class DeleteSecretRequestRequestTypeDef(TypedDict):
    SecretId: str,
    RecoveryWindowInDays: NotRequired[int],
    ForceDeleteWithoutRecovery: NotRequired[bool],

DescribeSecretRequestRequestTypeDef#

# DescribeSecretRequestRequestTypeDef definition

class DescribeSecretRequestRequestTypeDef(TypedDict):
    SecretId: str,

RotationRulesTypeTypeDef#

# RotationRulesTypeTypeDef definition

class RotationRulesTypeTypeDef(TypedDict):
    AutomaticallyAfterDays: NotRequired[int],
    Duration: NotRequired[str],
    ScheduleExpression: NotRequired[str],

GetRandomPasswordRequestRequestTypeDef#

# GetRandomPasswordRequestRequestTypeDef definition

class GetRandomPasswordRequestRequestTypeDef(TypedDict):
    PasswordLength: NotRequired[int],
    ExcludeCharacters: NotRequired[str],
    ExcludeNumbers: NotRequired[bool],
    ExcludePunctuation: NotRequired[bool],
    ExcludeUppercase: NotRequired[bool],
    ExcludeLowercase: NotRequired[bool],
    IncludeSpace: NotRequired[bool],
    RequireEachIncludedType: NotRequired[bool],

GetResourcePolicyRequestRequestTypeDef#

# GetResourcePolicyRequestRequestTypeDef definition

class GetResourcePolicyRequestRequestTypeDef(TypedDict):
    SecretId: str,

GetSecretValueRequestRequestTypeDef#

# GetSecretValueRequestRequestTypeDef definition

class GetSecretValueRequestRequestTypeDef(TypedDict):
    SecretId: str,
    VersionId: NotRequired[str],
    VersionStage: NotRequired[str],

ListSecretVersionIdsRequestRequestTypeDef#

# ListSecretVersionIdsRequestRequestTypeDef definition

class ListSecretVersionIdsRequestRequestTypeDef(TypedDict):
    SecretId: str,
    MaxResults: NotRequired[int],
    NextToken: NotRequired[str],
    IncludeDeprecated: NotRequired[bool],

SecretVersionsListEntryTypeDef#

# SecretVersionsListEntryTypeDef definition

class SecretVersionsListEntryTypeDef(TypedDict):
    VersionId: NotRequired[str],
    VersionStages: NotRequired[List[str]],
    LastAccessedDate: NotRequired[datetime],
    CreatedDate: NotRequired[datetime],
    KmsKeyIds: NotRequired[List[str]],

PaginatorConfigTypeDef#

# PaginatorConfigTypeDef definition

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

PutResourcePolicyRequestRequestTypeDef#

# PutResourcePolicyRequestRequestTypeDef definition

class PutResourcePolicyRequestRequestTypeDef(TypedDict):
    SecretId: str,
    ResourcePolicy: str,
    BlockPublicPolicy: NotRequired[bool],

RemoveRegionsFromReplicationRequestRequestTypeDef#

# RemoveRegionsFromReplicationRequestRequestTypeDef definition

class RemoveRegionsFromReplicationRequestRequestTypeDef(TypedDict):
    SecretId: str,
    RemoveReplicaRegions: Sequence[str],

RestoreSecretRequestRequestTypeDef#

# RestoreSecretRequestRequestTypeDef definition

class RestoreSecretRequestRequestTypeDef(TypedDict):
    SecretId: str,

StopReplicationToReplicaRequestRequestTypeDef#

# StopReplicationToReplicaRequestRequestTypeDef definition

class StopReplicationToReplicaRequestRequestTypeDef(TypedDict):
    SecretId: str,

UntagResourceRequestRequestTypeDef#

# UntagResourceRequestRequestTypeDef definition

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

UpdateSecretVersionStageRequestRequestTypeDef#

# UpdateSecretVersionStageRequestRequestTypeDef definition

class UpdateSecretVersionStageRequestRequestTypeDef(TypedDict):
    SecretId: str,
    VersionStage: str,
    RemoveFromVersionId: NotRequired[str],
    MoveToVersionId: NotRequired[str],

ValidateResourcePolicyRequestRequestTypeDef#

# ValidateResourcePolicyRequestRequestTypeDef definition

class ValidateResourcePolicyRequestRequestTypeDef(TypedDict):
    ResourcePolicy: str,
    SecretId: NotRequired[str],

ValidationErrorsEntryTypeDef#

# ValidationErrorsEntryTypeDef definition

class ValidationErrorsEntryTypeDef(TypedDict):
    CheckName: NotRequired[str],
    ErrorMessage: NotRequired[str],

BatchGetSecretValueRequestRequestTypeDef#

# BatchGetSecretValueRequestRequestTypeDef definition

class BatchGetSecretValueRequestRequestTypeDef(TypedDict):
    SecretIdList: NotRequired[Sequence[str]],
    Filters: NotRequired[Sequence[FilterTypeDef]],  # (1)
    MaxResults: NotRequired[int],
    NextToken: NotRequired[str],
  1. See FilterTypeDef

ListSecretsRequestRequestTypeDef#

# ListSecretsRequestRequestTypeDef definition

class ListSecretsRequestRequestTypeDef(TypedDict):
    IncludePlannedDeletion: NotRequired[bool],
    MaxResults: NotRequired[int],
    NextToken: NotRequired[str],
    Filters: NotRequired[Sequence[FilterTypeDef]],  # (1)
    SortOrder: NotRequired[SortOrderTypeType],  # (2)
  1. See FilterTypeDef
  2. See SortOrderTypeType

CancelRotateSecretResponseTypeDef#

# CancelRotateSecretResponseTypeDef definition

class CancelRotateSecretResponseTypeDef(TypedDict):
    ARN: str,
    Name: str,
    VersionId: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

DeleteResourcePolicyResponseTypeDef#

# DeleteResourcePolicyResponseTypeDef definition

class DeleteResourcePolicyResponseTypeDef(TypedDict):
    ARN: str,
    Name: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

DeleteSecretResponseTypeDef#

# DeleteSecretResponseTypeDef definition

class DeleteSecretResponseTypeDef(TypedDict):
    ARN: str,
    Name: str,
    DeletionDate: datetime,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

EmptyResponseMetadataTypeDef#

# EmptyResponseMetadataTypeDef definition

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

GetRandomPasswordResponseTypeDef#

# GetRandomPasswordResponseTypeDef definition

class GetRandomPasswordResponseTypeDef(TypedDict):
    RandomPassword: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

GetResourcePolicyResponseTypeDef#

# GetResourcePolicyResponseTypeDef definition

class GetResourcePolicyResponseTypeDef(TypedDict):
    ARN: str,
    Name: str,
    ResourcePolicy: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

GetSecretValueResponseTypeDef#

# GetSecretValueResponseTypeDef definition

class GetSecretValueResponseTypeDef(TypedDict):
    ARN: str,
    Name: str,
    VersionId: str,
    SecretBinary: bytes,
    SecretString: str,
    VersionStages: List[str],
    CreatedDate: datetime,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

PutResourcePolicyResponseTypeDef#

# PutResourcePolicyResponseTypeDef definition

class PutResourcePolicyResponseTypeDef(TypedDict):
    ARN: str,
    Name: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

PutSecretValueResponseTypeDef#

# PutSecretValueResponseTypeDef definition

class PutSecretValueResponseTypeDef(TypedDict):
    ARN: str,
    Name: str,
    VersionId: str,
    VersionStages: List[str],
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

RestoreSecretResponseTypeDef#

# RestoreSecretResponseTypeDef definition

class RestoreSecretResponseTypeDef(TypedDict):
    ARN: str,
    Name: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

RotateSecretResponseTypeDef#

# RotateSecretResponseTypeDef definition

class RotateSecretResponseTypeDef(TypedDict):
    ARN: str,
    Name: str,
    VersionId: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

StopReplicationToReplicaResponseTypeDef#

# StopReplicationToReplicaResponseTypeDef definition

class StopReplicationToReplicaResponseTypeDef(TypedDict):
    ARN: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

UpdateSecretResponseTypeDef#

# UpdateSecretResponseTypeDef definition

class UpdateSecretResponseTypeDef(TypedDict):
    ARN: str,
    Name: str,
    VersionId: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

UpdateSecretVersionStageResponseTypeDef#

# UpdateSecretVersionStageResponseTypeDef definition

class UpdateSecretVersionStageResponseTypeDef(TypedDict):
    ARN: str,
    Name: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

BatchGetSecretValueResponseTypeDef#

# BatchGetSecretValueResponseTypeDef definition

class BatchGetSecretValueResponseTypeDef(TypedDict):
    SecretValues: List[SecretValueEntryTypeDef],  # (1)
    Errors: List[APIErrorTypeTypeDef],  # (2)
    ResponseMetadata: ResponseMetadataTypeDef,  # (3)
    NextToken: NotRequired[str],
  1. See SecretValueEntryTypeDef
  2. See APIErrorTypeTypeDef
  3. See ResponseMetadataTypeDef

PutSecretValueRequestRequestTypeDef#

# PutSecretValueRequestRequestTypeDef definition

class PutSecretValueRequestRequestTypeDef(TypedDict):
    SecretId: str,
    ClientRequestToken: NotRequired[str],
    SecretBinary: NotRequired[BlobTypeDef],
    SecretString: NotRequired[str],
    VersionStages: NotRequired[Sequence[str]],
    RotationToken: NotRequired[str],

UpdateSecretRequestRequestTypeDef#

# UpdateSecretRequestRequestTypeDef definition

class UpdateSecretRequestRequestTypeDef(TypedDict):
    SecretId: str,
    ClientRequestToken: NotRequired[str],
    Description: NotRequired[str],
    KmsKeyId: NotRequired[str],
    SecretBinary: NotRequired[BlobTypeDef],
    SecretString: NotRequired[str],

ReplicateSecretToRegionsRequestRequestTypeDef#

# ReplicateSecretToRegionsRequestRequestTypeDef definition

class ReplicateSecretToRegionsRequestRequestTypeDef(TypedDict):
    SecretId: str,
    AddReplicaRegions: Sequence[ReplicaRegionTypeTypeDef],  # (1)
    ForceOverwriteReplicaSecret: NotRequired[bool],
  1. See ReplicaRegionTypeTypeDef

CreateSecretRequestRequestTypeDef#

# CreateSecretRequestRequestTypeDef definition

class CreateSecretRequestRequestTypeDef(TypedDict):
    Name: str,
    ClientRequestToken: NotRequired[str],
    Description: NotRequired[str],
    KmsKeyId: NotRequired[str],
    SecretBinary: NotRequired[BlobTypeDef],
    SecretString: NotRequired[str],
    Tags: NotRequired[Sequence[TagTypeDef]],  # (1)
    AddReplicaRegions: NotRequired[Sequence[ReplicaRegionTypeTypeDef]],  # (2)
    ForceOverwriteReplicaSecret: NotRequired[bool],
  1. See TagTypeDef
  2. See ReplicaRegionTypeTypeDef

TagResourceRequestRequestTypeDef#

# TagResourceRequestRequestTypeDef definition

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

CreateSecretResponseTypeDef#

# CreateSecretResponseTypeDef definition

class CreateSecretResponseTypeDef(TypedDict):
    ARN: str,
    Name: str,
    VersionId: str,
    ReplicationStatus: List[ReplicationStatusTypeTypeDef],  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See ReplicationStatusTypeTypeDef
  2. See ResponseMetadataTypeDef

RemoveRegionsFromReplicationResponseTypeDef#

# RemoveRegionsFromReplicationResponseTypeDef definition

class RemoveRegionsFromReplicationResponseTypeDef(TypedDict):
    ARN: str,
    ReplicationStatus: List[ReplicationStatusTypeTypeDef],  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See ReplicationStatusTypeTypeDef
  2. See ResponseMetadataTypeDef

ReplicateSecretToRegionsResponseTypeDef#

# ReplicateSecretToRegionsResponseTypeDef definition

class ReplicateSecretToRegionsResponseTypeDef(TypedDict):
    ARN: str,
    ReplicationStatus: List[ReplicationStatusTypeTypeDef],  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See ReplicationStatusTypeTypeDef
  2. See ResponseMetadataTypeDef

DescribeSecretResponseTypeDef#

# DescribeSecretResponseTypeDef definition

class DescribeSecretResponseTypeDef(TypedDict):
    ARN: str,
    Name: str,
    Description: str,
    KmsKeyId: str,
    RotationEnabled: bool,
    RotationLambdaARN: str,
    RotationRules: RotationRulesTypeTypeDef,  # (1)
    LastRotatedDate: datetime,
    LastChangedDate: datetime,
    LastAccessedDate: datetime,
    DeletedDate: datetime,
    NextRotationDate: datetime,
    Tags: List[TagTypeDef],  # (2)
    VersionIdsToStages: Dict[str, List[str]],
    OwningService: str,
    CreatedDate: datetime,
    PrimaryRegion: str,
    ReplicationStatus: List[ReplicationStatusTypeTypeDef],  # (3)
    ResponseMetadata: ResponseMetadataTypeDef,  # (4)
  1. See RotationRulesTypeTypeDef
  2. See TagTypeDef
  3. See ReplicationStatusTypeTypeDef
  4. See ResponseMetadataTypeDef

RotateSecretRequestRequestTypeDef#

# RotateSecretRequestRequestTypeDef definition

class RotateSecretRequestRequestTypeDef(TypedDict):
    SecretId: str,
    ClientRequestToken: NotRequired[str],
    RotationLambdaARN: NotRequired[str],
    RotationRules: NotRequired[RotationRulesTypeTypeDef],  # (1)
    RotateImmediately: NotRequired[bool],
  1. See RotationRulesTypeTypeDef

SecretListEntryTypeDef#

# SecretListEntryTypeDef definition

class SecretListEntryTypeDef(TypedDict):
    ARN: NotRequired[str],
    Name: NotRequired[str],
    Description: NotRequired[str],
    KmsKeyId: NotRequired[str],
    RotationEnabled: NotRequired[bool],
    RotationLambdaARN: NotRequired[str],
    RotationRules: NotRequired[RotationRulesTypeTypeDef],  # (1)
    LastRotatedDate: NotRequired[datetime],
    LastChangedDate: NotRequired[datetime],
    LastAccessedDate: NotRequired[datetime],
    DeletedDate: NotRequired[datetime],
    NextRotationDate: NotRequired[datetime],
    Tags: NotRequired[List[TagTypeDef]],  # (2)
    SecretVersionsToStages: NotRequired[Dict[str, List[str]]],
    OwningService: NotRequired[str],
    CreatedDate: NotRequired[datetime],
    PrimaryRegion: NotRequired[str],
  1. See RotationRulesTypeTypeDef
  2. See TagTypeDef

ListSecretVersionIdsResponseTypeDef#

# ListSecretVersionIdsResponseTypeDef definition

class ListSecretVersionIdsResponseTypeDef(TypedDict):
    Versions: List[SecretVersionsListEntryTypeDef],  # (1)
    ARN: str,
    Name: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
    NextToken: NotRequired[str],
  1. See SecretVersionsListEntryTypeDef
  2. See ResponseMetadataTypeDef

ListSecretsRequestListSecretsPaginateTypeDef#

# ListSecretsRequestListSecretsPaginateTypeDef definition

class ListSecretsRequestListSecretsPaginateTypeDef(TypedDict):
    IncludePlannedDeletion: NotRequired[bool],
    Filters: NotRequired[Sequence[FilterTypeDef]],  # (1)
    SortOrder: NotRequired[SortOrderTypeType],  # (2)
    PaginationConfig: NotRequired[PaginatorConfigTypeDef],  # (3)
  1. See FilterTypeDef
  2. See SortOrderTypeType
  3. See PaginatorConfigTypeDef

ValidateResourcePolicyResponseTypeDef#

# ValidateResourcePolicyResponseTypeDef definition

class ValidateResourcePolicyResponseTypeDef(TypedDict):
    PolicyValidationPassed: bool,
    ValidationErrors: List[ValidationErrorsEntryTypeDef],  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See ValidationErrorsEntryTypeDef
  2. See ResponseMetadataTypeDef

ListSecretsResponseTypeDef#

# ListSecretsResponseTypeDef definition

class ListSecretsResponseTypeDef(TypedDict):
    SecretList: List[SecretListEntryTypeDef],  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
    NextToken: NotRequired[str],
  1. See SecretListEntryTypeDef
  2. See ResponseMetadataTypeDef