Skip to content

Type definitions#

Index > Bedrock > Type definitions

Auto-generated documentation for Bedrock type annotations stubs module mypy-boto3-bedrock.

TimestampTypeDef#

# TimestampTypeDef definition

TimestampTypeDef = Union[
    datetime,
    str,
]

S3ConfigTypeDef#

# S3ConfigTypeDef definition

class S3ConfigTypeDef(TypedDict):
    bucketName: str,
    keyPrefix: NotRequired[str],

OutputDataConfigTypeDef#

# OutputDataConfigTypeDef definition

class OutputDataConfigTypeDef(TypedDict):
    s3Uri: str,

TagTypeDef#

# TagTypeDef definition

class TagTypeDef(TypedDict):
    key: str,
    value: str,

TrainingDataConfigTypeDef#

# TrainingDataConfigTypeDef definition

class TrainingDataConfigTypeDef(TypedDict):
    s3Uri: str,

VpcConfigTypeDef#

# VpcConfigTypeDef definition

class VpcConfigTypeDef(TypedDict):
    subnetIds: Sequence[str],
    securityGroupIds: Sequence[str],

ResponseMetadataTypeDef#

# ResponseMetadataTypeDef definition

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

CustomModelSummaryTypeDef#

# CustomModelSummaryTypeDef definition

class CustomModelSummaryTypeDef(TypedDict):
    modelArn: str,
    modelName: str,
    creationTime: datetime,
    baseModelArn: str,
    baseModelName: str,
    customizationType: NotRequired[CustomizationTypeType],  # (1)
  1. See CustomizationTypeType

DeleteCustomModelRequestRequestTypeDef#

# DeleteCustomModelRequestRequestTypeDef definition

class DeleteCustomModelRequestRequestTypeDef(TypedDict):
    modelIdentifier: str,

DeleteProvisionedModelThroughputRequestRequestTypeDef#

# DeleteProvisionedModelThroughputRequestRequestTypeDef definition

class DeleteProvisionedModelThroughputRequestRequestTypeDef(TypedDict):
    provisionedModelId: str,

FoundationModelLifecycleTypeDef#

# FoundationModelLifecycleTypeDef definition

class FoundationModelLifecycleTypeDef(TypedDict):
    status: FoundationModelLifecycleStatusType,  # (1)
  1. See FoundationModelLifecycleStatusType

GetCustomModelRequestRequestTypeDef#

# GetCustomModelRequestRequestTypeDef definition

class GetCustomModelRequestRequestTypeDef(TypedDict):
    modelIdentifier: str,

TrainingMetricsTypeDef#

# TrainingMetricsTypeDef definition

class TrainingMetricsTypeDef(TypedDict):
    trainingLoss: NotRequired[float],

ValidatorMetricTypeDef#

# ValidatorMetricTypeDef definition

class ValidatorMetricTypeDef(TypedDict):
    validationLoss: NotRequired[float],

GetFoundationModelRequestRequestTypeDef#

# GetFoundationModelRequestRequestTypeDef definition

class GetFoundationModelRequestRequestTypeDef(TypedDict):
    modelIdentifier: str,

GetModelCustomizationJobRequestRequestTypeDef#

# GetModelCustomizationJobRequestRequestTypeDef definition

class GetModelCustomizationJobRequestRequestTypeDef(TypedDict):
    jobIdentifier: str,

GetProvisionedModelThroughputRequestRequestTypeDef#

# GetProvisionedModelThroughputRequestRequestTypeDef definition

class GetProvisionedModelThroughputRequestRequestTypeDef(TypedDict):
    provisionedModelId: str,

PaginatorConfigTypeDef#

# PaginatorConfigTypeDef definition

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

ListFoundationModelsRequestRequestTypeDef#

# ListFoundationModelsRequestRequestTypeDef definition

