Class CfnDataSource

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggableV2, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-11T15:56:02.642Z") @Stability(Stable) public class CfnDataSource extends CfnResource implements IInspectable, ITaggableV2
Creates a data source connector for an Amazon Q Business application.

CreateDataSource is a synchronous operation. The operation returns 200 if the data source was successfully created. Otherwise, an exception is raised.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.qbusiness.*;
 Object configuration;
 CfnDataSource cfnDataSource = CfnDataSource.Builder.create(this, "MyCfnDataSource")
         .applicationId("applicationId")
         .configuration(configuration)
         .displayName("displayName")
         .indexId("indexId")
         // the properties below are optional
         .description("description")
         .documentEnrichmentConfiguration(DocumentEnrichmentConfigurationProperty.builder()
                 .inlineConfigurations(List.of(InlineDocumentEnrichmentConfigurationProperty.builder()
                         .condition(DocumentAttributeConditionProperty.builder()
                                 .key("key")
                                 .operator("operator")
                                 // the properties below are optional
                                 .value(DocumentAttributeValueProperty.builder()
                                         .dateValue("dateValue")
                                         .longValue(123)
                                         .stringListValue(List.of("stringListValue"))
                                         .stringValue("stringValue")
                                         .build())
                                 .build())
                         .documentContentOperator("documentContentOperator")
                         .target(DocumentAttributeTargetProperty.builder()
                                 .key("key")
                                 // the properties below are optional
                                 .attributeValueOperator("attributeValueOperator")
                                 .value(DocumentAttributeValueProperty.builder()
                                         .dateValue("dateValue")
                                         .longValue(123)
                                         .stringListValue(List.of("stringListValue"))
                                         .stringValue("stringValue")
                                         .build())
                                 .build())
                         .build()))
                 .postExtractionHookConfiguration(HookConfigurationProperty.builder()
                         .invocationCondition(DocumentAttributeConditionProperty.builder()
                                 .key("key")
                                 .operator("operator")
                                 // the properties below are optional
                                 .value(DocumentAttributeValueProperty.builder()
                                         .dateValue("dateValue")
                                         .longValue(123)
                                         .stringListValue(List.of("stringListValue"))
                                         .stringValue("stringValue")
                                         .build())
                                 .build())
                         .lambdaArn("lambdaArn")
                         .roleArn("roleArn")
                         .s3BucketName("s3BucketName")
                         .build())
                 .preExtractionHookConfiguration(HookConfigurationProperty.builder()
                         .invocationCondition(DocumentAttributeConditionProperty.builder()
                                 .key("key")
                                 .operator("operator")
                                 // the properties below are optional
                                 .value(DocumentAttributeValueProperty.builder()
                                         .dateValue("dateValue")
                                         .longValue(123)
                                         .stringListValue(List.of("stringListValue"))
                                         .stringValue("stringValue")
                                         .build())
                                 .build())
                         .lambdaArn("lambdaArn")
                         .roleArn("roleArn")
                         .s3BucketName("s3BucketName")
                         .build())
                 .build())
         .roleArn("roleArn")
         .syncSchedule("syncSchedule")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .vpcConfiguration(DataSourceVpcConfigurationProperty.builder()
                 .securityGroupIds(List.of("securityGroupIds"))
                 .subnetIds(List.of("subnetIds"))
                 .build())
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnDataSource

      protected CfnDataSource(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnDataSource

      protected CfnDataSource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnDataSource

      @Stability(Stable) public CfnDataSource(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnDataSourceProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrCreatedAt

      @Stability(Stable) @NotNull public String getAttrCreatedAt()
      The Unix timestamp when the Amazon Q Business data source was created.
    • getAttrDataSourceArn

      @Stability(Stable) @NotNull public String getAttrDataSourceArn()
      The Amazon Resource Name (ARN) of a data source in an Amazon Q Business application.
    • getAttrDataSourceId

      @Stability(Stable) @NotNull public String getAttrDataSourceId()
      The identifier of the Amazon Q Business data source.
    • getAttrStatus

      @Stability(Stable) @NotNull public String getAttrStatus()
      The status of the Amazon Q Business data source.
    • getAttrType

      @Stability(Stable) @NotNull public String getAttrType()
      The type of the Amazon Q Business data source.
    • getAttrUpdatedAt

      @Stability(Stable) @NotNull public String getAttrUpdatedAt()
      The Unix timestamp when the Amazon Q Business data source was last updated.
    • getCdkTagManager

      @Stability(Stable) @NotNull public TagManager getCdkTagManager()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getCdkTagManager in interface ITaggableV2
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getApplicationId

      @Stability(Stable) @NotNull public String getApplicationId()
      The identifier of the Amazon Q Business application the data source will be attached to.
    • setApplicationId

      @Stability(Stable) public void setApplicationId(@NotNull String value)
      The identifier of the Amazon Q Business application the data source will be attached to.
    • getConfiguration

      @Stability(Stable) @NotNull public Object getConfiguration()
      Use this property to specify a JSON or YAML schema with configuration information specific to your data source connector to connect your data source repository to Amazon Q Business .
    • setConfiguration

      @Stability(Stable) public void setConfiguration(@NotNull Object value)
      Use this property to specify a JSON or YAML schema with configuration information specific to your data source connector to connect your data source repository to Amazon Q Business .
    • getDisplayName

      @Stability(Stable) @NotNull public String getDisplayName()
      The name of the Amazon Q Business data source.
    • setDisplayName

      @Stability(Stable) public void setDisplayName(@NotNull String value)
      The name of the Amazon Q Business data source.
    • getIndexId

      @Stability(Stable) @NotNull public String getIndexId()
      The identifier of the index the data source is attached to.
    • setIndexId

      @Stability(Stable) public void setIndexId(@NotNull String value)
      The identifier of the index the data source is attached to.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      A description for the data source connector.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      A description for the data source connector.
    • getDocumentEnrichmentConfiguration

      @Stability(Stable) @Nullable public Object getDocumentEnrichmentConfiguration()
      Provides the configuration information for altering document metadata and content during the document ingestion process.
    • setDocumentEnrichmentConfiguration

      @Stability(Stable) public void setDocumentEnrichmentConfiguration(@Nullable IResolvable value)
      Provides the configuration information for altering document metadata and content during the document ingestion process.
    • setDocumentEnrichmentConfiguration

      @Stability(Stable) public void setDocumentEnrichmentConfiguration(@Nullable CfnDataSource.DocumentEnrichmentConfigurationProperty value)
      Provides the configuration information for altering document metadata and content during the document ingestion process.
    • getRoleArn

      @Stability(Stable) @Nullable public String getRoleArn()
      The Amazon Resource Name (ARN) of an IAM role with permission to access the data source and required resources.
    • setRoleArn

      @Stability(Stable) public void setRoleArn(@Nullable String value)
      The Amazon Resource Name (ARN) of an IAM role with permission to access the data source and required resources.
    • getSyncSchedule

      @Stability(Stable) @Nullable public String getSyncSchedule()
      Sets the frequency for Amazon Q Business to check the documents in your data source repository and update your index.
    • setSyncSchedule

      @Stability(Stable) public void setSyncSchedule(@Nullable String value)
      Sets the frequency for Amazon Q Business to check the documents in your data source repository and update your index.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      A list of key-value pairs that identify or categorize the data source connector.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      A list of key-value pairs that identify or categorize the data source connector.
    • getVpcConfiguration

      @Stability(Stable) @Nullable public Object getVpcConfiguration()
      Configuration information for an Amazon VPC (Virtual Private Cloud) to connect to your data source.
    • setVpcConfiguration

      @Stability(Stable) public void setVpcConfiguration(@Nullable IResolvable value)
      Configuration information for an Amazon VPC (Virtual Private Cloud) to connect to your data source.
    • setVpcConfiguration

      @Stability(Stable) public void setVpcConfiguration(@Nullable CfnDataSource.DataSourceVpcConfigurationProperty value)
      Configuration information for an Amazon VPC (Virtual Private Cloud) to connect to your data source.