s3vectors

package module
v1.4.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2025 License: Apache-2.0 Imports: 46 Imported by: 4

Documentation

Overview

Package s3vectors provides the API client, operations, and parameter types for Amazon S3 Vectors.

Amazon S3 vector buckets are a bucket type to store and search vectors with sub-second search times. They are designed to provide dedicated API operations for you to interact with vectors to do similarity search. Within a vector bucket, you use a vector index to organize and logically group your vector data. When you make a write or read request, you direct it to a single vector index. You store your vector data as vectors. A vector contains a key (a name that you assign), a multi-dimensional vector, and, optionally, metadata that describes a vector. The key uniquely identifies the vector in a vector index.

Index

Constants

View Source
const ServiceAPIVersion = "2025-07-15"
View Source
const ServiceID = "S3Vectors"

Variables

This section is empty.

Functions

func NewDefaultEndpointResolver

func NewDefaultEndpointResolver() *internalendpoints.Resolver

NewDefaultEndpointResolver constructs a new service endpoint resolver

func WithAPIOptions

func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options)

WithAPIOptions returns a functional option for setting the Client's APIOptions option.

func WithEndpointResolver deprecated

func WithEndpointResolver(v EndpointResolver) func(*Options)

Deprecated: EndpointResolver and WithEndpointResolver. Providing a value for this field will likely prevent you from using any endpoint-related service features released after the introduction of EndpointResolverV2 and BaseEndpoint.

To migrate an EndpointResolver implementation that uses a custom endpoint, set the client option BaseEndpoint instead.

func WithEndpointResolverV2

func WithEndpointResolverV2(v EndpointResolverV2) func(*Options)

WithEndpointResolverV2 returns a functional option for setting the Client's EndpointResolverV2 option.

func WithSigV4SigningName

func WithSigV4SigningName(name string) func(*Options)

WithSigV4SigningName applies an override to the authentication workflow to use the given signing name for SigV4-authenticated operations.

This is an advanced setting. The value here is FINAL, taking precedence over the resolved signing name from both auth scheme resolution and endpoint resolution.

func WithSigV4SigningRegion

func WithSigV4SigningRegion(region string) func(*Options)

WithSigV4SigningRegion applies an override to the authentication workflow to use the given signing region for SigV4-authenticated operations.

This is an advanced setting. The value here is FINAL, taking precedence over the resolved signing region from both auth scheme resolution and endpoint resolution.

Types

type AuthResolverParameters

type AuthResolverParameters struct {
	// The name of the operation being invoked.
	Operation string

	// The region in which the operation is being invoked.
	Region string
}

AuthResolverParameters contains the set of inputs necessary for auth scheme resolution.

type AuthSchemeResolver

type AuthSchemeResolver interface {
	ResolveAuthSchemes(context.Context, *AuthResolverParameters) ([]*smithyauth.Option, error)
}

AuthSchemeResolver returns a set of possible authentication options for an operation.

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client provides the API client to make operations call for Amazon S3 Vectors.

func New

func New(options Options, optFns ...func(*Options)) *Client

New returns an initialized Client based on the functional options. Provide additional functional options to further configure the behavior of the client, such as changing the client's endpoint or adding custom middleware behavior.

func NewFromConfig

func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client

NewFromConfig returns a new client from the provided config.

func (*Client) CreateIndex

func (c *Client) CreateIndex(ctx context.Context, params *CreateIndexInput, optFns ...func(*Options)) (*CreateIndexOutput, error)

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

Creates a vector index within a vector bucket. To specify the vector bucket, you must use either the vector bucket name or the vector bucket Amazon Resource Name (ARN).

Permissions You must have the s3vectors:CreateIndex permission to use this operation.

func (*Client) CreateVectorBucket

func (c *Client) CreateVectorBucket(ctx context.Context, params *CreateVectorBucketInput, optFns ...func(*Options)) (*CreateVectorBucketOutput, error)

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

Creates a vector bucket in the Amazon Web Services Region that you want your bucket to be in.

Permissions You must have the s3vectors:CreateVectorBucket permission to use this operation.

func (*Client) DeleteIndex

func (c *Client) DeleteIndex(ctx context.Context, params *DeleteIndexInput, optFns ...func(*Options)) (*DeleteIndexOutput, error)

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

Deletes a vector index. To specify the vector index, you can either use both the vector bucket name and vector index name, or use the vector index Amazon Resource Name (ARN).

