Skip to content

Type definitions#

Index > BedrockRuntime > Type definitions

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

BlobTypeDef#

# BlobTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import BlobTypeDef


def get_value() -> BlobTypeDef:
    return ...


# BlobTypeDef definition

BlobTypeDef = Union[
    str,
    bytes,
    IO[Any],
    botocore.response.StreamingBody,
]

TimestampTypeDef#

# TimestampTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import TimestampTypeDef


def get_value() -> TimestampTypeDef:
    return ...


# TimestampTypeDef definition

TimestampTypeDef = Union[
    datetime.datetime,
    str,
]

GuardrailConverseTextBlockUnionTypeDef#

# GuardrailConverseTextBlockUnionTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailConverseTextBlockUnionTypeDef


def get_value() -> GuardrailConverseTextBlockUnionTypeDef:
    return ...


# GuardrailConverseTextBlockUnionTypeDef definition

GuardrailConverseTextBlockUnionTypeDef = Union[
    GuardrailConverseTextBlockTypeDef,  # (1)
    GuardrailConverseTextBlockOutputTypeDef,  # (2)
]
  1. See GuardrailConverseTextBlockTypeDef
  2. See GuardrailConverseTextBlockOutputTypeDef

ToolUseBlockUnionTypeDef#

# ToolUseBlockUnionTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import ToolUseBlockUnionTypeDef


def get_value() -> ToolUseBlockUnionTypeDef:
    return ...


# ToolUseBlockUnionTypeDef definition

ToolUseBlockUnionTypeDef = Union[
    ToolUseBlockTypeDef,  # (1)
    ToolUseBlockOutputTypeDef,  # (2)
]
  1. See ToolUseBlockTypeDef
  2. See ToolUseBlockOutputTypeDef

GuardrailConverseImageSourceUnionTypeDef#

# GuardrailConverseImageSourceUnionTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailConverseImageSourceUnionTypeDef


def get_value() -> GuardrailConverseImageSourceUnionTypeDef:
    return ...


# GuardrailConverseImageSourceUnionTypeDef definition

GuardrailConverseImageSourceUnionTypeDef = Union[
    GuardrailConverseImageSourceTypeDef,  # (1)
    GuardrailConverseImageSourceOutputTypeDef,  # (2)
]
  1. See GuardrailConverseImageSourceTypeDef
  2. See GuardrailConverseImageSourceOutputTypeDef

DocumentSourceUnionTypeDef#

# DocumentSourceUnionTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import DocumentSourceUnionTypeDef


def get_value() -> DocumentSourceUnionTypeDef:
    return ...


# DocumentSourceUnionTypeDef definition

DocumentSourceUnionTypeDef = Union[
    DocumentSourceTypeDef,  # (1)
    DocumentSourceOutputTypeDef,  # (2)
]
  1. See DocumentSourceTypeDef
  2. See DocumentSourceOutputTypeDef

ImageSourceUnionTypeDef#

# ImageSourceUnionTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import ImageSourceUnionTypeDef


def get_value() -> ImageSourceUnionTypeDef:
    return ...


# ImageSourceUnionTypeDef definition

ImageSourceUnionTypeDef = Union[
    ImageSourceTypeDef,  # (1)
    ImageSourceOutputTypeDef,  # (2)
]
  1. See ImageSourceTypeDef
  2. See ImageSourceOutputTypeDef

VideoSourceUnionTypeDef#

# VideoSourceUnionTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import VideoSourceUnionTypeDef


def get_value() -> VideoSourceUnionTypeDef:
    return ...


# VideoSourceUnionTypeDef definition

VideoSourceUnionTypeDef = Union[
    VideoSourceTypeDef,  # (1)
    VideoSourceOutputTypeDef,  # (2)
]
  1. See VideoSourceTypeDef
  2. See VideoSourceOutputTypeDef

ReasoningContentBlockUnionTypeDef#

# ReasoningContentBlockUnionTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import ReasoningContentBlockUnionTypeDef


def get_value() -> ReasoningContentBlockUnionTypeDef:
    return ...


# ReasoningContentBlockUnionTypeDef definition

ReasoningContentBlockUnionTypeDef = Union[
    ReasoningContentBlockTypeDef,  # (1)
    ReasoningContentBlockOutputTypeDef,  # (2)
]
  1. See ReasoningContentBlockTypeDef
  2. See ReasoningContentBlockOutputTypeDef

GuardrailConverseImageBlockUnionTypeDef#

# GuardrailConverseImageBlockUnionTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailConverseImageBlockUnionTypeDef


def get_value() -> GuardrailConverseImageBlockUnionTypeDef:
    return ...


# GuardrailConverseImageBlockUnionTypeDef definition

GuardrailConverseImageBlockUnionTypeDef = Union[
    GuardrailConverseImageBlockTypeDef,  # (1)
    GuardrailConverseImageBlockOutputTypeDef,  # (2)
]
  1. See GuardrailConverseImageBlockTypeDef
  2. See GuardrailConverseImageBlockOutputTypeDef

DocumentBlockUnionTypeDef#

# DocumentBlockUnionTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import DocumentBlockUnionTypeDef


def get_value() -> DocumentBlockUnionTypeDef:
    return ...


# DocumentBlockUnionTypeDef definition

DocumentBlockUnionTypeDef = Union[
    DocumentBlockTypeDef,  # (1)
    DocumentBlockOutputTypeDef,  # (2)
]
  1. See DocumentBlockTypeDef
  2. See DocumentBlockOutputTypeDef

ImageBlockUnionTypeDef#

# ImageBlockUnionTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import ImageBlockUnionTypeDef


def get_value() -> ImageBlockUnionTypeDef:
    return ...


# ImageBlockUnionTypeDef definition

ImageBlockUnionTypeDef = Union[
    ImageBlockTypeDef,  # (1)
    ImageBlockOutputTypeDef,  # (2)
]
  1. See ImageBlockTypeDef
  2. See ImageBlockOutputTypeDef

VideoBlockUnionTypeDef#

# VideoBlockUnionTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import VideoBlockUnionTypeDef


def get_value() -> VideoBlockUnionTypeDef:
    return ...


# VideoBlockUnionTypeDef definition

VideoBlockUnionTypeDef = Union[
    VideoBlockTypeDef,  # (1)
    VideoBlockOutputTypeDef,  # (2)
]
  1. See VideoBlockTypeDef
  2. See VideoBlockOutputTypeDef

GuardrailConverseContentBlockUnionTypeDef#

# GuardrailConverseContentBlockUnionTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailConverseContentBlockUnionTypeDef


def get_value() -> GuardrailConverseContentBlockUnionTypeDef:
    return ...


# GuardrailConverseContentBlockUnionTypeDef definition

GuardrailConverseContentBlockUnionTypeDef = Union[
    GuardrailConverseContentBlockTypeDef,  # (1)
    GuardrailConverseContentBlockOutputTypeDef,  # (2)
]
  1. See GuardrailConverseContentBlockTypeDef
  2. See GuardrailConverseContentBlockOutputTypeDef

ToolResultContentBlockUnionTypeDef#

# ToolResultContentBlockUnionTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import ToolResultContentBlockUnionTypeDef


def get_value() -> ToolResultContentBlockUnionTypeDef:
    return ...


# ToolResultContentBlockUnionTypeDef definition

ToolResultContentBlockUnionTypeDef = Union[
    ToolResultContentBlockTypeDef,  # (1)
    ToolResultContentBlockOutputTypeDef,  # (2)
]
  1. See ToolResultContentBlockTypeDef
  2. See ToolResultContentBlockOutputTypeDef

ToolResultBlockUnionTypeDef#

# ToolResultBlockUnionTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import ToolResultBlockUnionTypeDef


def get_value() -> ToolResultBlockUnionTypeDef:
    return ...


# ToolResultBlockUnionTypeDef definition

ToolResultBlockUnionTypeDef = Union[
    ToolResultBlockTypeDef,  # (1)
    ToolResultBlockOutputTypeDef,  # (2)
]
  1. See ToolResultBlockTypeDef
  2. See ToolResultBlockOutputTypeDef

ContentBlockUnionTypeDef#

# ContentBlockUnionTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import ContentBlockUnionTypeDef


def get_value() -> ContentBlockUnionTypeDef:
    return ...


# ContentBlockUnionTypeDef definition

ContentBlockUnionTypeDef = Union[
    ContentBlockTypeDef,  # (1)
    ContentBlockOutputTypeDef,  # (2)
]
  1. See ContentBlockTypeDef
  2. See ContentBlockOutputTypeDef

MessageUnionTypeDef#

# MessageUnionTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import MessageUnionTypeDef


def get_value() -> MessageUnionTypeDef:
    return ...


# MessageUnionTypeDef definition

MessageUnionTypeDef = Union[
    MessageTypeDef,  # (1)
    MessageOutputTypeDef,  # (2)
]
  1. See MessageTypeDef
  2. See MessageOutputTypeDef

GuardrailOutputContentTypeDef#

# GuardrailOutputContentTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailOutputContentTypeDef


def get_value() -> GuardrailOutputContentTypeDef:
    return {
        "text": ...,
    }


# GuardrailOutputContentTypeDef definition

class GuardrailOutputContentTypeDef(TypedDict):
    text: NotRequired[str],

GuardrailUsageTypeDef#

# GuardrailUsageTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailUsageTypeDef


def get_value() -> GuardrailUsageTypeDef:
    return {
        "topicPolicyUnits": ...,
    }


# GuardrailUsageTypeDef definition

class GuardrailUsageTypeDef(TypedDict):
    topicPolicyUnits: int,
    contentPolicyUnits: int,
    wordPolicyUnits: int,
    sensitiveInformationPolicyUnits: int,
    sensitiveInformationPolicyFreeUnits: int,
    contextualGroundingPolicyUnits: int,
    contentPolicyImageUnits: NotRequired[int],

ResponseMetadataTypeDef#

# ResponseMetadataTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ResponseMetadataTypeDef


def get_value() -> ResponseMetadataTypeDef:
    return {
        "RequestId": ...,
    }


# ResponseMetadataTypeDef definition

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

AsyncInvokeS3OutputDataConfigTypeDef#

# AsyncInvokeS3OutputDataConfigTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import AsyncInvokeS3OutputDataConfigTypeDef


def get_value() -> AsyncInvokeS3OutputDataConfigTypeDef:
    return {
        "s3Uri": ...,
    }


# AsyncInvokeS3OutputDataConfigTypeDef definition

