airflow.providers.amazon.aws.operators.s3_vectors

Amazon S3 Vectors operators.

Classes

S3VectorsCreateVectorBucketOperator

Create an Amazon S3 Vectors vector bucket.

S3VectorsDeleteVectorBucketOperator

Delete an Amazon S3 Vectors vector bucket.

S3VectorsCreateIndexOperator

Create an index in an Amazon S3 Vectors vector bucket.

S3VectorsDeleteIndexOperator

Delete an index from an Amazon S3 Vectors vector bucket.

Module Contents

class airflow.providers.amazon.aws.operators.s3_vectors.S3VectorsCreateVectorBucketOperator(*, vector_bucket_name, encryption_configuration=None, tags=None, if_exists='skip', **kwargs)[source]

Bases: airflow.providers.amazon.aws.operators.base_aws.AwsBaseOperator[airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook]

Create an Amazon S3 Vectors vector bucket.

See also

For more information on how to use this operator, take a look at the guide: Create a Vector Bucket

Parameters:
  • vector_bucket_name (str) – The name of the vector bucket to create (3-63 chars).

  • encryption_configuration (dict[str, Any] | None) – Optional encryption config dict with keys sseType (AES256 or aws:kms) and optionally kmsKeyArn.

  • tags (dict[str, str] | None) – Optional dict of tags to apply to the vector bucket.

  • if_exists (Literal['fail', 'skip']) – Behavior when the bucket already exists. "fail" raises an error, "skip" returns the existing bucket ARN.

aws_hook_class[source]
template_fields: tuple[str, Ellipsis][source]
vector_bucket_name[source]
encryption_configuration = None[source]
tags = None[source]
if_exists = 'skip'[source]
execute(context)[source]

Derive when creating an operator.

The main method to execute the task. Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

class airflow.providers.amazon.aws.operators.s3_vectors.S3VectorsDeleteVectorBucketOperator(*, vector_bucket_name, **kwargs)[source]

Bases: airflow.providers.amazon.aws.operators.base_aws.AwsBaseOperator[airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook]

Delete an Amazon S3 Vectors vector bucket.

See also

For more information on how to use this operator, take a look at the guide: Delete a Vector Bucket

Parameters:

vector_bucket_name (str) – The name of the vector bucket to delete.

aws_hook_class[source]
template_fields: tuple[str, Ellipsis][source]
vector_bucket_name[source]
execute(context)[source]

Derive when creating an operator.

The main method to execute the task. Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

class airflow.providers.amazon.aws.operators.s3_vectors.S3VectorsCreateIndexOperator(*, vector_bucket_name, index_name, data_type, dimension, distance_metric='cosine', metadata_configuration=None, if_exists='skip', **kwargs)[source]

Bases: airflow.providers.amazon.aws.operators.base_aws.AwsBaseOperator[airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook]

Create an index in an Amazon S3 Vectors vector bucket.

An index stores vectors and supports similarity search queries.

See also

For more information on how to use this operator, take a look at the guide: Create an Index

Parameters:
  • vector_bucket_name (str) – The name of the vector bucket. (templated)

  • index_name (str) – The name of the index to create. (templated)

  • data_type (str) – The data type for vectors (e.g. float32). (templated)

  • dimension (int) – The number of dimensions for each vector.

  • distance_metric (str) – The distance metric for similarity search (e.g. cosine, euclidean).

  • metadata_configuration (dict[str, Any] | None) – Optional metadata configuration dict.

  • if_exists (Literal['fail', 'skip']) – Behavior when the index already exists. "fail" raises an error, "skip" returns the existing index ARN.

aws_hook_class[source]
template_fields: tuple[str, Ellipsis][source]
template_fields_renderers[source]
vector_bucket_name[source]
index_name[source]
data_type[source]
dimension[source]
distance_metric = 'cosine'[source]
metadata_configuration = None[source]
if_exists = 'skip'[source]
execute(context)[source]

Derive when creating an operator.

The main method to execute the task. Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

class airflow.providers.amazon.aws.operators.s3_vectors.S3VectorsDeleteIndexOperator(*, vector_bucket_name, index_name, **kwargs)[source]

Bases: airflow.providers.amazon.aws.operators.base_aws.AwsBaseOperator[airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook]

Delete an index from an Amazon S3 Vectors vector bucket.

See also

For more information on how to use this operator, take a look at the guide: Delete an Index

Parameters:
  • vector_bucket_name (str) – The name of the vector bucket. (templated)

  • index_name (str) – The name of the index to delete. (templated)

aws_hook_class[source]
template_fields: tuple[str, Ellipsis][source]
vector_bucket_name[source]
index_name[source]
execute(context)[source]

Derive when creating an operator.

The main method to execute the task. Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

Was this entry helpful?