# OpenSearchManagedClusterConfigurationProperty

Contains details about the Managed Cluster configuration of the knowledge base in Amazon OpenSearch Service.

For more information, see [Create a vector index in OpenSearch Managed Cluster](https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-setup-osm.html) .

- Source: Generated at build time
- Type last changed: v2.190.0 · 17 Apr 2025

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_bedrock as bedrock } from 'aws-cdk-lib';
const openSearchManagedClusterConfigurationProperty: bedrock.CfnKnowledgeBase.OpenSearchManagedClusterConfigurationProperty = {
  domainArn: 'domainArn',
  domainEndpoint: 'domainEndpoint',
  fieldMapping: {
    metadataField: 'metadataField',
    textField: 'textField',
    vectorField: 'vectorField',
  },
  vectorIndexName: 'vectorIndexName',
};
```

Python:

```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_bedrock as bedrock

open_search_managed_cluster_configuration_property = bedrock.CfnKnowledgeBase.OpenSearchManagedClusterConfigurationProperty(
    domain_arn="domainArn",
    domain_endpoint="domainEndpoint",
    field_mapping=bedrock.CfnKnowledgeBase.OpenSearchManagedClusterFieldMappingProperty(
        metadata_field="metadataField",
        text_field="textField",
        vector_field="vectorField"
    ),
    vector_index_name="vectorIndexName"
)
```

Java:

```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.bedrock.*;

OpenSearchManagedClusterConfigurationProperty openSearchManagedClusterConfigurationProperty = OpenSearchManagedClusterConfigurationProperty.builder()
        .domainArn("domainArn")
        .domainEndpoint("domainEndpoint")
        .fieldMapping(OpenSearchManagedClusterFieldMappingProperty.builder()
                .metadataField("metadataField")
                .textField("textField")
                .vectorField("vectorField")
                .build())
        .vectorIndexName("vectorIndexName")
        .build();
```

C# / .NET:

```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.Bedrock;

var openSearchManagedClusterConfigurationProperty = new OpenSearchManagedClusterConfigurationProperty {
    DomainArn = "domainArn",
    DomainEndpoint = "domainEndpoint",
    FieldMapping = new OpenSearchManagedClusterFieldMappingProperty {
        MetadataField = "metadataField",
        TextField = "textField",
        VectorField = "vectorField"
    },
    VectorIndexName = "vectorIndexName"
};
```

Golang:

```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"

openSearchManagedClusterConfigurationProperty := &OpenSearchManagedClusterConfigurationProperty{
	DomainArn: jsii.String("domainArn"),
	DomainEndpoint: jsii.String("domainEndpoint"),
	FieldMapping: &OpenSearchManagedClusterFieldMappingProperty{
		MetadataField: jsii.String("metadataField"),
		TextField: jsii.String("textField"),
		VectorField: jsii.String("vectorField"),
	},
	VectorIndexName: jsii.String("vectorIndexName"),
}
```

## Properties

- `domainArn`: string (required) — The Amazon Resource Name (ARN) of the OpenSearch domain.

- `domainEndpoint`: string (required) — The endpoint URL the OpenSearch domain.

- `fieldMapping`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnKnowledgeBase.OpenSearchManagedClusterFieldMappingProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrock.CfnKnowledgeBase.OpenSearchManagedClusterFieldMappingProperty.html) (required) — Contains the names of the fields to which to map information about the vector store.

- `vectorIndexName`: string (required) — The name of the vector store.