class AsyncInvokeS3OutputDataConfigTypeDef(TypedDict):
    s3Uri: str,
    kmsKeyId: NotRequired[str],
    bucketOwner: NotRequired[str],

BidirectionalOutputPayloadPartTypeDef#

# BidirectionalOutputPayloadPartTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import BidirectionalOutputPayloadPartTypeDef


def get_value() -> BidirectionalOutputPayloadPartTypeDef:
    return {
        "bytes": ...,
    }


# BidirectionalOutputPayloadPartTypeDef definition

class BidirectionalOutputPayloadPartTypeDef(TypedDict):
    bytes: NotRequired[bytes],

CachePointBlockTypeDef#

# CachePointBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import CachePointBlockTypeDef


def get_value() -> CachePointBlockTypeDef:
    return {
        "type": ...,
    }


# CachePointBlockTypeDef definition

class CachePointBlockTypeDef(TypedDict):
    type: CachePointTypeType,  # (1)
  1. See CachePointTypeType

ReasoningContentBlockDeltaTypeDef#

# ReasoningContentBlockDeltaTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ReasoningContentBlockDeltaTypeDef


def get_value() -> ReasoningContentBlockDeltaTypeDef:
    return {
        "text": ...,
    }


# ReasoningContentBlockDeltaTypeDef definition

class ReasoningContentBlockDeltaTypeDef(TypedDict):
    text: NotRequired[str],
    redactedContent: NotRequired[bytes],
    signature: NotRequired[str],

ToolUseBlockDeltaTypeDef#

# ToolUseBlockDeltaTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ToolUseBlockDeltaTypeDef


def get_value() -> ToolUseBlockDeltaTypeDef:
    return {
        "input": ...,
    }


# ToolUseBlockDeltaTypeDef definition

class ToolUseBlockDeltaTypeDef(TypedDict):
    input: str,

ToolUseBlockOutputTypeDef#

# ToolUseBlockOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ToolUseBlockOutputTypeDef


def get_value() -> ToolUseBlockOutputTypeDef:
    return {
        "toolUseId": ...,
    }


# ToolUseBlockOutputTypeDef definition

class ToolUseBlockOutputTypeDef(TypedDict):
    toolUseId: str,
    name: str,
    input: Dict[str, Any],

ToolUseBlockStartTypeDef#

# ToolUseBlockStartTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ToolUseBlockStartTypeDef


def get_value() -> ToolUseBlockStartTypeDef:
    return {
        "toolUseId": ...,
    }


# ToolUseBlockStartTypeDef definition

class ToolUseBlockStartTypeDef(TypedDict):
    toolUseId: str,
    name: str,

ContentBlockStopEventTypeDef#

# ContentBlockStopEventTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ContentBlockStopEventTypeDef


def get_value() -> ContentBlockStopEventTypeDef:
    return {
        "contentBlockIndex": ...,
    }


# ContentBlockStopEventTypeDef definition

class ContentBlockStopEventTypeDef(TypedDict):
    contentBlockIndex: int,

ConverseMetricsTypeDef#

# ConverseMetricsTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ConverseMetricsTypeDef


def get_value() -> ConverseMetricsTypeDef:
    return {
        "latencyMs": ...,
    }


# ConverseMetricsTypeDef definition

class ConverseMetricsTypeDef(TypedDict):
    latencyMs: int,

GuardrailConfigurationTypeDef#

# GuardrailConfigurationTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailConfigurationTypeDef


def get_value() -> GuardrailConfigurationTypeDef:
    return {
        "guardrailIdentifier": ...,
    }


# GuardrailConfigurationTypeDef definition

class GuardrailConfigurationTypeDef(TypedDict):
    guardrailIdentifier: str,
    guardrailVersion: str,
    trace: NotRequired[GuardrailTraceType],  # (1)
  1. See GuardrailTraceType

InferenceConfigurationTypeDef#

# InferenceConfigurationTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import InferenceConfigurationTypeDef


def get_value() -> InferenceConfigurationTypeDef:
    return {
        "maxTokens": ...,
    }


# InferenceConfigurationTypeDef definition

class InferenceConfigurationTypeDef(TypedDict):
    maxTokens: NotRequired[int],
    temperature: NotRequired[float],
    topP: NotRequired[float],
    stopSequences: NotRequired[Sequence[str]],

PerformanceConfigurationTypeDef#

# PerformanceConfigurationTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import PerformanceConfigurationTypeDef


def get_value() -> PerformanceConfigurationTypeDef:
    return {
        "latency": ...,
    }


# PerformanceConfigurationTypeDef definition

class PerformanceConfigurationTypeDef(TypedDict):
    latency: NotRequired[PerformanceConfigLatencyType],  # (1)
  1. See PerformanceConfigLatencyType

PromptVariableValuesTypeDef#

# PromptVariableValuesTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import PromptVariableValuesTypeDef


def get_value() -> PromptVariableValuesTypeDef:
    return {
        "text": ...,
    }


# PromptVariableValuesTypeDef definition

class PromptVariableValuesTypeDef(TypedDict):
    text: NotRequired[str],

TokenUsageTypeDef#

# TokenUsageTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import TokenUsageTypeDef


def get_value() -> TokenUsageTypeDef:
    return {
        "inputTokens": ...,
    }


# TokenUsageTypeDef definition

class TokenUsageTypeDef(TypedDict):
    inputTokens: int,
    outputTokens: int,
    totalTokens: int,
    cacheReadInputTokens: NotRequired[int],
    cacheWriteInputTokens: NotRequired[int],

ConverseStreamMetricsTypeDef#

# ConverseStreamMetricsTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ConverseStreamMetricsTypeDef


def get_value() -> ConverseStreamMetricsTypeDef:
    return {
        "latencyMs": ...,
    }


# ConverseStreamMetricsTypeDef definition

class ConverseStreamMetricsTypeDef(TypedDict):
    latencyMs: int,

InternalServerExceptionTypeDef#

# InternalServerExceptionTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import InternalServerExceptionTypeDef


def get_value() -> InternalServerExceptionTypeDef:
    return {
        "message": ...,
    }


# InternalServerExceptionTypeDef definition

class InternalServerExceptionTypeDef(TypedDict):
    message: NotRequired[str],

MessageStartEventTypeDef#

# MessageStartEventTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import MessageStartEventTypeDef


def get_value() -> MessageStartEventTypeDef:
    return {
        "role": ...,
    }


# MessageStartEventTypeDef definition

class MessageStartEventTypeDef(TypedDict):
    role: ConversationRoleType,  # (1)
  1. See ConversationRoleType

MessageStopEventTypeDef#

# MessageStopEventTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import MessageStopEventTypeDef


def get_value() -> MessageStopEventTypeDef:
    return {
        "stopReason": ...,
    }


# MessageStopEventTypeDef definition

class MessageStopEventTypeDef(TypedDict):
    stopReason: StopReasonType,  # (1)
    additionalModelResponseFields: NotRequired[Dict[str, Any]],
  1. See StopReasonType

ModelStreamErrorExceptionTypeDef#

# ModelStreamErrorExceptionTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ModelStreamErrorExceptionTypeDef


def get_value() -> ModelStreamErrorExceptionTypeDef:
    return {
        "message": ...,
    }


# ModelStreamErrorExceptionTypeDef definition

class ModelStreamErrorExceptionTypeDef(TypedDict):
    message: NotRequired[str],
    originalStatusCode: NotRequired[int],
    originalMessage: NotRequired[str],

ServiceUnavailableExceptionTypeDef#

# ServiceUnavailableExceptionTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ServiceUnavailableExceptionTypeDef


def get_value() -> ServiceUnavailableExceptionTypeDef:
    return {
        "message": ...,
    }


# ServiceUnavailableExceptionTypeDef definition

class ServiceUnavailableExceptionTypeDef(TypedDict):
    message: NotRequired[str],

ThrottlingExceptionTypeDef#

# ThrottlingExceptionTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ThrottlingExceptionTypeDef


def get_value() -> ThrottlingExceptionTypeDef:
    return {
        "message": ...,
    }


# ThrottlingExceptionTypeDef definition

class ThrottlingExceptionTypeDef(TypedDict):
    message: NotRequired[str],

ValidationExceptionTypeDef#

# ValidationExceptionTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ValidationExceptionTypeDef


def get_value() -> ValidationExceptionTypeDef:
    return {
        "message": ...,
    }


# ValidationExceptionTypeDef definition

class ValidationExceptionTypeDef(TypedDict):
    message: NotRequired[str],

GuardrailStreamConfigurationTypeDef#

# GuardrailStreamConfigurationTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailStreamConfigurationTypeDef


def get_value() -> GuardrailStreamConfigurationTypeDef:
    return {
        "guardrailIdentifier": ...,
    }


# GuardrailStreamConfigurationTypeDef definition

class GuardrailStreamConfigurationTypeDef(TypedDict):
    guardrailIdentifier: str,
    guardrailVersion: str,
    trace: NotRequired[GuardrailTraceType],  # (1)
    streamProcessingMode: NotRequired[GuardrailStreamProcessingModeType],  # (2)
  1. See GuardrailTraceType
  2. See GuardrailStreamProcessingModeType

PromptRouterTraceTypeDef#

# PromptRouterTraceTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import PromptRouterTraceTypeDef


def get_value() -> PromptRouterTraceTypeDef:
    return {
        "invokedModelId": ...,
    }


# PromptRouterTraceTypeDef definition

class PromptRouterTraceTypeDef(TypedDict):
    invokedModelId: NotRequired[str],

S3LocationTypeDef#

# S3LocationTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import S3LocationTypeDef


def get_value() -> S3LocationTypeDef:
    return {
        "uri": ...,
    }


# S3LocationTypeDef definition

class S3LocationTypeDef(TypedDict):
    uri: str,
    bucketOwner: NotRequired[str],

GetAsyncInvokeRequestTypeDef#

# GetAsyncInvokeRequestTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GetAsyncInvokeRequestTypeDef


def get_value() -> GetAsyncInvokeRequestTypeDef:
    return {
        "invocationArn": ...,
    }


# GetAsyncInvokeRequestTypeDef definition

class GetAsyncInvokeRequestTypeDef(TypedDict):
    invocationArn: str,

GuardrailTextBlockTypeDef#

# GuardrailTextBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailTextBlockTypeDef


def get_value() -> GuardrailTextBlockTypeDef:
    return {
        "text": ...,
    }


# GuardrailTextBlockTypeDef definition

