CfnIndexPropsMixin

class aws_cdk.cfn_property_mixins.aws_opensearchserverless.CfnIndexPropsMixin(props, *, strategy=None)

Bases: Mixin

An OpenSearch Serverless index resource.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opensearchserverless-index.html

CloudformationResource:

AWS::OpenSearchServerless::Index

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_opensearchserverless as opensearchserverless
import aws_cdk as cdk

# merge_strategy: cdk.IMergeStrategy
# property_mapping_property_: opensearchserverless.CfnIndexPropsMixin.PropertyMappingProperty

cfn_index_props_mixin = opensearchserverless.CfnIndexPropsMixin(opensearchserverless.CfnIndexMixinProps(
    collection_endpoint="collectionEndpoint",
    index_name="indexName",
    mappings=opensearchserverless.CfnIndexPropsMixin.MappingsProperty(
        properties={
            "properties_key": opensearchserverless.CfnIndexPropsMixin.PropertyMappingProperty(
                dimension=123,
                index=False,
                method=opensearchserverless.CfnIndexPropsMixin.MethodProperty(
                    engine="engine",
                    name="name",
                    parameters=opensearchserverless.CfnIndexPropsMixin.ParametersProperty(
                        ef_construction=123,
                        m=123
                    ),
                    space_type="spaceType"
                ),
                properties={
                    "properties_key": property_mapping_property_
                },
                type="type",
                value="value"
            )
        }
    ),
    settings=opensearchserverless.CfnIndexPropsMixin.IndexSettingsProperty(
        index=opensearchserverless.CfnIndexPropsMixin.IndexProperty(
            knn=False,
            knn_algo_param_ef_search=123,
            refresh_interval="refreshInterval"
        )
    )
),
    strategy=merge_strategy
)

Create a mixin to apply properties to AWS::OpenSearchServerless::Index.

Parameters:
  • props (Union[CfnIndexMixinProps, Dict[str, Any]]) – L1 properties to apply.

  • strategy (Optional[IMergeStrategy]) – Strategy for merging nested properties. Default: - PropertyMergeStrategy.combine()

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

None

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['collectionEndpoint', 'indexName', 'mappings', 'settings']

Static Methods

classmethod is_mixin(x)

Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

IndexProperty

class CfnIndexPropsMixin.IndexProperty(*, knn=None, knn_algo_param_ef_search=None, refresh_interval=None)

Bases: object

An OpenSearch Serverless index resource.

Parameters:
  • knn (Union[bool, IResolvable, None]) – Enable or disable k-nearest neighbor search capability.

  • knn_algo_param_ef_search (Union[int, float, None]) – The size of the dynamic list for the nearest neighbors.

  • refresh_interval (Optional[str]) – How often to perform a refresh operation. For example, 1s or 5s.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchserverless-index-index.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_opensearchserverless as opensearchserverless

index_property = opensearchserverless.CfnIndexPropsMixin.IndexProperty(
    knn=False,
    knn_algo_param_ef_search=123,
    refresh_interval="refreshInterval"
)

Attributes

knn

Enable or disable k-nearest neighbor search capability.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchserverless-index-index.html#cfn-opensearchserverless-index-index-knn

The size of the dynamic list for the nearest neighbors.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchserverless-index-index.html#cfn-opensearchserverless-index-index-knnalgoparamefsearch

refresh_interval

How often to perform a refresh operation.

For example, 1s or 5s.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchserverless-index-index.html#cfn-opensearchserverless-index-index-refreshinterval

IndexSettingsProperty

class CfnIndexPropsMixin.IndexSettingsProperty(*, index=None)

Bases: object

Index settings for the OpenSearch Serverless index.

Parameters:

index (Union[IResolvable, IndexProperty, Dict[str, Any], None]) – Index settings.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchserverless-index-indexsettings.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_opensearchserverless as opensearchserverless

index_settings_property = opensearchserverless.CfnIndexPropsMixin.IndexSettingsProperty(
    index=opensearchserverless.CfnIndexPropsMixin.IndexProperty(
        knn=False,
        knn_algo_param_ef_search=123,
        refresh_interval="refreshInterval"
    )
)

Attributes

index

Index settings.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchserverless-index-indexsettings.html#cfn-opensearchserverless-index-indexsettings-index

MappingsProperty

class CfnIndexPropsMixin.MappingsProperty(*, properties=None)

Bases: object

Index mappings for the OpenSearch Serverless index.

Parameters:

properties (Union[IResolvable, Mapping[str, Union[IResolvable, PropertyMappingProperty, Dict[str, Any]]], None]) – Nested fields within an object or nested field type.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchserverless-index-mappings.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_opensearchserverless as opensearchserverless

# property_mapping_property_: opensearchserverless.CfnIndexPropsMixin.PropertyMappingProperty

mappings_property = opensearchserverless.CfnIndexPropsMixin.MappingsProperty(
    properties={
        "properties_key": opensearchserverless.CfnIndexPropsMixin.PropertyMappingProperty(
            dimension=123,
            index=False,
            method=opensearchserverless.CfnIndexPropsMixin.MethodProperty(
                engine="engine",
                name="name",
                parameters=opensearchserverless.CfnIndexPropsMixin.ParametersProperty(
                    ef_construction=123,
                    m=123
                ),
                space_type="spaceType"
            ),
            properties={
                "properties_key": property_mapping_property_
            },
            type="type",
            value="value"
        )
    }
)

