Class: AWSCDK::QBusiness::CfnDataSource::DocumentAttributeTargetProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::QBusiness::CfnDataSource::DocumentAttributeTargetProperty
- Defined in:
- q_business/cfn_data_source.rb
Overview
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 . Amazon Q Business will then map your newly created document attribute to your index field.
You can also use this with DocumentAttributeCondition .
Instance Attribute Summary collapse
-
#attribute_value_operator ⇒ String?
readonly
TRUEto delete the existing target value for your specified target attribute key. -
#key ⇒ String
readonly
The identifier of the target document attribute or metadata field.
-
#value ⇒ AWSCDK::IResolvable, ...
readonly
The value of a document attribute.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(key:, attribute_value_operator: nil, value: nil) ⇒ DocumentAttributeTargetProperty
constructor
A new instance of DocumentAttributeTargetProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(key:, attribute_value_operator: nil, value: nil) ⇒ DocumentAttributeTargetProperty
Returns a new instance of DocumentAttributeTargetProperty.
849 850 851 852 853 854 855 856 |
# File 'q_business/cfn_data_source.rb', line 849 def initialize(key:, attribute_value_operator: nil, value: nil) @key = key Jsii::Type.check_type(@key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "key") @attribute_value_operator = attribute_value_operator Jsii::Type.check_type(@attribute_value_operator, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "attributeValueOperator") unless @attribute_value_operator.nil? @value = value.is_a?(Hash) ? ::AWSCDK::QBusiness::CfnDataSource::DocumentAttributeValueProperty.new(**value.transform_keys(&:to_sym)) : value Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19xYnVzaW5lc3MuQ2ZuRGF0YVNvdXJjZS5Eb2N1bWVudEF0dHJpYnV0ZVZhbHVlUHJvcGVydHkifV19fQ==")), "value") unless @value.nil? end |
Instance Attribute Details
#attribute_value_operator ⇒ String? (readonly)
TRUE to delete the existing target value for your specified target attribute key.
You cannot create a target value and set this to TRUE .
871 872 873 |
# File 'q_business/cfn_data_source.rb', line 871 def attribute_value_operator @attribute_value_operator end |
#key ⇒ String (readonly)
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.
864 865 866 |
# File 'q_business/cfn_data_source.rb', line 864 def key @key end |
#value ⇒ AWSCDK::IResolvable, ... (readonly)
The value of a document attribute.
You can only provide one value for a document attribute.
878 879 880 |
# File 'q_business/cfn_data_source.rb', line 878 def value @value end |
Class Method Details
.jsii_properties ⇒ Object
880 881 882 883 884 885 886 |
# File 'q_business/cfn_data_source.rb', line 880 def self.jsii_properties { :key => "key", :attribute_value_operator => "attributeValueOperator", :value => "value", } end |
Instance Method Details
#to_jsii ⇒ Object
888 889 890 891 892 893 894 895 896 |
# File 'q_business/cfn_data_source.rb', line 888 def to_jsii result = {} result.merge!({ "key" => @key, "attributeValueOperator" => @attribute_value_operator, "value" => @value, }) result.compact end |