Skip to content

S3VectorsClient#

Index > S3Vectors > S3VectorsClient

Auto-generated documentation for S3Vectors type annotations stubs module mypy-boto3-s3vectors.

S3VectorsClient#

Type annotations and code completion for boto3.client("s3vectors"). boto3 documentation

# S3VectorsClient usage example

from boto3.session import Session
from mypy_boto3_s3vectors.client import S3VectorsClient

def get_s3vectors_client() -> S3VectorsClient:
    return Session().client("s3vectors")

Exceptions#

boto3 client exceptions are generated in runtime. This class provides code completion for boto3.client("s3vectors").exceptions structure.

# Exceptions.exceptions usage example

client = boto3.client("s3vectors")

try:
    do_something(client)
except (
    client.exceptions.AccessDeniedException,
    client.exceptions.ClientError,
    client.exceptions.ConflictException,
    client.exceptions.InternalServerException,
    client.exceptions.KmsDisabledException,
    client.exceptions.KmsInvalidKeyUsageException,
    client.exceptions.KmsInvalidStateException,
    client.exceptions.KmsNotFoundException,
    client.exceptions.NotFoundException,
    client.exceptions.ServiceQuotaExceededException,
    client.exceptions.ServiceUnavailableException,
    client.exceptions.TooManyRequestsException,
    client.exceptions.ValidationException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_s3vectors.client import Exceptions

def handle_error(exc: Exceptions.AccessDeniedException) -> None:
    ...

Methods#

can_paginate#

Type annotations and code completion for boto3.client("s3vectors").can_paginate method. boto3 documentation

# can_paginate method definition

def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

generate_presigned_url#

Type annotations and code completion for boto3.client("s3vectors").generate_presigned_url method. boto3 documentation

# generate_presigned_url method definition

def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...

create_index#

Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.

Type annotations and code completion for boto3.client("s3vectors").create_index method. boto3 documentation

# create_index method definition

def create_index(
    self,
    *,
    indexName: str,
    dataType: DataTypeType,  # (1)
    dimension: int,
    distanceMetric: DistanceMetricType,  # (2)
    vectorBucketName: str = ...,
    vectorBucketArn: str = ...,
    metadataConfiguration: MetadataConfigurationUnionTypeDef = ...,  # (3)
) -> Dict[str, Any]:
    ...
  1. See DataTypeType
  2. See DistanceMetricType
  3. See MetadataConfigurationUnionTypeDef
# create_index method usage example with argument unpacking

kwargs: CreateIndexInputTypeDef = {  # (1)
    "indexName": ...,
    "dataType": ...,
    "dimension": ...,
    "distanceMetric": ...,
}

parent.create_index(**kwargs)
  1. See CreateIndexInputTypeDef

create_vector_bucket#

Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.

Type annotations and code completion for boto3.client("s3vectors").create_vector_bucket method. boto3 documentation

# create_vector_bucket method definition

def create_vector_bucket(
    self,
    *,
    vectorBucketName: str,
    encryptionConfiguration: EncryptionConfigurationTypeDef = ...,  # (1)
) -> Dict[str, Any]:
    ...
  1. See EncryptionConfigurationTypeDef
# create_vector_bucket method usage example with argument unpacking

kwargs: CreateVectorBucketInputTypeDef = {  # (1)
    "vectorBucketName": ...,
}

parent.create_vector_bucket(**kwargs)
  1. See CreateVectorBucketInputTypeDef

delete_index#

Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.

Type annotations and code completion for boto3.client("s3vectors").delete_index method. boto3 documentation

# delete_index method definition

def delete_index(
    self,
    *,
    vectorBucketName: str = ...,
    indexName: str = ...,
    indexArn: str = ...,
) -> Dict[str, Any]:
    ...
# delete_index method usage example with argument unpacking

kwargs: DeleteIndexInputTypeDef = {  # (1)
    "vectorBucketName": ...,
}

parent.delete_index(**kwargs)
  1. See DeleteIndexInputTypeDef

delete_vector_bucket#

Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.

Type annotations and code completion for boto3.client("s3vectors").delete_vector_bucket method. boto3 documentation

# delete_vector_bucket method definition

def delete_vector_bucket(
    self,
    *,
    vectorBucketName: str = ...,
    vectorBucketArn: str = ...,
) -> Dict[str, Any]:
    ...
# delete_vector_bucket method usage example with argument unpacking

kwargs: DeleteVectorBucketInputTypeDef = {  # (1)
    "vectorBucketName": ...,
}

parent.delete_vector_bucket(**kwargs)
  1. See DeleteVectorBucketInputTypeDef

delete_vector_bucket_policy#

Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.

Type annotations and code completion for boto3.client("s3vectors").delete_vector_bucket_policy method. boto3 documentation

# delete_vector_bucket_policy method definition

def delete_vector_bucket_policy(
    self,
    *,
    vectorBucketName: str = ...,
    vectorBucketArn: str = ...,
) -> Dict[str, Any]:
    ...
# delete_vector_bucket_policy method usage example with argument unpacking

kwargs: DeleteVectorBucketPolicyInputTypeDef = {  # (1)
    "vectorBucketName": ...,
}

parent.delete_vector_bucket_policy(**kwargs)
  1. See DeleteVectorBucketPolicyInputTypeDef

delete_vectors#

Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.

Type annotations and code completion for boto3.client("s3vectors").delete_vectors method. boto3 documentation

# delete_vectors method definition

def delete_vectors(
    self,
    *,
    keys: Sequence[str],
    vectorBucketName: str = ...,
    indexName: str = ...,
    indexArn: str = ...,
) -> Dict[str, Any]:
    ...
# delete_vectors method usage example with argument unpacking

kwargs: DeleteVectorsInputTypeDef = {  # (1)
    "keys": ...,
}

parent.delete_vectors(**kwargs)
  1. See DeleteVectorsInputTypeDef

get_index#

Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.

Type annotations and code completion for boto3.client("s3vectors").get_index method. boto3 documentation

# get_index method definition

def get_index(
    self,
    *,
    vectorBucketName: str = ...,
    indexName: str = ...,
    indexArn: str = ...,
) -> GetIndexOutputTypeDef:  # (1)
    ...
  1. See GetIndexOutputTypeDef
# get_index method usage example with argument unpacking

kwargs: GetIndexInputTypeDef = {  # (1)
    "vectorBucketName": ...,
}

parent.get_index(**kwargs)
  1. See GetIndexInputTypeDef

get_vector_bucket#

Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.

Type annotations and code completion for boto3.client("s3vectors").get_vector_bucket method. boto3 documentation

# get_vector_bucket method definition

def get_vector_bucket(
    self,
    *,
    vectorBucketName: str = ...,
    vectorBucketArn: str = ...,
) -> GetVectorBucketOutputTypeDef:  # (1)
    ...
  1. See GetVectorBucketOutputTypeDef
# get_vector_bucket method usage example with argument unpacking

kwargs: GetVectorBucketInputTypeDef = {  # (1)
    "vectorBucketName": ...,
}

parent.get_vector_bucket(**kwargs)
  1. See GetVectorBucketInputTypeDef

get_vector_bucket_policy#

Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.

Type annotations and code completion for boto3.client("s3vectors").get_vector_bucket_policy method. boto3 documentation

# get_vector_bucket_policy method definition

def get_vector_bucket_policy(
    self,
    *,
    vectorBucketName: str = ...,
    vectorBucketArn: str = ...,
) -> GetVectorBucketPolicyOutputTypeDef:  # (1)
    ...
  1. See GetVectorBucketPolicyOutputTypeDef
# get_vector_bucket_policy method usage example with argument unpacking

kwargs: GetVectorBucketPolicyInputTypeDef = {  # (1)
    "vectorBucketName": ...,
}

parent.get_vector_bucket_policy(**kwargs)
  1. See GetVectorBucketPolicyInputTypeDef

get_vectors#

Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.

Type annotations and code completion for boto3.client("s3vectors").get_vectors method. boto3 documentation

# get_vectors method definition

def get_vectors(
    self,
    *,
    keys: Sequence[str],
    vectorBucketName: str = ...,
    indexName: str = ...,
    indexArn: str = ...,
    returnData: bool = ...,
    returnMetadata: bool = ...,
) -> GetVectorsOutputTypeDef:  # (1)
    ...
  1. See GetVectorsOutputTypeDef
# get_vectors method usage example with argument unpacking

kwargs: GetVectorsInputTypeDef = {  # (1)
    "keys": ...,
}

parent.get_vectors(**kwargs)
  1. See GetVectorsInputTypeDef

list_indexes#

Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.

Type annotations and code completion for boto3.client("s3vectors").list_indexes method. boto3 documentation

# list_indexes method definition

def list_indexes(
    self,
    *,
    vectorBucketName: str = ...,
    vectorBucketArn: str = ...,
    maxResults: int = ...,
    nextToken: str = ...,
    prefix: str = ...,
) -> ListIndexesOutputTypeDef:  # (1)
    ...
  1. See ListIndexesOutputTypeDef
# list_indexes method usage example with argument unpacking

kwargs: ListIndexesInputTypeDef = {  # (1)
    "vectorBucketName": ...,
}

parent.list_indexes(**kwargs)
  1. See ListIndexesInputTypeDef

list_vector_buckets#

Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.

Type annotations and code completion for boto3.client("s3vectors").list_vector_buckets method. boto3 documentation

# list_vector_buckets method definition

def list_vector_buckets(
    self,
    *,
    maxResults: int = ...,
    nextToken: str = ...,
    prefix: str = ...,
) -> ListVectorBucketsOutputTypeDef:  # (1)
    ...
  1. See ListVectorBucketsOutputTypeDef
# list_vector_buckets method usage example with argument unpacking

kwargs: ListVectorBucketsInputTypeDef = {  # (1)
    "maxResults": ...,
}

parent.list_vector_buckets(**kwargs)
  1. See ListVectorBucketsInputTypeDef

list_vectors#

Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.

Type annotations and code completion for boto3.client("s3vectors").list_vectors method. boto3 documentation

# list_vectors method definition

def list_vectors(
    self,
    *,
    vectorBucketName: str = ...,
    indexName: str = ...,
    indexArn: str = ...,
    maxResults: int = ...,
    nextToken: str = ...,
    segmentCount: int = ...,
    segmentIndex: int = ...,
    returnData: bool = ...,
    returnMetadata: bool = ...,
) -> ListVectorsOutputTypeDef:  # (1)
    ...
  1. See ListVectorsOutputTypeDef
# list_vectors method usage example with argument unpacking

kwargs: ListVectorsInputTypeDef = {  # (1)
    "vectorBucketName": ...,
}

parent.list_vectors(**kwargs)
  1. See ListVectorsInputTypeDef

put_vector_bucket_policy#

Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.

Type annotations and code completion for boto3.client("s3vectors").put_vector_bucket_policy method. boto3 documentation

# put_vector_bucket_policy method definition

def put_vector_bucket_policy(
    self,
    *,
    policy: str,
    vectorBucketName: str = ...,
    vectorBucketArn: str = ...,
) -> Dict[str, Any]:
    ...
# put_vector_bucket_policy method usage example with argument unpacking

kwargs: PutVectorBucketPolicyInputTypeDef = {  # (1)
    "policy": ...,
}

parent.put_vector_bucket_policy(**kwargs)
  1. See PutVectorBucketPolicyInputTypeDef

put_vectors#

Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.

Type annotations and code completion for boto3.client("s3vectors").put_vectors method. boto3 documentation

# put_vectors method definition

def put_vectors(
    self,
    *,
    vectors: Sequence[PutInputVectorTypeDef],  # (1)
    vectorBucketName: str = ...,
    indexName: str = ...,
    indexArn: str = ...,
) -> Dict[str, Any]:
    ...
  1. See Sequence[PutInputVectorTypeDef]
# put_vectors method usage example with argument unpacking

kwargs: PutVectorsInputTypeDef = {  # (1)
    "vectors": ...,
}

parent.put_vectors(**kwargs)
  1. See PutVectorsInputTypeDef

query_vectors#

Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.

Type annotations and code completion for boto3.client("s3vectors").query_vectors method. boto3 documentation

# query_vectors method definition

def query_vectors(
    self,
    *,
    topK: int,
    queryVector: VectorDataUnionTypeDef,  # (1)
    vectorBucketName: str = ...,
    indexName: str = ...,
    indexArn: str = ...,
    filter: Mapping[str, Any] = ...,
    returnMetadata: bool = ...,
    returnDistance: bool = ...,
) -> QueryVectorsOutputTypeDef:  # (2)
    ...
  1. See VectorDataUnionTypeDef
  2. See QueryVectorsOutputTypeDef
# query_vectors method usage example with argument unpacking

kwargs: QueryVectorsInputTypeDef = {  # (1)
    "topK": ...,
    "queryVector": ...,
}

parent.query_vectors(**kwargs)
  1. See QueryVectorsInputTypeDef

get_paginator#

Type annotations and code completion for boto3.client("s3vectors").get_paginator method with overloads.