Class CfnIndex

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

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-11T15:56:00.689Z") @Stability(Stable) public class CfnIndex extends CfnResource implements IInspectable, ITaggable
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.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.kendra.*;
 CfnIndex cfnIndex = CfnIndex.Builder.create(this, "MyCfnIndex")
         .edition("edition")
         .name("name")
         .roleArn("roleArn")
         // the properties below are optional
         .capacityUnits(CapacityUnitsConfigurationProperty.builder()
                 .queryCapacityUnits(123)
                 .storageCapacityUnits(123)
                 .build())
         .description("description")
         .documentMetadataConfigurations(List.of(DocumentMetadataConfigurationProperty.builder()
                 .name("name")
                 .type("type")
                 // the properties below are optional
                 .relevance(RelevanceProperty.builder()
                         .duration("duration")
                         .freshness(false)
                         .importance(123)
                         .rankOrder("rankOrder")
                         .valueImportanceItems(List.of(ValueImportanceItemProperty.builder()
                                 .key("key")
                                 .value(123)
                                 .build()))
                         .build())
                 .search(SearchProperty.builder()
                         .displayable(false)
                         .facetable(false)
                         .searchable(false)
                         .sortable(false)
                         .build())
                 .build()))
         .serverSideEncryptionConfiguration(ServerSideEncryptionConfigurationProperty.builder()
                 .kmsKeyId("kmsKeyId")
                 .build())
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .userContextPolicy("userContextPolicy")
         .userTokenConfigurations(List.of(UserTokenConfigurationProperty.builder()
                 .jsonTokenTypeConfiguration(JsonTokenTypeConfigurationProperty.builder()
                         .groupAttributeField("groupAttributeField")
                         .userNameAttributeField("userNameAttributeField")
                         .build())
                 .jwtTokenTypeConfiguration(JwtTokenTypeConfigurationProperty.builder()
                         .keyLocation("keyLocation")
                         // the properties below are optional
                         .claimRegex("claimRegex")
                         .groupAttributeField("groupAttributeField")
                         .issuer("issuer")
                         .secretManagerArn("secretManagerArn")
                         .url("url")
                         .userNameAttributeField("userNameAttributeField")
                         .build())
                 .build()))
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

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

    • CfnIndex

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

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

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

    • inspect

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

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

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

      @Stability(Stable) @NotNull public String getAttrArn()
      The Amazon Resource Name (ARN) of the index.

      For example: arn:aws:kendra:us-west-2:111122223333:index/0123456789abcdef .

    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
      The identifier for the index.

      For example: f4aeaa10-8056-4b2c-a343-522ca0f41234 .

    • getCfnProperties

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

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

      @Stability(Stable) @NotNull public String getEdition()
      Indicates whether the index is a Enterprise Edition index or a Developer Edition index.
    • setEdition

      @Stability(Stable) public void setEdition(@NotNull String value)
      Indicates whether the index is a Enterprise Edition index or a Developer Edition index.
    • getName

      @Stability(Stable) @NotNull public String getName()
      The name of the index.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      The name of the index.
    • getRoleArn

      @Stability(Stable) @NotNull public String getRoleArn()
      An IAM role that gives Amazon Kendra permissions to access your Amazon CloudWatch logs and metrics.
    • setRoleArn

      @Stability(Stable) public void setRoleArn(@NotNull String value)
      An IAM role that gives Amazon Kendra permissions to access your Amazon CloudWatch logs and metrics.
    • getCapacityUnits

      @Stability(Stable) @Nullable public Object getCapacityUnits()
      Specifies additional capacity units configured for your Enterprise Edition index.
    • setCapacityUnits

      @Stability(Stable) public void setCapacityUnits(@Nullable IResolvable value)
      Specifies additional capacity units configured for your Enterprise Edition index.
    • setCapacityUnits

      @Stability(Stable) public void setCapacityUnits(@Nullable CfnIndex.CapacityUnitsConfigurationProperty value)
      Specifies additional capacity units configured for your Enterprise Edition index.
    • getDescription

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

      @Stability(Stable) public void setDescription(@Nullable String value)
      A description for the index.
    • getDocumentMetadataConfigurations

      @Stability(Stable) @Nullable public Object getDocumentMetadataConfigurations()
      Specifies the properties of an index field.
    • setDocumentMetadataConfigurations

      @Stability(Stable) public void setDocumentMetadataConfigurations(@Nullable IResolvable value)
      Specifies the properties of an index field.
    • setDocumentMetadataConfigurations

      @Stability(Stable) public void setDocumentMetadataConfigurations(@Nullable List<Object> value)
      Specifies the properties of an index field.
    • getServerSideEncryptionConfiguration

      @Stability(Stable) @Nullable public Object getServerSideEncryptionConfiguration()
      The identifier of the AWS KMS customer managed key (CMK) to use to encrypt data indexed by Amazon Kendra.
    • setServerSideEncryptionConfiguration

      @Stability(Stable) public void setServerSideEncryptionConfiguration(@Nullable IResolvable value)
      The identifier of the AWS KMS customer managed key (CMK) to use to encrypt data indexed by Amazon Kendra.
    • setServerSideEncryptionConfiguration

      @Stability(Stable) public void setServerSideEncryptionConfiguration(@Nullable CfnIndex.ServerSideEncryptionConfigurationProperty value)
      The identifier of the AWS KMS customer managed key (CMK) to use to encrypt data indexed by Amazon Kendra.
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      An array of key-value pairs to apply to this resource.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      An array of key-value pairs to apply to this resource.
    • getUserContextPolicy

      @Stability(Stable) @Nullable public String getUserContextPolicy()
      The user context policy.
    • setUserContextPolicy

      @Stability(Stable) public void setUserContextPolicy(@Nullable String value)
      The user context policy.
    • getUserTokenConfigurations

      @Stability(Stable) @Nullable public Object getUserTokenConfigurations()
      Defines the type of user token used for the index.
    • setUserTokenConfigurations

      @Stability(Stable) public void setUserTokenConfigurations(@Nullable IResolvable value)
      Defines the type of user token used for the index.
    • setUserTokenConfigurations

      @Stability(Stable) public void setUserTokenConfigurations(@Nullable List<Object> value)
      Defines the type of user token used for the index.