1. Packages
  2. AWS Classic
  3. API Docs
  4. kendra
  5. Thesaurus

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

aws.kendra.Thesaurus

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

    Resource for managing an AWS Kendra Thesaurus.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.kendra.Thesaurus("example", {
        indexId: exampleAwsKendraIndex.id,
        name: "Example",
        roleArn: exampleAwsIamRole.arn,
        sourceS3Path: {
            bucket: exampleAwsS3Bucket.id,
            key: exampleAwsS3Object.key,
        },
        tags: {
            Name: "Example Kendra Thesaurus",
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.kendra.Thesaurus("example",
        index_id=example_aws_kendra_index["id"],
        name="Example",
        role_arn=example_aws_iam_role["arn"],
        source_s3_path={
            "bucket": example_aws_s3_bucket["id"],
            "key": example_aws_s3_object["key"],
        },
        tags={
            "Name": "Example Kendra Thesaurus",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kendra"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := kendra.NewThesaurus(ctx, "example", &kendra.ThesaurusArgs{
    			IndexId: pulumi.Any(exampleAwsKendraIndex.Id),
    			Name:    pulumi.String("Example"),
    			RoleArn: pulumi.Any(exampleAwsIamRole.Arn),
    			SourceS3Path: &kendra.ThesaurusSourceS3PathArgs{
    				Bucket: pulumi.Any(exampleAwsS3Bucket.Id),
    				Key:    pulumi.Any(exampleAwsS3Object.Key),
    			},
    			Tags: pulumi.StringMap{
    				"Name": pulumi.String("Example Kendra Thesaurus"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Kendra.Thesaurus("example", new()
        {
            IndexId = exampleAwsKendraIndex.Id,
            Name = "Example",
            RoleArn = exampleAwsIamRole.Arn,
            SourceS3Path = new Aws.Kendra.Inputs.ThesaurusSourceS3PathArgs
            {
                Bucket = exampleAwsS3Bucket.Id,
                Key = exampleAwsS3Object.Key,
            },
            Tags = 
            {
                { "Name", "Example Kendra Thesaurus" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.kendra.Thesaurus;
    import com.pulumi.aws.kendra.ThesaurusArgs;
    import com.pulumi.aws.kendra.inputs.ThesaurusSourceS3PathArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new Thesaurus("example", ThesaurusArgs.builder()
                .indexId(exampleAwsKendraIndex.id())
                .name("Example")
                .roleArn(exampleAwsIamRole.arn())
                .sourceS3Path(ThesaurusSourceS3PathArgs.builder()
                    .bucket(exampleAwsS3Bucket.id())
                    .key(exampleAwsS3Object.key())
                    .build())
                .tags(Map.of("Name", "Example Kendra Thesaurus"))
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:kendra:Thesaurus
        properties:
          indexId: ${exampleAwsKendraIndex.id}
          name: Example
          roleArn: ${exampleAwsIamRole.arn}
          sourceS3Path:
            bucket: ${exampleAwsS3Bucket.id}
            key: ${exampleAwsS3Object.key}
          tags:
            Name: Example Kendra Thesaurus
    

    Create Thesaurus Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Thesaurus(name: string, args: ThesaurusArgs, opts?: CustomResourceOptions);
    @overload
    def Thesaurus(resource_name: str,
                  args: ThesaurusArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def Thesaurus(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  index_id: Optional[str] = None,
                  role_arn: Optional[str] = None,
                  source_s3_path: Optional[ThesaurusSourceS3PathArgs] = None,
                  description: Optional[str] = None,
                  name: Optional[str] = None,
                  tags: Optional[Mapping[str, str]] = None)
    func NewThesaurus(ctx *Context, name string, args ThesaurusArgs, opts ...ResourceOption) (*Thesaurus, error)
    public Thesaurus(string name, ThesaurusArgs args, CustomResourceOptions? opts = null)
    public Thesaurus(String name, ThesaurusArgs args)
    public Thesaurus(String name, ThesaurusArgs args, CustomResourceOptions options)
    
    type: aws:kendra:Thesaurus
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ThesaurusArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ThesaurusArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ThesaurusArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ThesaurusArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ThesaurusArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var thesaurusResource = new Aws.Kendra.Thesaurus("thesaurusResource", new()
    {
        IndexId = "string",
        RoleArn = "string",
        SourceS3Path = new Aws.Kendra.Inputs.ThesaurusSourceS3PathArgs
        {
            Bucket = "string",
            Key = "string",
        },
        Description = "string",
        Name = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := kendra.NewThesaurus(ctx, "thesaurusResource", &kendra.ThesaurusArgs{
    	IndexId: pulumi.String("string"),
    	RoleArn: pulumi.String("string"),
    	SourceS3Path: &kendra.ThesaurusSourceS3PathArgs{
    		Bucket: pulumi.String("string"),
    		Key:    pulumi.String("string"),
    	},
    	Description: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var thesaurusResource = new Thesaurus("thesaurusResource", ThesaurusArgs.builder()
        .indexId("string")
        .roleArn("string")
        .sourceS3Path(ThesaurusSourceS3PathArgs.builder()
            .bucket("string")
            .key("string")
            .build())
        .description("string")
        .name("string")
        .tags(Map.of("string", "string"))
        .build());
    
    thesaurus_resource = aws.kendra.Thesaurus("thesaurusResource",
        index_id="string",
        role_arn="string",
        source_s3_path={
            "bucket": "string",
            "key": "string",
        },
        description="string",
        name="string",
        tags={
            "string": "string",
        })
    
    const thesaurusResource = new aws.kendra.Thesaurus("thesaurusResource", {
        indexId: "string",
        roleArn: "string",
        sourceS3Path: {
            bucket: "string",
            key: "string",
        },
        description: "string",
        name: "string",
        tags: {
            string: "string",
        },
    });
    
    type: aws:kendra:Thesaurus
    properties:
        description: string
        indexId: string
        name: string
        roleArn: string
        sourceS3Path:
            bucket: string
            key: string
        tags:
            string: string
    

    Thesaurus Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Thesaurus resource accepts the following input properties:

    IndexId string
    The identifier of the index for a thesaurus.
    RoleArn string
    The IAM (Identity and Access Management) role used to access the thesaurus file in S3.
    SourceS3Path ThesaurusSourceS3Path
    The S3 path where your thesaurus file sits in S3. Detailed below.
    Description string
    Name string
    The name for the thesaurus.
    Tags Dictionary<string, string>
    IndexId string
    The identifier of the index for a thesaurus.
    RoleArn string
    The IAM (Identity and Access Management) role used to access the thesaurus file in S3.
    SourceS3Path ThesaurusSourceS3PathArgs
    The S3 path where your thesaurus file sits in S3. Detailed below.
    Description string
    Name string
    The name for the thesaurus.
    Tags map[string]string
    indexId String
    The identifier of the index for a thesaurus.
    roleArn String
    The IAM (Identity and Access Management) role used to access the thesaurus file in S3.
    sourceS3Path ThesaurusSourceS3Path
    The S3 path where your thesaurus file sits in S3. Detailed below.
    description String
    name String
    The name for the thesaurus.
    tags Map<String,String>
    indexId string
    The identifier of the index for a thesaurus.
    roleArn string
    The IAM (Identity and Access Management) role used to access the thesaurus file in S3.
    sourceS3Path ThesaurusSourceS3Path
    The S3 path where your thesaurus file sits in S3. Detailed below.
    description string
    name string
    The name for the thesaurus.
    tags {[key: string]: string}
    index_id str
    The identifier of the index for a thesaurus.
    role_arn str
    The IAM (Identity and Access Management) role used to access the thesaurus file in S3.
    source_s3_path ThesaurusSourceS3PathArgs
    The S3 path where your thesaurus file sits in S3. Detailed below.
    description str
    name str
    The name for the thesaurus.
    tags Mapping[str, str]
    indexId String
    The identifier of the index for a thesaurus.
    roleArn String
    The IAM (Identity and Access Management) role used to access the thesaurus file in S3.
    sourceS3Path Property Map
    The S3 path where your thesaurus file sits in S3. Detailed below.
    description String
    name String
    The name for the thesaurus.
    tags Map<String>

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Thesaurus resource produces the following output properties:

    Arn string
    ARN of the thesaurus.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The current status of the thesaurus.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    ThesaurusId string
    Arn string
    ARN of the thesaurus.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The current status of the thesaurus.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    ThesaurusId string
    arn String
    ARN of the thesaurus.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The current status of the thesaurus.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    thesaurusId String
    arn string
    ARN of the thesaurus.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The current status of the thesaurus.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    thesaurusId string
    arn str
    ARN of the thesaurus.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The current status of the thesaurus.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    thesaurus_id str
    arn String
    ARN of the thesaurus.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The current status of the thesaurus.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    thesaurusId String

    Look up Existing Thesaurus Resource

    Get an existing Thesaurus resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ThesaurusState, opts?: CustomResourceOptions): Thesaurus
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            description: Optional[str] = None,
            index_id: Optional[str] = None,
            name: Optional[str] = None,
            role_arn: Optional[str] = None,
            source_s3_path: Optional[ThesaurusSourceS3PathArgs] = None,
            status: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            thesaurus_id: Optional[str] = None) -> Thesaurus
    func GetThesaurus(ctx *Context, name string, id IDInput, state *ThesaurusState, opts ...ResourceOption) (*Thesaurus, error)
    public static Thesaurus Get(string name, Input<string> id, ThesaurusState? state, CustomResourceOptions? opts = null)
    public static Thesaurus get(String name, Output<String> id, ThesaurusState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Arn string
    ARN of the thesaurus.
    Description string
    IndexId string
    The identifier of the index for a thesaurus.
    Name string
    The name for the thesaurus.
    RoleArn string
    The IAM (Identity and Access Management) role used to access the thesaurus file in S3.
    SourceS3Path ThesaurusSourceS3Path
    The S3 path where your thesaurus file sits in S3. Detailed below.
    Status string
    The current status of the thesaurus.
    Tags Dictionary<string, string>
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    ThesaurusId string
    Arn string
    ARN of the thesaurus.
    Description string
    IndexId string
    The identifier of the index for a thesaurus.
    Name string
    The name for the thesaurus.
    RoleArn string
    The IAM (Identity and Access Management) role used to access the thesaurus file in S3.
    SourceS3Path ThesaurusSourceS3PathArgs
    The S3 path where your thesaurus file sits in S3. Detailed below.
    Status string
    The current status of the thesaurus.
    Tags map[string]string
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    ThesaurusId string
    arn String
    ARN of the thesaurus.
    description String
    indexId String
    The identifier of the index for a thesaurus.
    name String
    The name for the thesaurus.
    roleArn String
    The IAM (Identity and Access Management) role used to access the thesaurus file in S3.
    sourceS3Path ThesaurusSourceS3Path
    The S3 path where your thesaurus file sits in S3. Detailed below.
    status String
    The current status of the thesaurus.
    tags Map<String,String>
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    thesaurusId String
    arn string
    ARN of the thesaurus.
    description string
    indexId string
    The identifier of the index for a thesaurus.
    name string
    The name for the thesaurus.
    roleArn string
    The IAM (Identity and Access Management) role used to access the thesaurus file in S3.
    sourceS3Path ThesaurusSourceS3Path
    The S3 path where your thesaurus file sits in S3. Detailed below.
    status string
    The current status of the thesaurus.
    tags {[key: string]: string}
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    thesaurusId string
    arn str
    ARN of the thesaurus.
    description str
    index_id str
    The identifier of the index for a thesaurus.
    name str
    The name for the thesaurus.
    role_arn str
    The IAM (Identity and Access Management) role used to access the thesaurus file in S3.
    source_s3_path ThesaurusSourceS3PathArgs
    The S3 path where your thesaurus file sits in S3. Detailed below.
    status str
    The current status of the thesaurus.
    tags Mapping[str, str]
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    thesaurus_id str
    arn String
    ARN of the thesaurus.
    description String
    indexId String
    The identifier of the index for a thesaurus.
    name String
    The name for the thesaurus.
    roleArn String
    The IAM (Identity and Access Management) role used to access the thesaurus file in S3.
    sourceS3Path Property Map
    The S3 path where your thesaurus file sits in S3. Detailed below.
    status String
    The current status of the thesaurus.
    tags Map<String>
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    thesaurusId String

    Supporting Types

    ThesaurusSourceS3Path, ThesaurusSourceS3PathArgs

    Bucket string
    The name of the S3 bucket that contains the file.
    Key string

    The name of the file.

    The following arguments are optional:

    Bucket string
    The name of the S3 bucket that contains the file.
    Key string

    The name of the file.

    The following arguments are optional:

    bucket String
    The name of the S3 bucket that contains the file.
    key String

    The name of the file.

    The following arguments are optional:

    bucket string
    The name of the S3 bucket that contains the file.
    key string

    The name of the file.

    The following arguments are optional:

    bucket str
    The name of the S3 bucket that contains the file.
    key str

    The name of the file.

    The following arguments are optional:

    bucket String
    The name of the S3 bucket that contains the file.
    key String

    The name of the file.

    The following arguments are optional:

    Import

    Using pulumi import, import aws_kendra_thesaurus using the unique identifiers of the thesaurus and index separated by a slash (/). For example:

    $ pulumi import aws:kendra/thesaurus:Thesaurus example thesaurus-123456780/idx-8012925589
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi