CfnIndexPropsMixin
- class aws_cdk.cfn_property_mixins.aws_opensearchserverless.CfnIndexPropsMixin(props, *, strategy=None)
Bases:
MixinAn OpenSearch Serverless index resource.
- See:
- 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
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.
IndexProperty
- class CfnIndexPropsMixin.IndexProperty(*, knn=None, knn_algo_param_ef_search=None, refresh_interval=None)
Bases:
objectAn 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:
- 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.
- knn_algo_param_ef_search
The size of the dynamic list for the nearest neighbors.
- refresh_interval
How often to perform a refresh operation.
For example, 1s or 5s.
IndexSettingsProperty
- class CfnIndexPropsMixin.IndexSettingsProperty(*, index=None)
Bases:
objectIndex settings for the OpenSearch Serverless index.
- Parameters:
index (
Union[IResolvable,IndexProperty,Dict[str,Any],None]) – Index settings.- See:
- 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
MappingsProperty
- class CfnIndexPropsMixin.MappingsProperty(*, properties=None)
Bases:
objectIndex 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:
- 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.
MethodProperty
- class CfnIndexPropsMixin.MethodProperty(*, engine=None, name=None, parameters=None, space_type=None)
Bases:
objectConfiguration 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:
- 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.
- name
The algorithm name for k-NN search.
- parameters
Additional parameters for the k-NN algorithm.
- space_type
The distance function used for k-NN search.
ParametersProperty
- class CfnIndexPropsMixin.ParametersProperty(*, ef_construction=None, m=None)
Bases:
objectAdditional 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:
- 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.
- m
Number of neighbors to consider during k-NN search.
PropertyMappingProperty
- class CfnIndexPropsMixin.PropertyMappingProperty(*, dimension=None, index=None, method=None, properties=None, type=None, value=None)
Bases:
objectProperty 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:
- 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.
- index
Whether a field should be indexed.
- method
Configuration for k-NN search method.
- properties
Defines the fields within the mapping, including their types and configurations.
- type
The field data type.
Must be a valid OpenSearch field type.
- value
Default value for the field when not specified in a document.