CfnDataSource

class aws_cdk.aws_qbusiness.CfnDataSource(scope, id, *, application_id, configuration, display_name, index_id, description=None, document_enrichment_configuration=None, role_arn=None, sync_schedule=None, tags=None, vpc_configuration=None)

Bases: CfnResource

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-qbusiness-datasource.html

CloudformationResource:

AWS::QBusiness::DataSource

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_qbusiness as qbusiness

# configuration: Any

cfn_data_source = qbusiness.CfnDataSource(self, "MyCfnDataSource",
    application_id="applicationId",
    configuration=configuration,
    display_name="displayName",
    index_id="indexId",

    # the properties below are optional
    description="description",
    document_enrichment_configuration=qbusiness.CfnDataSource.DocumentEnrichmentConfigurationProperty(
        inline_configurations=[qbusiness.CfnDataSource.InlineDocumentEnrichmentConfigurationProperty(
            condition=qbusiness.CfnDataSource.DocumentAttributeConditionProperty(
                key="key",
                operator="operator",

                # the properties below are optional
                value=qbusiness.CfnDataSource.DocumentAttributeValueProperty(
                    date_value="dateValue",
                    long_value=123,
                    string_list_value=["stringListValue"],
                    string_value="stringValue"
                )
            ),
            document_content_operator="documentContentOperator",
            target=qbusiness.CfnDataSource.DocumentAttributeTargetProperty(
                key="key",

                # the properties below are optional
                attribute_value_operator="attributeValueOperator",
                value=qbusiness.CfnDataSource.DocumentAttributeValueProperty(
                    date_value="dateValue",
                    long_value=123,
                    string_list_value=["stringListValue"],
                    string_value="stringValue"
                )
            )
        )],
        post_extraction_hook_configuration=qbusiness.CfnDataSource.HookConfigurationProperty(
            invocation_condition=qbusiness.CfnDataSource.DocumentAttributeConditionProperty(
                key="key",
                operator="operator",

                # the properties below are optional
                value=qbusiness.CfnDataSource.DocumentAttributeValueProperty(
                    date_value="dateValue",
                    long_value=123,
                    string_list_value=["stringListValue"],
                    string_value="stringValue"
                )
            ),
            lambda_arn="lambdaArn",
            role_arn="roleArn",
            s3_bucket_name="s3BucketName"
        ),
        pre_extraction_hook_configuration=qbusiness.CfnDataSource.HookConfigurationProperty(
            invocation_condition=qbusiness.CfnDataSource.DocumentAttributeConditionProperty(
                key="key",
                operator="operator",

                # the properties below are optional
                value=qbusiness.CfnDataSource.DocumentAttributeValueProperty(
                    date_value="dateValue",
                    long_value=123,
                    string_list_value=["stringListValue"],
                    string_value="stringValue"
                )
            ),
            lambda_arn="lambdaArn",
            role_arn="roleArn",
            s3_bucket_name="s3BucketName"
        )
    ),
    role_arn="roleArn",
    sync_schedule="syncSchedule",
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    vpc_configuration=qbusiness.CfnDataSource.DataSourceVpcConfigurationProperty(
        security_group_ids=["securityGroupIds"],
        subnet_ids=["subnetIds"]
    )
)
Parameters:
  • scope (Construct) – Scope in which this resource is defined.

  • id (str) – Construct identifier for this resource (unique in its scope).

  • application_id (str) – The identifier of the Amazon Q Business application the data source will be attached to.

  • configuration (Any) – Use this property to specify a JSON or YAML schema with configuration properties specific to your data source connector to connect your data source repository to Amazon Q Business . You must use the JSON or YAML schema provided by Amazon Q . The following links have the configuration properties and schemas for AWS CloudFormation for the following connectors: - Amazon Simple Storage Service - Amazon Q Web Crawler Similarly, you can find configuration templates and properties for your specific data source using the following steps: - Navigate to the Supported connectors page in the Amazon Q Business User Guide, and select the data source connector of your choice. - Then, from that specific data source connector’s page, choose the topic containing Using AWS CloudFormation to find the schemas for your data source connector, including configuration parameter descriptions and examples.

  • display_name (str) – The name of the Amazon Q Business data source.

  • index_id (str) – The identifier of the index the data source is attached to.

  • description (Optional[str]) – A description for the data source connector.

  • document_enrichment_configuration (Union[IResolvable, DocumentEnrichmentConfigurationProperty, Dict[str, Any], None]) – Provides the configuration information for altering document metadata and content during the document ingestion process. For more information, see Custom document enrichment .

  • role_arn (Optional[str]) – The Amazon Resource Name (ARN) of an IAM role with permission to access the data source and required resources.

  • sync_schedule (Optional[str]) – Sets the frequency for Amazon Q Business to check the documents in your data source repository and update your index. If you don’t set a schedule, Amazon Q Business won’t periodically update the index. Specify a cron- format schedule string or an empty string to indicate that the index is updated on demand. You can’t specify the Schedule parameter when the Type parameter is set to CUSTOM . If you do, you receive a ValidationException exception.

  • tags (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – A list of key-value pairs that identify or categorize the data source connector. You can also use tags to help control access to the data source connector. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + -

  • vpc_configuration (Union[IResolvable, DataSourceVpcConfigurationProperty, Dict[str, Any], None]) – Configuration information for an Amazon VPC (Virtual Private Cloud) to connect to your data source. For more information, see Using Amazon VPC with Amazon Q Business connectors .

Methods

add_deletion_override(path)

Syntactic sugar for addOverride(path, undefined).

Parameters:

path (str) – The path of the value to delete.

Return type:

None

add_dependency(target)

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

add_depends_on(target)

(deprecated) Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

Parameters:

target (CfnResource) –

Deprecated:

use addDependency

Stability:

deprecated

Return type:

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters:
  • key (str) –

  • value (Any) –

See:

Return type:

None

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

add_override(path, value)

Adds an override to the synthesized CloudFormation resource.

To add a property override, either use addPropertyOverride or prefix path with “Properties.” (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example:

cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"])
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")

would add the overrides Example:

"Properties": {
  "GlobalSecondaryIndexes": [
    {
      "Projection": {
        "NonKeyAttributes": [ "myattribute" ]
        ...
      }
      ...
    },
    {
      "ProjectionType": "INCLUDE"
      ...
    },
  ]
  ...
}

The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters:
  • path (str) –

    • The path of the property, you can use dot notation to override values in complex types. Any intermediate keys will be created as needed.

  • value (Any) –

    • The value. Could be primitive or complex.

Return type:

None

add_property_deletion_override(property_path)

Adds an override that deletes the value of a property from the resource definition.

Parameters:

property_path (str) – The path to the property.

Return type:

None

add_property_override(property_path, value)

Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

Parameters:
  • property_path (str) – The path of the property.

  • value (Any) – The value.

Return type:

None

apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)

Sets the deletion policy of the resource based on the removal policy specified.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT). A list of resources that support this policy can be found in the following link:

