RekognitionClient#
Index > Rekognition > RekognitionClient
Auto-generated documentation for Rekognition type annotations stubs module mypy-boto3-rekognition.
RekognitionClient#
Type annotations and code completion for boto3.client("rekognition")
.
boto3 documentation
# RekognitionClient usage example
from boto3.session import Session
from mypy_boto3_rekognition.client import RekognitionClient
def get_rekognition_client() -> RekognitionClient:
return Session().client("rekognition")
Exceptions#
boto3
client exceptions are generated in runtime.
This class provides code completion for boto3.client("rekognition").exceptions
structure.
# Exceptions.exceptions usage example
client = boto3.client("rekognition")
try:
do_something(client)
except (
client.exceptions.AccessDeniedException,
client.exceptions.ClientError,
client.exceptions.ConflictException,
client.exceptions.HumanLoopQuotaExceededException,
client.exceptions.IdempotentParameterMismatchException,
client.exceptions.ImageTooLargeException,
client.exceptions.InternalServerError,
client.exceptions.InvalidImageFormatException,
client.exceptions.InvalidManifestException,
client.exceptions.InvalidPaginationTokenException,
client.exceptions.InvalidParameterException,
client.exceptions.InvalidPolicyRevisionIdException,
client.exceptions.InvalidS3ObjectException,
client.exceptions.LimitExceededException,
client.exceptions.MalformedPolicyDocumentException,
client.exceptions.ProvisionedThroughputExceededException,
client.exceptions.ResourceAlreadyExistsException,
client.exceptions.ResourceInUseException,
client.exceptions.ResourceNotFoundException,
client.exceptions.ResourceNotReadyException,
client.exceptions.ServiceQuotaExceededException,
client.exceptions.SessionNotFoundException,
client.exceptions.ThrottlingException,
client.exceptions.VideoTooLargeException,
) as e:
print(e)
# Exceptions.exceptions type checking example
from mypy_boto3_rekognition.client import Exceptions
def handle_error(exc: Exceptions.AccessDeniedException) -> None:
...
Methods#
associate_faces#
Associates one or more faces with an existing UserID.
Type annotations and code completion for boto3.client("rekognition").associate_faces
method.
boto3 documentation
# associate_faces method definition
def associate_faces(
self,
*,
CollectionId: str,
UserId: str,
FaceIds: Sequence[str],
UserMatchThreshold: float = ...,
ClientRequestToken: str = ...,
) -> AssociateFacesResponseTypeDef: # (1)
...
# associate_faces method usage example with argument unpacking
kwargs: AssociateFacesRequestRequestTypeDef = { # (1)
"CollectionId": ...,
"UserId": ...,
"FaceIds": ...,
}
parent.associate_faces(**kwargs)
can_paginate#
Check if an operation can be paginated.
Type annotations and code completion for boto3.client("rekognition").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("rekognition").close
method.
boto3 documentation
# close method definition
def close(
self,
) -> None:
...
compare_faces#
Compares a face in the source input image with each of the 100 largest faces detected in the target input image.
Type annotations and code completion for boto3.client("rekognition").compare_faces
method.
boto3 documentation
# compare_faces method definition
def compare_faces(
self,
*,
SourceImage: ImageTypeDef, # (1)
TargetImage: ImageTypeDef, # (1)
SimilarityThreshold: float = ...,
QualityFilter: QualityFilterType = ..., # (3)
) -> CompareFacesResponseTypeDef: # (4)
...
- See ImageTypeDef
- See ImageTypeDef
- See QualityFilterType
- See CompareFacesResponseTypeDef
# compare_faces method usage example with argument unpacking
kwargs: CompareFacesRequestRequestTypeDef = { # (1)
"SourceImage": ...,
"TargetImage": ...,
}
parent.compare_faces(**kwargs)
copy_project_version#
.
Type annotations and code completion for boto3.client("rekognition").copy_project_version
method.
boto3 documentation
# copy_project_version method definition
def copy_project_version(
self,
*,
SourceProjectArn: str,
SourceProjectVersionArn: str,
DestinationProjectArn: str,
VersionName: str,
OutputConfig: OutputConfigTypeDef, # (1)
Tags: Mapping[str, str] = ...,
KmsKeyId: str = ...,
) -> CopyProjectVersionResponseTypeDef: # (2)
...
# copy_project_version method usage example with argument unpacking
kwargs: CopyProjectVersionRequestRequestTypeDef = { # (1)
"SourceProjectArn": ...,
"SourceProjectVersionArn": ...,
"DestinationProjectArn": ...,
"VersionName": ...,
"OutputConfig": ...,
}
parent.copy_project_version(**kwargs)
create_collection#
Creates a collection in an AWS Region.
Type annotations and code completion for boto3.client("rekognition").create_collection
method.
boto3 documentation
# create_collection method definition
def create_collection(
self,
*,
CollectionId: str,
Tags: Mapping[str, str] = ...,
) -> CreateCollectionResponseTypeDef: # (1)
...
# create_collection method usage example with argument unpacking
kwargs: CreateCollectionRequestRequestTypeDef = { # (1)
"CollectionId": ...,
}
parent.create_collection(**kwargs)
create_dataset#
.
Type annotations and code completion for boto3.client("rekognition").create_dataset
method.
boto3 documentation
# create_dataset method definition
def create_dataset(
self,
*,
DatasetType: DatasetTypeType, # (1)
ProjectArn: str,
DatasetSource: DatasetSourceTypeDef = ..., # (2)
) -> CreateDatasetResponseTypeDef: # (3)
...
# create_dataset method usage example with argument unpacking
kwargs: CreateDatasetRequestRequestTypeDef = { # (1)
"DatasetType": ...,
"ProjectArn": ...,
}
parent.create_dataset(**kwargs)
create_face_liveness_session#
This API operation initiates a Face Liveness session.
Type annotations and code completion for boto3.client("rekognition").create_face_liveness_session
method.
boto3 documentation
# create_face_liveness_session method definition
def create_face_liveness_session(
self,
*,
KmsKeyId: str = ...,
Settings: CreateFaceLivenessSessionRequestSettingsTypeDef = ..., # (1)
ClientRequestToken: str = ...,
) -> CreateFaceLivenessSessionResponseTypeDef: # (2)
...
# create_face_liveness_session method usage example with argument unpacking
kwargs: CreateFaceLivenessSessionRequestRequestTypeDef = { # (1)
"KmsKeyId": ...,
}
parent.create_face_liveness_session(**kwargs)
create_project#
Creates a new Amazon Rekognition project.
Type annotations and code completion for boto3.client("rekognition").create_project
method.
boto3 documentation
# create_project method definition
def create_project(
self,
*,
ProjectName: str,
Feature: CustomizationFeatureType = ..., # (1)
AutoUpdate: ProjectAutoUpdateType = ..., # (2)
) -> CreateProjectResponseTypeDef: # (3)
...
# create_project method usage example with argument unpacking
kwargs: CreateProjectRequestRequestTypeDef = { # (1)
"ProjectName": ...,
}
parent.create_project(**kwargs)
create_project_version#
Creates a new version of Amazon Rekognition project (like a Custom Labels model or a custom adapter) and begins training.
Type annotations and code completion for boto3.client("rekognition").create_project_version
method.
boto3 documentation
# create_project_version method definition
def create_project_version(
self,
*,
ProjectArn: str,
VersionName: str,
OutputConfig: OutputConfigTypeDef, # (1)
TrainingData: TrainingDataTypeDef = ..., # (2)
TestingData: TestingDataTypeDef = ..., # (3)
Tags: Mapping[str, str] = ...,
KmsKeyId: str = ...,
VersionDescription: str = ...,
FeatureConfig: CustomizationFeatureConfigTypeDef = ..., # (4)
) -> CreateProjectVersionResponseTypeDef: # (5)
...
- See OutputConfigTypeDef
- See TrainingDataTypeDef
- See TestingDataTypeDef
- See CustomizationFeatureConfigTypeDef
- See CreateProjectVersionResponseTypeDef
# create_project_version method usage example with argument unpacking
kwargs: CreateProjectVersionRequestRequestTypeDef = { # (1)
"ProjectArn": ...,
"VersionName": ...,
"OutputConfig": ...,
}
parent.create_project_version(**kwargs)
create_stream_processor#
Creates an Amazon Rekognition stream processor that you can use to detect and recognize faces or to detect labels in a streaming video.
Type annotations and code completion for boto3.client("rekognition").create_stream_processor
method.
boto3 documentation
# create_stream_processor method definition
def create_stream_processor(
self,
*,
Input: StreamProcessorInputTypeDef, # (1)
Output: StreamProcessorOutputTypeDef, # (2)
Name: str,
Settings: StreamProcessorSettingsTypeDef, # (3)
RoleArn: str,
Tags: Mapping[str, str] = ...,
NotificationChannel: StreamProcessorNotificationChannelTypeDef = ..., # (4)
KmsKeyId: str = ...,
RegionsOfInterest: Sequence[RegionOfInterestTypeDef] = ..., # (5)
DataSharingPreference: StreamProcessorDataSharingPreferenceTypeDef = ..., # (6)
) -> CreateStreamProcessorResponseTypeDef: # (7)
...
- See StreamProcessorInputTypeDef
- See StreamProcessorOutputTypeDef
- See StreamProcessorSettingsTypeDef
- See StreamProcessorNotificationChannelTypeDef
- See RegionOfInterestTypeDef
- See StreamProcessorDataSharingPreferenceTypeDef
- See CreateStreamProcessorResponseTypeDef
# create_stream_processor method usage example with argument unpacking
kwargs: CreateStreamProcessorRequestRequestTypeDef = { # (1)
"Input": ...,
"Output": ...,
"Name": ...,
"Settings": ...,
"RoleArn": ...,
}
parent.create_stream_processor(**kwargs)
create_user#
Creates a new User within a collection specified by CollectionId
.
Type annotations and code completion for boto3.client("rekognition").create_user
method.
boto3 documentation
# create_user method definition
def create_user(
self,
*,
CollectionId: str,
UserId: str,
ClientRequestToken: str = ...,
) -> Dict[str, Any]:
...
# create_user method usage example with argument unpacking
kwargs: CreateUserRequestRequestTypeDef = { # (1)
"CollectionId": ...,
"UserId": ...,
}
parent.create_user(**kwargs)
delete_collection#
Deletes the specified collection.
Type annotations and code completion for boto3.client("rekognition").delete_collection
method.
boto3 documentation
# delete_collection method definition
def delete_collection(
self,
*,
CollectionId: str,
) -> DeleteCollectionResponseTypeDef: # (1)
...
# delete_collection method usage example with argument unpacking
kwargs: DeleteCollectionRequestRequestTypeDef = { # (1)
"CollectionId":