aws.kendra.Thesaurus
Explore with Pulumi AI
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Thesaurus resource accepts the following input properties:
- Index
Id string - The identifier of the index for a thesaurus.
- Role
Arn string - The IAM (Identity and Access Management) role used to access the thesaurus file in S3.
- Source
S3Path ThesaurusSource S3Path - The S3 path where your thesaurus file sits in S3. Detailed below.
- Description string
- Name string
- The name for the thesaurus.
- Dictionary<string, string>
- Index
Id string - The identifier of the index for a thesaurus.
- Role
Arn string - The IAM (Identity and Access Management) role used to access the thesaurus file in S3.
- Source
S3Path ThesaurusSource S3Path Args - The S3 path where your thesaurus file sits in S3. Detailed below.
- Description string
- Name string
- The name for the thesaurus.
- map[string]string
- index
Id String - The identifier of the index for a thesaurus.
- role
Arn String - The IAM (Identity and Access Management) role used to access the thesaurus file in S3.
- source
S3Path ThesaurusSource S3Path - The S3 path where your thesaurus file sits in S3. Detailed below.
- description String
- name String
- The name for the thesaurus.
- Map<String,String>
- index
Id string - The identifier of the index for a thesaurus.
- role
Arn string - The IAM (Identity and Access Management) role used to access the thesaurus file in S3.
- source
S3Path ThesaurusSource S3Path - The S3 path where your thesaurus file sits in S3. Detailed below.
- description string
- name string
- The name for the thesaurus.
- {[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_ Thesauruspath Source S3Path Args - The S3 path where your thesaurus file sits in S3. Detailed below.
- description str
- name str
- The name for the thesaurus.
- Mapping[str, str]
- index
Id String - The identifier of the index for a thesaurus.
- role
Arn String - The IAM (Identity and Access Management) role used to access the thesaurus file in S3.
- source
S3Path Property Map - The S3 path where your thesaurus file sits in S3. Detailed below.
- description String
- name String
- The name for the thesaurus.
- 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.
- Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Thesaurus
Id 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.
- map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Thesaurus
Id 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.
- Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - thesaurus
Id 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.
- {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - thesaurus
Id 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.
- Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - 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.
- Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - thesaurus
Id 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.
- Arn string
- ARN of the thesaurus.
- Description string
- Index
Id string - The identifier of the index for a thesaurus.
- Name string
- The name for the thesaurus.
- Role
Arn string - The IAM (Identity and Access Management) role used to access the thesaurus file in S3.
- Source
S3Path ThesaurusSource S3Path - The S3 path where your thesaurus file sits in S3. Detailed below.
- Status string
- The current status of the thesaurus.
- Dictionary<string, string>
- Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Thesaurus
Id string
- Arn string
- ARN of the thesaurus.
- Description string
- Index
Id string - The identifier of the index for a thesaurus.
- Name string
- The name for the thesaurus.
- Role
Arn string - The IAM (Identity and Access Management) role used to access the thesaurus file in S3.
- Source
S3Path ThesaurusSource S3Path Args - The S3 path where your thesaurus file sits in S3. Detailed below.
- Status string
- The current status of the thesaurus.
- map[string]string
- map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Thesaurus
Id string
- arn String
- ARN of the thesaurus.
- description String
- index
Id String - The identifier of the index for a thesaurus.
- name String
- The name for the thesaurus.
- role
Arn String - The IAM (Identity and Access Management) role used to access the thesaurus file in S3.
- source
S3Path ThesaurusSource S3Path - The S3 path where your thesaurus file sits in S3. Detailed below.
- status String
- The current status of the thesaurus.
- Map<String,String>
- Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - thesaurus
Id String
- arn string
- ARN of the thesaurus.
- description string
- index
Id string - The identifier of the index for a thesaurus.
- name string
- The name for the thesaurus.
- role
Arn string - The IAM (Identity and Access Management) role used to access the thesaurus file in S3.
- source
S3Path ThesaurusSource S3Path - The S3 path where your thesaurus file sits in S3. Detailed below.
- status string
- The current status of the thesaurus.
- {[key: string]: string}
- {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - thesaurus
Id 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_ Thesauruspath Source S3Path Args - The S3 path where your thesaurus file sits in S3. Detailed below.
- status str
- The current status of the thesaurus.
- Mapping[str, str]
- Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - thesaurus_
id str
- arn String
- ARN of the thesaurus.
- description String
- index
Id String - The identifier of the index for a thesaurus.
- name String
- The name for the thesaurus.
- role
Arn String - The IAM (Identity and Access Management) role used to access the thesaurus file in S3.
- source
S3Path Property Map - The S3 path where your thesaurus file sits in S3. Detailed below.
- status String
- The current status of the thesaurus.
- Map<String>
- Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - thesaurus
Id String
Supporting Types
ThesaurusSourceS3Path, ThesaurusSourceS3PathArgs
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.