Parameters:
  • policy (Optional[RemovalPolicy]) –

  • apply_to_update_replace_policy (Optional[bool]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: true

  • default (Optional[RemovalPolicy]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resource, please consult that specific resource’s documentation.

See:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options

Return type:

None

get_att(attribute_name, type_hint=None)

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

Parameters:
  • attribute_name (str) – The name of the attribute.

  • type_hint (Optional[ResolutionTypeHint]) –

Return type:

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters:

key (str) –

See:

Return type:

Any

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters:

inspector (TreeInspector) – tree inspector to collect and process attributes.

Return type:

None

obtain_dependencies()

Retrieves an array of resources this resource depends on.

This assembles dependencies on resources across stacks (including nested stacks) automatically.

Return type:

List[Union[Stack, CfnResource]]

obtain_resource_dependencies()

Get a shallow copy of dependencies between this resource and other resources in the same stack.

Return type:

List[CfnResource]

override_logical_id(new_logical_id)

Overrides the auto-generated logical ID with a specific ID.

Parameters:

new_logical_id (str) – The new logical ID to use for this stack element.

Return type:

None

remove_dependency(target)

Indicates that this resource no longer depends on another resource.

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

replace_dependency(target, new_target)

Replaces one dependency with another.

Parameters:
Return type:

None

to_string()

Returns a string representation of this construct.

Return type:

str

Returns:

a string representation of this resource

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::QBusiness::DataSource'
application_id

The identifier of the Amazon Q Business application the data source will be attached to.

attr_created_at

The Unix timestamp when the Amazon Q Business data source was created.

CloudformationAttribute:

CreatedAt

attr_data_source_arn

The Amazon Resource Name (ARN) of a data source in an Amazon Q Business application.

CloudformationAttribute:

DataSourceArn

attr_data_source_id

The identifier of the Amazon Q Business data source.

CloudformationAttribute:

DataSourceId

attr_status

The status of the Amazon Q Business data source.

CloudformationAttribute:

Status

attr_type

The type of the Amazon Q Business data source.

CloudformationAttribute:

Type

attr_updated_at

The Unix timestamp when the Amazon Q Business data source was last updated.

CloudformationAttribute:

UpdatedAt

cdk_tag_manager

Tag Manager which manages the tags for this resource.

cfn_options

Options for this resource, such as condition, update policy etc.

cfn_resource_type

AWS resource type.

configuration

Use this property to specify a JSON or YAML schema with configuration properties specific to your data source connector to connect your data source repository to Amazon Q Business .

creation_stack

return:

the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.

description

A description for the data source connector.

display_name

The name of the Amazon Q Business data source.

document_enrichment_configuration

Provides the configuration information for altering document metadata and content during the document ingestion process.

index_id

The identifier of the index the data source is attached to.

logical_id

The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Returns:

the logical ID as a stringified token. This value will only get resolved during synthesis.

node

The tree node.

ref

Return a string that will be resolved to a CloudFormation { Ref } for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

role_arn

The Amazon Resource Name (ARN) of an IAM role with permission to access the data source and required resources.

stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

sync_schedule

Sets the frequency for Amazon Q Business to check the documents in your data source repository and update your index.

tags

A list of key-value pairs that identify or categorize the data source connector.

vpc_configuration

Configuration information for an Amazon VPC (Virtual Private Cloud) to connect to your data source.

Static Methods

classmethod is_cfn_element(x)

Returns true if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

Parameters:

x (Any) –

Return type:

bool

Returns:

The construct as a stack element or undefined if it is not a stack element.

classmethod is_cfn_resource(x)

Check whether the given object is a CfnResource.

Parameters:

x (Any) –

Return type:

bool

classmethod is_construct(x)

Checks if x is a construct.

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Construct.

DataSourceVpcConfigurationProperty

class CfnDataSource.DataSourceVpcConfigurationProperty(*, security_group_ids, subnet_ids)

Bases: object

Provides configuration information needed to connect to an Amazon VPC (Virtual Private Cloud).

Parameters:
  • security_group_ids (Sequence[str]) – A list of identifiers of security groups within your Amazon VPC. The security groups should enable Amazon Q Business to connect to the data source.

  • subnet_ids (Sequence[str]) – A list of identifiers for subnets within your Amazon VPC. The subnets should be able to connect to each other in the VPC, and they should have outgoing access to the Internet through a NAT device.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-datasource-datasourcevpcconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_qbusiness as qbusiness

data_source_vpc_configuration_property = qbusiness.CfnDataSource.DataSourceVpcConfigurationProperty(
    security_group_ids=["securityGroupIds"],
    subnet_ids=["subnetIds"]
)

Attributes

security_group_ids

A list of identifiers of security groups within your Amazon VPC.

The security groups should enable Amazon Q Business to connect to the data source.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-datasource-datasourcevpcconfiguration.html#cfn-qbusiness-datasource-datasourcevpcconfiguration-securitygroupids

subnet_ids

A list of identifiers for subnets within your Amazon VPC.

The subnets should be able to connect to each other in the VPC, and they should have outgoing access to the Internet through a NAT device.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-datasource-datasourcevpcconfiguration.html#cfn-qbusiness-datasource-datasourcevpcconfiguration-subnetids

DocumentAttributeConditionProperty

class CfnDataSource.DocumentAttributeConditionProperty(*, key, operator, value=None)

Bases: object

The condition used for the target document attribute or metadata field when ingesting documents into Amazon Q Business.

You use this with `DocumentAttributeTarget <https://docs.aws.amazon.com/amazonq/latest/api-reference/API_DocumentAttributeTarget.html>`_ to apply the condition.

For example, you can create the ‘Department’ target field and have it prefill department names associated with the documents based on information in the ‘Source_URI’ field. Set the condition that if the ‘Source_URI’ field contains ‘financial’ in its URI value, then prefill the target field ‘Department’ with the target value ‘Finance’ for the document.

Amazon Q Business can’t create a target field if it has not already been created as an index field. After you create your index field, you can create a document metadata field using DocumentAttributeTarget . Amazon Q Business then will map your newly created metadata field to your index field.

Parameters:
  • key (str) – The identifier of the document attribute used for the condition. For example, ‘Source_URI’ could be an identifier for the attribute or metadata field that contains source URIs associated with the documents. Amazon Q Business currently doesn’t support _document_body as an attribute key used for the condition.

  • operator (str) – The identifier of the document attribute used for the condition. For example, ‘Source_URI’ could be an identifier for the attribute or metadata field that contains source URIs associated with the documents. Amazon Q Business currently does not support _document_body as an attribute key used for the condition.

  • value (Union[IResolvable, DocumentAttributeValueProperty, Dict[str, Any], None]) – The value of a document attribute. You can only provide one value for a document attribute.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-datasource-documentattributecondition.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_qbusiness as qbusiness

document_attribute_condition_property = qbusiness.CfnDataSource.DocumentAttributeConditionProperty(
    key="key",
    operator="operator",

    # the properties below are optional
    value=qbusiness.CfnDataSource.DocumentAttributeValueProperty(
        date_value="dateValue",
        long_value=123,
        string_list_value=["stringListValue"],
        string_value="stringValue"
    )
)

Attributes

key

The identifier of the document attribute used for the condition.

For example, ‘Source_URI’ could be an identifier for the attribute or metadata field that contains source URIs associated with the documents.

Amazon Q Business currently doesn’t support _document_body as an attribute key used for the condition.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-datasource-documentattributecondition.html#cfn-qbusiness-datasource-documentattributecondition-key

operator

The identifier of the document attribute used for the condition.

For example, ‘Source_URI’ could be an identifier for the attribute or metadata field that contains source URIs associated with the documents.

Amazon Q Business currently does not support _document_body as an attribute key used for the condition.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-datasource-documentattributecondition.html#cfn-qbusiness-datasource-documentattributecondition-operator

value

The value of a document attribute.

You can only provide one value for a document attribute.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-datasource-documentattributecondition.html#cfn-qbusiness-datasource-documentattributecondition-value

DocumentAttributeTargetProperty

class CfnDataSource.DocumentAttributeTargetProperty(*, key, attribute_value_operator=None, value=None)

Bases: object

The target document attribute or metadata field you want to alter when ingesting documents into Amazon Q Business.

For example, you can delete all customer identification numbers associated with the documents, stored in the document metadata field called ‘Customer_ID’ by setting the target key as ‘Customer_ID’ and the deletion flag to TRUE . This removes all customer ID values in the field ‘Customer_ID’. This would scrub personally identifiable information from each document’s metadata.

Amazon Q Business can’t create a target field if it has not already been created as an index field. After you create your index field, you can create a document metadata field using `DocumentAttributeTarget <https://docs.aws.amazon.com/amazonq/latest/api-reference/API_DocumentAttributeTarget.html>`_ . Amazon Q Business will then map your newly created document attribute to your index field.

You can also use this with `DocumentAttributeCondition <https://docs.aws.amazon.com/amazonq/latest/api-reference/API_DocumentAttributeCondition.html>`_ .

Parameters:
  • key (str) – The identifier of the target document attribute or metadata field. For example, ‘Department’ could be an identifier for the target attribute or metadata field that includes the department names associated with the documents.

  • attribute_value_operator (Optional[str]) – TRUE to delete the existing target value for your specified target attribute key. You cannot create a target value and set this to TRUE .

  • value (Union[IResolvable, DocumentAttributeValueProperty, Dict[str, Any], None]) – The value of a document attribute. You can only provide one value for a document attribute.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-datasource-documentattributetarget.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_qbusiness as qbusiness

document_attribute_target_property = qbusiness.CfnDataSource.DocumentAttributeTargetProperty(
    key="key",

    # the properties below are optional
    attribute_value_operator="attributeValueOperator",
    value=qbusiness.CfnDataSource.DocumentAttributeValueProperty(
        date_value="dateValue",
        long_value=123,
        string_list_value=["stringListValue"],
        string_value="stringValue"
    )
)

Attributes

attribute_value_operator

TRUE to delete the existing target value for your specified target attribute key.

You cannot create a target value and set this to TRUE .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-datasource-documentattributetarget.html#cfn-qbusiness-datasource-documentattributetarget-attributevalueoperator

key

The identifier of the target document attribute or metadata field.

For example, ‘Department’ could be an identifier for the target attribute or metadata field that includes the department names associated with the documents.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-datasource-documentattributetarget.html#cfn-qbusiness-datasource-documentattributetarget-key

value

The value of a document attribute.

You can only provide one value for a document attribute.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-datasource-documentattributetarget.html#cfn-qbusiness-datasource-documentattributetarget-value

DocumentAttributeValueProperty

class CfnDataSource.DocumentAttributeValueProperty(*, date_value=None, long_value=None, string_list_value=None, string_value=None)

Bases: object

The value of a document attribute.

You can only provide one value for a document attribute.

Parameters:
  • date_value (Optional[str]) – A date expressed as an ISO 8601 string. It’s important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.

  • long_value (Union[int, float, None]) – A long integer value.

  • string_list_value (Optional[Sequence[str]]) – A list of strings.

  • string_value (Optional[str]) – A string.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-datasource-documentattributevalue.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_qbusiness as qbusiness

document_attribute_value_property = qbusiness.CfnDataSource.DocumentAttributeValueProperty(
    date_value="dateValue",
    long_value=123,
    string_list_value=["stringListValue"],
    string_value="stringValue"
)

Attributes

date_value

A date expressed as an ISO 8601 string.

It’s important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-datasource-documentattributevalue.html#cfn-qbusiness-datasource-documentattributevalue-datevalue

long_value

A long integer value.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-datasource-documentattributevalue.html#cfn-qbusiness-datasource-documentattributevalue-longvalue

string_list_value

A list of strings.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-datasource-documentattributevalue.html#cfn-qbusiness-datasource-documentattributevalue-stringlistvalue

string_value

A string.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-datasource-documentattributevalue.html#cfn-qbusiness-datasource-documentattributevalue-stringvalue

DocumentEnrichmentConfigurationProperty

class CfnDataSource.DocumentEnrichmentConfigurationProperty(*, inline_configurations=None, post_extraction_hook_configuration=None, pre_extraction_hook_configuration=None)

Bases: object

Provides the configuration information for altering document metadata and content during the document ingestion process.

For more information, see Custom document enrichment .

Parameters:
  • inline_configurations (Union[IResolvable, Sequence[Union[IResolvable, InlineDocumentEnrichmentConfigurationProperty, Dict[str, Any]]], None]) – Configuration information to alter document attributes or metadata fields and content when ingesting documents into Amazon Q Business.

  • post_extraction_hook_configuration (Union[IResolvable, HookConfigurationProperty, Dict[str, Any], None]) – Configuration information for invoking a Lambda function in AWS Lambda on the structured documents with their metadata and text extracted. You can use a Lambda function to apply advanced logic for creating, modifying, or deleting document metadata and content. For more information, see Using Lambda functions .

  • pre_extraction_hook_configuration (Union[IResolvable, HookConfigurationProperty, Dict[str, Any], None]) –

    Configuration information for invoking a Lambda function in AWS Lambda on the original or raw documents before extracting their metadata and text. You can use a Lambda function to apply advanced logic for creating, modifying, or deleting document metadata and content. For more information, see Using Lambda functions .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-datasource-documentenrichmentconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_qbusiness as qbusiness

document_enrichment_configuration_property = qbusiness.CfnDataSource.DocumentEnrichmentConfigurationProperty(
    inline_configurations=[qbusiness.CfnDataSource.InlineDocumentEnrichmentConfigurationProperty(
        condition=qbusiness.CfnDataSource.DocumentAttributeConditionProperty(
            key="key",
            operator="operator",

            # the properties below are optional
            value=qbusiness.CfnDataSource.DocumentAttributeValueProperty(
                date_value="dateValue",
                long_value=123,
                string_list_value=["stringListValue"],
                string_value="stringValue"
            )
        ),
        document_content_operator="documentContentOperator",
        target=qbusiness.CfnDataSource.DocumentAttributeTargetProperty(
            key="key",

            # the properties below are optional
            attribute_value_operator="attributeValueOperator",
            value=qbusiness.CfnDataSource.DocumentAttributeValueProperty(
                date_value="dateValue",
                long_value=123,
                string_list_value=["stringListValue"],
                string_value="stringValue"
            )
        )
    )],
    post_extraction_hook_configuration=qbusiness.CfnDataSource.HookConfigurationProperty(
        invocation_condition=qbusiness.CfnDataSource.DocumentAttributeConditionProperty(
            key="key",
            operator="operator",

            # the properties below are optional
            value=qbusiness.CfnDataSource.DocumentAttributeValueProperty(
                date_value="dateValue",
                long_value=123,
                string_list_value=["stringListValue"],
                string_value="stringValue"
            )
        ),
        lambda_arn="lambdaArn",
        role_arn="roleArn",
        s3_bucket_name="s3BucketName"
    ),
    pre_extraction_hook_configuration=qbusiness.CfnDataSource.HookConfigurationProperty(
        invocation_condition=qbusiness.CfnDataSource.DocumentAttributeConditionProperty(
            key="key",
            operator="operator",

            # the properties below are optional
            value=qbusiness.CfnDataSource.DocumentAttributeValueProperty(
                date_value="dateValue",
                long_value=123,
                string_list_value=["stringListValue"],
                string_value="stringValue"
            )
        ),
        lambda_arn="lambdaArn",
        role_arn="roleArn",
        s3_bucket_name="s3BucketName"
    )
)

Attributes

inline_configurations

Configuration information to alter document attributes or metadata fields and content when ingesting documents into Amazon Q Business.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-datasource-documentenrichmentconfiguration.html#cfn-qbusiness-datasource-documentenrichmentconfiguration-inlineconfigurations

post_extraction_hook_configuration

Configuration information for invoking a Lambda function in AWS Lambda on the structured documents with their metadata and text extracted.

You can use a Lambda function to apply advanced logic for creating, modifying, or deleting document metadata and content. For more information, see Using Lambda functions .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-datasource-documentenrichmentconfiguration.html#cfn-qbusiness-datasource-documentenrichmentconfiguration-postextractionhookconfiguration

pre_extraction_hook_configuration

Configuration information for invoking a Lambda function in AWS Lambda on the original or raw documents before extracting their metadata and text.

You can use a Lambda function to apply advanced logic for creating, modifying, or deleting document metadata and content. For more information, see Using Lambda functions .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-datasource-documentenrichmentconfiguration.html#cfn-qbusiness-datasource-documentenrichmentconfiguration-preextractionhookconfiguration

HookConfigurationProperty

class CfnDataSource.HookConfigurationProperty(*, invocation_condition=None, lambda_arn=None, role_arn=None, s3_bucket_name=None)

Bases: object

Provides the configuration information for invoking a Lambda function in AWS Lambda to alter document metadata and content when ingesting documents into Amazon Q Business.

You can configure your Lambda function using the PreExtractionHookConfiguration parameter if you want to apply advanced alterations on the original or raw documents.

If you want to apply advanced alterations on the Amazon Q Business structured documents, you must configure your Lambda function using PostExtractionHookConfiguration .

You can only invoke one Lambda function. However, this function can invoke other functions it requires.

For more information, see Custom document enrichment .

Parameters:
  • invocation_condition (Union[IResolvable, DocumentAttributeConditionProperty, Dict[str, Any], None]) – The condition used for when a Lambda function should be invoked. For example, you can specify a condition that if there are empty date-time values, then Amazon Q Business should invoke a function that inserts the current date-time.

  • lambda_arn (Optional[str]) – The Amazon Resource Name (ARN) of a role with permission to run a Lambda function during ingestion. For more information, see IAM roles for Custom Document Enrichment (CDE) .

  • role_arn (Optional[str]) – The Amazon Resource Name (ARN) of a role with permission to run PreExtractionHookConfiguration and PostExtractionHookConfiguration for altering document metadata and content during the document ingestion process.

  • s3_bucket_name (Optional[str]) – Stores the original, raw documents or the structured, parsed documents before and after altering them. For more information, see Data contracts for Lambda functions .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-datasource-hookconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_qbusiness as qbusiness

hook_configuration_property = qbusiness.CfnDataSource.HookConfigurationProperty(
    invocation_condition=qbusiness.CfnDataSource.DocumentAttributeConditionProperty(
        key="key",
        operator="operator",

        # the properties below are optional
        value=qbusiness.CfnDataSource.DocumentAttributeValueProperty(
            date_value="dateValue",
            long_value=123,
            string_list_value=["stringListValue"],
            string_value="stringValue"
        )
    ),
    lambda_arn="lambdaArn",
    role_arn="roleArn",
    s3_bucket_name="s3BucketName"
)

Attributes

invocation_condition

The condition used for when a Lambda function should be invoked.

For example, you can specify a condition that if there are empty date-time values, then Amazon Q Business should invoke a function that inserts the current date-time.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-datasource-hookconfiguration.html#cfn-qbusiness-datasource-hookconfiguration-invocationcondition

lambda_arn

The Amazon Resource Name (ARN) of a role with permission to run a Lambda function during ingestion.

For more information, see IAM roles for Custom Document Enrichment (CDE) .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-datasource-hookconfiguration.html#cfn-qbusiness-datasource-hookconfiguration-lambdaarn

role_arn

The Amazon Resource Name (ARN) of a role with permission to run PreExtractionHookConfiguration and PostExtractionHookConfiguration for altering document metadata and content during the document ingestion process.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-datasource-hookconfiguration.html#cfn-qbusiness-datasource-hookconfiguration-rolearn

s3_bucket_name

Stores the original, raw documents or the structured, parsed documents before and after altering them.

For more information, see Data contracts for Lambda functions .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-datasource-hookconfiguration.html#cfn-qbusiness-datasource-hookconfiguration-s3bucketname

InlineDocumentEnrichmentConfigurationProperty

class CfnDataSource.InlineDocumentEnrichmentConfigurationProperty(*, condition=None, document_content_operator=None, target=None)

Bases: object

Provides the configuration information for applying basic logic to alter document metadata and content when ingesting documents into Amazon Q Business.

To apply advanced logic, to go beyond what you can do with basic logic, see `HookConfiguration <https://docs.aws.amazon.com/amazonq/latest/api-reference/API_HookConfiguration.html>`_ .

For more information, see Custom document enrichment .

Parameters:
  • condition (Union[IResolvable, DocumentAttributeConditionProperty, Dict[str, Any], None]) – Configuration of the condition used for the target document attribute or metadata field when ingesting documents into Amazon Q Business .

  • document_content_operator (Optional[str]) – TRUE to delete content if the condition used for the target attribute is met.

  • target (Union[IResolvable, DocumentAttributeTargetProperty, Dict[str, Any], None]) – Configuration of the target document attribute or metadata field when ingesting documents into Amazon Q Business . You can also include a value.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-datasource-inlinedocumentenrichmentconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_qbusiness as qbusiness

inline_document_enrichment_configuration_property = qbusiness.CfnDataSource.InlineDocumentEnrichmentConfigurationProperty(
    condition=qbusiness.CfnDataSource.DocumentAttributeConditionProperty(
        key="key",
        operator="operator",

        # the properties below are optional
        value=qbusiness.CfnDataSource.DocumentAttributeValueProperty(
            date_value="dateValue",
            long_value=123,
            string_list_value=["stringListValue"],
            string_value="stringValue"
        )
    ),
    document_content_operator="documentContentOperator",
    target=qbusiness.CfnDataSource.DocumentAttributeTargetProperty(
        key="key",

        # the properties below are optional
        attribute_value_operator="attributeValueOperator",
        value=qbusiness.CfnDataSource.DocumentAttributeValueProperty(
            date_value="dateValue",
            long_value=123,
            string_list_value=["stringListValue"],
            string_value="stringValue"
        )
    )
)

Attributes

condition

Configuration of the condition used for the target document attribute or metadata field when ingesting documents into Amazon Q Business .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-datasource-inlinedocumentenrichmentconfiguration.html#cfn-qbusiness-datasource-inlinedocumentenrichmentconfiguration-condition

document_content_operator

TRUE to delete content if the condition used for the target attribute is met.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-datasource-inlinedocumentenrichmentconfiguration.html#cfn-qbusiness-datasource-inlinedocumentenrichmentconfiguration-documentcontentoperator

target

Configuration of the target document attribute or metadata field when ingesting documents into Amazon Q Business .

You can also include a value.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-datasource-inlinedocumentenrichmentconfiguration.html#cfn-qbusiness-datasource-inlinedocumentenrichmentconfiguration-target