deleteVectors method

Future<void> deleteVectors({
  1. required List<String> keys,
  2. String? indexArn,
  3. String? indexName,
  4. String? vectorBucketName,
})

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.

May throw AccessDeniedException. May throw KmsDisabledException. May throw KmsInvalidKeyUsageException. May throw KmsInvalidStateException. May throw KmsNotFoundException. May throw NotFoundException. May throw ServiceUnavailableException.

Parameter keys : The keys of the vectors to delete.

Parameter indexArn : The ARN of the vector index that contains a vector you want to delete.

Parameter indexName : The name of the vector index that contains a vector you want to delete.

Parameter vectorBucketName : The name of the vector bucket that contains the vector index.

Implementation

Future<void> deleteVectors({
  required List<String> keys,
  String? indexArn,
  String? indexName,
  String? vectorBucketName,
}) async {
  final $payload = <String, dynamic>{
    'keys': keys,
    if (indexArn != null) 'indexArn': indexArn,
    if (indexName != null) 'indexName': indexName,
    if (vectorBucketName != null) 'vectorBucketName': vectorBucketName,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/DeleteVectors',
    exceptionFnMap: _exceptionFns,
  );
}