class ListFoundationModelsRequestRequestTypeDef(TypedDict):
    byProvider: NotRequired[str],
    byCustomizationType: NotRequired[ModelCustomizationType],  # (1)
    byOutputModality: NotRequired[ModelModalityType],  # (2)
    byInferenceType: NotRequired[InferenceTypeType],  # (3)
  1. See ModelCustomizationType
  2. See ModelModalityType
  3. See InferenceTypeType

ModelCustomizationJobSummaryTypeDef#

# ModelCustomizationJobSummaryTypeDef definition

class ModelCustomizationJobSummaryTypeDef(TypedDict):
    jobArn: str,
    baseModelArn: str,
    jobName: str,
    status: ModelCustomizationJobStatusType,  # (1)
    creationTime: datetime,
    lastModifiedTime: NotRequired[datetime],
    endTime: NotRequired[datetime],
    customModelArn: NotRequired[str],
    customModelName: NotRequired[str],
    customizationType: NotRequired[CustomizationTypeType],  # (2)
  1. See ModelCustomizationJobStatusType
  2. See CustomizationTypeType

ProvisionedModelSummaryTypeDef#

# ProvisionedModelSummaryTypeDef definition

class ProvisionedModelSummaryTypeDef(TypedDict):
    provisionedModelName: str,
    provisionedModelArn: str,
    modelArn: str,
    desiredModelArn: str,
    foundationModelArn: str,
    modelUnits: int,
    desiredModelUnits: int,
    status: ProvisionedModelStatusType,  # (1)
    creationTime: datetime,
    lastModifiedTime: datetime,
    commitmentDuration: NotRequired[CommitmentDurationType],  # (2)
    commitmentExpirationTime: NotRequired[datetime],
  1. See ProvisionedModelStatusType
  2. See CommitmentDurationType

ListTagsForResourceRequestRequestTypeDef#

# ListTagsForResourceRequestRequestTypeDef definition

class ListTagsForResourceRequestRequestTypeDef(TypedDict):
    resourceARN: str,

StopModelCustomizationJobRequestRequestTypeDef#

# StopModelCustomizationJobRequestRequestTypeDef definition

class StopModelCustomizationJobRequestRequestTypeDef(TypedDict):
    jobIdentifier: str,

UntagResourceRequestRequestTypeDef#

# UntagResourceRequestRequestTypeDef definition

class UntagResourceRequestRequestTypeDef(TypedDict):
    resourceARN: str,
    tagKeys: Sequence[str],

UpdateProvisionedModelThroughputRequestRequestTypeDef#

# UpdateProvisionedModelThroughputRequestRequestTypeDef definition

class UpdateProvisionedModelThroughputRequestRequestTypeDef(TypedDict):
    provisionedModelId: str,
    desiredProvisionedModelName: NotRequired[str],
    desiredModelId: NotRequired[str],

ValidatorTypeDef#

# ValidatorTypeDef definition

class ValidatorTypeDef(TypedDict):
    s3Uri: str,

CloudWatchConfigTypeDef#

# CloudWatchConfigTypeDef definition

class CloudWatchConfigTypeDef(TypedDict):
    logGroupName: str,
    roleArn: str,
    largeDataDeliveryS3Config: NotRequired[S3ConfigTypeDef],  # (1)
  1. See S3ConfigTypeDef

CreateProvisionedModelThroughputRequestRequestTypeDef#

# CreateProvisionedModelThroughputRequestRequestTypeDef definition

class CreateProvisionedModelThroughputRequestRequestTypeDef(TypedDict):
    modelUnits: int,
    provisionedModelName: str,
    modelId: str,
    clientRequestToken: NotRequired[str],
    commitmentDuration: NotRequired[CommitmentDurationType],  # (1)
    tags: NotRequired[Sequence[TagTypeDef]],  # (2)
  1. See CommitmentDurationType
  2. See TagTypeDef

TagResourceRequestRequestTypeDef#

# TagResourceRequestRequestTypeDef definition

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

CreateModelCustomizationJobResponseTypeDef#

# CreateModelCustomizationJobResponseTypeDef definition

