CfnIndex
- class aws_cdk.aws_kendra.CfnIndex(scope, id, *, edition, name, role_arn, capacity_units=None, description=None, document_metadata_configurations=None, server_side_encryption_configuration=None, tags=None, user_context_policy=None, user_token_configurations=None)
Bases:
CfnResource
Creates 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
- 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_kendra as kendra cfn_index = kendra.CfnIndex(self, "MyCfnIndex", edition="edition", name="name", role_arn="roleArn", # the properties below are optional capacity_units=kendra.CfnIndex.CapacityUnitsConfigurationProperty( query_capacity_units=123, storage_capacity_units=123 ), description="description", document_metadata_configurations=[kendra.CfnIndex.DocumentMetadataConfigurationProperty( name="name", type="type", # the properties below are optional relevance=kendra.CfnIndex.RelevanceProperty( duration="duration", freshness=False, importance=123, rank_order="rankOrder", value_importance_items=[kendra.CfnIndex.ValueImportanceItemProperty( key="key", value=123 )] ), search=kendra.CfnIndex.SearchProperty( displayable=False, facetable=False, searchable=False, sortable=False ) )], server_side_encryption_configuration=kendra.CfnIndex.ServerSideEncryptionConfigurationProperty( kms_key_id="kmsKeyId" ), tags=[CfnTag( key="key", value="value" )], user_context_policy="userContextPolicy", user_token_configurations=[kendra.CfnIndex.UserTokenConfigurationProperty( json_token_type_configuration=kendra.CfnIndex.JsonTokenTypeConfigurationProperty( group_attribute_field="groupAttributeField", user_name_attribute_field="userNameAttributeField" ), jwt_token_type_configuration=kendra.CfnIndex.JwtTokenTypeConfigurationProperty( key_location="keyLocation", # the properties below are optional claim_regex="claimRegex", group_attribute_field="groupAttributeField", issuer="issuer", secret_manager_arn="secretManagerArn", url="url", user_name_attribute_field="userNameAttributeField" ) )] )
- Parameters:
scope (
Construct
) – Scope in which this resource is defined.id (
str
) – Construct identifier for this resource (unique in its scope).edition (
str
) – Indicates whether the index is a Enterprise Edition index or a Developer Edition index. Valid values areDEVELOPER_EDITION
andENTERPRISE_EDITION
.name (
str
) – The name of the index.role_arn (
str
) –An IAM role that gives Amazon Kendra permissions to access your Amazon CloudWatch logs and metrics. This is also the role used when you use the BatchPutDocument operation to index documents from an Amazon S3 bucket.
capacity_units (
Union
[IResolvable
,CapacityUnitsConfigurationProperty
,Dict
[str
,Any
],None
]) – Specifies additional capacity units configured for your Enterprise Edition index. You can add and remove capacity units to fit your usage requirements.description (
Optional
[str
]) – A description for the index.document_metadata_configurations (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,DocumentMetadataConfigurationProperty
,Dict
[str
,Any
]]],None
]) – Specifies the properties of an index field. You can add either a custom or a built-in field. You can add and remove built-in fields at any time. When a built-in field is removed it’s configuration reverts to the default for the field. Custom fields can’t be removed from an index after they are added.server_side_encryption_configuration (
Union
[IResolvable
,ServerSideEncryptionConfigurationProperty
,Dict
[str
,Any
],None
]) – The identifier of the AWS KMS customer managed key (CMK) to use to encrypt data indexed by Amazon Kendra. Amazon Kendra doesn’t support asymmetric CMKs.tags (
Optional
[Sequence
[Union
[CfnTag
,Dict
[str
,Any
]]]]) – An array of key-value pairs to apply to this resource. For more information, see Tag .user_context_policy (
Optional
[str
]) – The user context policy. ATTRIBUTE_FILTER - All indexed content is searchable and displayable for all users. If you want to filter search results on user context, you can use the attribute filters of_user_id
and_group_ids
or you can provide user and group information inUserContext
. USER_TOKEN - Enables token-based user access control to filter search results on user context. All documents with no access control and all documents accessible to the user will be searchable and displayable.user_token_configurations (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,UserTokenConfigurationProperty
,Dict
[str
,Any
]]],None
]) – Defines the type of user token used for the index.
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 prefixpath
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 toaddOverride
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: truedefault (
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:
- 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:
- 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:
target (
CfnResource
) – The dependency to replace.new_target (
CfnResource
) – The new dependency to add.
- 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::Kendra::Index'
- attr_arn
The Amazon Resource Name (ARN) of the index.
For example:
arn:aws:kendra:us-west-2:111122223333:index/0123456789abcdef
.- CloudformationAttribute:
Arn
- attr_id
The identifier for the index.
For example:
f4aeaa10-8056-4b2c-a343-522ca0f41234
.- CloudformationAttribute:
Id
- capacity_units
Specifies additional capacity units configured for your Enterprise Edition index.
- cfn_options
Options for this resource, such as condition, update policy etc.
- cfn_resource_type
AWS resource type.
- 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 index.
- document_metadata_configurations
Specifies the properties of an index field.
- edition
Indicates whether the index is a Enterprise Edition index or a Developer Edition index.
- 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.
- name
The name of the index.
- 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
An IAM role that gives Amazon Kendra permissions to access your Amazon CloudWatch logs and metrics.
- server_side_encryption_configuration
The identifier of the AWS KMS customer managed key (CMK) to use to encrypt data indexed by Amazon Kendra.
- stack
The stack in which this element is defined.
CfnElements must be defined within a stack scope (directly or indirectly).
- tags
Tag Manager which manages the tags for this resource.
- tags_raw
An array of key-value pairs to apply to this resource.
- user_context_policy
The user context policy.
- user_token_configurations
Defines the type of user token used for the index.
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 detectConstruct
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 classConstruct
in each copy of theconstructs
library is seen as a different class, and an instance of one class will not test asinstanceof
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 theconstructs
library can be accidentally installed, andinstanceof
will behave unpredictably. It is safest to avoid usinginstanceof
, 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 extendsConstruct
.
CapacityUnitsConfigurationProperty
- class CfnIndex.CapacityUnitsConfigurationProperty(*, query_capacity_units, storage_capacity_units)
Bases:
object
Specifies 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
]) – 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.GetQuerySuggestions
capacity 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, andGetQuerySuggestions
capacity 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, theGetQuerySuggestions
capacity is 2.5 calls per second (higher than five times 0.2 queries per second).storage_capacity_units (
Union
[int
,float
]) – 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 import aws_kendra as kendra capacity_units_configuration_property = kendra.CfnIndex.CapacityUnitsConfigurationProperty( query_capacity_units=123, storage_capacity_units=123 )
Attributes
- query_capacity_units
//docs.aws.amazon.com/kendra/latest/dg/API_GetQuerySuggestions.html>`_ 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.
GetQuerySuggestions
capacity 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, andGetQuerySuggestions
capacity 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, theGetQuerySuggestions
capacity is 2.5 calls per second (higher than five times 0.2 queries per second).- See:
- Type:
The amount of extra query capacity for an index and `GetQuerySuggestions <https
- 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 CfnIndex.DocumentMetadataConfigurationProperty(*, name, type, relevance=None, search=None)
Bases:
object
Specifies the properties, such as relevance tuning and searchability, of an index field.
- Parameters:
name (
str
) – The name of the index field.type (
str
) – The data type 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.
- 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 import aws_kendra as kendra document_metadata_configuration_property = kendra.CfnIndex.DocumentMetadataConfigurationProperty( name="name", type="type", # the properties below are optional relevance=kendra.CfnIndex.RelevanceProperty( duration="duration", freshness=False, importance=123, rank_order="rankOrder", value_importance_items=[kendra.CfnIndex.ValueImportanceItemProperty( key="key", value=123 )] ), search=kendra.CfnIndex.SearchProperty( displayable=False, facetable=False, searchable=False, sortable=False ) )
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 CfnIndex.JsonTokenTypeConfigurationProperty(*, group_attribute_field, user_name_attribute_field)
Bases:
object
Provides the configuration information for the JSON token type.
- Parameters:
group_attribute_field (
str
) – The group attribute field.user_name_attribute_field (
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 import aws_kendra as kendra json_token_type_configuration_property = kendra.CfnIndex.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 CfnIndex.JwtTokenTypeConfigurationProperty(*, key_location, claim_regex=None, group_attribute_field=None, issuer=None, secret_manager_arn=None, url=None, user_name_attribute_field=None)
Bases:
object
Provides the configuration information for the JWT token type.
- Parameters:
key_location (
str
) – The location of the key.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.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 import aws_kendra as kendra jwt_token_type_configuration_property = kendra.CfnIndex.JwtTokenTypeConfigurationProperty( key_location="keyLocation", # the properties below are optional claim_regex="claimRegex", group_attribute_field="groupAttributeField", issuer="issuer", 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 CfnIndex.RelevanceProperty(*, duration=None, freshness=None, importance=None, rank_order=None, value_importance_items=None)
Bases:
object
Provides 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 toDATE
fields.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 toDATE
fields.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 theRankOrder
field 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 theRankOrder
field 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 toLONG
fields.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 import aws_kendra as kendra relevance_property = kendra.CfnIndex.RelevanceProperty( duration="duration", freshness=False, importance=123, rank_order="rankOrder", value_importance_items=[kendra.CfnIndex.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
DATE
fields.
- 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
DATE
fields.
- 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
RankOrder
field 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
RankOrder
field 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
LONG
fields.
- 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 CfnIndex.SearchProperty(*, displayable=None, facetable=None, searchable=None, sortable=None)
Bases:
object
Provides 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 theSearchable
field istrue
, you can use relevance tuning to manually tune how Amazon Kendra weights the field in the search. The default istrue
for string fields andfalse
for 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 import aws_kendra as kendra search_property = kendra.CfnIndex.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
Searchable
field istrue
, you can use relevance tuning to manually tune how Amazon Kendra weights the field in the search. The default istrue
for string fields andfalse
for 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 CfnIndex.ServerSideEncryptionConfigurationProperty(*, kms_key_id=None)
Bases:
object
Provides 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 import aws_kendra as kendra server_side_encryption_configuration_property = kendra.CfnIndex.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 CfnIndex.UserTokenConfigurationProperty(*, json_token_type_configuration=None, jwt_token_type_configuration=None)
Bases:
object
Provides the configuration information for a token.
- 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 import aws_kendra as kendra user_token_configuration_property = kendra.CfnIndex.UserTokenConfigurationProperty( json_token_type_configuration=kendra.CfnIndex.JsonTokenTypeConfigurationProperty( group_attribute_field="groupAttributeField", user_name_attribute_field="userNameAttributeField" ), jwt_token_type_configuration=kendra.CfnIndex.JwtTokenTypeConfigurationProperty( key_location="keyLocation", # the properties below are optional claim_regex="claimRegex", group_attribute_field="groupAttributeField", issuer="issuer", 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 CfnIndex.ValueImportanceItemProperty(*, key=None, value=None)
Bases:
object
Specifies 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 import aws_kendra as kendra value_importance_item_property = kendra.CfnIndex.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.