Attributes

properties

Nested fields within an object or nested field type.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchserverless-index-mappings.html#cfn-opensearchserverless-index-mappings-properties

MethodProperty

class CfnIndexPropsMixin.MethodProperty(*, engine=None, name=None, parameters=None, space_type=None)

Bases: object

Configuration for k-NN search method.

Parameters:
  • engine (Optional[str]) – The k-NN search engine to use.

  • name (Optional[str]) – The algorithm name for k-NN search.

  • parameters (Union[IResolvable, ParametersProperty, Dict[str, Any], None]) – Additional parameters for the k-NN algorithm.

  • space_type (Optional[str]) – The distance function used for k-NN search.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchserverless-index-method.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_opensearchserverless as opensearchserverless

method_property = opensearchserverless.CfnIndexPropsMixin.MethodProperty(
    engine="engine",
    name="name",
    parameters=opensearchserverless.CfnIndexPropsMixin.ParametersProperty(
        ef_construction=123,
        m=123
    ),
    space_type="spaceType"
)

Attributes

engine

The k-NN search engine to use.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchserverless-index-method.html#cfn-opensearchserverless-index-method-engine

name

The algorithm name for k-NN search.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchserverless-index-method.html#cfn-opensearchserverless-index-method-name

parameters

Additional parameters for the k-NN algorithm.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchserverless-index-method.html#cfn-opensearchserverless-index-method-parameters

space_type

The distance function used for k-NN search.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchserverless-index-method.html#cfn-opensearchserverless-index-method-spacetype

ParametersProperty

class CfnIndexPropsMixin.ParametersProperty(*, ef_construction=None, m=None)

Bases: object

Additional parameters for the k-NN algorithm.

Parameters:
  • ef_construction (Union[int, float, None]) – The size of the dynamic list used during k-NN graph creation.

  • m (Union[int, float, None]) – Number of neighbors to consider during k-NN search.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchserverless-index-parameters.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_opensearchserverless as opensearchserverless

parameters_property = opensearchserverless.CfnIndexPropsMixin.ParametersProperty(
    ef_construction=123,
    m=123
)

Attributes

ef_construction

The size of the dynamic list used during k-NN graph creation.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchserverless-index-parameters.html#cfn-opensearchserverless-index-parameters-efconstruction

m

Number of neighbors to consider during k-NN search.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchserverless-index-parameters.html#cfn-opensearchserverless-index-parameters-m

PropertyMappingProperty

class CfnIndexPropsMixin.PropertyMappingProperty(*, dimension=None, index=None, method=None, properties=None, type=None, value=None)

Bases: object

Property mappings for the OpenSearch Serverless index.

Parameters:
  • dimension (Union[int, float, None]) – Dimension size for vector fields, defines the number of dimensions in the vector.

  • index (Union[bool, IResolvable, None]) – Whether a field should be indexed.

  • method (Union[IResolvable, MethodProperty, Dict[str, Any], None]) – Configuration for k-NN search method.

  • properties (Union[IResolvable, Mapping[str, Union[IResolvable, PropertyMappingProperty, Dict[str, Any]]], None]) – Defines the fields within the mapping, including their types and configurations.

  • type (Optional[str]) – The field data type. Must be a valid OpenSearch field type.

  • value (Optional[str]) – Default value for the field when not specified in a document.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchserverless-index-propertymapping.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_opensearchserverless as opensearchserverless

# property_mapping_property_: opensearchserverless.CfnIndexPropsMixin.PropertyMappingProperty

property_mapping_property = opensearchserverless.CfnIndexPropsMixin.PropertyMappingProperty(
    dimension=123,
    index=False,
    method=opensearchserverless.CfnIndexPropsMixin.MethodProperty(
        engine="engine",
        name="name",
        parameters=opensearchserverless.CfnIndexPropsMixin.ParametersProperty(
            ef_construction=123,
            m=123
        ),
        space_type="spaceType"
    ),
    properties={
        "properties_key": property_mapping_property_
    },
    type="type",
    value="value"
)

Attributes

dimension

Dimension size for vector fields, defines the number of dimensions in the vector.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchserverless-index-propertymapping.html#cfn-opensearchserverless-index-propertymapping-dimension

index

Whether a field should be indexed.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchserverless-index-propertymapping.html#cfn-opensearchserverless-index-propertymapping-index

method

Configuration for k-NN search method.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchserverless-index-propertymapping.html#cfn-opensearchserverless-index-propertymapping-method

properties

Defines the fields within the mapping, including their types and configurations.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchserverless-index-propertymapping.html#cfn-opensearchserverless-index-propertymapping-properties

type

The field data type.

Must be a valid OpenSearch field type.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchserverless-index-propertymapping.html#cfn-opensearchserverless-index-propertymapping-type

value

Default value for the field when not specified in a document.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchserverless-index-propertymapping.html#cfn-opensearchserverless-index-propertymapping-value