class CreateModelCustomizationJobResponseTypeDef(TypedDict):
    jobArn: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

CreateProvisionedModelThroughputResponseTypeDef#

# CreateProvisionedModelThroughputResponseTypeDef definition

class CreateProvisionedModelThroughputResponseTypeDef(TypedDict):
    provisionedModelArn: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

GetProvisionedModelThroughputResponseTypeDef#

# GetProvisionedModelThroughputResponseTypeDef definition

class GetProvisionedModelThroughputResponseTypeDef(TypedDict):
    modelUnits: int,
    desiredModelUnits: int,
    provisionedModelName: str,
    provisionedModelArn: str,
    modelArn: str,
    desiredModelArn: str,
    foundationModelArn: str,
    status: ProvisionedModelStatusType,  # (1)
    creationTime: datetime,
    lastModifiedTime: datetime,
    failureMessage: str,
    commitmentDuration: CommitmentDurationType,  # (2)
    commitmentExpirationTime: datetime,
    ResponseMetadata: ResponseMetadataTypeDef,  # (3)
  1. See ProvisionedModelStatusType
  2. See CommitmentDurationType
  3. See ResponseMetadataTypeDef

ListTagsForResourceResponseTypeDef#

# ListTagsForResourceResponseTypeDef definition

class ListTagsForResourceResponseTypeDef(TypedDict):
    tags: List[TagTypeDef],  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See TagTypeDef
  2. See ResponseMetadataTypeDef

ListCustomModelsResponseTypeDef#

# ListCustomModelsResponseTypeDef definition

class ListCustomModelsResponseTypeDef(TypedDict):
    nextToken: str,
    modelSummaries: List[CustomModelSummaryTypeDef],  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See CustomModelSummaryTypeDef
  2. See ResponseMetadataTypeDef

FoundationModelDetailsTypeDef#

# FoundationModelDetailsTypeDef definition

class FoundationModelDetailsTypeDef(TypedDict):
    modelArn: str,
    modelId: str,
    modelName: NotRequired[str],
    providerName: NotRequired[str],
    inputModalities: NotRequired[List[ModelModalityType]],  # (1)
    outputModalities: NotRequired[List[ModelModalityType]],  # (1)
    responseStreamingSupported: NotRequired[bool],
    customizationsSupported: NotRequired[List[ModelCustomizationType]],  # (3)
    inferenceTypesSupported: NotRequired[List[InferenceTypeType]],  # (4)
    modelLifecycle: NotRequired[FoundationModelLifecycleTypeDef],  # (5)
  1. See ModelModalityType
  2. See ModelModalityType
  3. See ModelCustomizationType
  4. See InferenceTypeType
  5. See FoundationModelLifecycleTypeDef

FoundationModelSummaryTypeDef#

# FoundationModelSummaryTypeDef definition

class FoundationModelSummaryTypeDef(TypedDict):
    modelArn: str,
    modelId: str,
    modelName: NotRequired[str],
    providerName: NotRequired[str],
    inputModalities: NotRequired[List[ModelModalityType]],  # (1)
    outputModalities: NotRequired[List[ModelModalityType]],  # (1)
    responseStreamingSupported: NotRequired[bool],
    customizationsSupported: NotRequired[List[ModelCustomizationType]],  # (3)
    inferenceTypesSupported: NotRequired[List[InferenceTypeType]],  # (4)
    modelLifecycle: NotRequired[FoundationModelLifecycleTypeDef],  # (5)
  1. See ModelModalityType
  2. See ModelModalityType
  3. See ModelCustomizationType
  4. See InferenceTypeType
  5. See FoundationModelLifecycleTypeDef

ListCustomModelsRequestListCustomModelsPaginateTypeDef#

# ListCustomModelsRequestListCustomModelsPaginateTypeDef definition

class ListCustomModelsRequestListCustomModelsPaginateTypeDef(TypedDict):
    creationTimeBefore: NotRequired[Union[datetime, str]],
    creationTimeAfter: NotRequired[Union[datetime, str]],
    nameContains: NotRequired[str],
    baseModelArnEquals: NotRequired[str],
    foundationModelArnEquals: NotRequired[str],
    sortBy: NotRequired[SortModelsByType],  # (1)
    sortOrder: NotRequired[SortOrderType],  # (2)
    PaginationConfig: NotRequired[PaginatorConfigTypeDef],  # (3)
  1. See SortModelsByType
  2. See SortOrderType
  3. See PaginatorConfigTypeDef

ListCustomModelsRequestRequestTypeDef#

# ListCustomModelsRequestRequestTypeDef definition

class ListCustomModelsRequestRequestTypeDef(TypedDict):
    creationTimeBefore: NotRequired[Union[datetime, str]],
    creationTimeAfter: NotRequired[Union[datetime, str]],
    nameContains: NotRequired[str],
    baseModelArnEquals: NotRequired[str],
    foundationModelArnEquals: NotRequired[str],
    maxResults: NotRequired[int],
    nextToken: NotRequired[str],
    sortBy: NotRequired[SortModelsByType],  # (1)
    sortOrder: NotRequired[SortOrderType],  # (2)
  1. See SortModelsByType
  2. See SortOrderType

ListModelCustomizationJobsRequestListModelCustomizationJobsPaginateTypeDef#

# ListModelCustomizationJobsRequestListModelCustomizationJobsPaginateTypeDef definition

class ListModelCustomizationJobsRequestListModelCustomizationJobsPaginateTypeDef(TypedDict):
    creationTimeAfter: NotRequired[Union[datetime, str]],
    creationTimeBefore: NotRequired[Union[datetime, str]],
    statusEquals: NotRequired[FineTuningJobStatusType],  # (1)
    nameContains: NotRequired[str],
    sortBy: NotRequired[SortJobsByType],  # (2)
    sortOrder: NotRequired[SortOrderType],  # (3)
    PaginationConfig: NotRequired[PaginatorConfigTypeDef],  # (4)
  1. See FineTuningJobStatusType
  2. See SortJobsByType
  3. See SortOrderType
  4. See PaginatorConfigTypeDef

ListModelCustomizationJobsRequestRequestTypeDef#

# ListModelCustomizationJobsRequestRequestTypeDef definition

class ListModelCustomizationJobsRequestRequestTypeDef(TypedDict):
    creationTimeAfter: NotRequired[Union[datetime, str]],
    creationTimeBefore: NotRequired[Union[datetime, str]],
    statusEquals: NotRequired[FineTuningJobStatusType],  # (1)
    nameContains: NotRequired[str],
    maxResults: NotRequired[int],
    nextToken: NotRequired[str],
    sortBy: NotRequired[SortJobsByType],  # (2)
    sortOrder: NotRequired[SortOrderType],  # (3)
  1. See FineTuningJobStatusType
  2. See SortJobsByType
  3. See SortOrderType

ListProvisionedModelThroughputsRequestListProvisionedModelThroughputsPaginateTypeDef#

# ListProvisionedModelThroughputsRequestListProvisionedModelThroughputsPaginateTypeDef definition

class ListProvisionedModelThroughputsRequestListProvisionedModelThroughputsPaginateTypeDef(TypedDict):
    creationTimeAfter: NotRequired[Union[datetime, str]],
    creationTimeBefore: NotRequired[Union[datetime, str]],
    statusEquals: NotRequired[ProvisionedModelStatusType],  # (1)
    modelArnEquals: NotRequired[str],
    nameContains: NotRequired[str],
    sortBy: NotRequired[SortByProvisionedModelsType],  # (2)
    sortOrder: NotRequired[SortOrderType],  # (3)
    PaginationConfig: NotRequired[PaginatorConfigTypeDef],  # (4)
  1. See ProvisionedModelStatusType
  2. See SortByProvisionedModelsType
  3. See SortOrderType
  4. See PaginatorConfigTypeDef