class GuardrailTextBlockTypeDef(TypedDict):
    text: str,
    qualifiers: NotRequired[Sequence[GuardrailContentQualifierType]],  # (1)
  1. See Sequence[GuardrailContentQualifierType]

GuardrailContentFilterTypeDef#

# GuardrailContentFilterTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailContentFilterTypeDef


def get_value() -> GuardrailContentFilterTypeDef:
    return {
        "type": ...,
    }


# GuardrailContentFilterTypeDef definition

class GuardrailContentFilterTypeDef(TypedDict):
    type: GuardrailContentFilterTypeType,  # (1)
    confidence: GuardrailContentFilterConfidenceType,  # (2)
    action: GuardrailContentPolicyActionType,  # (4)
    filterStrength: NotRequired[GuardrailContentFilterStrengthType],  # (3)
    detected: NotRequired[bool],
  1. See GuardrailContentFilterTypeType
  2. See GuardrailContentFilterConfidenceType
  3. See GuardrailContentFilterStrengthType
  4. See GuardrailContentPolicyActionType

GuardrailContextualGroundingFilterTypeDef#

# GuardrailContextualGroundingFilterTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailContextualGroundingFilterTypeDef


def get_value() -> GuardrailContextualGroundingFilterTypeDef:
    return {
        "type": ...,
    }


# GuardrailContextualGroundingFilterTypeDef definition

class GuardrailContextualGroundingFilterTypeDef(TypedDict):
    type: GuardrailContextualGroundingFilterTypeType,  # (1)
    threshold: float,
    score: float,
    action: GuardrailContextualGroundingPolicyActionType,  # (2)
    detected: NotRequired[bool],
  1. See GuardrailContextualGroundingFilterTypeType
  2. See GuardrailContextualGroundingPolicyActionType

GuardrailConverseTextBlockOutputTypeDef#

# GuardrailConverseTextBlockOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailConverseTextBlockOutputTypeDef


def get_value() -> GuardrailConverseTextBlockOutputTypeDef:
    return {
        "text": ...,
    }


# GuardrailConverseTextBlockOutputTypeDef definition

class GuardrailConverseTextBlockOutputTypeDef(TypedDict):
    text: str,
    qualifiers: NotRequired[List[GuardrailConverseContentQualifierType]],  # (1)
  1. See List[GuardrailConverseContentQualifierType]

GuardrailConverseImageSourceOutputTypeDef#

# GuardrailConverseImageSourceOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailConverseImageSourceOutputTypeDef


def get_value() -> GuardrailConverseImageSourceOutputTypeDef:
    return {
        "bytes": ...,
    }


# GuardrailConverseImageSourceOutputTypeDef definition

class GuardrailConverseImageSourceOutputTypeDef(TypedDict):
    bytes: NotRequired[bytes],

GuardrailConverseTextBlockTypeDef#

# GuardrailConverseTextBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailConverseTextBlockTypeDef


def get_value() -> GuardrailConverseTextBlockTypeDef:
    return {
        "text": ...,
    }


# GuardrailConverseTextBlockTypeDef definition

class GuardrailConverseTextBlockTypeDef(TypedDict):
    text: str,
    qualifiers: NotRequired[Sequence[GuardrailConverseContentQualifierType]],  # (1)
  1. See Sequence[GuardrailConverseContentQualifierType]

GuardrailImageCoverageTypeDef#

# GuardrailImageCoverageTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailImageCoverageTypeDef


def get_value() -> GuardrailImageCoverageTypeDef:
    return {
        "guarded": ...,
    }


# GuardrailImageCoverageTypeDef definition

class GuardrailImageCoverageTypeDef(TypedDict):
    guarded: NotRequired[int],
    total: NotRequired[int],

GuardrailTextCharactersCoverageTypeDef#

# GuardrailTextCharactersCoverageTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailTextCharactersCoverageTypeDef


def get_value() -> GuardrailTextCharactersCoverageTypeDef:
    return {
        "guarded": ...,
    }


# GuardrailTextCharactersCoverageTypeDef definition

class GuardrailTextCharactersCoverageTypeDef(TypedDict):
    guarded: NotRequired[int],
    total: NotRequired[int],

GuardrailCustomWordTypeDef#

# GuardrailCustomWordTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailCustomWordTypeDef


def get_value() -> GuardrailCustomWordTypeDef:
    return {
        "match": ...,
    }


# GuardrailCustomWordTypeDef definition

class GuardrailCustomWordTypeDef(TypedDict):
    match: str,
    action: GuardrailWordPolicyActionType,  # (1)
    detected: NotRequired[bool],
  1. See GuardrailWordPolicyActionType

GuardrailManagedWordTypeDef#

# GuardrailManagedWordTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailManagedWordTypeDef


def get_value() -> GuardrailManagedWordTypeDef:
    return {
        "match": ...,
    }


# GuardrailManagedWordTypeDef definition

class GuardrailManagedWordTypeDef(TypedDict):
    match: str,
    type: GuardrailManagedWordTypeType,  # (1)
    action: GuardrailWordPolicyActionType,  # (2)
    detected: NotRequired[bool],
  1. See GuardrailManagedWordTypeType
  2. See GuardrailWordPolicyActionType

GuardrailPiiEntityFilterTypeDef#

# GuardrailPiiEntityFilterTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailPiiEntityFilterTypeDef


def get_value() -> GuardrailPiiEntityFilterTypeDef:
    return {
        "match": ...,
    }


# GuardrailPiiEntityFilterTypeDef definition

class GuardrailPiiEntityFilterTypeDef(TypedDict):
    match: str,
    type: GuardrailPiiEntityTypeType,  # (1)
    action: GuardrailSensitiveInformationPolicyActionType,  # (2)
    detected: NotRequired[bool],
  1. See GuardrailPiiEntityTypeType
  2. See GuardrailSensitiveInformationPolicyActionType

GuardrailRegexFilterTypeDef#

# GuardrailRegexFilterTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailRegexFilterTypeDef


def get_value() -> GuardrailRegexFilterTypeDef:
    return {
        "name": ...,
    }


# GuardrailRegexFilterTypeDef definition

class GuardrailRegexFilterTypeDef(TypedDict):
    action: GuardrailSensitiveInformationPolicyActionType,  # (1)
    name: NotRequired[str],
    match: NotRequired[str],
    regex: NotRequired[str],
    detected: NotRequired[bool],
  1. See GuardrailSensitiveInformationPolicyActionType

GuardrailTopicTypeDef#

# GuardrailTopicTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailTopicTypeDef


def get_value() -> GuardrailTopicTypeDef:
    return {
        "name": ...,
    }


# GuardrailTopicTypeDef definition

class GuardrailTopicTypeDef(TypedDict):
    name: str,
    type: GuardrailTopicTypeType,  # (1)
    action: GuardrailTopicPolicyActionType,  # (2)
    detected: NotRequired[bool],
  1. See GuardrailTopicTypeType
  2. See GuardrailTopicPolicyActionType

ModelTimeoutExceptionTypeDef#

# ModelTimeoutExceptionTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ModelTimeoutExceptionTypeDef


def get_value() -> ModelTimeoutExceptionTypeDef:
    return {
        "message": ...,
    }


# ModelTimeoutExceptionTypeDef definition

class ModelTimeoutExceptionTypeDef(TypedDict):
    message: NotRequired[str],

PaginatorConfigTypeDef#

# PaginatorConfigTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import PaginatorConfigTypeDef


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


# PaginatorConfigTypeDef definition

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

PayloadPartTypeDef#

# PayloadPartTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import PayloadPartTypeDef


def get_value() -> PayloadPartTypeDef:
    return {
        "bytes": ...,
    }


# PayloadPartTypeDef definition

class PayloadPartTypeDef(TypedDict):
    bytes: NotRequired[bytes],

ReasoningTextBlockTypeDef#

# ReasoningTextBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ReasoningTextBlockTypeDef


def get_value() -> ReasoningTextBlockTypeDef:
    return {
        "text": ...,
    }


# ReasoningTextBlockTypeDef definition

class ReasoningTextBlockTypeDef(TypedDict):
    text: str,
    signature: NotRequired[str],

SpecificToolChoiceTypeDef#

# SpecificToolChoiceTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import SpecificToolChoiceTypeDef


def get_value() -> SpecificToolChoiceTypeDef:
    return {
        "name": ...,
    }


# SpecificToolChoiceTypeDef definition

class SpecificToolChoiceTypeDef(TypedDict):
    name: str,

TagTypeDef#

# TagTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import TagTypeDef


def get_value() -> TagTypeDef:
    return {
        "key": ...,
    }


# TagTypeDef definition

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

ToolInputSchemaTypeDef#

# ToolInputSchemaTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ToolInputSchemaTypeDef


def get_value() -> ToolInputSchemaTypeDef:
    return {
        "json": ...,
    }


# ToolInputSchemaTypeDef definition

class ToolInputSchemaTypeDef(TypedDict):
    json: NotRequired[Mapping[str, Any]],

ToolUseBlockTypeDef#

# ToolUseBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ToolUseBlockTypeDef


def get_value() -> ToolUseBlockTypeDef:
    return {
        "toolUseId": ...,
    }


# ToolUseBlockTypeDef definition

class ToolUseBlockTypeDef(TypedDict):
    toolUseId: str,
    name: str,
    input: Mapping[str, Any],

InvokeModelResponseTypeDef#

# InvokeModelResponseTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import InvokeModelResponseTypeDef


def get_value() -> InvokeModelResponseTypeDef:
    return {
        "body": ...,
    }


# InvokeModelResponseTypeDef definition

class InvokeModelResponseTypeDef(TypedDict):
    body: botocore.response.StreamingBody,
    contentType: str,
    performanceConfigLatency: PerformanceConfigLatencyType,  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See PerformanceConfigLatencyType
  2. See ResponseMetadataTypeDef

StartAsyncInvokeResponseTypeDef#

# StartAsyncInvokeResponseTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import StartAsyncInvokeResponseTypeDef


def get_value() -> StartAsyncInvokeResponseTypeDef:
    return {
        "invocationArn": ...,
    }


# StartAsyncInvokeResponseTypeDef definition

class StartAsyncInvokeResponseTypeDef(TypedDict):
    invocationArn: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

AsyncInvokeOutputDataConfigTypeDef#

# AsyncInvokeOutputDataConfigTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import AsyncInvokeOutputDataConfigTypeDef


