BedrockClient#
Auto-generated documentation for Bedrock type annotations stubs module mypy-boto3-bedrock.
BedrockClient#
Type annotations and code completion for boto3.client("bedrock")
.
boto3 documentation
# BedrockClient usage example
from boto3.session import Session
from mypy_boto3_bedrock.client import BedrockClient
def get_bedrock_client() -> BedrockClient:
return Session().client("bedrock")
Exceptions#
boto3
client exceptions are generated in runtime.
This class provides code completion for boto3.client("bedrock").exceptions
structure.
# Exceptions.exceptions usage example
client = boto3.client("bedrock")
try:
do_something(client)
except (
client.exceptions.AccessDeniedException,
client.exceptions.ClientError,
client.exceptions.ConflictException,
client.exceptions.InternalServerException,
client.exceptions.ResourceNotFoundException,
client.exceptions.ServiceQuotaExceededException,
client.exceptions.ThrottlingException,
client.exceptions.TooManyTagsException,
client.exceptions.ValidationException,
) as e:
print(e)
# Exceptions.exceptions type checking example
from mypy_boto3_bedrock.client import Exceptions
def handle_error(exc: Exceptions.AccessDeniedException) -> None:
...
Methods#
batch_delete_evaluation_job#
Creates a batch deletion job.
Type annotations and code completion for boto3.client("bedrock").batch_delete_evaluation_job
method.
boto3 documentation
# batch_delete_evaluation_job method definition
def batch_delete_evaluation_job(
self,
*,
jobIdentifiers: Sequence[str],
) -> BatchDeleteEvaluationJobResponseTypeDef: # (1)
...
# batch_delete_evaluation_job method usage example with argument unpacking
kwargs: BatchDeleteEvaluationJobRequestRequestTypeDef = { # (1)
"jobIdentifiers": ...,
}
parent.batch_delete_evaluation_job(**kwargs)
can_paginate#
Check if an operation can be paginated.
Type annotations and code completion for boto3.client("bedrock").can_paginate
method.
boto3 documentation
# can_paginate method definition
def can_paginate(
self,
operation_name: str,
) -> bool:
...
close#
Closes underlying endpoint connections.
Type annotations and code completion for boto3.client("bedrock").close
method.
boto3 documentation
# close method definition
def close(
self,
) -> None:
...
create_evaluation_job#
API operation for creating and managing Amazon Bedrock automatic model evaluation jobs and model evaluation jobs that use human workers.
Type annotations and code completion for boto3.client("bedrock").create_evaluation_job
method.
boto3 documentation
# create_evaluation_job method definition
def create_evaluation_job(
self,
*,
jobName: str,
roleArn: str,
evaluationConfig: Union[EvaluationConfigTypeDef, EvaluationConfigOutputTypeDef], # (1)
inferenceConfig: Union[EvaluationInferenceConfigTypeDef, EvaluationInferenceConfigOutputTypeDef], # (2)
outputDataConfig: EvaluationOutputDataConfigTypeDef, # (3)
jobDescription: str = ...,
clientRequestToken: str = ...,
customerEncryptionKeyId: str = ...,
jobTags: Sequence[TagTypeDef] = ..., # (4)
) -> CreateEvaluationJobResponseTypeDef: # (5)
...
- See EvaluationConfigTypeDef EvaluationConfigOutputTypeDef
- See EvaluationInferenceConfigTypeDef EvaluationInferenceConfigOutputTypeDef
- See EvaluationOutputDataConfigTypeDef
- See TagTypeDef
- See CreateEvaluationJobResponseTypeDef
# create_evaluation_job method usage example with argument unpacking
kwargs: CreateEvaluationJobRequestRequestTypeDef = { # (1)
"jobName": ...,
"roleArn": ...,
"evaluationConfig": ...,
"inferenceConfig": ...,
"outputDataConfig": ...,
}
parent.create_evaluation_job(**kwargs)
create_guardrail#
Creates a guardrail to block topics and to implement safeguards for your generative AI applications.
Type annotations and code completion for boto3.client("bedrock").create_guardrail
method.
boto3 documentation
# create_guardrail method definition
def create_guardrail(
self,
*,
name: str,
blockedInputMessaging: str,
blockedOutputsMessaging: str,
description: str = ...,
topicPolicyConfig: GuardrailTopicPolicyConfigTypeDef = ..., # (1)
contentPolicyConfig: GuardrailContentPolicyConfigTypeDef = ..., # (2)
wordPolicyConfig: GuardrailWordPolicyConfigTypeDef = ..., # (3)
sensitiveInformationPolicyConfig: GuardrailSensitiveInformationPolicyConfigTypeDef = ..., # (4)
contextualGroundingPolicyConfig: GuardrailContextualGroundingPolicyConfigTypeDef = ..., # (5)
kmsKeyId: str = ...,
tags: Sequence[TagTypeDef] = ..., # (6)
clientRequestToken: str = ...,
) -> CreateGuardrailResponseTypeDef: # (7)
...