ListProvisionedModelThroughputsRequestRequestTypeDef#

# ListProvisionedModelThroughputsRequestRequestTypeDef definition

class ListProvisionedModelThroughputsRequestRequestTypeDef(TypedDict):
    creationTimeAfter: NotRequired[Union[datetime, str]],
    creationTimeBefore: NotRequired[Union[datetime, str]],
    statusEquals: NotRequired[ProvisionedModelStatusType],  # (1)
    modelArnEquals: NotRequired[str],
    nameContains: NotRequired[str],
    maxResults: NotRequired[int],
    nextToken: NotRequired[str],
    sortBy: NotRequired[SortByProvisionedModelsType],  # (2)
    sortOrder: NotRequired[SortOrderType],  # (3)
  1. See ProvisionedModelStatusType
  2. See SortByProvisionedModelsType
  3. See SortOrderType

ListModelCustomizationJobsResponseTypeDef#

# ListModelCustomizationJobsResponseTypeDef definition

class ListModelCustomizationJobsResponseTypeDef(TypedDict):
    nextToken: str,
    modelCustomizationJobSummaries: List[ModelCustomizationJobSummaryTypeDef],  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See ModelCustomizationJobSummaryTypeDef
  2. See ResponseMetadataTypeDef

ListProvisionedModelThroughputsResponseTypeDef#

# ListProvisionedModelThroughputsResponseTypeDef definition

class ListProvisionedModelThroughputsResponseTypeDef(TypedDict):
    nextToken: str,
    provisionedModelSummaries: List[ProvisionedModelSummaryTypeDef],  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See ProvisionedModelSummaryTypeDef
  2. See ResponseMetadataTypeDef

ValidationDataConfigTypeDef#

# ValidationDataConfigTypeDef definition

class ValidationDataConfigTypeDef(TypedDict):
    validators: Sequence[ValidatorTypeDef],  # (1)
  1. See ValidatorTypeDef

LoggingConfigTypeDef#

# LoggingConfigTypeDef definition

class LoggingConfigTypeDef(TypedDict):
    cloudWatchConfig: NotRequired[CloudWatchConfigTypeDef],  # (1)
    s3Config: NotRequired[S3ConfigTypeDef],  # (2)
    textDataDeliveryEnabled: NotRequired[bool],
    imageDataDeliveryEnabled: NotRequired[bool],
    embeddingDataDeliveryEnabled: NotRequired[bool],
  1. See CloudWatchConfigTypeDef
  2. See S3ConfigTypeDef

GetFoundationModelResponseTypeDef#

# GetFoundationModelResponseTypeDef definition

class GetFoundationModelResponseTypeDef(TypedDict):
    modelDetails: FoundationModelDetailsTypeDef,  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See FoundationModelDetailsTypeDef
  2. See ResponseMetadataTypeDef

ListFoundationModelsResponseTypeDef#

# ListFoundationModelsResponseTypeDef definition

class ListFoundationModelsResponseTypeDef(TypedDict):
    modelSummaries: List[FoundationModelSummaryTypeDef],  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See FoundationModelSummaryTypeDef
  2. See ResponseMetadataTypeDef

CreateModelCustomizationJobRequestRequestTypeDef#

# CreateModelCustomizationJobRequestRequestTypeDef definition

class CreateModelCustomizationJobRequestRequestTypeDef(TypedDict):
    jobName: str,
    customModelName: str,
    roleArn: str,
    baseModelIdentifier: str,
    trainingDataConfig: TrainingDataConfigTypeDef,  # (1)
    outputDataConfig: OutputDataConfigTypeDef,  # (2)
    hyperParameters: Mapping[str, str],
    clientRequestToken: NotRequired[str],
    customizationType: NotRequired[CustomizationTypeType],  # (3)
    customModelKmsKeyId: NotRequired[str],
    jobTags: NotRequired[Sequence[TagTypeDef]],  # (4)
    customModelTags: NotRequired[Sequence[TagTypeDef]],  # (4)
    validationDataConfig: NotRequired[ValidationDataConfigTypeDef],  # (6)
    vpcConfig: NotRequired[VpcConfigTypeDef],  # (7)
  1. See TrainingDataConfigTypeDef
  2. See OutputDataConfigTypeDef
  3. See CustomizationTypeType
  4. See TagTypeDef
  5. See TagTypeDef
  6. See ValidationDataConfigTypeDef
  7. See VpcConfigTypeDef

