Class CfnDataSource
Creates a data source connector that you want to use with an Amazon Kendra index.
Inherited Members
Namespace: Amazon.CDK.AWS.Kendra
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnDataSource : CfnResource, IInspectable, ITaggable
Syntax (vb)
Public Class CfnDataSource
Inherits CfnResource
Implements IInspectable, ITaggable
Remarks
You specify a name, data source connector type and description for your data source. You also specify configuration information for the data source connector.
CreateDataSource
does not support connectors which require a TemplateConfiguration
object for connecting to Amazon Kendra .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kendra-datasource.html
CloudformationResource: AWS::Kendra::DataSource
ExampleMetadata: fixture=_generated
Examples
// 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 cfnDataSource = new CfnDataSource(this, "MyCfnDataSource", new CfnDataSourceProps {
IndexId = "indexId",
Name = "name",
Type = "type",
// the properties below are optional
CustomDocumentEnrichmentConfiguration = new CustomDocumentEnrichmentConfigurationProperty {
InlineConfigurations = new [] { new InlineCustomDocumentEnrichmentConfigurationProperty {
Condition = new DocumentAttributeConditionProperty {
ConditionDocumentAttributeKey = "conditionDocumentAttributeKey",
Operator = "operator",
// the properties below are optional
ConditionOnValue = new DocumentAttributeValueProperty {
DateValue = "dateValue",
LongValue = 123,
StringListValue = new [] { "stringListValue" },
StringValue = "stringValue"
}
},
DocumentContentDeletion = false,
Target = new DocumentAttributeTargetProperty {
TargetDocumentAttributeKey = "targetDocumentAttributeKey",
// the properties below are optional
TargetDocumentAttributeValue = new DocumentAttributeValueProperty {
DateValue = "dateValue",
LongValue = 123,
StringListValue = new [] { "stringListValue" },
StringValue = "stringValue"
},
TargetDocumentAttributeValueDeletion = false
}
} },
PostExtractionHookConfiguration = new HookConfigurationProperty {
LambdaArn = "lambdaArn",
S3Bucket = "s3Bucket",
// the properties below are optional
InvocationCondition = new DocumentAttributeConditionProperty {
ConditionDocumentAttributeKey = "conditionDocumentAttributeKey",
Operator = "operator",
// the properties below are optional
ConditionOnValue = new DocumentAttributeValueProperty {
DateValue = "dateValue",
LongValue = 123,
StringListValue = new [] { "stringListValue" },
StringValue = "stringValue"
}
}
},
PreExtractionHookConfiguration = new HookConfigurationProperty {
LambdaArn = "lambdaArn",
S3Bucket = "s3Bucket",
// the properties below are optional
InvocationCondition = new DocumentAttributeConditionProperty {
ConditionDocumentAttributeKey = "conditionDocumentAttributeKey",
Operator = "operator",
// the properties below are optional
ConditionOnValue = new DocumentAttributeValueProperty {
DateValue = "dateValue",
LongValue = 123,
StringListValue = new [] { "stringListValue" },
StringValue = "stringValue"
}
}
},
RoleArn = "roleArn"
},
DataSourceConfiguration = new DataSourceConfigurationProperty {
ConfluenceConfiguration = new ConfluenceConfigurationProperty {
SecretArn = "secretArn",
ServerUrl = "serverUrl",
Version = "version",
// the properties below are optional
AttachmentConfiguration = new ConfluenceAttachmentConfigurationProperty {
AttachmentFieldMappings = new [] { new ConfluenceAttachmentToIndexFieldMappingProperty {
DataSourceFieldName = "dataSourceFieldName",
IndexFieldName = "indexFieldName",
// the properties below are optional
DateFieldFormat = "dateFieldFormat"
} },
CrawlAttachments = false
},
BlogConfiguration = new ConfluenceBlogConfigurationProperty {
BlogFieldMappings = new [] { new ConfluenceBlogToIndexFieldMappingProperty {
DataSourceFieldName = "dataSourceFieldName",
IndexFieldName = "indexFieldName",
// the properties below are optional
DateFieldFormat = "dateFieldFormat"
} }
},
ExclusionPatterns = new [] { "exclusionPatterns" },
InclusionPatterns = new [] { "inclusionPatterns" },
PageConfiguration = new ConfluencePageConfigurationProperty {
PageFieldMappings = new [] { new ConfluencePageToIndexFieldMappingProperty {
DataSourceFieldName = "dataSourceFieldName",
IndexFieldName = "indexFieldName",
// the properties below are optional
DateFieldFormat = "dateFieldFormat"
} }
},
SpaceConfiguration = 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"
} }
},
VpcConfiguration = new DataSourceVpcConfigurationProperty {
SecurityGroupIds = new [] { "securityGroupIds" },
SubnetIds = new [] { "subnetIds" }
}
},
DatabaseConfiguration = new DatabaseConfigurationProperty {
ColumnConfiguration = new ColumnConfigurationProperty {
ChangeDetectingColumns = new [] { "changeDetectingColumns" },
DocumentDataColumnName = "documentDataColumnName",
DocumentIdColumnName = "documentIdColumnName",
// the properties below are optional
DocumentTitleColumnName = "documentTitleColumnName",
FieldMappings = new [] { new DataSourceToIndexFieldMappingProperty {
DataSourceFieldName = "dataSourceFieldName",
IndexFieldName = "indexFieldName",
// the properties below are optional
DateFieldFormat = "dateFieldFormat"
} }
},
ConnectionConfiguration = new ConnectionConfigurationProperty {
DatabaseHost = "databaseHost",
DatabaseName = "databaseName",
DatabasePort = 123,
SecretArn = "secretArn",
TableName = "tableName"
},
DatabaseEngineType = "databaseEngineType",
// the properties below are optional
AclConfiguration = new AclConfigurationProperty {
AllowedGroupsColumnName = "allowedGroupsColumnName"
},
SqlConfiguration = new SqlConfigurationProperty {
QueryIdentifiersEnclosingOption = "queryIdentifiersEnclosingOption"
},
VpcConfiguration = new DataSourceVpcConfigurationProperty {
SecurityGroupIds = new [] { "securityGroupIds" },
SubnetIds = new [] { "subnetIds" }
}
},
GoogleDriveConfiguration = new GoogleDriveConfigurationProperty {
SecretArn = "secretArn",
// the properties below are optional
ExcludeMimeTypes = new [] { "excludeMimeTypes" },
ExcludeSharedDrives = new [] { "excludeSharedDrives" },
ExcludeUserAccounts = new [] { "excludeUserAccounts" },
ExclusionPatterns = new [] { "exclusionPatterns" },
FieldMappings = new [] { new DataSourceToIndexFieldMappingProperty {
DataSourceFieldName = "dataSourceFieldName",
IndexFieldName = "indexFieldName",
// the properties below are optional
DateFieldFormat = "dateFieldFormat"
} },
InclusionPatterns = new [] { "inclusionPatterns" }
},
OneDriveConfiguration = new OneDriveConfigurationProperty {
OneDriveUsers = new OneDriveUsersProperty {
OneDriveUserList = new [] { "oneDriveUserList" },
OneDriveUserS3Path = new S3PathProperty {
Bucket = "bucket",
Key = "key"
}
},
SecretArn = "secretArn",
TenantDomain = "tenantDomain",
// the properties below are optional
DisableLocalGroups = false,
ExclusionPatterns = new [] { "exclusionPatterns" },
FieldMappings = new [] { new DataSourceToIndexFieldMappingProperty {
DataSourceFieldName = "dataSourceFieldName",
IndexFieldName = "indexFieldName",
// the properties below are optional
DateFieldFormat = "dateFieldFormat"
} },
InclusionPatterns = new [] { "inclusionPatterns" }
},
S3Configuration = new S3DataSourceConfigurationProperty {
BucketName = "bucketName",
// the properties below are optional
AccessControlListConfiguration = new AccessControlListConfigurationProperty {
KeyPath = "keyPath"
},
DocumentsMetadataConfiguration = new DocumentsMetadataConfigurationProperty {
S3Prefix = "s3Prefix"
},
ExclusionPatterns = new [] { "exclusionPatterns" },
InclusionPatterns = new [] { "inclusionPatterns" },
InclusionPrefixes = new [] { "inclusionPrefixes" }
},
SalesforceConfiguration = new SalesforceConfigurationProperty {
SecretArn = "secretArn",
ServerUrl = "serverUrl",
// the properties below are optional
ChatterFeedConfiguration = new SalesforceChatterFeedConfigurationProperty {
DocumentDataFieldName = "documentDataFieldName",
// the properties below are optional
DocumentTitleFieldName = "documentTitleFieldName",
FieldMappings = new [] { new DataSourceToIndexFieldMappingProperty {
DataSourceFieldName = "dataSourceFieldName",
IndexFieldName = "indexFieldName",
// the properties below are optional
DateFieldFormat = "dateFieldFormat"
} },
IncludeFilterTypes = new [] { "includeFilterTypes" }
},
CrawlAttachments = false,
ExcludeAttachmentFilePatterns = new [] { "excludeAttachmentFilePatterns" },
IncludeAttachmentFilePatterns = new [] { "includeAttachmentFilePatterns" },
KnowledgeArticleConfiguration = new SalesforceKnowledgeArticleConfigurationProperty {
IncludedStates = new [] { "includedStates" },
// the properties below are optional
CustomKnowledgeArticleTypeConfigurations = new [] { new SalesforceCustomKnowledgeArticleTypeConfigurationProperty {
DocumentDataFieldName = "documentDataFieldName",
Name = "name",
// the properties below are optional
DocumentTitleFieldName = "documentTitleFieldName",
FieldMappings = new [] { new DataSourceToIndexFieldMappingProperty {
DataSourceFieldName = "dataSourceFieldName",
IndexFieldName = "indexFieldName",
// the properties below are optional
DateFieldFormat = "dateFieldFormat"
} }
} },
StandardKnowledgeArticleTypeConfiguration = new SalesforceStandardKnowledgeArticleTypeConfigurationProperty {
DocumentDataFieldName = "documentDataFieldName",
// the properties below are optional
DocumentTitleFieldName = "documentTitleFieldName",
FieldMappings = new [] { new DataSourceToIndexFieldMappingProperty {
DataSourceFieldName = "dataSourceFieldName",
IndexFieldName = "indexFieldName",
// the properties below are optional
DateFieldFormat = "dateFieldFormat"
} }
}
},
StandardObjectAttachmentConfiguration = new SalesforceStandardObjectAttachmentConfigurationProperty {
DocumentTitleFieldName = "documentTitleFieldName",
FieldMappings = new [] { new DataSourceToIndexFieldMappingProperty {
DataSourceFieldName = "dataSourceFieldName",
IndexFieldName = "indexFieldName",
// the properties below are optional
DateFieldFormat = "dateFieldFormat"
} }
},
StandardObjectConfigurations = new [] { new SalesforceStandardObjectConfigurationProperty {
DocumentDataFieldName = "documentDataFieldName",
Name = "name",
// the properties below are optional
DocumentTitleFieldName = "documentTitleFieldName",
FieldMappings = new [] { new DataSourceToIndexFieldMappingProperty {
DataSourceFieldName = "dataSourceFieldName",
IndexFieldName = "indexFieldName",
// the properties below are optional
DateFieldFormat = "dateFieldFormat"
} }
} }
},
ServiceNowConfiguration = new ServiceNowConfigurationProperty {
HostUrl = "hostUrl",
SecretArn = "secretArn",
ServiceNowBuildVersion = "serviceNowBuildVersion",
// the properties below are optional
AuthenticationType = "authenticationType",
KnowledgeArticleConfiguration = new ServiceNowKnowledgeArticleConfigurationProperty {
DocumentDataFieldName = "documentDataFieldName",
// the properties below are optional
CrawlAttachments = false,
DocumentTitleFieldName = "documentTitleFieldName",
ExcludeAttachmentFilePatterns = new [] { "excludeAttachmentFilePatterns" },
FieldMappings = new [] { new DataSourceToIndexFieldMappingProperty {
DataSourceFieldName = "dataSourceFieldName",
IndexFieldName = "indexFieldName",
// the properties below are optional
DateFieldFormat = "dateFieldFormat"
} },
FilterQuery = "filterQuery",
IncludeAttachmentFilePatterns = new [] { "includeAttachmentFilePatterns" }
},
ServiceCatalogConfiguration = new ServiceNowServiceCatalogConfigurationProperty {
DocumentDataFieldName = "documentDataFieldName",
// the properties below are optional
CrawlAttachments = false,
DocumentTitleFieldName = "documentTitleFieldName",
ExcludeAttachmentFilePatterns = new [] { "excludeAttachmentFilePatterns" },
FieldMappings = new [] { new DataSourceToIndexFieldMappingProperty {
DataSourceFieldName = "dataSourceFieldName",
IndexFieldName = "indexFieldName",
// the properties below are optional
DateFieldFormat = "dateFieldFormat"
} },
IncludeAttachmentFilePatterns = new [] { "includeAttachmentFilePatterns" }
}
},
SharePointConfiguration = new SharePointConfigurationProperty {
SecretArn = "secretArn",
SharePointVersion = "sharePointVersion",
Urls = new [] { "urls" },
// the properties below are optional
CrawlAttachments = false,
DisableLocalGroups = false,
DocumentTitleFieldName = "documentTitleFieldName",
ExclusionPatterns = new [] { "exclusionPatterns" },
FieldMappings = new [] { new DataSourceToIndexFieldMappingProperty {
DataSourceFieldName = "dataSourceFieldName",
IndexFieldName = "indexFieldName",
// the properties below are optional
DateFieldFormat = "dateFieldFormat"
} },
InclusionPatterns = new [] { "inclusionPatterns" },
SslCertificateS3Path = new S3PathProperty {
Bucket = "bucket",
Key = "key"
},
UseChangeLog = false,
VpcConfiguration = new DataSourceVpcConfigurationProperty {
SecurityGroupIds = new [] { "securityGroupIds" },
SubnetIds = new [] { "subnetIds" }
}
},
TemplateConfiguration = new TemplateConfigurationProperty {
Template = "template"
},
WebCrawlerConfiguration = new WebCrawlerConfigurationProperty {
Urls = new WebCrawlerUrlsProperty {
SeedUrlConfiguration = new WebCrawlerSeedUrlConfigurationProperty {
SeedUrls = new [] { "seedUrls" },
// the properties below are optional
WebCrawlerMode = "webCrawlerMode"
},
SiteMapsConfiguration = new WebCrawlerSiteMapsConfigurationProperty {
SiteMaps = new [] { "siteMaps" }
}
},
// the properties below are optional
AuthenticationConfiguration = new WebCrawlerAuthenticationConfigurationProperty {
BasicAuthentication = new [] { new WebCrawlerBasicAuthenticationProperty {
Credentials = "credentials",
Host = "host",
Port = 123
} }
},
CrawlDepth = 123,
MaxContentSizePerPageInMegaBytes = 123,
MaxLinksPerPage = 123,
MaxUrlsPerMinuteCrawlRate = 123,
ProxyConfiguration = new ProxyConfigurationProperty {
Host = "host",
Port = 123,
// the properties below are optional
Credentials = "credentials"
},
UrlExclusionPatterns = new [] { "urlExclusionPatterns" },
UrlInclusionPatterns = new [] { "urlInclusionPatterns" }
},
WorkDocsConfiguration = new WorkDocsConfigurationProperty {
OrganizationId = "organizationId",
// the properties below are optional
CrawlComments = false,
ExclusionPatterns = new [] { "exclusionPatterns" },
FieldMappings = new [] { new DataSourceToIndexFieldMappingProperty {
DataSourceFieldName = "dataSourceFieldName",
IndexFieldName = "indexFieldName",
// the properties below are optional
DateFieldFormat = "dateFieldFormat"
} },
InclusionPatterns = new [] { "inclusionPatterns" },
UseChangeLog = false
}
},
Description = "description",
LanguageCode = "languageCode",
RoleArn = "roleArn",
Schedule = "schedule",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
});
Synopsis
Constructors
CfnDataSource(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnDataSource(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnDataSource(Construct, String, ICfnDataSourceProps) |
Properties
AttrArn | The Amazon Resource Name (ARN) of the data source. For example:. |
AttrId | The identifier for the data source. For example:. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
CustomDocumentEnrichmentConfiguration | Configuration information for altering document metadata and content during the document ingestion process. |
DataSourceConfiguration | Configuration information for an Amazon Kendra data source. |
Description | A description for the data source connector. |
IndexId | The identifier of the index you want to use with the data source connector. |
LanguageCode | The code for a language. |
Name | The name of the data source. |
RoleArn | The Amazon Resource Name (ARN) of a role with permission to access the data source. |
Schedule | Sets the frequency that Amazon Kendra checks the documents in your data source and updates the index. |
Tags | Tag Manager which manages the tags for this resource. |
TagsRaw | An array of key-value pairs to apply to this resource. |
Type | The type of the data source. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnDataSource(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnDataSource(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnDataSource(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnDataSource(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnDataSource(Construct, String, ICfnDataSourceProps)
public CfnDataSource(Construct scope, string id, ICfnDataSourceProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnDataSourceProps
Resource properties.
Properties
AttrArn
The Amazon Resource Name (ARN) of the data source. For example:.
public virtual string AttrArn { get; }
Property Value
System.String
Remarks
arn:aws:kendra:us-west-2:111122223333:index/335c3741-41df-46a6-b5d3-61f85b787884/data-source/b8cae438-6787-4091-8897-684a652bbb0a
CloudformationAttribute: Arn
AttrId
The identifier for the data source. For example:.
public virtual string AttrId { get; }
Property Value
System.String
Remarks
b8cae438-6787-4091-8897-684a652bbb0a
.
CloudformationAttribute: Id
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
CustomDocumentEnrichmentConfiguration
Configuration information for altering document metadata and content during the document ingestion process.
public virtual object CustomDocumentEnrichmentConfiguration { get; set; }
Property Value
System.Object
DataSourceConfiguration
Configuration information for an Amazon Kendra data source.
public virtual object DataSourceConfiguration { get; set; }
Property Value
System.Object
Description
A description for the data source connector.
public virtual string Description { get; set; }
Property Value
System.String
IndexId
The identifier of the index you want to use with the data source connector.
public virtual string IndexId { get; set; }
Property Value
System.String
LanguageCode
The code for a language.
public virtual string LanguageCode { get; set; }
Property Value
System.String
Name
The name of the data source.
public virtual string Name { get; set; }
Property Value
System.String
RoleArn
The Amazon Resource Name (ARN) of a role with permission to access the data source.
public virtual string RoleArn { get; set; }
Property Value
System.String
Schedule
Sets the frequency that Amazon Kendra checks the documents in your data source and updates the index.
public virtual string Schedule { get; set; }
Property Value
System.String
Tags
Tag Manager which manages the tags for this resource.
public virtual TagManager Tags { get; }
Property Value
TagsRaw
An array of key-value pairs to apply to this resource.
public virtual ICfnTag[] TagsRaw { get; set; }
Property Value
ICfnTag[]
Type
The type of the data source.
public virtual string Type { get; set; }
Property Value
System.String
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>