def get_value() -> AsyncInvokeOutputDataConfigTypeDef:
    return {
        "s3OutputDataConfig": ...,
    }


# AsyncInvokeOutputDataConfigTypeDef definition

class AsyncInvokeOutputDataConfigTypeDef(TypedDict):
    s3OutputDataConfig: NotRequired[AsyncInvokeS3OutputDataConfigTypeDef],  # (1)
  1. See AsyncInvokeS3OutputDataConfigTypeDef

BidirectionalInputPayloadPartTypeDef#

# BidirectionalInputPayloadPartTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import BidirectionalInputPayloadPartTypeDef


def get_value() -> BidirectionalInputPayloadPartTypeDef:
    return {
        "bytes": ...,
    }


# BidirectionalInputPayloadPartTypeDef definition

class BidirectionalInputPayloadPartTypeDef(TypedDict):
    bytes: NotRequired[BlobTypeDef],

GuardrailConverseImageSourceTypeDef#

# GuardrailConverseImageSourceTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailConverseImageSourceTypeDef


def get_value() -> GuardrailConverseImageSourceTypeDef:
    return {
        "bytes": ...,
    }


# GuardrailConverseImageSourceTypeDef definition

class GuardrailConverseImageSourceTypeDef(TypedDict):
    bytes: NotRequired[BlobTypeDef],

GuardrailImageSourceTypeDef#

# GuardrailImageSourceTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailImageSourceTypeDef


def get_value() -> GuardrailImageSourceTypeDef:
    return {
        "bytes": ...,
    }


# GuardrailImageSourceTypeDef definition

class GuardrailImageSourceTypeDef(TypedDict):
    bytes: NotRequired[BlobTypeDef],

InvokeModelRequestTypeDef#

# InvokeModelRequestTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import InvokeModelRequestTypeDef


def get_value() -> InvokeModelRequestTypeDef:
    return {
        "modelId": ...,
    }


# InvokeModelRequestTypeDef definition

class InvokeModelRequestTypeDef(TypedDict):
    modelId: str,
    body: NotRequired[BlobTypeDef],
    contentType: NotRequired[str],
    accept: NotRequired[str],
    trace: NotRequired[TraceType],  # (1)
    guardrailIdentifier: NotRequired[str],
    guardrailVersion: NotRequired[str],
    performanceConfigLatency: NotRequired[PerformanceConfigLatencyType],  # (2)
  1. See TraceType
  2. See PerformanceConfigLatencyType

InvokeModelWithResponseStreamRequestTypeDef#

# InvokeModelWithResponseStreamRequestTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import InvokeModelWithResponseStreamRequestTypeDef


def get_value() -> InvokeModelWithResponseStreamRequestTypeDef:
    return {
        "modelId": ...,
    }


# InvokeModelWithResponseStreamRequestTypeDef definition

class InvokeModelWithResponseStreamRequestTypeDef(TypedDict):
    modelId: str,
    body: NotRequired[BlobTypeDef],
    contentType: NotRequired[str],
    accept: NotRequired[str],
    trace: NotRequired[TraceType],  # (1)
    guardrailIdentifier: NotRequired[str],
    guardrailVersion: NotRequired[str],
    performanceConfigLatency: NotRequired[PerformanceConfigLatencyType],  # (2)
  1. See TraceType
  2. See PerformanceConfigLatencyType

ContentBlockDeltaTypeDef#

# ContentBlockDeltaTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ContentBlockDeltaTypeDef


def get_value() -> ContentBlockDeltaTypeDef:
    return {
        "text": ...,
    }


# ContentBlockDeltaTypeDef definition

class ContentBlockDeltaTypeDef(TypedDict):
    text: NotRequired[str],
    toolUse: NotRequired[ToolUseBlockDeltaTypeDef],  # (1)
    reasoningContent: NotRequired[ReasoningContentBlockDeltaTypeDef],  # (2)
  1. See ToolUseBlockDeltaTypeDef
  2. See ReasoningContentBlockDeltaTypeDef

ContentBlockStartTypeDef#

# ContentBlockStartTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ContentBlockStartTypeDef


def get_value() -> ContentBlockStartTypeDef:
    return {
        "toolUse": ...,
    }


# ContentBlockStartTypeDef definition

class ContentBlockStartTypeDef(TypedDict):
    toolUse: NotRequired[ToolUseBlockStartTypeDef],  # (1)
  1. See ToolUseBlockStartTypeDef

DocumentSourceOutputTypeDef#

# DocumentSourceOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import DocumentSourceOutputTypeDef


def get_value() -> DocumentSourceOutputTypeDef:
    return {
        "bytes": ...,
    }


# DocumentSourceOutputTypeDef definition

class DocumentSourceOutputTypeDef(TypedDict):
    bytes: NotRequired[bytes],
    s3Location: NotRequired[S3LocationTypeDef],  # (1)
  1. See S3LocationTypeDef

DocumentSourceTypeDef#

# DocumentSourceTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import DocumentSourceTypeDef


def get_value() -> DocumentSourceTypeDef:
    return {
        "bytes": ...,
    }


# DocumentSourceTypeDef definition

class DocumentSourceTypeDef(TypedDict):
    bytes: NotRequired[BlobTypeDef],
    s3Location: NotRequired[S3LocationTypeDef],  # (1)
  1. See S3LocationTypeDef

ImageSourceOutputTypeDef#

# ImageSourceOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ImageSourceOutputTypeDef


def get_value() -> ImageSourceOutputTypeDef:
    return {
        "bytes": ...,
    }


# ImageSourceOutputTypeDef definition

class ImageSourceOutputTypeDef(TypedDict):
    bytes: NotRequired[bytes],
    s3Location: NotRequired[S3LocationTypeDef],  # (1)
  1. See S3LocationTypeDef

ImageSourceTypeDef#

# ImageSourceTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ImageSourceTypeDef


def get_value() -> ImageSourceTypeDef:
    return {
        "bytes": ...,
    }


# ImageSourceTypeDef definition

class ImageSourceTypeDef(TypedDict):
    bytes: NotRequired[BlobTypeDef],
    s3Location: NotRequired[S3LocationTypeDef],  # (1)
  1. See S3LocationTypeDef

VideoSourceOutputTypeDef#

# VideoSourceOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import VideoSourceOutputTypeDef


def get_value() -> VideoSourceOutputTypeDef:
    return {
        "bytes": ...,
    }


# VideoSourceOutputTypeDef definition

class VideoSourceOutputTypeDef(TypedDict):
    bytes: NotRequired[bytes],
    s3Location: NotRequired[S3LocationTypeDef],  # (1)
  1. See S3LocationTypeDef

VideoSourceTypeDef#

# VideoSourceTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import VideoSourceTypeDef


def get_value() -> VideoSourceTypeDef:
    return {
        "bytes": ...,
    }


# VideoSourceTypeDef definition

class VideoSourceTypeDef(TypedDict):
    bytes: NotRequired[BlobTypeDef],
    s3Location: NotRequired[S3LocationTypeDef],  # (1)
  1. See S3LocationTypeDef

GuardrailContentPolicyAssessmentTypeDef#

# GuardrailContentPolicyAssessmentTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailContentPolicyAssessmentTypeDef


def get_value() -> GuardrailContentPolicyAssessmentTypeDef:
    return {
        "filters": ...,
    }


# GuardrailContentPolicyAssessmentTypeDef definition

class GuardrailContentPolicyAssessmentTypeDef(TypedDict):
    filters: List[GuardrailContentFilterTypeDef],  # (1)
  1. See List[GuardrailContentFilterTypeDef]

GuardrailContextualGroundingPolicyAssessmentTypeDef#

# GuardrailContextualGroundingPolicyAssessmentTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailContextualGroundingPolicyAssessmentTypeDef


def get_value() -> GuardrailContextualGroundingPolicyAssessmentTypeDef:
    return {
        "filters": ...,
    }


# GuardrailContextualGroundingPolicyAssessmentTypeDef definition

class GuardrailContextualGroundingPolicyAssessmentTypeDef(TypedDict):
    filters: NotRequired[List[GuardrailContextualGroundingFilterTypeDef]],  # (1)
  1. See List[GuardrailContextualGroundingFilterTypeDef]

GuardrailConverseImageBlockOutputTypeDef#

# GuardrailConverseImageBlockOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailConverseImageBlockOutputTypeDef


def get_value() -> GuardrailConverseImageBlockOutputTypeDef:
    return {
        "format": ...,
    }


# GuardrailConverseImageBlockOutputTypeDef definition

class GuardrailConverseImageBlockOutputTypeDef(TypedDict):
    format: GuardrailConverseImageFormatType,  # (1)
    source: GuardrailConverseImageSourceOutputTypeDef,  # (2)
  1. See GuardrailConverseImageFormatType
  2. See GuardrailConverseImageSourceOutputTypeDef

GuardrailCoverageTypeDef#

# GuardrailCoverageTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailCoverageTypeDef


def get_value() -> GuardrailCoverageTypeDef:
    return {
        "textCharacters": ...,
    }


# GuardrailCoverageTypeDef definition

class GuardrailCoverageTypeDef(TypedDict):
    textCharacters: NotRequired[GuardrailTextCharactersCoverageTypeDef],  # (1)
    images: NotRequired[GuardrailImageCoverageTypeDef],  # (2)
  1. See GuardrailTextCharactersCoverageTypeDef
  2. See GuardrailImageCoverageTypeDef

GuardrailWordPolicyAssessmentTypeDef#

# GuardrailWordPolicyAssessmentTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailWordPolicyAssessmentTypeDef


def get_value() -> GuardrailWordPolicyAssessmentTypeDef:
    return {
        "customWords": ...,
    }


# GuardrailWordPolicyAssessmentTypeDef definition

class GuardrailWordPolicyAssessmentTypeDef(TypedDict):
    customWords: List[GuardrailCustomWordTypeDef],  # (1)
    managedWordLists: List[GuardrailManagedWordTypeDef],  # (2)
  1. See List[GuardrailCustomWordTypeDef]
  2. See List[GuardrailManagedWordTypeDef]

GuardrailSensitiveInformationPolicyAssessmentTypeDef#

# GuardrailSensitiveInformationPolicyAssessmentTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailSensitiveInformationPolicyAssessmentTypeDef


def get_value() -> GuardrailSensitiveInformationPolicyAssessmentTypeDef:
    return {
        "piiEntities": ...,
    }


# GuardrailSensitiveInformationPolicyAssessmentTypeDef definition

class GuardrailSensitiveInformationPolicyAssessmentTypeDef(TypedDict):
    piiEntities: List[GuardrailPiiEntityFilterTypeDef],  # (1)
    regexes: List[GuardrailRegexFilterTypeDef],  # (2)
  1. See List[GuardrailPiiEntityFilterTypeDef]
  2. See List[GuardrailRegexFilterTypeDef]

GuardrailTopicPolicyAssessmentTypeDef#

# GuardrailTopicPolicyAssessmentTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailTopicPolicyAssessmentTypeDef


def get_value() -> GuardrailTopicPolicyAssessmentTypeDef:
    return {
        "topics": ...,
    }


# GuardrailTopicPolicyAssessmentTypeDef definition

class GuardrailTopicPolicyAssessmentTypeDef(TypedDict):
    topics: List[GuardrailTopicTypeDef],  # (1)
  1. See List[GuardrailTopicTypeDef]

InvokeModelWithBidirectionalStreamOutputTypeDef#

# InvokeModelWithBidirectionalStreamOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import InvokeModelWithBidirectionalStreamOutputTypeDef


def get_value() -> InvokeModelWithBidirectionalStreamOutputTypeDef:
    return {
        "chunk": ...,
    }


# InvokeModelWithBidirectionalStreamOutputTypeDef definition

class InvokeModelWithBidirectionalStreamOutputTypeDef(TypedDict):
    chunk: NotRequired[BidirectionalOutputPayloadPartTypeDef],  # (1)
    internalServerException: NotRequired[InternalServerExceptionTypeDef],  # (2)
    modelStreamErrorException: NotRequired[ModelStreamErrorExceptionTypeDef],  # (3)
    validationException: NotRequired[ValidationExceptionTypeDef],  # (4)
    throttlingException: NotRequired[ThrottlingExceptionTypeDef],  # (5)
    modelTimeoutException: NotRequired[ModelTimeoutExceptionTypeDef],  # (6)
    serviceUnavailableException: NotRequired[ServiceUnavailableExceptionTypeDef],  # (7)
  1. See BidirectionalOutputPayloadPartTypeDef
  2. See InternalServerExceptionTypeDef
  3. See ModelStreamErrorExceptionTypeDef
  4. See ValidationExceptionTypeDef
  5. See ThrottlingExceptionTypeDef
  6. See ModelTimeoutExceptionTypeDef
  7. See ServiceUnavailableExceptionTypeDef

ListAsyncInvokesRequestPaginateTypeDef#

# ListAsyncInvokesRequestPaginateTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ListAsyncInvokesRequestPaginateTypeDef


def get_value() -> ListAsyncInvokesRequestPaginateTypeDef:
    return {
        "submitTimeAfter": ...,
    }


# ListAsyncInvokesRequestPaginateTypeDef definition

class ListAsyncInvokesRequestPaginateTypeDef(TypedDict):
    submitTimeAfter: NotRequired[TimestampTypeDef],
    submitTimeBefore: NotRequired[TimestampTypeDef],
    statusEquals: NotRequired[AsyncInvokeStatusType],  # (1)
    sortBy: NotRequired[SortAsyncInvocationByType],  # (2)
    sortOrder: NotRequired[SortOrderType],  # (3)
    PaginationConfig: NotRequired[PaginatorConfigTypeDef],  # (4)
  1. See AsyncInvokeStatusType
  2. See SortAsyncInvocationByType
  3. See SortOrderType
  4. See PaginatorConfigTypeDef

ListAsyncInvokesRequestTypeDef#

# ListAsyncInvokesRequestTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ListAsyncInvokesRequestTypeDef


def get_value() -> ListAsyncInvokesRequestTypeDef:
    return {
        "submitTimeAfter": ...,
    }


# ListAsyncInvokesRequestTypeDef definition

class ListAsyncInvokesRequestTypeDef(TypedDict):
    submitTimeAfter: NotRequired[TimestampTypeDef],
    submitTimeBefore: NotRequired[TimestampTypeDef],
    statusEquals: NotRequired[AsyncInvokeStatusType],  # (1)
    maxResults: NotRequired[int],
    nextToken: NotRequired[str],
    sortBy: NotRequired[SortAsyncInvocationByType],  # (2)
    sortOrder: NotRequired[SortOrderType],  # (3)
  1. See AsyncInvokeStatusType
  2. See SortAsyncInvocationByType
  3. See SortOrderType

ResponseStreamTypeDef#

# ResponseStreamTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ResponseStreamTypeDef


def get_value() -> ResponseStreamTypeDef:
    return {
        "chunk": ...,
    }


# ResponseStreamTypeDef definition

class ResponseStreamTypeDef(TypedDict):
    chunk: NotRequired[PayloadPartTypeDef],  # (1)
    internalServerException: NotRequired[InternalServerExceptionTypeDef],  # (2)
    modelStreamErrorException: NotRequired[ModelStreamErrorExceptionTypeDef],  # (3)
    validationException: NotRequired[ValidationExceptionTypeDef],  # (4)
    throttlingException: NotRequired[ThrottlingExceptionTypeDef],  # (5)
    modelTimeoutException: NotRequired[ModelTimeoutExceptionTypeDef],  # (6)
    serviceUnavailableException: NotRequired[ServiceUnavailableExceptionTypeDef],  # (7)
  1. See PayloadPartTypeDef
  2. See InternalServerExceptionTypeDef
  3. See ModelStreamErrorExceptionTypeDef
  4. See ValidationExceptionTypeDef
  5. See ThrottlingExceptionTypeDef
  6. See ModelTimeoutExceptionTypeDef
  7. See ServiceUnavailableExceptionTypeDef

ReasoningContentBlockOutputTypeDef#

# ReasoningContentBlockOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ReasoningContentBlockOutputTypeDef


def get_value() -> ReasoningContentBlockOutputTypeDef:
    return {
        "reasoningText": ...,
    }


# ReasoningContentBlockOutputTypeDef definition

class ReasoningContentBlockOutputTypeDef(TypedDict):
    reasoningText: NotRequired[ReasoningTextBlockTypeDef],  # (1)
    redactedContent: NotRequired[bytes],
  1. See ReasoningTextBlockTypeDef

ReasoningContentBlockTypeDef#

# ReasoningContentBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ReasoningContentBlockTypeDef


def get_value() -> ReasoningContentBlockTypeDef:
    return {
        "reasoningText": ...,
    }


# ReasoningContentBlockTypeDef definition

class ReasoningContentBlockTypeDef(TypedDict):
    reasoningText: NotRequired[ReasoningTextBlockTypeDef],  # (1)
    redactedContent: NotRequired[BlobTypeDef],
  1. See ReasoningTextBlockTypeDef

ToolChoiceTypeDef#

# ToolChoiceTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ToolChoiceTypeDef


def get_value() -> ToolChoiceTypeDef:
    return {
        "auto": ...,
    }


# ToolChoiceTypeDef definition

class ToolChoiceTypeDef(TypedDict):
    auto: NotRequired[Mapping[str, Any]],
    any: NotRequired[Mapping[str, Any]],
    tool: NotRequired[SpecificToolChoiceTypeDef],  # (1)
  1. See SpecificToolChoiceTypeDef

ToolSpecificationTypeDef#

# ToolSpecificationTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ToolSpecificationTypeDef


def get_value() -> ToolSpecificationTypeDef:
    return {
        "name": ...,
    }


# ToolSpecificationTypeDef definition

class ToolSpecificationTypeDef(TypedDict):
    name: str,
    inputSchema: ToolInputSchemaTypeDef,  # (1)
    description: NotRequired[str],
  1. See ToolInputSchemaTypeDef

AsyncInvokeSummaryTypeDef#

# AsyncInvokeSummaryTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import AsyncInvokeSummaryTypeDef


def get_value() -> AsyncInvokeSummaryTypeDef:
    return {
        "invocationArn": ...,
    }


# AsyncInvokeSummaryTypeDef definition

class AsyncInvokeSummaryTypeDef(TypedDict):
    invocationArn: str,
    modelArn: str,
    submitTime: datetime.datetime,
    outputDataConfig: AsyncInvokeOutputDataConfigTypeDef,  # (2)
    clientRequestToken: NotRequired[str],
    status: NotRequired[AsyncInvokeStatusType],  # (1)
    failureMessage: NotRequired[str],
    lastModifiedTime: NotRequired[datetime.datetime],
    endTime: NotRequired[datetime.datetime],
  1. See AsyncInvokeStatusType
  2. See AsyncInvokeOutputDataConfigTypeDef

GetAsyncInvokeResponseTypeDef#

# GetAsyncInvokeResponseTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GetAsyncInvokeResponseTypeDef


def get_value() -> GetAsyncInvokeResponseTypeDef:
    return {
        "invocationArn": ...,
    }


# GetAsyncInvokeResponseTypeDef definition

class GetAsyncInvokeResponseTypeDef(TypedDict):
    invocationArn: str,
    modelArn: str,
    clientRequestToken: str,
    status: AsyncInvokeStatusType,  # (1)
    failureMessage: str,
    submitTime: datetime.datetime,
    lastModifiedTime: datetime.datetime,
    endTime: datetime.datetime,
    outputDataConfig: AsyncInvokeOutputDataConfigTypeDef,  # (2)
    ResponseMetadata: ResponseMetadataTypeDef,  # (3)
  1. See AsyncInvokeStatusType
  2. See AsyncInvokeOutputDataConfigTypeDef
  3. See ResponseMetadataTypeDef

StartAsyncInvokeRequestTypeDef#

# StartAsyncInvokeRequestTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import StartAsyncInvokeRequestTypeDef


def get_value() -> StartAsyncInvokeRequestTypeDef:
    return {
        "modelId": ...,
    }


# StartAsyncInvokeRequestTypeDef definition

class StartAsyncInvokeRequestTypeDef(TypedDict):
    modelId: str,
    modelInput: Mapping[str, Any],
    outputDataConfig: AsyncInvokeOutputDataConfigTypeDef,  # (1)
    clientRequestToken: NotRequired[str],
    tags: NotRequired[Sequence[TagTypeDef]],  # (2)
  1. See AsyncInvokeOutputDataConfigTypeDef
  2. See Sequence[TagTypeDef]

InvokeModelWithBidirectionalStreamInputTypeDef#

# InvokeModelWithBidirectionalStreamInputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import InvokeModelWithBidirectionalStreamInputTypeDef


def get_value() -> InvokeModelWithBidirectionalStreamInputTypeDef:
    return {
        "chunk": ...,
    }