GetCustomModelResponseTypeDef#

# GetCustomModelResponseTypeDef definition

class GetCustomModelResponseTypeDef(TypedDict):
    modelArn: str,
    modelName: str,
    jobName: str,
    jobArn: str,
    baseModelArn: str,
    customizationType: CustomizationTypeType,  # (1)
    modelKmsKeyArn: str,
    hyperParameters: Dict[str, str],
    trainingDataConfig: TrainingDataConfigTypeDef,  # (2)
    validationDataConfig: ValidationDataConfigTypeDef,  # (3)
    outputDataConfig: OutputDataConfigTypeDef,  # (4)
    trainingMetrics: TrainingMetricsTypeDef,  # (5)
    validationMetrics: List[ValidatorMetricTypeDef],  # (6)
    creationTime: datetime,
    ResponseMetadata: ResponseMetadataTypeDef,  # (7)
  1. See CustomizationTypeType
  2. See TrainingDataConfigTypeDef
  3. See ValidationDataConfigTypeDef
  4. See OutputDataConfigTypeDef
  5. See TrainingMetricsTypeDef
  6. See ValidatorMetricTypeDef
  7. See ResponseMetadataTypeDef

GetModelCustomizationJobResponseTypeDef#

# GetModelCustomizationJobResponseTypeDef definition

class GetModelCustomizationJobResponseTypeDef(TypedDict):
    jobArn: str,
    jobName: str,
    outputModelName: str,
    outputModelArn: str,
    clientRequestToken: str,
    roleArn: str,
    status: ModelCustomizationJobStatusType,  # (1)
    failureMessage: str,
    creationTime: datetime,
    lastModifiedTime: datetime,
    endTime: datetime,
    baseModelArn: str,
    hyperParameters: Dict[str, str],
    trainingDataConfig: TrainingDataConfigTypeDef,  # (2)
    validationDataConfig: ValidationDataConfigTypeDef,  # (3)
    outputDataConfig: OutputDataConfigTypeDef,  # (4)
    customizationType: CustomizationTypeType,  # (5)
    outputModelKmsKeyArn: str,
    trainingMetrics: TrainingMetricsTypeDef,  # (6)
    validationMetrics: List[ValidatorMetricTypeDef],  # (7)
    vpcConfig: VpcConfigTypeDef,  # (8)
    ResponseMetadata: ResponseMetadataTypeDef,  # (9)
  1. See ModelCustomizationJobStatusType
  2. See TrainingDataConfigTypeDef
  3. See ValidationDataConfigTypeDef
  4. See OutputDataConfigTypeDef
  5. See CustomizationTypeType
  6. See TrainingMetricsTypeDef
  7. See ValidatorMetricTypeDef
  8. See VpcConfigTypeDef
  9. See ResponseMetadataTypeDef

GetModelInvocationLoggingConfigurationResponseTypeDef#

# GetModelInvocationLoggingConfigurationResponseTypeDef definition

class GetModelInvocationLoggingConfigurationResponseTypeDef(TypedDict):
    loggingConfig: LoggingConfigTypeDef,  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See LoggingConfigTypeDef
  2. See ResponseMetadataTypeDef

PutModelInvocationLoggingConfigurationRequestRequestTypeDef#

# PutModelInvocationLoggingConfigurationRequestRequestTypeDef definition

class PutModelInvocationLoggingConfigurationRequestRequestTypeDef(TypedDict):
    loggingConfig: LoggingConfigTypeDef,  # (1)
  1. See LoggingConfigTypeDef