# ConfluenceSpaceConfigurationProperty

Configuration information for indexing Confluence spaces.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_kendra as kendra } from 'aws-cdk-lib';
const confluenceSpaceConfigurationProperty: kendra.CfnDataSource.ConfluenceSpaceConfigurationProperty = {
  crawlArchivedSpaces: false,
  crawlPersonalSpaces: false,
  excludeSpaces: ['excludeSpaces'],
  includeSpaces: ['includeSpaces'],
  spaceFieldMappings: [{
    dataSourceFieldName: 'dataSourceFieldName',
    indexFieldName: 'indexFieldName',

    // the properties below are optional
    dateFieldFormat: 'dateFieldFormat',
  }],
};
```

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_kendra as kendra

confluence_space_configuration_property = kendra.CfnDataSource.ConfluenceSpaceConfigurationProperty(
    crawl_archived_spaces=False,
    crawl_personal_spaces=False,
    exclude_spaces=["excludeSpaces"],
    include_spaces=["includeSpaces"],
    space_field_mappings=[kendra.CfnDataSource.ConfluenceSpaceToIndexFieldMappingProperty(
        data_source_field_name="dataSourceFieldName",
        index_field_name="indexFieldName",

        # the properties below are optional
        date_field_format="dateFieldFormat"
    )]
)
```

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.kendra.*;

ConfluenceSpaceConfigurationProperty confluenceSpaceConfigurationProperty = ConfluenceSpaceConfigurationProperty.builder()
        .crawlArchivedSpaces(false)
        .crawlPersonalSpaces(false)
        .excludeSpaces(List.of("excludeSpaces"))
        .includeSpaces(List.of("includeSpaces"))
        .spaceFieldMappings(List.of(ConfluenceSpaceToIndexFieldMappingProperty.builder()
                .dataSourceFieldName("dataSourceFieldName")
                .indexFieldName("indexFieldName")

                // the properties below are optional
                .dateFieldFormat("dateFieldFormat")
                .build()))
        .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.Kendra;

var confluenceSpaceConfigurationProperty = new ConfluenceSpaceConfigurationProperty {
    CrawlArchivedSpaces = false,
    CrawlPersonalSpaces = false,
    ExcludeSpaces = new [] { "excludeSpaces" },
    IncludeSpaces = new [] { "includeSpaces" },
    SpaceFieldMappings = new [] { new ConfluenceSpaceToIndexFieldMappingProperty {
        DataSourceFieldName = "dataSourceFieldName",
        IndexFieldName = "indexFieldName",

        // the properties below are optional
        DateFieldFormat = "dateFieldFormat"
    } }
};
```

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"

confluenceSpaceConfigurationProperty := &ConfluenceSpaceConfigurationProperty{
	CrawlArchivedSpaces: jsii.Boolean(false),
	CrawlPersonalSpaces: jsii.Boolean(false),
	ExcludeSpaces: []*string{
		jsii.String("excludeSpaces"),
	},
	IncludeSpaces: []*string{
		jsii.String("includeSpaces"),
	},
	SpaceFieldMappings: []interface{}{
		&ConfluenceSpaceToIndexFieldMappingProperty{
			DataSourceFieldName: jsii.String("dataSourceFieldName"),
			IndexFieldName: jsii.String("indexFieldName"),

			// the properties below are optional
			DateFieldFormat: jsii.String("dateFieldFormat"),
		},
	},
}
```

## Properties

- `crawlArchivedSpaces`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — `TRUE` to index archived spaces.

- `crawlPersonalSpaces`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — `TRUE` to index personal spaces.

  You can add restrictions to items in personal spaces. If personal spaces are indexed, queries without user context information may return restricted items from a personal space in their results. For more information, see [Filtering on user context](https://docs.aws.amazon.com/kendra/latest/dg/user-context-filter.html) .

- `excludeSpaces`: string[] — A list of space keys of Confluence spaces.

  If you include a key, the blogs, documents, and attachments in the space are not indexed. If a space is in both the `ExcludeSpaces` and the `IncludeSpaces` list, the space is excluded.

- `includeSpaces`: string[] — A list of space keys for Confluence spaces.

  If you include a key, the blogs, documents, and attachments in the space are indexed. Spaces that aren't in the list aren't indexed. A space in the list must exist. Otherwise, Amazon Kendra logs an error when the data source is synchronized. If a space is in both the `IncludeSpaces` and the `ExcludeSpaces` list, the space is excluded.

- `spaceFieldMappings`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDataSource.ConfluenceSpaceToIndexFieldMappingProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kendra.CfnDataSource.ConfluenceSpaceToIndexFieldMappingProperty.html)[] — Maps attributes or field names of Confluence spaces to Amazon Kendra index field names.

  To create custom fields, use the `UpdateIndex` API before you map to Confluence fields. For more information, see [Mapping data source fields](https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) . The Confluence data source field names must exist in your Confluence custom metadata.

  If you specify the `SpaceFieldMappings` parameter, you must specify at least one field mapping.