# InvokeModelWithBidirectionalStreamInputTypeDef definition

class InvokeModelWithBidirectionalStreamInputTypeDef(TypedDict):
    chunk: NotRequired[BidirectionalInputPayloadPartTypeDef],  # (1)
  1. See BidirectionalInputPayloadPartTypeDef

GuardrailImageBlockTypeDef#

# GuardrailImageBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailImageBlockTypeDef


def get_value() -> GuardrailImageBlockTypeDef:
    return {
        "format": ...,
    }


# GuardrailImageBlockTypeDef definition

class GuardrailImageBlockTypeDef(TypedDict):
    format: GuardrailImageFormatType,  # (1)
    source: GuardrailImageSourceTypeDef,  # (2)
  1. See GuardrailImageFormatType
  2. See GuardrailImageSourceTypeDef

ContentBlockDeltaEventTypeDef#

# ContentBlockDeltaEventTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ContentBlockDeltaEventTypeDef


def get_value() -> ContentBlockDeltaEventTypeDef:
    return {
        "delta": ...,
    }


# ContentBlockDeltaEventTypeDef definition

class ContentBlockDeltaEventTypeDef(TypedDict):
    delta: ContentBlockDeltaTypeDef,  # (1)
    contentBlockIndex: int,
  1. See ContentBlockDeltaTypeDef

ContentBlockStartEventTypeDef#

# ContentBlockStartEventTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ContentBlockStartEventTypeDef


def get_value() -> ContentBlockStartEventTypeDef:
    return {
        "start": ...,
    }


# ContentBlockStartEventTypeDef definition

class ContentBlockStartEventTypeDef(TypedDict):
    start: ContentBlockStartTypeDef,  # (1)
    contentBlockIndex: int,
  1. See ContentBlockStartTypeDef

DocumentBlockOutputTypeDef#

# DocumentBlockOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import DocumentBlockOutputTypeDef


def get_value() -> DocumentBlockOutputTypeDef:
    return {
        "format": ...,
    }


# DocumentBlockOutputTypeDef definition

class DocumentBlockOutputTypeDef(TypedDict):
    format: DocumentFormatType,  # (1)
    name: str,
    source: DocumentSourceOutputTypeDef,  # (2)
  1. See DocumentFormatType
  2. See DocumentSourceOutputTypeDef

ImageBlockOutputTypeDef#

# ImageBlockOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ImageBlockOutputTypeDef


def get_value() -> ImageBlockOutputTypeDef:
    return {
        "format": ...,
    }


# ImageBlockOutputTypeDef definition

class ImageBlockOutputTypeDef(TypedDict):
    format: ImageFormatType,  # (1)
    source: ImageSourceOutputTypeDef,  # (2)
  1. See ImageFormatType
  2. See ImageSourceOutputTypeDef

VideoBlockOutputTypeDef#

# VideoBlockOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import VideoBlockOutputTypeDef


def get_value() -> VideoBlockOutputTypeDef:
    return {
        "format": ...,
    }


# VideoBlockOutputTypeDef definition

class VideoBlockOutputTypeDef(TypedDict):
    format: VideoFormatType,  # (1)
    source: VideoSourceOutputTypeDef,  # (2)
  1. See VideoFormatType
  2. See VideoSourceOutputTypeDef

GuardrailConverseContentBlockOutputTypeDef#

# GuardrailConverseContentBlockOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailConverseContentBlockOutputTypeDef


def get_value() -> GuardrailConverseContentBlockOutputTypeDef:
    return {
        "text": ...,
    }


# GuardrailConverseContentBlockOutputTypeDef definition

class GuardrailConverseContentBlockOutputTypeDef(TypedDict):
    text: NotRequired[GuardrailConverseTextBlockOutputTypeDef],  # (1)
    image: NotRequired[GuardrailConverseImageBlockOutputTypeDef],  # (2)
  1. See GuardrailConverseTextBlockOutputTypeDef
  2. See GuardrailConverseImageBlockOutputTypeDef

GuardrailInvocationMetricsTypeDef#

# GuardrailInvocationMetricsTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailInvocationMetricsTypeDef


def get_value() -> GuardrailInvocationMetricsTypeDef:
    return {
        "guardrailProcessingLatency": ...,
    }


# GuardrailInvocationMetricsTypeDef definition

class GuardrailInvocationMetricsTypeDef(TypedDict):
    guardrailProcessingLatency: NotRequired[int],
    usage: NotRequired[GuardrailUsageTypeDef],  # (1)
    guardrailCoverage: NotRequired[GuardrailCoverageTypeDef],  # (2)
  1. See GuardrailUsageTypeDef
  2. See GuardrailCoverageTypeDef

InvokeModelWithBidirectionalStreamResponseTypeDef#

# InvokeModelWithBidirectionalStreamResponseTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import InvokeModelWithBidirectionalStreamResponseTypeDef


def get_value() -> InvokeModelWithBidirectionalStreamResponseTypeDef:
    return {
        "body": ...,
    }


# InvokeModelWithBidirectionalStreamResponseTypeDef definition

class InvokeModelWithBidirectionalStreamResponseTypeDef(TypedDict):
    body: botocore.eventstream.EventStream[InvokeModelWithBidirectionalStreamOutputTypeDef],  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See EventStream[InvokeModelWithBidirectionalStreamOutputTypeDef]
  2. See ResponseMetadataTypeDef

InvokeModelWithResponseStreamResponseTypeDef#

# InvokeModelWithResponseStreamResponseTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import InvokeModelWithResponseStreamResponseTypeDef


def get_value() -> InvokeModelWithResponseStreamResponseTypeDef:
    return {
        "body": ...,
    }


# InvokeModelWithResponseStreamResponseTypeDef definition

class InvokeModelWithResponseStreamResponseTypeDef(TypedDict):
    body: botocore.eventstream.EventStream[ResponseStreamTypeDef],  # (1)
    contentType: str,
    performanceConfigLatency: PerformanceConfigLatencyType,  # (2)
    ResponseMetadata: ResponseMetadataTypeDef,  # (3)
  1. See EventStream[ResponseStreamTypeDef]
  2. See PerformanceConfigLatencyType
  3. See ResponseMetadataTypeDef

ToolTypeDef#

# ToolTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ToolTypeDef


def get_value() -> ToolTypeDef:
    return {
        "toolSpec": ...,
    }


# ToolTypeDef definition

class ToolTypeDef(TypedDict):
    toolSpec: NotRequired[ToolSpecificationTypeDef],  # (1)
    cachePoint: NotRequired[CachePointBlockTypeDef],  # (2)
  1. See ToolSpecificationTypeDef
  2. See CachePointBlockTypeDef

ListAsyncInvokesResponseTypeDef#

# ListAsyncInvokesResponseTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ListAsyncInvokesResponseTypeDef


def get_value() -> ListAsyncInvokesResponseTypeDef:
    return {
        "nextToken": ...,
    }


# ListAsyncInvokesResponseTypeDef definition

class ListAsyncInvokesResponseTypeDef(TypedDict):
    asyncInvokeSummaries: List[AsyncInvokeSummaryTypeDef],  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
    nextToken: NotRequired[str],
  1. See List[AsyncInvokeSummaryTypeDef]
  2. See ResponseMetadataTypeDef

InvokeModelWithBidirectionalStreamRequestTypeDef#

# InvokeModelWithBidirectionalStreamRequestTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import InvokeModelWithBidirectionalStreamRequestTypeDef


def get_value() -> InvokeModelWithBidirectionalStreamRequestTypeDef:
    return {
        "modelId": ...,
    }


# InvokeModelWithBidirectionalStreamRequestTypeDef definition

class InvokeModelWithBidirectionalStreamRequestTypeDef(TypedDict):
    modelId: str,
    body: botocore.eventstream.EventStream[InvokeModelWithBidirectionalStreamInputTypeDef],  # (1)
  1. See EventStream[InvokeModelWithBidirectionalStreamInputTypeDef]

GuardrailConverseImageBlockTypeDef#

# GuardrailConverseImageBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailConverseImageBlockTypeDef


def get_value() -> GuardrailConverseImageBlockTypeDef:
    return {
        "format": ...,
    }


# GuardrailConverseImageBlockTypeDef definition

class GuardrailConverseImageBlockTypeDef(TypedDict):
    format: GuardrailConverseImageFormatType,  # (1)
    source: GuardrailConverseImageSourceUnionTypeDef,  # (2)
  1. See GuardrailConverseImageFormatType
  2. See GuardrailConverseImageSourceUnionTypeDef

GuardrailContentBlockTypeDef#

# GuardrailContentBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailContentBlockTypeDef


def get_value() -> GuardrailContentBlockTypeDef:
    return {
        "text": ...,
    }


# GuardrailContentBlockTypeDef definition

class GuardrailContentBlockTypeDef(TypedDict):
    text: NotRequired[GuardrailTextBlockTypeDef],  # (1)
    image: NotRequired[GuardrailImageBlockTypeDef],  # (2)
  1. See GuardrailTextBlockTypeDef
  2. See GuardrailImageBlockTypeDef

DocumentBlockTypeDef#

# DocumentBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import DocumentBlockTypeDef


def get_value() -> DocumentBlockTypeDef:
    return {
        "format": ...,
    }


# DocumentBlockTypeDef definition

class DocumentBlockTypeDef(TypedDict):
    format: DocumentFormatType,  # (1)
    name: str,
    source: DocumentSourceUnionTypeDef,  # (2)
  1. See DocumentFormatType
  2. See DocumentSourceUnionTypeDef

ImageBlockTypeDef#

# ImageBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ImageBlockTypeDef


def get_value() -> ImageBlockTypeDef:
    return {
        "format": ...,
    }


# ImageBlockTypeDef definition

class ImageBlockTypeDef(TypedDict):
    format: ImageFormatType,  # (1)
    source: ImageSourceUnionTypeDef,  # (2)
  1. See ImageFormatType
  2. See ImageSourceUnionTypeDef

ToolResultContentBlockOutputTypeDef#

# ToolResultContentBlockOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ToolResultContentBlockOutputTypeDef


def get_value() -> ToolResultContentBlockOutputTypeDef:
    return {
        "json": ...,
    }


# ToolResultContentBlockOutputTypeDef definition