Permissions You must have the s3vectors:DeleteIndex permission to use this operation.

func (*Client) DeleteVectorBucket

func (c *Client) DeleteVectorBucket(ctx context.Context, params *DeleteVectorBucketInput, optFns ...func(*Options)) (*DeleteVectorBucketOutput, error)

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

Deletes a vector bucket. All vector indexes in the vector bucket must be deleted before the vector bucket can be deleted. To perform this operation, you must use either the vector bucket name or the vector bucket Amazon Resource Name (ARN).

Permissions You must have the s3vectors:DeleteVectorBucket permission to use this operation.

func (*Client) DeleteVectorBucketPolicy

func (c *Client) DeleteVectorBucketPolicy(ctx context.Context, params *DeleteVectorBucketPolicyInput, optFns ...func(*Options)) (*DeleteVectorBucketPolicyOutput, error)

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

Deletes a vector bucket policy. To specify the bucket, you must use either the vector bucket name or the vector bucket Amazon Resource Name (ARN).

Permissions You must have the s3vectors:DeleteVectorBucketPolicy permission to use this operation.

func (*Client) DeleteVectors

func (c *Client) DeleteVectors(ctx context.Context, params *DeleteVectorsInput, optFns ...func(*Options)) (*DeleteVectorsOutput, error)

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

Deletes one or more vectors in a vector index. To specify the vector index, you can either use both the vector bucket name and vector index name, or use the vector index Amazon Resource Name (ARN).

Permissions You must have the s3vectors:DeleteVectors permission to use this operation.

func (*Client) GetIndex

func (c *Client) GetIndex(ctx context.Context, params *GetIndexInput, optFns ...func(*Options)) (*GetIndexOutput, error)

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

Returns vector index attributes. To specify the vector index, you can either use both the vector bucket name and the vector index name, or use the vector index Amazon Resource Name (ARN).

Permissions You must have the s3vectors:GetIndex permission to use this operation.

func (*Client) GetVectorBucket

func (c *Client) GetVectorBucket(ctx context.Context, params *GetVectorBucketInput, optFns ...func(*Options)) (*GetVectorBucketOutput, error)

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

Returns vector bucket attributes. To specify the bucket, you must use either the vector bucket name or the vector bucket Amazon Resource Name (ARN).

Permissions You must have the s3vectors:GetVectorBucket permission to use this operation.

func (*Client) GetVectorBucketPolicy

func (c *Client) GetVectorBucketPolicy(ctx context.Context, params *GetVectorBucketPolicyInput, optFns ...func(*Options)) (*GetVectorBucketPolicyOutput, error)

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

Gets details about a vector bucket policy. To specify the bucket, you must use either the vector bucket name or the vector bucket Amazon Resource Name (ARN).

Permissions You must have the s3vectors:GetVectorBucketPolicy permission to use this operation.

func (*Client) GetVectors

func (c *Client) GetVectors(ctx context.Context, params *GetVectorsInput, optFns ...func(*Options)) (*GetVectorsOutput, error)

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

Returns vector attributes. To specify the vector index, you can either use both the vector bucket name and the vector index name, or use the vector index Amazon Resource Name (ARN).

Permissions You must have the s3vectors:GetVectors permission to use this operation.

func (*Client) ListIndexes

func (c *Client) ListIndexes(ctx context.Context, params *ListIndexesInput, optFns ...func(*Options)) (*ListIndexesOutput, error)

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

Returns a list of all the vector indexes within the specified vector bucket. To specify the bucket, you must use either the vector bucket name or the vector bucket Amazon Resource Name (ARN).

Permissions You must have the s3vectors:ListIndexes permission to use this operation.

func (*Client) ListVectorBuckets

func (c *Client) ListVectorBuckets(ctx context.Context, params *ListVectorBucketsInput, optFns ...func(*Options)) (*ListVectorBucketsOutput, error)

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

Returns a list of all the vector buckets that are owned by the authenticated sender of the request.

Permissions You must have the s3vectors:ListVectorBuckets permission to use this operation.

func (*Client) ListVectors

func (c *Client) ListVectors(ctx context.Context, params *ListVectorsInput, optFns ...func(*Options)) (*ListVectorsOutput, error)

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

List vectors in the specified vector index. To specify the vector index, you can either use both the vector bucket name and the vector index name, or use the vector index Amazon Resource Name (ARN).

ListVectors operations proceed sequentially; however, for faster performance on a large number of vectors in a vector index, applications can request a parallel ListVectors operation by providing the segmentCount and segmentIndex parameters.

Permissions You must have the s3vectors:ListVectors permission to use this operation. Additional permissions are required based on the request parameters you specify:

  • With only s3vectors:ListVectors permission, you can list vector keys when returnData and returnMetadata are both set to false or not specified..

  • If you set returnData or returnMetadata to true, you must have both s3vectors:ListVectors and s3vectors:GetVectors permissions. The request fails with a 403 Forbidden error if you request vector data or metadata without the s3vectors:GetVectors permission.

func (*Client) Options

func (c *Client) Options() Options

Options returns a copy of the client configuration.

Callers SHOULD NOT perform mutations on any inner structures within client config. Config overrides should instead be made on a per-operation basis through functional options.

func (*Client) PutVectorBucketPolicy

func (c *Client) PutVectorBucketPolicy(ctx context.Context, params *PutVectorBucketPolicyInput, optFns ...func(*Options)) (*PutVectorBucketPolicyOutput, error)

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

Creates a bucket policy for a vector bucket. To specify the bucket, you must use either the vector bucket name or the vector bucket Amazon Resource Name (ARN).

Permissions You must have the s3vectors:PutVectorBucketPolicy permission to use this operation.

func (*Client) PutVectors

func (c *Client) PutVectors(ctx context.Context, params *PutVectorsInput, optFns ...func(*Options)) (*PutVectorsOutput, error)

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

Adds one or more vectors to a vector index. To specify the vector index, you can either use both the vector bucket name and the vector index name, or use the vector index Amazon Resource Name (ARN).

For more information about limits, see Limitations and restrictions in the Amazon S3 User Guide.

When inserting vector data into your vector index, you must provide the vector data as float32 (32-bit floating point) values. If you pass higher-precision values to an Amazon Web Services SDK, S3 Vectors converts the values to 32-bit floating point before storing them, and GetVectors , ListVectors , and QueryVectors operations return the float32 values. Different Amazon Web Services SDKs may have different default numeric types, so ensure your vectors are properly formatted as float32 values regardless of which SDK you're using. For example, in Python, use numpy.float32 or explicitly cast your values.

Permissions You must have the s3vectors:PutVectors permission to use this operation.

func (*Client) QueryVectors

func (c *Client) QueryVectors(ctx context.Context, params *QueryVectorsInput, optFns ...func(*Options)) (*QueryVectorsOutput, error)

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

Performs an approximate nearest neighbor search query in a vector index using a query vector. By default, it returns the keys of approximate nearest neighbors. You can optionally include the computed distance (between the query vector and each vector in the response), the vector data, and metadata of each vector in the response.

To specify the vector index, you can either use both the vector bucket name and the vector index name, or use the vector index Amazon Resource Name (ARN).

Permissions You must have the s3vectors:QueryVectors permission to use this operation. Additional permissions are required based on the request parameters you specify:

  • With only s3vectors:QueryVectors permission, you can retrieve vector keys of approximate nearest neighbors and computed distances between these vectors. This permission is sufficient only when you don't set any metadata filters and don't request vector data or metadata (by keeping the returnMetadata parameter set to false or not specified).

  • If you specify a metadata filter or set returnMetadata to true, you must have both s3vectors:QueryVectors and s3vectors:GetVectors permissions. The request fails with a 403 Forbidden error if you request metadata filtering, vector data, or metadata without the s3vectors:GetVectors permission.

type CreateIndexInput

type CreateIndexInput struct {

	// The data type of the vectors to be inserted into the vector index.
	//
	// This member is required.
	DataType types.DataType

	// The dimensions of the vectors to be inserted into the vector index.
	//
	// This member is required.
	Dimension *int32

	// The distance metric to be used for similarity search.
	//
	// This member is required.
	DistanceMetric types.DistanceMetric

	// The name of the vector index to create.
	//
	// This member is required.
	IndexName *string

	// The metadata configuration for the vector index.
	MetadataConfiguration *types.MetadataConfiguration

	// The Amazon Resource Name (ARN) of the vector bucket to create the vector index
	// in.
	VectorBucketArn *string

	// The name of the vector bucket to create the vector index in.
	VectorBucketName *string
	// contains filtered or unexported fields
}

type CreateIndexOutput

type CreateIndexOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type CreateVectorBucketInput

