S3VectorsClient#
Auto-generated documentation for S3Vectors type annotations stubs module types-boto3-s3vectors.
S3VectorsClient#
Type annotations and code completion for boto3.client("s3vectors").
boto3 documentation
# S3VectorsClient usage example
from boto3.session import Session
from types_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.RequestTimeoutException,
client.exceptions.ServiceQuotaExceededException,
client.exceptions.ServiceUnavailableException,
client.exceptions.TooManyRequestsException,
client.exceptions.ValidationException,
) as e:
print(e)
# Exceptions.exceptions type checking example
from types_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#
Creates a vector index within a vector bucket.
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)
encryptionConfiguration: EncryptionConfigurationTypeDef = ..., # (4)
tags: Mapping[str, str] = ...,
) -> CreateIndexOutputTypeDef: # (5)
...
- See DataTypeType
- See DistanceMetricType
- See MetadataConfigurationUnionTypeDef
- See EncryptionConfigurationTypeDef
- See CreateIndexOutputTypeDef
# create_index method usage example with argument unpacking
kwargs: CreateIndexInputTypeDef = { # (1)
"indexName": ...,
"dataType": ...,
"dimension": ...,
"distanceMetric": ...,
}
parent.create_index(**kwargs)
create_vector_bucket#
Creates a vector bucket in the Amazon Web Services Region that you want your bucket to be in.
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)
tags: Mapping[str, str] = ...,
) -> CreateVectorBucketOutputTypeDef: # (2)
...
# create_vector_bucket method usage example with argument unpacking
kwargs: CreateVectorBucketInputTypeDef = { # (1)
"vectorBucketName": ...,
}
parent.create_vector_bucket(**kwargs)
delete_index#
Deletes a vector index.
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)
delete_vector_bucket#
Deletes a vector bucket.
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)
delete_vector_bucket_policy#
Deletes a vector bucket policy.
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)
delete_vectors#
Deletes one or more vectors in a vector index.
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)
get_index#
Returns vector index attributes.
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)
...
# get_index method usage example with argument unpacking
kwargs: GetIndexInputTypeDef = { # (1)
"vectorBucketName": ...,
}
parent.get_index(**kwargs)
get_vector_bucket#
Returns vector bucket attributes.
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)
...
# get_vector_bucket method usage example with argument unpacking
kwargs: GetVectorBucketInputTypeDef = { # (1)
"vectorBucketName": ...,
}
parent.get_vector_bucket(**kwargs)
get_vector_bucket_policy#
Gets details about a vector bucket policy.
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)
...
# get_vector_bucket_policy method usage example with argument unpacking
kwargs: GetVectorBucketPolicyInputTypeDef = { # (1)
"vectorBucketName": ...,
}
parent.get_vector_bucket_policy(**kwargs)
get_vectors#
Returns vector attributes.
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)
...
# get_vectors method usage example with argument unpacking
kwargs: GetVectorsInputTypeDef = { # (1)
"keys": ...,
}
parent.get_vectors(**kwargs)
list_indexes#
Returns a list of all the vector indexes within the specified vector bucket.
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)
...
# list_indexes method usage example with argument unpacking
kwargs: ListIndexesInputTypeDef = { # (1)
"vectorBucketName": ...,
}
parent.list_indexes(**kwargs)
list_tags_for_resource#
Lists all of the tags applied to a specified Amazon S3 Vectors resource.
Type annotations and code completion for boto3.client("s3vectors").list_tags_for_resource method.
boto3 documentation
# list_tags_for_resource method definition
def list_tags_for_resource(
self,
*,
resourceArn: str,
) -> ListTagsForResourceOutputTypeDef: # (1)
...
# list_tags_for_resource method usage example with argument unpacking
kwargs: ListTagsForResourceInputTypeDef = { # (1)
"resourceArn": ...,
}
parent.list_tags_for_resource(**kwargs)
list_vector_buckets#
Returns a list of all the vector buckets that are owned by the authenticated sender of the request.
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)
...
# list_vector_buckets method usage example with argument unpacking
kwargs: ListVectorBucketsInputTypeDef = { # (1)
"maxResults": ...,
}
parent.list_vector_buckets(**kwargs)
list_vectors#
List vectors in the specified vector index.
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)
...
# list_vectors method usage example with argument unpacking
kwargs: ListVectorsInputTypeDef = { # (1)
"vectorBucketName": ...,
}
parent.list_vectors(**kwargs)
put_vector_bucket_policy#
Creates a bucket policy for a vector bucket.
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)
put_vectors#
Adds one or more vectors to a vector index.
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]:
...
- See
Sequence[PutInputVectorTypeDef]
# put_vectors method usage example with argument unpacking
kwargs: PutVectorsInputTypeDef = { # (1)
"vectors": ...,
}
parent.put_vectors(**kwargs)
query_vectors#
Performs an approximate nearest neighbor search query in a vector index using a query vector.
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)
...
# query_vectors method usage example with argument unpacking
kwargs: QueryVectorsInputTypeDef = { # (1)
"topK": ...,
"queryVector": ...,
}
parent.query_vectors(**kwargs)
tag_resource#
Applies one or more user-defined tags to an Amazon S3 Vectors resource or updates existing tags.
Type annotations and code completion for boto3.client("s3vectors").tag_resource method.
boto3 documentation
# tag_resource method definition
def tag_resource(
self,
*,
resourceArn: str,
tags: Mapping[str, str],
) -> dict[str, Any]:
...
# tag_resource method usage example with argument unpacking
kwargs: TagResourceInputTypeDef = { # (1)
"resourceArn": ...,
"tags": ...,
}
parent.tag_resource(**kwargs)
untag_resource#
Removes the specified user-defined tags from an Amazon S3 Vectors resource.
Type annotations and code completion for boto3.client("s3vectors").untag_resource method.
boto3 documentation
# untag_resource method definition
def untag_resource(
self,
*,
resourceArn: str,
tagKeys: Sequence[str],
) -> dict[str, Any]:
...
# untag_resource method usage example with argument unpacking
kwargs: UntagResourceInputTypeDef = { # (1)
"resourceArn": ...,
"tagKeys": ...,
}
parent.untag_resource(**kwargs)
get_paginator#
Type annotations and code completion for boto3.client("s3vectors").get_paginator method with overloads.
client.get_paginator("list_indexes")-> ListIndexesPaginatorclient.get_paginator("list_vector_buckets")-> ListVectorBucketsPaginatorclient.get_paginator("list_vectors")-> ListVectorsPaginator