Skip to content
v2.278.0

MappingsProperty ​

Struct External

Index mappings for the OpenSearch Serverless index.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_opensearchserverless as opensearchserverless } from 'aws-cdk-lib';

declare const propertyMappingProperty_: opensearchserverless.CfnIndex.PropertyMappingProperty;
const mappingsProperty: opensearchserverless.CfnIndex.MappingsProperty = {
  properties: {
    propertiesKey: {
      type: 'type',

      // the properties below are optional
      analyzer: 'analyzer',
      compressionLevel: 'compressionLevel',
      dataType: 'dataType',
      dimension: 123,
      index: false,
      method: {
        name: 'name',

        // the properties below are optional
        engine: 'engine',
        parameters: {
          efConstruction: 123,
          m: 123,
        },
        spaceType: 'spaceType',
      },
      properties: {
        propertiesKey: propertyMappingProperty_,
      },
      spaceType: 'spaceType',
      value: 'value',
    },
  },
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_opensearchserverless as opensearchserverless

# property_mapping_property_: opensearchserverless.CfnIndex.PropertyMappingProperty

mappings_property = opensearchserverless.CfnIndex.MappingsProperty(
    properties={
        "properties_key": opensearchserverless.CfnIndex.PropertyMappingProperty(
            type="type",

            # the properties below are optional
            analyzer="analyzer",
            compression_level="compressionLevel",
            data_type="dataType",
            dimension=123,
            index=False,
            method=opensearchserverless.CfnIndex.MethodProperty(
                name="name",

                # the properties below are optional
                engine="engine",
                parameters=opensearchserverless.CfnIndex.ParametersProperty(
                    ef_construction=123,
                    m=123
                ),
                space_type="spaceType"
            ),
            properties={
                "properties_key": property_mapping_property_
            },
            space_type="spaceType",
            value="value"
        )
    }
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.opensearchserverless.*;

PropertyMappingProperty propertyMappingProperty_;

MappingsProperty mappingsProperty = MappingsProperty.builder()
        .properties(Map.of(
                "propertiesKey", PropertyMappingProperty.builder()
                        .type("type")

                        // the properties below are optional
                        .analyzer("analyzer")
                        .compressionLevel("compressionLevel")
                        .dataType("dataType")
                        .dimension(123)
                        .index(false)
                        .method(MethodProperty.builder()
                                .name("name")

                                // the properties below are optional
                                .engine("engine")
                                .parameters(ParametersProperty.builder()
                                        .efConstruction(123)
                                        .m(123)
                                        .build())
                                .spaceType("spaceType")
                                .build())
                        .properties(Map.of(
                                "propertiesKey", propertyMappingProperty_))
                        .spaceType("spaceType")
                        .value("value")
                        .build()))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.OpenSearchServerless;

PropertyMappingProperty propertyMappingProperty_;

var mappingsProperty = new MappingsProperty {
    Properties = new Dictionary<string, object> {
        { "propertiesKey", new PropertyMappingProperty {
            Type = "type",

            // the properties below are optional
            Analyzer = "analyzer",
            CompressionLevel = "compressionLevel",
            DataType = "dataType",
            Dimension = 123,
            Index = false,
            Method = new MethodProperty {
                Name = "name",

                // the properties below are optional
                Engine = "engine",
                Parameters = new ParametersProperty {
                    EfConstruction = 123,
                    M = 123
                },
                SpaceType = "spaceType"
            },
            Properties = new Dictionary<string, object> {
                { "propertiesKey", propertyMappingProperty_ }
            },
            SpaceType = "spaceType",
            Value = "value"
        } }
    }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var propertyMappingProperty_ PropertyMappingProperty

mappingsProperty := &MappingsProperty{
	Properties: map[string]interface{}{
		"propertiesKey": &PropertyMappingProperty{
			"type": jsii.String("type"),

			// the properties below are optional
			"analyzer": jsii.String("analyzer"),
			"compressionLevel": jsii.String("compressionLevel"),
			"dataType": jsii.String("dataType"),
			"dimension": jsii.Number(123),
			"index": jsii.Boolean(false),
			"method": &MethodProperty{
				"name": jsii.String("name"),

				// the properties below are optional
				"engine": jsii.String("engine"),
				"parameters": &ParametersProperty{
					"efConstruction": jsii.Number(123),
					"m": jsii.Number(123),
				},
				"spaceType": jsii.String("spaceType"),
			},
			"properties": map[string]interface{}{
				"propertiesKey": propertyMappingProperty_,
			},
			"spaceType": jsii.String("spaceType"),
			"value": jsii.String("value"),
		},
	},
}

Properties ​

propertiesoptionalIResolvable | { [key: string]: IResolvable | CfnIndex.PropertyMappingProperty }propertiesoptionaltyping.Union[IResolvable, typing.Mapping[str, typing.Union[IResolvable, PropertyMappingProperty]]]propertiesoptionalIResolvablePropertiesoptionalIResolvablePropertiesoptionalinterface{} #
Nested fields within an object or nested field type.