class ToolResultContentBlockOutputTypeDef(TypedDict):
    json: NotRequired[Dict[str, Any]],
    text: NotRequired[str],
    image: NotRequired[ImageBlockOutputTypeDef],  # (1)
    document: NotRequired[DocumentBlockOutputTypeDef],  # (2)
    video: NotRequired[VideoBlockOutputTypeDef],  # (3)
  1. See ImageBlockOutputTypeDef
  2. See DocumentBlockOutputTypeDef
  3. See VideoBlockOutputTypeDef

VideoBlockTypeDef#

# VideoBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import VideoBlockTypeDef


def get_value() -> VideoBlockTypeDef:
    return {
        "format": ...,
    }


# VideoBlockTypeDef definition

class VideoBlockTypeDef(TypedDict):
    format: VideoFormatType,  # (1)
    source: VideoSourceUnionTypeDef,  # (2)
  1. See VideoFormatType
  2. See VideoSourceUnionTypeDef

GuardrailAssessmentTypeDef#

# GuardrailAssessmentTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailAssessmentTypeDef


def get_value() -> GuardrailAssessmentTypeDef:
    return {
        "topicPolicy": ...,
    }


# GuardrailAssessmentTypeDef definition

class GuardrailAssessmentTypeDef(TypedDict):
    topicPolicy: NotRequired[GuardrailTopicPolicyAssessmentTypeDef],  # (1)
    contentPolicy: NotRequired[GuardrailContentPolicyAssessmentTypeDef],  # (2)
    wordPolicy: NotRequired[GuardrailWordPolicyAssessmentTypeDef],  # (3)
    sensitiveInformationPolicy: NotRequired[GuardrailSensitiveInformationPolicyAssessmentTypeDef],  # (4)
    contextualGroundingPolicy: NotRequired[GuardrailContextualGroundingPolicyAssessmentTypeDef],  # (5)
    invocationMetrics: NotRequired[GuardrailInvocationMetricsTypeDef],  # (6)
  1. See GuardrailTopicPolicyAssessmentTypeDef
  2. See GuardrailContentPolicyAssessmentTypeDef
  3. See GuardrailWordPolicyAssessmentTypeDef
  4. See GuardrailSensitiveInformationPolicyAssessmentTypeDef
  5. See GuardrailContextualGroundingPolicyAssessmentTypeDef
  6. See GuardrailInvocationMetricsTypeDef

ToolConfigurationTypeDef#

# ToolConfigurationTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ToolConfigurationTypeDef


def get_value() -> ToolConfigurationTypeDef:
    return {
        "tools": ...,
    }


# ToolConfigurationTypeDef definition

class ToolConfigurationTypeDef(TypedDict):
    tools: Sequence[ToolTypeDef],  # (1)
    toolChoice: NotRequired[ToolChoiceTypeDef],  # (2)
  1. See Sequence[ToolTypeDef]
  2. See ToolChoiceTypeDef

ApplyGuardrailRequestTypeDef#

# ApplyGuardrailRequestTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ApplyGuardrailRequestTypeDef


def get_value() -> ApplyGuardrailRequestTypeDef:
    return {
        "guardrailIdentifier": ...,
    }


# ApplyGuardrailRequestTypeDef definition

class ApplyGuardrailRequestTypeDef(TypedDict):
    guardrailIdentifier: str,
    guardrailVersion: str,
    source: GuardrailContentSourceType,  # (1)
    content: Sequence[GuardrailContentBlockTypeDef],  # (2)
    outputScope: NotRequired[GuardrailOutputScopeType],  # (3)
  1. See GuardrailContentSourceType
  2. See Sequence[GuardrailContentBlockTypeDef]
  3. See GuardrailOutputScopeType

ToolResultBlockOutputTypeDef#

# ToolResultBlockOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ToolResultBlockOutputTypeDef


def get_value() -> ToolResultBlockOutputTypeDef:
    return {
        "toolUseId": ...,
    }


# ToolResultBlockOutputTypeDef definition

class ToolResultBlockOutputTypeDef(TypedDict):
    toolUseId: str,
    content: List[ToolResultContentBlockOutputTypeDef],  # (1)
    status: NotRequired[ToolResultStatusType],  # (2)
  1. See List[ToolResultContentBlockOutputTypeDef]
  2. See ToolResultStatusType

ApplyGuardrailResponseTypeDef#

# ApplyGuardrailResponseTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ApplyGuardrailResponseTypeDef


def get_value() -> ApplyGuardrailResponseTypeDef:
    return {
        "usage": ...,
    }


# ApplyGuardrailResponseTypeDef definition

class ApplyGuardrailResponseTypeDef(TypedDict):
    usage: GuardrailUsageTypeDef,  # (1)
    action: GuardrailActionType,  # (2)
    actionReason: str,
    outputs: List[GuardrailOutputContentTypeDef],  # (3)
    assessments: List[GuardrailAssessmentTypeDef],  # (4)
    guardrailCoverage: GuardrailCoverageTypeDef,  # (5)
    ResponseMetadata: ResponseMetadataTypeDef,  # (6)
  1. See GuardrailUsageTypeDef
  2. See GuardrailActionType
  3. See List[GuardrailOutputContentTypeDef]
  4. See List[GuardrailAssessmentTypeDef]
  5. See GuardrailCoverageTypeDef
  6. See ResponseMetadataTypeDef

GuardrailTraceAssessmentTypeDef#

# GuardrailTraceAssessmentTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailTraceAssessmentTypeDef


def get_value() -> GuardrailTraceAssessmentTypeDef:
    return {
        "modelOutput": ...,
    }


# GuardrailTraceAssessmentTypeDef definition

class GuardrailTraceAssessmentTypeDef(TypedDict):
    modelOutput: NotRequired[List[str]],
    inputAssessment: NotRequired[Dict[str, GuardrailAssessmentTypeDef]],  # (1)
    outputAssessments: NotRequired[Dict[str, List[GuardrailAssessmentTypeDef]]],  # (2)
    actionReason: NotRequired[str],
  1. See Dict[str, GuardrailAssessmentTypeDef]
  2. See Dict[str, List[GuardrailAssessmentTypeDef]]

GuardrailConverseContentBlockTypeDef#

# GuardrailConverseContentBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailConverseContentBlockTypeDef


def get_value() -> GuardrailConverseContentBlockTypeDef:
    return {
        "text": ...,
    }


# GuardrailConverseContentBlockTypeDef definition

class GuardrailConverseContentBlockTypeDef(TypedDict):
    text: NotRequired[GuardrailConverseTextBlockUnionTypeDef],  # (1)
    image: NotRequired[GuardrailConverseImageBlockUnionTypeDef],  # (2)
  1. See GuardrailConverseTextBlockUnionTypeDef
  2. See GuardrailConverseImageBlockUnionTypeDef

ContentBlockOutputTypeDef#

# ContentBlockOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ContentBlockOutputTypeDef


def get_value() -> ContentBlockOutputTypeDef:
    return {
        "text": ...,
    }


# ContentBlockOutputTypeDef definition

class ContentBlockOutputTypeDef(TypedDict):
    text: NotRequired[str],
    image: NotRequired[ImageBlockOutputTypeDef],  # (1)
    document: NotRequired[DocumentBlockOutputTypeDef],  # (2)
    video: NotRequired[VideoBlockOutputTypeDef],  # (3)
    toolUse: NotRequired[ToolUseBlockOutputTypeDef],  # (4)
    toolResult: NotRequired[ToolResultBlockOutputTypeDef],  # (5)
    guardContent: NotRequired[GuardrailConverseContentBlockOutputTypeDef],  # (6)
    cachePoint: NotRequired[CachePointBlockTypeDef],  # (7)
    reasoningContent: NotRequired[ReasoningContentBlockOutputTypeDef],  # (8)
  1. See ImageBlockOutputTypeDef
  2. See DocumentBlockOutputTypeDef
  3. See VideoBlockOutputTypeDef
  4. See ToolUseBlockOutputTypeDef
  5. See ToolResultBlockOutputTypeDef
  6. See GuardrailConverseContentBlockOutputTypeDef
  7. See CachePointBlockTypeDef
  8. See ReasoningContentBlockOutputTypeDef

ToolResultContentBlockTypeDef#

# ToolResultContentBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ToolResultContentBlockTypeDef


def get_value() -> ToolResultContentBlockTypeDef:
    return {
        "json": ...,
    }


# ToolResultContentBlockTypeDef definition

class ToolResultContentBlockTypeDef(TypedDict):
    json: NotRequired[Mapping[str, Any]],
    text: NotRequired[str],
    image: NotRequired[ImageBlockUnionTypeDef],  # (1)
    document: NotRequired[DocumentBlockUnionTypeDef],  # (2)
    video: NotRequired[VideoBlockUnionTypeDef],  # (3)
  1. See ImageBlockUnionTypeDef
  2. See DocumentBlockUnionTypeDef
  3. See VideoBlockUnionTypeDef

ConverseStreamTraceTypeDef#

# ConverseStreamTraceTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ConverseStreamTraceTypeDef


def get_value() -> ConverseStreamTraceTypeDef:
    return {
        "guardrail": ...,
    }


# ConverseStreamTraceTypeDef definition

class ConverseStreamTraceTypeDef(TypedDict):
    guardrail: NotRequired[GuardrailTraceAssessmentTypeDef],  # (1)
    promptRouter: NotRequired[PromptRouterTraceTypeDef],  # (2)
  1. See GuardrailTraceAssessmentTypeDef
  2. See PromptRouterTraceTypeDef

ConverseTraceTypeDef#

# ConverseTraceTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ConverseTraceTypeDef


def get_value() -> ConverseTraceTypeDef:
    return {
        "guardrail": ...,
    }


# ConverseTraceTypeDef definition

class ConverseTraceTypeDef(TypedDict):
    guardrail: NotRequired[GuardrailTraceAssessmentTypeDef],  # (1)
    promptRouter: NotRequired[PromptRouterTraceTypeDef],  # (2)
  1. See GuardrailTraceAssessmentTypeDef
  2. See PromptRouterTraceTypeDef

MessageOutputTypeDef#

# MessageOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import MessageOutputTypeDef


def get_value() -> MessageOutputTypeDef:
    return {
        "role": ...,
    }


# MessageOutputTypeDef definition

class MessageOutputTypeDef(TypedDict):
    role: ConversationRoleType,  # (1)
    content: List[ContentBlockOutputTypeDef],  # (2)
  1. See ConversationRoleType
  2. See List[ContentBlockOutputTypeDef]

ConverseStreamMetadataEventTypeDef#

# ConverseStreamMetadataEventTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ConverseStreamMetadataEventTypeDef


def get_value() -> ConverseStreamMetadataEventTypeDef:
    return {
        "usage": ...,
    }


# ConverseStreamMetadataEventTypeDef definition

class ConverseStreamMetadataEventTypeDef(TypedDict):
    usage: TokenUsageTypeDef,  # (1)
    metrics: ConverseStreamMetricsTypeDef,  # (2)
    trace: NotRequired[ConverseStreamTraceTypeDef],  # (3)
    performanceConfig: NotRequired[PerformanceConfigurationTypeDef],  # (4)
  1. See TokenUsageTypeDef
  2. See ConverseStreamMetricsTypeDef
  3. See ConverseStreamTraceTypeDef
  4. See PerformanceConfigurationTypeDef

SystemContentBlockTypeDef#

# SystemContentBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import SystemContentBlockTypeDef


def get_value() -> SystemContentBlockTypeDef:
    return {
        "text": ...,
    }


# SystemContentBlockTypeDef definition

class SystemContentBlockTypeDef(TypedDict):
    text: NotRequired[str],
    guardContent: NotRequired[GuardrailConverseContentBlockUnionTypeDef],  # (1)
    cachePoint: NotRequired[CachePointBlockTypeDef],  # (2)
  1. See GuardrailConverseContentBlockUnionTypeDef
  2. See CachePointBlockTypeDef

ConverseOutputTypeDef#

# ConverseOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ConverseOutputTypeDef


def get_value() -> ConverseOutputTypeDef:
    return {
        "message": ...,
    }


# ConverseOutputTypeDef definition

class ConverseOutputTypeDef(TypedDict):
    message: NotRequired[MessageOutputTypeDef],  # (1)
  1. See MessageOutputTypeDef

ToolResultBlockTypeDef#

# ToolResultBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ToolResultBlockTypeDef


def get_value() -> ToolResultBlockTypeDef:
    return {
        "toolUseId": ...,
    }


# ToolResultBlockTypeDef definition

class ToolResultBlockTypeDef(TypedDict):
    toolUseId: str,
    content: Sequence[ToolResultContentBlockUnionTypeDef],  # (1)
    status: NotRequired[ToolResultStatusType],  # (2)
  1. See Sequence[ToolResultContentBlockUnionTypeDef]
  2. See ToolResultStatusType

ConverseStreamOutputTypeDef#

# ConverseStreamOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ConverseStreamOutputTypeDef


def get_value() -> ConverseStreamOutputTypeDef:
    return {
        "messageStart": ...,
    }


# ConverseStreamOutputTypeDef definition

class ConverseStreamOutputTypeDef(TypedDict):
    messageStart: NotRequired[MessageStartEventTypeDef],  # (1)
    contentBlockStart: NotRequired[ContentBlockStartEventTypeDef],  # (2)
    contentBlockDelta: NotRequired[ContentBlockDeltaEventTypeDef],  # (3)
    contentBlockStop: NotRequired[ContentBlockStopEventTypeDef],  # (4)
    messageStop: NotRequired[MessageStopEventTypeDef],  # (5)
    metadata: NotRequired[ConverseStreamMetadataEventTypeDef],  # (6)
    internalServerException: NotRequired[InternalServerExceptionTypeDef],  # (7)
    modelStreamErrorException: NotRequired[ModelStreamErrorExceptionTypeDef],  # (8)
    validationException: NotRequired[ValidationExceptionTypeDef],  # (9)
    throttlingException: NotRequired[ThrottlingExceptionTypeDef],  # (10)
    serviceUnavailableException: NotRequired[ServiceUnavailableExceptionTypeDef],  # (11)
  1. See MessageStartEventTypeDef
  2. See ContentBlockStartEventTypeDef
  3. See ContentBlockDeltaEventTypeDef
  4. See ContentBlockStopEventTypeDef
  5. See MessageStopEventTypeDef
  6. See ConverseStreamMetadataEventTypeDef
  7. See InternalServerExceptionTypeDef
  8. See ModelStreamErrorExceptionTypeDef
  9. See ValidationExceptionTypeDef
  10. See ThrottlingExceptionTypeDef
  11. See ServiceUnavailableExceptionTypeDef

ConverseResponseTypeDef#

# ConverseResponseTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ConverseResponseTypeDef


def get_value() -> ConverseResponseTypeDef:
    return {
        "output": ...,
    }


# ConverseResponseTypeDef definition

class ConverseResponseTypeDef(TypedDict):
    output: ConverseOutputTypeDef,  # (1)
    stopReason: StopReasonType,  # (2)
    usage: TokenUsageTypeDef,  # (3)
    metrics: ConverseMetricsTypeDef,  # (4)
    additionalModelResponseFields: Dict[str, Any],
    trace: ConverseTraceTypeDef,  # (5)
    performanceConfig: PerformanceConfigurationTypeDef,  # (6)
    ResponseMetadata: ResponseMetadataTypeDef,  # (7)
  1. See ConverseOutputTypeDef
  2. See StopReasonType
  3. See TokenUsageTypeDef
  4. See ConverseMetricsTypeDef
  5. See ConverseTraceTypeDef
  6. See PerformanceConfigurationTypeDef
  7. See ResponseMetadataTypeDef

ConverseStreamResponseTypeDef#

# ConverseStreamResponseTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ConverseStreamResponseTypeDef


def get_value() -> ConverseStreamResponseTypeDef:
    return {
        "stream": ...,
    }


# ConverseStreamResponseTypeDef definition

class ConverseStreamResponseTypeDef(TypedDict):
    stream: botocore.eventstream.EventStream[ConverseStreamOutputTypeDef],  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See EventStream[ConverseStreamOutputTypeDef]
  2. See ResponseMetadataTypeDef

ContentBlockTypeDef#

# ContentBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ContentBlockTypeDef


def get_value() -> ContentBlockTypeDef:
    return {
        "text": ...,
    }


# ContentBlockTypeDef definition

class ContentBlockTypeDef(TypedDict):
    text: NotRequired[str],
    image: NotRequired[ImageBlockUnionTypeDef],  # (1)
    document: NotRequired[DocumentBlockUnionTypeDef],  # (2)
    video: NotRequired[VideoBlockUnionTypeDef],  # (3)
    toolUse: NotRequired[ToolUseBlockUnionTypeDef],  # (4)
    toolResult: NotRequired[ToolResultBlockUnionTypeDef],  # (5)
    guardContent: NotRequired[GuardrailConverseContentBlockUnionTypeDef],  # (6)
    cachePoint: NotRequired[CachePointBlockTypeDef],  # (7)
    reasoningContent: NotRequired[ReasoningContentBlockUnionTypeDef],  # (8)
  1. See ImageBlockUnionTypeDef
  2. See DocumentBlockUnionTypeDef
  3. See VideoBlockUnionTypeDef
  4. See ToolUseBlockUnionTypeDef
  5. See ToolResultBlockUnionTypeDef
  6. See GuardrailConverseContentBlockUnionTypeDef
  7. See CachePointBlockTypeDef
  8. See ReasoningContentBlockUnionTypeDef

MessageTypeDef#

# MessageTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import MessageTypeDef


def get_value() -> MessageTypeDef:
    return {
        "role": ...,
    }


# MessageTypeDef definition

class MessageTypeDef(TypedDict):
    role: ConversationRoleType,  # (1)
    content: Sequence[ContentBlockUnionTypeDef],  # (2)
  1. See ConversationRoleType
  2. See Sequence[ContentBlockUnionTypeDef]

ConverseRequestTypeDef#

# ConverseRequestTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ConverseRequestTypeDef


def get_value() -> ConverseRequestTypeDef:
    return {
        "modelId": ...,
    }


# ConverseRequestTypeDef definition

class ConverseRequestTypeDef(TypedDict):
    modelId: str,
    messages: NotRequired[Sequence[MessageUnionTypeDef]],  # (1)
    system: NotRequired[Sequence[SystemContentBlockTypeDef]],  # (2)
    inferenceConfig: NotRequired[InferenceConfigurationTypeDef],  # (3)
    toolConfig: NotRequired[ToolConfigurationTypeDef],  # (4)
    guardrailConfig: NotRequired[GuardrailConfigurationTypeDef],  # (5)
    additionalModelRequestFields: NotRequired[Mapping[str, Any]],
    promptVariables: NotRequired[Mapping[str, PromptVariableValuesTypeDef]],  # (6)
    additionalModelResponseFieldPaths: NotRequired[Sequence[str]],
    requestMetadata: NotRequired[Mapping[str, str]],
    performanceConfig: NotRequired[PerformanceConfigurationTypeDef],  # (7)
  1. See Sequence[MessageUnionTypeDef]
  2. See Sequence[SystemContentBlockTypeDef]
  3. See InferenceConfigurationTypeDef
  4. See ToolConfigurationTypeDef
  5. See GuardrailConfigurationTypeDef
  6. See Mapping[str, PromptVariableValuesTypeDef]
  7. See PerformanceConfigurationTypeDef

ConverseStreamRequestTypeDef#

# ConverseStreamRequestTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ConverseStreamRequestTypeDef


def get_value() -> ConverseStreamRequestTypeDef:
    return {
        "modelId": ...,
    }


# ConverseStreamRequestTypeDef definition

class ConverseStreamRequestTypeDef(TypedDict):
    modelId: str,
    messages: NotRequired[Sequence[MessageUnionTypeDef]],  # (1)
    system: NotRequired[Sequence[SystemContentBlockTypeDef]],  # (2)
    inferenceConfig: NotRequired[InferenceConfigurationTypeDef],  # (3)
    toolConfig: NotRequired[ToolConfigurationTypeDef],  # (4)
    guardrailConfig: NotRequired[GuardrailStreamConfigurationTypeDef],  # (5)
    additionalModelRequestFields: NotRequired[Mapping[str, Any]],
    promptVariables: NotRequired[Mapping[str, PromptVariableValuesTypeDef]],  # (6)
    additionalModelResponseFieldPaths: NotRequired[Sequence[str]],
    requestMetadata: NotRequired[Mapping[str, str]],
    performanceConfig: NotRequired[PerformanceConfigurationTypeDef],  # (7)
  1. See Sequence[MessageUnionTypeDef]
  2. See Sequence[SystemContentBlockTypeDef]
  3. See InferenceConfigurationTypeDef
  4. See ToolConfigurationTypeDef
  5. See GuardrailStreamConfigurationTypeDef
  6. See Mapping[str, PromptVariableValuesTypeDef]
  7. See PerformanceConfigurationTypeDef