type CreateVectorBucketInput struct {

	// The name of the vector bucket to create.
	//
	// This member is required.
	VectorBucketName *string

	// The encryption configuration for the vector bucket. By default, if you don't
	// specify, all new vectors in Amazon S3 vector buckets use server-side encryption
	// with Amazon S3 managed keys (SSE-S3), specifically AES256 .
	EncryptionConfiguration *types.EncryptionConfiguration
	// contains filtered or unexported fields
}

type CreateVectorBucketOutput

type CreateVectorBucketOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type DeleteIndexInput

type DeleteIndexInput struct {

	// The ARN of the vector index to delete.
	IndexArn *string

	// The name of the vector index to delete.
	IndexName *string

	// The name of the vector bucket that contains the vector index.
	VectorBucketName *string
	// contains filtered or unexported fields
}

type DeleteIndexOutput

type DeleteIndexOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type DeleteVectorBucketInput

type DeleteVectorBucketInput struct {

	// The ARN of the vector bucket to delete.
	VectorBucketArn *string

	// The name of the vector bucket to delete.
	VectorBucketName *string
	// contains filtered or unexported fields
}

type DeleteVectorBucketOutput

type DeleteVectorBucketOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type DeleteVectorBucketPolicyInput

type DeleteVectorBucketPolicyInput struct {

	// The ARN of the vector bucket to delete the policy from.
	VectorBucketArn *string

	// The name of the vector bucket to delete the policy from.
	VectorBucketName *string
	// contains filtered or unexported fields
}

type DeleteVectorBucketPolicyOutput

type DeleteVectorBucketPolicyOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type DeleteVectorsInput

type DeleteVectorsInput struct {

	// The keys of the vectors to delete.
	//
	// This member is required.
	Keys []string

	// The ARN of the vector index that contains a vector you want to delete.
	IndexArn *string

	// The name of the vector index that contains a vector you want to delete.
	IndexName *string

	// The name of the vector bucket that contains the vector index.
	VectorBucketName *string
	// contains filtered or unexported fields
}

type DeleteVectorsOutput

type DeleteVectorsOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type EndpointParameters

type EndpointParameters struct {
	// When true, send this request to the FIPS-compliant regional endpoint. If the
	// configured endpoint does not have a FIPS compliant endpoint, dispatching the
	// request will return an error.
	//
	// Defaults to false if no value is
	// provided.
	//
	// AWS::UseFIPS
	UseFIPS *bool

	// Override the endpoint used to send this request
	//
	// Parameter is
	// required.
	//
	// SDK::Endpoint
	Endpoint *string

	// The AWS region used to dispatch the request.
	//
	// Parameter is
	// required.
	//
	// AWS::Region
	Region *string
}

EndpointParameters provides the parameters that influence how endpoints are resolved.

func (EndpointParameters) ValidateRequired

func (p EndpointParameters) ValidateRequired() error

ValidateRequired validates required parameters are set.

func (EndpointParameters) WithDefaults

func (p EndpointParameters) WithDefaults() EndpointParameters

WithDefaults returns a shallow copy of EndpointParameterswith default values applied to members where applicable.

type EndpointResolver

type EndpointResolver interface {
	ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error)
}

EndpointResolver interface for resolving service endpoints.

func EndpointResolverFromURL

func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver

EndpointResolverFromURL returns an EndpointResolver configured using the provided endpoint url. By default, the resolved endpoint resolver uses the client region as signing region, and the endpoint source is set to EndpointSourceCustom.You can provide functional options to configure endpoint values for the resolved endpoint.

type EndpointResolverFunc

type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error)

EndpointResolverFunc is a helper utility that wraps a function so it satisfies the EndpointResolver interface. This is useful when you want to add additional endpoint resolving logic, or stub out specific endpoints with custom values.

func (EndpointResolverFunc) ResolveEndpoint

func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error)

type EndpointResolverOptions

type EndpointResolverOptions = internalendpoints.Options

EndpointResolverOptions is the service endpoint resolver options

type EndpointResolverV2

type EndpointResolverV2 interface {
	// ResolveEndpoint attempts to resolve the endpoint with the provided options,
	// returning the endpoint if found. Otherwise an error is returned.
	ResolveEndpoint(ctx context.Context, params EndpointParameters) (
		smithyendpoints.Endpoint, error,
	)
}

EndpointResolverV2 provides the interface for resolving service endpoints.

func NewDefaultEndpointResolverV2

func NewDefaultEndpointResolverV2() EndpointResolverV2

type GetIndexInput

type GetIndexInput struct {

	// The ARN of the vector index.
	IndexArn *string

	// The name of the vector index.
	IndexName *string

	// The name of the vector bucket that contains the vector index.
	VectorBucketName *string
	// contains filtered or unexported fields
}

type GetIndexOutput

type GetIndexOutput struct {

	// The attributes of the vector index.
	//
	// This member is required.
	Index *types.Index

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type GetVectorBucketInput

type GetVectorBucketInput struct {

	// The ARN of the vector bucket to retrieve information about.
	VectorBucketArn *string

	// The name of the vector bucket to retrieve information about.
	VectorBucketName *string
	// contains filtered or unexported fields
}

type GetVectorBucketOutput

type GetVectorBucketOutput struct {

	// The attributes of the vector bucket.
	//
	// This member is required.
	VectorBucket *types.VectorBucket

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type GetVectorBucketPolicyInput

type GetVectorBucketPolicyInput struct {

	// The ARN of the vector bucket.
	VectorBucketArn *string

	// The name of the vector bucket.
	VectorBucketName *string
	// contains filtered or unexported fields
}

type GetVectorBucketPolicyOutput

type GetVectorBucketPolicyOutput struct {

	// The JSON that defines the policy.
	Policy *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type GetVectorsInput

type GetVectorsInput struct {

	// The names of the vectors you want to return attributes for.
	//
	// This member is required.
	Keys []string

	// The ARN of the vector index.
	IndexArn *string

	// The name of the vector index.
	IndexName *string

	// Indicates whether to include the vector data in the response. The default value
	// is false .
	ReturnData bool

	// Indicates whether to include metadata in the response. The default value is
	// false .
	ReturnMetadata bool

	// The name of the vector bucket that contains the vector index.
	VectorBucketName *string
	// contains filtered or unexported fields
}

type GetVectorsOutput

type GetVectorsOutput struct {

	// The attributes of the vectors.
	//
	// This member is required.
	Vectors []types.GetOutputVector

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type HTTPClient

type HTTPClient interface {
	Do(*http.Request) (*http.Response, error)
}

type HTTPSignerV4

type HTTPSignerV4 interface {
	SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error
}

type ListIndexesAPIClient

type ListIndexesAPIClient interface {
	ListIndexes(context.Context, *ListIndexesInput, ...func(*Options)) (*ListIndexesOutput, error)
}

ListIndexesAPIClient is a client that implements the ListIndexes operation.

type ListIndexesInput

type ListIndexesInput struct {

	// The maximum number of items to be returned in the response.
	MaxResults *int32

	// The previous pagination token.
	NextToken *string

	// Limits the response to vector indexes that begin with the specified prefix.
	Prefix *string

	// The ARN of the vector bucket that contains the vector indexes.
	VectorBucketArn *string

	// The name of the vector bucket that contains the vector indexes.
	VectorBucketName *string
	// contains filtered or unexported fields
}

type ListIndexesOutput

type ListIndexesOutput struct {

	// The attributes of the vector indexes
	//
	// This member is required.
	Indexes []types.IndexSummary

	// The next pagination token.
	NextToken *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type ListIndexesPaginator

type ListIndexesPaginator struct {
	// contains filtered or unexported fields
}

ListIndexesPaginator is a paginator for ListIndexes

func NewListIndexesPaginator

func NewListIndexesPaginator(client ListIndexesAPIClient, params *ListIndexesInput, optFns ...func(*ListIndexesPaginatorOptions)) *ListIndexesPaginator

NewListIndexesPaginator returns a new ListIndexesPaginator

func (*ListIndexesPaginator) HasMorePages

func (p *ListIndexesPaginator) HasMorePages() bool

HasMorePages returns a boolean indicating whether more pages are available

func (*ListIndexesPaginator) NextPage

func (p *ListIndexesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListIndexesOutput, error)

NextPage retrieves the next ListIndexes page.

type ListIndexesPaginatorOptions

type ListIndexesPaginatorOptions struct {
	// The maximum number of items to be returned in the response.
	Limit int32

	// Set to true if pagination should stop if the service returns a pagination token
	// that matches the most recent token provided to the service.
	StopOnDuplicateToken bool
}

ListIndexesPaginatorOptions is the paginator options for ListIndexes

type ListVectorBucketsAPIClient

type ListVectorBucketsAPIClient interface {
	ListVectorBuckets(context.Context, *ListVectorBucketsInput, ...func(*Options)) (*ListVectorBucketsOutput, error)
}

ListVectorBucketsAPIClient is a client that implements the ListVectorBuckets operation.

type ListVectorBucketsInput

type ListVectorBucketsInput struct {

	// The maximum number of vector buckets to be returned in the response.
	MaxResults *int32

	// The previous pagination token.
	NextToken *string

	// Limits the response to vector buckets that begin with the specified prefix.
	Prefix *string
	// contains filtered or unexported fields
}

type ListVectorBucketsOutput

type ListVectorBucketsOutput struct {

	// The list of vector buckets owned by the requester.
	//
	// This member is required.
	VectorBuckets []types.VectorBucketSummary

	// The element is included in the response when there are more buckets to be
	// listed with pagination.
	NextToken *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type ListVectorBucketsPaginator

type ListVectorBucketsPaginator struct {
	// contains filtered or unexported fields
}

ListVectorBucketsPaginator is a paginator for ListVectorBuckets

func NewListVectorBucketsPaginator

func NewListVectorBucketsPaginator(client ListVectorBucketsAPIClient, params *ListVectorBucketsInput, optFns ...func(*ListVectorBucketsPaginatorOptions)) *ListVectorBucketsPaginator

NewListVectorBucketsPaginator returns a new ListVectorBucketsPaginator

func (*ListVectorBucketsPaginator) HasMorePages

func (p *ListVectorBucketsPaginator) HasMorePages() bool

HasMorePages returns a boolean indicating whether more pages are available

func (*ListVectorBucketsPaginator) NextPage

func (p *ListVectorBucketsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListVectorBucketsOutput, error)

NextPage retrieves the next ListVectorBuckets page.

type ListVectorBucketsPaginatorOptions

type ListVectorBucketsPaginatorOptions struct {
	// The maximum number of vector buckets to be returned in the response.
	Limit int32

	// Set to true if pagination should stop if the service returns a pagination token
	// that matches the most recent token provided to the service.
	StopOnDuplicateToken bool
}

ListVectorBucketsPaginatorOptions is the paginator options for ListVectorBuckets

type ListVectorsAPIClient

type ListVectorsAPIClient interface {
	ListVectors(context.Context, *ListVectorsInput, ...func(*Options)) (*ListVectorsOutput, error)
}

ListVectorsAPIClient is a client that implements the ListVectors operation.

type ListVectorsInput

type ListVectorsInput struct {

	// The Amazon resource Name (ARN) of the vector index.
	IndexArn *string

	// The name of the vector index.
	IndexName *string

	// The maximum number of vectors to return on a page.
	//
	// If you don't specify maxResults , the ListVectors operation uses a default
	// value of 500.
	//
	// If the processed dataset size exceeds 1 MB before reaching the maxResults
	// value, the operation stops and returns the vectors that are retrieved up to that
	// point, along with a nextToken that you can use in a subsequent request to
	// retrieve the next set of results.
	MaxResults *int32

	// Pagination token from a previous request. The value of this field is empty for
	// an initial request.
	NextToken *string

	// If true, the vector data of each vector will be included in the response. The
	// default value is false .
	ReturnData bool

	// If true, the metadata associated with each vector will be included in the
	// response. The default value is false .
	ReturnMetadata bool

	// For a parallel ListVectors request, segmentCount represents the total number of
	// vector segments into which the ListVectors operation will be divided. The value
	// of segmentCount corresponds to the number of application workers that will
	// perform the parallel ListVectors operation. For example, if you want to use
	// four application threads to list vectors in a vector index, specify a
	// segmentCount value of 4.
	//
	// If you specify a segmentCount value of 1, the ListVectors operation will be
	// sequential rather than parallel.
	//
	// If you specify segmentCount , you must also specify segmentIndex .
	SegmentCount *int32

	// For a parallel ListVectors request, segmentIndex is the index of the segment
	// from which to list vectors in the current request. It identifies an individual
	// segment to be listed by an application worker.
	//
	// Segment IDs are zero-based, so the first segment is always 0. For example, if
	// you want to use four application threads to list vectors in a vector index, then
	// the first thread specifies a segmentIndex value of 0, the second thread
	// specifies 1, and so on.
	//
	// The value of segmentIndex must be less than the value provided for segmentCount
	// .
	//
	// If you provide segmentIndex , you must also provide segmentCount .
	SegmentIndex int32

	// The name of the vector bucket.
	VectorBucketName *string
	// contains filtered or unexported fields
}

type ListVectorsOutput

type ListVectorsOutput struct {

	// Vectors in the current segment.
	//
	// This member is required.
	Vectors []types.ListOutputVector

	// Pagination token to be used in the subsequent request. The field is empty if no
	// further pagination is required.
	NextToken *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type ListVectorsPaginator

type ListVectorsPaginator struct {
	// contains filtered or unexported fields
}

ListVectorsPaginator is a paginator for ListVectors

func NewListVectorsPaginator

func NewListVectorsPaginator(client ListVectorsAPIClient, params *ListVectorsInput, optFns ...func(*ListVectorsPaginatorOptions)) *ListVectorsPaginator

NewListVectorsPaginator returns a new ListVectorsPaginator

func (*ListVectorsPaginator) HasMorePages

func (p *ListVectorsPaginator) HasMorePages() bool

HasMorePages returns a boolean indicating whether more pages are available

func (*ListVectorsPaginator) NextPage

func (p *ListVectorsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListVectorsOutput, error)

NextPage retrieves the next ListVectors page.

type ListVectorsPaginatorOptions

type ListVectorsPaginatorOptions struct {
	// The maximum number of vectors to return on a page.
	//
	// If you don't specify maxResults , the ListVectors operation uses a default
	// value of 500.
	//
	// If the processed dataset size exceeds 1 MB before reaching the maxResults
	// value, the operation stops and returns the vectors that are retrieved up to that
	// point, along with a nextToken that you can use in a subsequent request to
	// retrieve the next set of results.
	Limit int32

	// Set to true if pagination should stop if the service returns a pagination token
	// that matches the most recent token provided to the service.
	StopOnDuplicateToken bool
}

ListVectorsPaginatorOptions is the paginator options for ListVectors

type Options

type Options struct {
	// Set of options to modify how an operation is invoked. These apply to all
	// operations invoked for this client. Use functional options on operation call to
	// modify this list for per operation behavior.
	APIOptions []func(*middleware.Stack) error

	// The optional application specific identifier appended to the User-Agent header.
	AppID string

	// This endpoint will be given as input to an EndpointResolverV2. It is used for
	// providing a custom base endpoint that is subject to modifications by the
	// processing EndpointResolverV2.
	BaseEndpoint *string

	// Configures the events that will be sent to the configured logger.
	ClientLogMode aws.ClientLogMode

	// The credentials object to use when signing requests.
	Credentials aws.CredentialsProvider

	// The configuration DefaultsMode that the SDK should use when constructing the
	// clients initial default settings.
	DefaultsMode aws.DefaultsMode

	// The endpoint options to be used when attempting to resolve an endpoint.
	EndpointOptions EndpointResolverOptions

	// The service endpoint resolver.
	//
	// Deprecated: Deprecated: EndpointResolver and WithEndpointResolver. Providing a
	// value for this field will likely prevent you from using any endpoint-related
	// service features released after the introduction of EndpointResolverV2 and
	// BaseEndpoint.
	//
	// To migrate an EndpointResolver implementation that uses a custom endpoint, set
	// the client option BaseEndpoint instead.
	EndpointResolver EndpointResolver

	// Resolves the endpoint used for a particular service operation. This should be
	// used over the deprecated EndpointResolver.
	EndpointResolverV2 EndpointResolverV2

	// Signature Version 4 (SigV4) Signer
	HTTPSignerV4 HTTPSignerV4

	// The logger writer interface to write logging messages to.
	Logger logging.Logger

	// The client meter provider.
	MeterProvider metrics.MeterProvider

	// The region to send requests to. (Required)
	Region string

	// RetryMaxAttempts specifies the maximum number attempts an API client will call
	// an operation that fails with a retryable error. A value of 0 is ignored, and
	// will not be used to configure the API client created default retryer, or modify
	// per operation call's retry max attempts.
	//
	// If specified in an operation call's functional options with a value that is
	// different than the constructed client's Options, the Client's Retryer will be
	// wrapped to use the operation's specific RetryMaxAttempts value.
	RetryMaxAttempts int

	// RetryMode specifies the retry mode the API client will be created with, if
	// Retryer option is not also specified.
	//
	// When creating a new API Clients this member will only be used if the Retryer
	// Options member is nil. This value will be ignored if Retryer is not nil.
	//
	// Currently does not support per operation call overrides, may in the future.
	RetryMode aws.RetryMode

	// Retryer guides how HTTP requests should be retried in case of recoverable
	// failures. When nil the API client will use a default retryer. The kind of
	// default retry created by the API client can be changed with the RetryMode
	// option.
	Retryer aws.Retryer

	// The RuntimeEnvironment configuration, only populated if the DefaultsMode is set
	// to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You
	// should not populate this structure programmatically, or rely on the values here
	// within your applications.
	RuntimeEnvironment aws.RuntimeEnvironment

	// The client tracer provider.
	TracerProvider tracing.TracerProvider

	// The HTTP client to invoke API calls with. Defaults to client's default HTTP
	// implementation if nil.
	HTTPClient HTTPClient

	// Client registry of operation interceptors.
	Interceptors smithyhttp.InterceptorRegistry

	// The auth scheme resolver which determines how to authenticate for each
	// operation.
	AuthSchemeResolver AuthSchemeResolver

	// The list of auth schemes supported by the client.
	AuthSchemes []smithyhttp.AuthScheme

	// Priority list of preferred auth scheme names (e.g. sigv4a).
	AuthSchemePreference []string
	// contains filtered or unexported fields
}

func (Options) Copy

func (o Options) Copy() Options

Copy creates a clone where the APIOptions list is deep copied.

func (Options) GetIdentityResolver

func (o Options) GetIdentityResolver(schemeID string) smithyauth.IdentityResolver

type PutVectorBucketPolicyInput

type PutVectorBucketPolicyInput struct {

	// The JSON that defines the policy. For more information about bucket policies
	// for S3 Vectors, see [Managing vector bucket policies]in the Amazon S3 User Guide.
	//
	// [Managing vector bucket policies]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-vectors-bucket-policy.html
	//
	// This member is required.
	Policy *string

	// The Amazon Resource Name (ARN) of the vector bucket.
	VectorBucketArn *string

	// The name of the vector bucket.
	VectorBucketName *string
	// contains filtered or unexported fields
}

type PutVectorBucketPolicyOutput

type PutVectorBucketPolicyOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type PutVectorsInput

type PutVectorsInput struct {

	// The vectors to add to a vector index. The number of vectors in a single request
	// must not exceed the resource capacity, otherwise the request will be rejected
	// with the error ServiceUnavailableException with the error message "Currently
	// unable to handle the request".
	//
	// This member is required.
	Vectors []types.PutInputVector

	// The ARN of the vector index where you want to write vectors.
	IndexArn *string

	// The name of the vector index where you want to write vectors.
	IndexName *string

	// The name of the vector bucket that contains the vector index.
	VectorBucketName *string
	// contains filtered or unexported fields
}

type PutVectorsOutput

type PutVectorsOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type QueryVectorsInput

type QueryVectorsInput struct {

	// The query vector. Ensure that the query vector has the same dimension as the
	// dimension of the vector index that's being queried. For example, if your vector
	// index contains vectors with 384 dimensions, your query vector must also have 384
	// dimensions.
	//
	// This member is required.
	QueryVector types.VectorData

	// The number of results to return for each query.
	//
	// This member is required.
	TopK *int32

	// Metadata filter to apply during the query. For more information about metadata
	// keys, see [Metadata filtering]in the Amazon S3 User Guide.
	//
	// [Metadata filtering]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-vectors-metadata-filtering.html
	Filter document.Interface

	// The ARN of the vector index that you want to query.
	IndexArn *string

	// The name of the vector index that you want to query.
	IndexName *string

	// Indicates whether to include the computed distance in the response. The default
	// value is false .
	ReturnDistance bool

	// Indicates whether to include metadata in the response. The default value is
	// false .
	ReturnMetadata bool

	// The name of the vector bucket that contains the vector index.
	VectorBucketName *string
	// contains filtered or unexported fields
}

type QueryVectorsOutput

type QueryVectorsOutput struct {

	// The vectors in the approximate nearest neighbor search.
	//
	// This member is required.
	Vectors []types.QueryOutputVector

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type ResolveEndpoint

type ResolveEndpoint struct {
	Resolver EndpointResolver
	Options  EndpointResolverOptions
}

func (*ResolveEndpoint) HandleSerialize

func (*ResolveEndpoint) ID

func (*ResolveEndpoint) ID() string

Directories

Path Synopsis
Package document implements encoding and decoding of open-content that has a JSON-like data model.
Package document implements encoding and decoding of open-content that has a JSON-like data model.
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL