CfnIndexPropsMixin
- class aws_cdk.mixins_preview.aws_kendra.mixins.CfnIndexPropsMixin(props, *, strategy=None)
Bases:
MixinCreates an Amazon Kendra index.
Once the index is active you can add documents to your index using the BatchPutDocument operation or using one of the supported data sources.
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kendra-index.html
- CloudformationResource:
AWS::Kendra::Index
- Mixin:
true
- 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.mixins_preview import mixins from aws_cdk.mixins_preview.aws_kendra import mixins as kendra_mixins cfn_index_props_mixin = kendra_mixins.CfnIndexPropsMixin(kendra_mixins.CfnIndexMixinProps( capacity_units=kendra_mixins.CfnIndexPropsMixin.CapacityUnitsConfigurationProperty( query_capacity_units=123, storage_capacity_units=123 ), description="description", document_metadata_configurations=[kendra_mixins.CfnIndexPropsMixin.DocumentMetadataConfigurationProperty( name="name", relevance=kendra_mixins.CfnIndexPropsMixin.RelevanceProperty( duration="duration", freshness=False, importance=123, rank_order="rankOrder", value_importance_items=[kendra_mixins.CfnIndexPropsMixin.ValueImportanceItemProperty( key="key", value=123 )] ), search=kendra_mixins.CfnIndexPropsMixin.SearchProperty( displayable=False, facetable=False, searchable=False, sortable=False ), type="type" )], edition="edition", name="name", role_arn="roleArn", server_side_encryption_configuration=kendra_mixins.CfnIndexPropsMixin.ServerSideEncryptionConfigurationProperty( kms_key_id="kmsKeyId" ), tags=[CfnTag( key="key", value="value" )], user_context_policy="userContextPolicy", user_token_configurations=[kendra_mixins.CfnIndexPropsMixin.UserTokenConfigurationProperty( json_token_type_configuration=kendra_mixins.CfnIndexPropsMixin.JsonTokenTypeConfigurationProperty( group_attribute_field="groupAttributeField", user_name_attribute_field="userNameAttributeField" ), jwt_token_type_configuration=kendra_mixins.CfnIndexPropsMixin.JwtTokenTypeConfigurationProperty( claim_regex="claimRegex", group_attribute_field="groupAttributeField", issuer="issuer", key_location="keyLocation", secret_manager_arn="secretManagerArn", url="url", user_name_attribute_field="userNameAttributeField" ) )] ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::Kendra::Index.- Parameters:
props (
Union[CfnIndexMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['capacityUnits', 'description', 'documentMetadataConfigurations', 'edition', 'name', 'roleArn', 'serverSideEncryptionConfiguration', 'tags', 'userContextPolicy', 'userTokenConfigurations']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
CapacityUnitsConfigurationProperty
- class CfnIndexPropsMixin.CapacityUnitsConfigurationProperty(*, query_capacity_units=None, storage_capacity_units=None)
Bases:
objectSpecifies additional capacity units configured for your Enterprise Edition index.
You can add and remove capacity units to fit your usage requirements.
- Parameters:
query_capacity_units (
Union[int,float,None]) – The amount of extra query capacity for an index and GetQuerySuggestions capacity. A single extra capacity unit for an index provides 0.1 queries per second or approximately 8,000 queries per day. You can add up to 100 extra capacity units.GetQuerySuggestionscapacity is five times the provisioned query capacity for an index, or the base capacity of 2.5 calls per second, whichever is higher. For example, the base capacity for an index is 0.1 queries per second, andGetQuerySuggestionscapacity has a base of 2.5 calls per second. If you add another 0.1 queries per second to total 0.2 queries per second for an index, theGetQuerySuggestionscapacity is 2.5 calls per second (higher than five times 0.2 queries per second).storage_capacity_units (
Union[int,float,None]) – The amount of extra storage capacity for an index. A single capacity unit provides 30 GB of storage space or 100,000 documents, whichever is reached first. You can add up to 100 extra capacity units.
- See:
- 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.mixins_preview.aws_kendra import mixins as kendra_mixins capacity_units_configuration_property = kendra_mixins.CfnIndexPropsMixin.CapacityUnitsConfigurationProperty( query_capacity_units=123, storage_capacity_units=123 )
Attributes
- query_capacity_units
The amount of extra query capacity for an index and GetQuerySuggestions capacity.
A single extra capacity unit for an index provides 0.1 queries per second or approximately 8,000 queries per day. You can add up to 100 extra capacity units.
GetQuerySuggestionscapacity is five times the provisioned query capacity for an index, or the base capacity of 2.5 calls per second, whichever is higher. For example, the base capacity for an index is 0.1 queries per second, andGetQuerySuggestionscapacity has a base of 2.5 calls per second. If you add another 0.1 queries per second to total 0.2 queries per second for an index, theGetQuerySuggestionscapacity is 2.5 calls per second (higher than five times 0.2 queries per second).
- storage_capacity_units
The amount of extra storage capacity for an index.
A single capacity unit provides 30 GB of storage space or 100,000 documents, whichever is reached first. You can add up to 100 extra capacity units.
DocumentMetadataConfigurationProperty
- class CfnIndexPropsMixin.DocumentMetadataConfigurationProperty(*, name=None, relevance=None, search=None, type=None)
Bases:
objectSpecifies the properties, such as relevance tuning and searchability, of an index field.
- Parameters:
name (
Optional[str]) – The name of the index field.relevance (
Union[IResolvable,RelevanceProperty,Dict[str,Any],None]) – Provides tuning parameters to determine how the field affects the search results.search (
Union[IResolvable,SearchProperty,Dict[str,Any],None]) – Provides information about how the field is used during a search.type (
Optional[str]) – The data type of the index field.
- See:
- 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.mixins_preview.aws_kendra import mixins as kendra_mixins document_metadata_configuration_property = kendra_mixins.CfnIndexPropsMixin.DocumentMetadataConfigurationProperty( name="name", relevance=kendra_mixins.CfnIndexPropsMixin.RelevanceProperty( duration="duration", freshness=False, importance=123, rank_order="rankOrder", value_importance_items=[kendra_mixins.CfnIndexPropsMixin.ValueImportanceItemProperty( key="key", value=123 )] ), search=kendra_mixins.CfnIndexPropsMixin.SearchProperty( displayable=False, facetable=False, searchable=False, sortable=False ), type="type" )
Attributes
- name
The name of the index field.
- relevance
Provides tuning parameters to determine how the field affects the search results.
- search
Provides information about how the field is used during a search.
JsonTokenTypeConfigurationProperty
- class CfnIndexPropsMixin.JsonTokenTypeConfigurationProperty(*, group_attribute_field=None, user_name_attribute_field=None)
Bases:
objectProvides the configuration information for the JSON token type.
- Parameters:
group_attribute_field (
Optional[str]) – The group attribute field.user_name_attribute_field (
Optional[str]) – The user name attribute field.
- See:
- 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.mixins_preview.aws_kendra import mixins as kendra_mixins json_token_type_configuration_property = kendra_mixins.CfnIndexPropsMixin.JsonTokenTypeConfigurationProperty( group_attribute_field="groupAttributeField", user_name_attribute_field="userNameAttributeField" )
Attributes
- group_attribute_field
The group attribute field.
- user_name_attribute_field
The user name attribute field.
JwtTokenTypeConfigurationProperty
- class CfnIndexPropsMixin.JwtTokenTypeConfigurationProperty(*, claim_regex=None, group_attribute_field=None, issuer=None, key_location=None, secret_manager_arn=None, url=None, user_name_attribute_field=None)
Bases:
objectProvides the configuration information for the JWT token type.
- Parameters:
claim_regex (
Optional[str]) – The regular expression that identifies the claim.group_attribute_field (
Optional[str]) – The group attribute field.issuer (
Optional[str]) – The issuer of the token.key_location (
Optional[str]) – The location of the key.secret_manager_arn (
Optional[str]) – The Amazon Resource Name (arn) of the secret.url (
Optional[str]) – The signing key URL.user_name_attribute_field (
Optional[str]) – The user name attribute field.
- See:
- 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.mixins_preview.aws_kendra import mixins as kendra_mixins jwt_token_type_configuration_property = kendra_mixins.CfnIndexPropsMixin.JwtTokenTypeConfigurationProperty( claim_regex="claimRegex", group_attribute_field="groupAttributeField", issuer="issuer", key_location="keyLocation", secret_manager_arn="secretManagerArn", url="url", user_name_attribute_field="userNameAttributeField" )
Attributes
- claim_regex
The regular expression that identifies the claim.
- group_attribute_field
The group attribute field.
- issuer
The issuer of the token.
- key_location
The location of the key.
- secret_manager_arn
The Amazon Resource Name (arn) of the secret.
- url
The signing key URL.
- user_name_attribute_field
The user name attribute field.
RelevanceProperty
- class CfnIndexPropsMixin.RelevanceProperty(*, duration=None, freshness=None, importance=None, rank_order=None, value_importance_items=None)
Bases:
objectProvides information for tuning the relevance of a field in a search.
When a query includes terms that match the field, the results are given a boost in the response based on these tuning parameters.
- Parameters:
duration (
Optional[str]) – Specifies the time period that the boost applies to. For example, to make the boost apply to documents with the field value within the last month, you would use “2628000s”. Once the field value is beyond the specified range, the effect of the boost drops off. The higher the importance, the faster the effect drops off. If you don’t specify a value, the default is 3 months. The value of the field is a numeric string followed by the character “s”, for example “86400s” for one day, or “604800s” for one week. Only applies toDATEfields.freshness (
Union[bool,IResolvable,None]) – Indicates that this field determines how “fresh” a document is. For example, if document 1 was created on November 5, and document 2 was created on October 31, document 1 is “fresher” than document 2. Only applies toDATEfields.importance (
Union[int,float,None]) – The relative importance of the field in the search. Larger numbers provide more of a boost than smaller numbers.rank_order (
Optional[str]) – Determines how values should be interpreted. When theRankOrderfield isASCENDING, higher numbers are better. For example, a document with a rating score of 10 is higher ranking than a document with a rating score of 1. When theRankOrderfield isDESCENDING, lower numbers are better. For example, in a task tracking application, a priority 1 task is more important than a priority 5 task. Only applies toLONGfields.value_importance_items (
Union[IResolvable,Sequence[Union[IResolvable,ValueImportanceItemProperty,Dict[str,Any]]],None]) – An array of key-value pairs for different boosts when they appear in the search result list. For example, if you want to boost query terms that match the “department” field in the result, query terms that match this field are boosted in the result. You can add entries from the department field to boost documents with those values higher. For example, you can add entries to the map with names of departments. If you add “HR”, 5 and “Legal”,3 those departments are given special attention when they appear in the metadata of a document.
- See:
- 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.mixins_preview.aws_kendra import mixins as kendra_mixins relevance_property = kendra_mixins.CfnIndexPropsMixin.RelevanceProperty( duration="duration", freshness=False, importance=123, rank_order="rankOrder", value_importance_items=[kendra_mixins.CfnIndexPropsMixin.ValueImportanceItemProperty( key="key", value=123 )] )
Attributes
- duration
Specifies the time period that the boost applies to.
For example, to make the boost apply to documents with the field value within the last month, you would use “2628000s”. Once the field value is beyond the specified range, the effect of the boost drops off. The higher the importance, the faster the effect drops off. If you don’t specify a value, the default is 3 months. The value of the field is a numeric string followed by the character “s”, for example “86400s” for one day, or “604800s” for one week.
Only applies to
DATEfields.
- freshness
Indicates that this field determines how “fresh” a document is.
For example, if document 1 was created on November 5, and document 2 was created on October 31, document 1 is “fresher” than document 2. Only applies to
DATEfields.
- importance
The relative importance of the field in the search.
Larger numbers provide more of a boost than smaller numbers.
- rank_order
Determines how values should be interpreted.
When the
RankOrderfield isASCENDING, higher numbers are better. For example, a document with a rating score of 10 is higher ranking than a document with a rating score of 1.When the
RankOrderfield isDESCENDING, lower numbers are better. For example, in a task tracking application, a priority 1 task is more important than a priority 5 task.Only applies to
LONGfields.
- value_importance_items
An array of key-value pairs for different boosts when they appear in the search result list.
For example, if you want to boost query terms that match the “department” field in the result, query terms that match this field are boosted in the result. You can add entries from the department field to boost documents with those values higher.
For example, you can add entries to the map with names of departments. If you add “HR”, 5 and “Legal”,3 those departments are given special attention when they appear in the metadata of a document.
SearchProperty
- class CfnIndexPropsMixin.SearchProperty(*, displayable=None, facetable=None, searchable=None, sortable=None)
Bases:
objectProvides information about how a custom index field is used during a search.
- Parameters:
displayable (
Union[bool,IResolvable,None]) – Determines whether the field is returned in the query response. The default istrue.facetable (
Union[bool,IResolvable,None]) – Indicates that the field can be used to create search facets, a count of results for each value in the field. The default isfalse.searchable (
Union[bool,IResolvable,None]) – Determines whether the field is used in the search. If theSearchablefield istrue, you can use relevance tuning to manually tune how Amazon Kendra weights the field in the search. The default istruefor string fields andfalsefor number and date fields.sortable (
Union[bool,IResolvable,None]) – Determines whether the field can be used to sort the results of a query. The default isfalse.
- See:
- 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.mixins_preview.aws_kendra import mixins as kendra_mixins search_property = kendra_mixins.CfnIndexPropsMixin.SearchProperty( displayable=False, facetable=False, searchable=False, sortable=False )
Attributes
- displayable
Determines whether the field is returned in the query response.
The default is
true.
- facetable
Indicates that the field can be used to create search facets, a count of results for each value in the field.
The default is
false.
- searchable
Determines whether the field is used in the search.
If the
Searchablefield istrue, you can use relevance tuning to manually tune how Amazon Kendra weights the field in the search. The default istruefor string fields andfalsefor number and date fields.
- sortable
Determines whether the field can be used to sort the results of a query.
The default is
false.
ServerSideEncryptionConfigurationProperty
- class CfnIndexPropsMixin.ServerSideEncryptionConfigurationProperty(*, kms_key_id=None)
Bases:
objectProvides the identifier of the AWS KMS customer master key (CMK) used to encrypt data indexed by Amazon Kendra.
We suggest that you use a CMK from your account to help secure your index. Amazon Kendra doesn’t support asymmetric CMKs.
- Parameters:
kms_key_id (
Optional[str]) – The identifier of the AWS KMS key . Amazon Kendra doesn’t support asymmetric keys.- See:
- 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.mixins_preview.aws_kendra import mixins as kendra_mixins server_side_encryption_configuration_property = kendra_mixins.CfnIndexPropsMixin.ServerSideEncryptionConfigurationProperty( kms_key_id="kmsKeyId" )
Attributes
- kms_key_id
The identifier of the AWS KMS key .
Amazon Kendra doesn’t support asymmetric keys.
UserTokenConfigurationProperty
- class CfnIndexPropsMixin.UserTokenConfigurationProperty(*, json_token_type_configuration=None, jwt_token_type_configuration=None)
Bases:
objectProvides the configuration information for a token.
If you’re using an Amazon Kendra Gen AI Enterprise Edition index and you try to use
UserTokenConfigurationsto configure user context policy, Amazon Kendra returns aValidationExceptionerror.- Parameters:
json_token_type_configuration (
Union[IResolvable,JsonTokenTypeConfigurationProperty,Dict[str,Any],None]) – Information about the JSON token type configuration.jwt_token_type_configuration (
Union[IResolvable,JwtTokenTypeConfigurationProperty,Dict[str,Any],None]) – Information about the JWT token type configuration.
- See:
- 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.mixins_preview.aws_kendra import mixins as kendra_mixins user_token_configuration_property = kendra_mixins.CfnIndexPropsMixin.UserTokenConfigurationProperty( json_token_type_configuration=kendra_mixins.CfnIndexPropsMixin.JsonTokenTypeConfigurationProperty( group_attribute_field="groupAttributeField", user_name_attribute_field="userNameAttributeField" ), jwt_token_type_configuration=kendra_mixins.CfnIndexPropsMixin.JwtTokenTypeConfigurationProperty( claim_regex="claimRegex", group_attribute_field="groupAttributeField", issuer="issuer", key_location="keyLocation", secret_manager_arn="secretManagerArn", url="url", user_name_attribute_field="userNameAttributeField" ) )
Attributes
- json_token_type_configuration
Information about the JSON token type configuration.
- jwt_token_type_configuration
Information about the JWT token type configuration.
ValueImportanceItemProperty
- class CfnIndexPropsMixin.ValueImportanceItemProperty(*, key=None, value=None)
Bases:
objectSpecifies a key-value pair of the search boost value for a document when the key is part of the metadata of a document.
- Parameters:
key (
Optional[str]) – The document metadata value used for the search boost.value (
Union[int,float,None]) – The boost value for a document when the key is part of the metadata of a document.
- See:
- 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.mixins_preview.aws_kendra import mixins as kendra_mixins value_importance_item_property = kendra_mixins.CfnIndexPropsMixin.ValueImportanceItemProperty( key="key", value=123 )
Attributes
- key
The document metadata value used for the search boost.
- value
The boost value for a document when the key is part of the metadata of a document.