createVectorBucket method
Creates a vector bucket in the Amazon Web Services Region that you want your bucket to be in.
- Permissions
-
You must have the
s3vectors:CreateVectorBucketpermission to use this operation.You must have the
s3vectors:TagResourcepermission in addition tos3vectors:CreateVectorBucketpermission to create a vector bucket with tags.
May throw ConflictException.
May throw ServiceQuotaExceededException.
May throw ServiceUnavailableException.
Parameter vectorBucketName :
The name of the vector bucket to create.
Parameter encryptionConfiguration :
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.
Parameter tags :
An array of user-defined tags that you would like to apply to the vector
bucket that you are creating. A tag is a key-value pair that you apply to
your resources. Tags can help you organize and control access to
resources. For more information, see Tagging
for cost allocation or attribute-based access control (ABAC).
Implementation
Future<CreateVectorBucketOutput> createVectorBucket({
required String vectorBucketName,
EncryptionConfiguration? encryptionConfiguration,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'vectorBucketName': vectorBucketName,
if (encryptionConfiguration != null)
'encryptionConfiguration': encryptionConfiguration,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/CreateVectorBucket',
exceptionFnMap: _exceptionFns,
);
return CreateVectorBucketOutput.fromJson(response);
}