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

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.QuerySuggestionsBlockList

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

    Use the aws_kendra_index_block_list resource to manage an AWS Kendra block list used for query suggestions for an index.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.kendra.QuerySuggestionsBlockList("example", {
        indexId: exampleAwsKendraIndex.id,
        name: "Example",
        roleArn: exampleAwsIamRole.arn,
        sourceS3Path: {
            bucket: exampleAwsS3Bucket.id,
            key: "example/suggestions.txt",
        },
        tags: {
            Name: "Example Kendra Index",
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.kendra.QuerySuggestionsBlockList("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/suggestions.txt",
        },
        tags={
            "Name": "Example Kendra Index",
        })
    
    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.NewQuerySuggestionsBlockList(ctx, "example", &kendra.QuerySuggestionsBlockListArgs{
    			IndexId: pulumi.Any(exampleAwsKendraIndex.Id),
    			Name:    pulumi.String("Example"),
    			RoleArn: pulumi.Any(exampleAwsIamRole.Arn),
    			SourceS3Path: &kendra.QuerySuggestionsBlockListSourceS3PathArgs{
    				Bucket: pulumi.Any(exampleAwsS3Bucket.Id),
    				Key:    pulumi.String("example/suggestions.txt"),
    			},
    			Tags: pulumi.StringMap{
    				"Name": pulumi.String("Example Kendra Index"),
    			},
    		})
    		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.QuerySuggestionsBlockList("example", new()
        {
            IndexId = exampleAwsKendraIndex.Id,
            Name = "Example",
            RoleArn = exampleAwsIamRole.Arn,
            SourceS3Path = new Aws.Kendra.Inputs.QuerySuggestionsBlockListSourceS3PathArgs
            {
                Bucket = exampleAwsS3Bucket.Id,
                Key = "example/suggestions.txt",
            },
            Tags = 
            {
                { "Name", "Example Kendra Index" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.kendra.QuerySuggestionsBlockList;
    import com.pulumi.aws.kendra.QuerySuggestionsBlockListArgs;
    import com.pulumi.aws.kendra.inputs.QuerySuggestionsBlockListSourceS3PathArgs;
    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 QuerySuggestionsBlockList("example", QuerySuggestionsBlockListArgs.builder()
                .indexId(exampleAwsKendraIndex.id())
                .name("Example")
                .roleArn(exampleAwsIamRole.arn())
                .sourceS3Path(QuerySuggestionsBlockListSourceS3PathArgs.builder()
                    .bucket(exampleAwsS3Bucket.id())
                    .key("example/suggestions.txt")
                    .build())
                .tags(Map.of("Name", "Example Kendra Index"))
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:kendra:QuerySuggestionsBlockList
        properties:
          indexId: ${exampleAwsKendraIndex.id}
          name: Example
          roleArn: ${exampleAwsIamRole.arn}
          sourceS3Path:
            bucket: ${exampleAwsS3Bucket.id}
            key: example/suggestions.txt
          tags:
            Name: Example Kendra Index
    

    Create QuerySuggestionsBlockList Resource

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

    Constructor syntax

    new QuerySuggestionsBlockList(name: string, args: QuerySuggestionsBlockListArgs, opts?: CustomResourceOptions);
    @overload
    def QuerySuggestionsBlockList(resource_name: str,
                                  args: QuerySuggestionsBlockListArgs,
                                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def QuerySuggestionsBlockList(resource_name: str,
                                  opts: Optional[ResourceOptions] = None,
                                  index_id: Optional[str] = None,
                                  role_arn: Optional[str] = None,
                                  source_s3_path: Optional[QuerySuggestionsBlockListSourceS3PathArgs] = None,
                                  description: Optional[str] = None,
                                  name: Optional[str] = None,
                                  tags: Optional[Mapping[str, str]] = None)
    func NewQuerySuggestionsBlockList(ctx *Context, name string, args QuerySuggestionsBlockListArgs, opts ...ResourceOption) (*QuerySuggestionsBlockList, error)
    public QuerySuggestionsBlockList(string name, QuerySuggestionsBlockListArgs args, CustomResourceOptions? opts = null)
    public QuerySuggestionsBlockList(String name, QuerySuggestionsBlockListArgs args)
    public QuerySuggestionsBlockList(String name, QuerySuggestionsBlockListArgs args, CustomResourceOptions options)
    
    type: aws:kendra:QuerySuggestionsBlockList
    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 QuerySuggestionsBlockListArgs
    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 QuerySuggestionsBlockListArgs
    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 QuerySuggestionsBlockListArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args QuerySuggestionsBlockListArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args QuerySuggestionsBlockListArgs
    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 querySuggestionsBlockListResource = new Aws.Kendra.QuerySuggestionsBlockList("querySuggestionsBlockListResource", new()
    {
        IndexId = "string",
        RoleArn = "string",
        SourceS3Path = new Aws.Kendra.Inputs.QuerySuggestionsBlockListSourceS3PathArgs
        {
            Bucket = "string",
            Key = "string",
        },
        Description = "string",
        Name = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := kendra.NewQuerySuggestionsBlockList(ctx, "querySuggestionsBlockListResource", &kendra.QuerySuggestionsBlockListArgs{
    	IndexId: pulumi.String("string"),
    	RoleArn: pulumi.String("string"),
    	SourceS3Path: &kendra.QuerySuggestionsBlockListSourceS3PathArgs{
    		Bucket: pulumi.String("string"),
    		Key:    pulumi.String("string"),
    	},
    	Description: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var querySuggestionsBlockListResource = new QuerySuggestionsBlockList("querySuggestionsBlockListResource", QuerySuggestionsBlockListArgs.builder()
        .indexId("string")
        .roleArn("string")
        .sourceS3Path(QuerySuggestionsBlockListSourceS3PathArgs.builder()
            .bucket("string")
            .key("string")
            .build())
        .description("string")
        .name("string")
        .tags(Map.of("string", "string"))
        .build());
    
    query_suggestions_block_list_resource = aws.kendra.QuerySuggestionsBlockList("querySuggestionsBlockListResource",
        index_id="string",
        role_arn="string",
        source_s3_path={
            "bucket": "string",
            "key": "string",
        },
        description="string",
        name="string",
        tags={
            "string": "string",
        })
    
    const querySuggestionsBlockListResource = new aws.kendra.QuerySuggestionsBlockList("querySuggestionsBlockListResource", {
        indexId: "string",
        roleArn: "string",
        sourceS3Path: {
            bucket: "string",
            key: "string",
        },
        description: "string",
        name: "string",
        tags: {
            string: "string",
        },
    });
    
    type: aws:kendra:QuerySuggestionsBlockList
    properties:
        description: string
        indexId: string
        name: string
        roleArn: string
        sourceS3Path:
            bucket: string
            key: string
        tags:
            string: string
    

    QuerySuggestionsBlockList 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 QuerySuggestionsBlockList resource accepts the following input properties:

    IndexId string
    Identifier of the index for a block list.
    RoleArn string
    IAM (Identity and Access Management) role used to access the block list text file in S3.
    SourceS3Path QuerySuggestionsBlockListSourceS3Path
    S3 path where your block list text file is located. See details below.
    Description string
    Name string
    Name for the block list.
    Tags Dictionary<string, string>
    IndexId string
    Identifier of the index for a block list.
    RoleArn string
    IAM (Identity and Access Management) role used to access the block list text file in S3.
    SourceS3Path QuerySuggestionsBlockListSourceS3PathArgs
    S3 path where your block list text file is located. See details below.
    Description string
    Name string
    Name for the block list.
    Tags map[string]string
    indexId String
    Identifier of the index for a block list.
    roleArn String
    IAM (Identity and Access Management) role used to access the block list text file in S3.
    sourceS3Path QuerySuggestionsBlockListSourceS3Path
    S3 path where your block list text file is located. See details below.
    description String
    name String
    Name for the block list.
    tags Map<String,String>
    indexId string
    Identifier of the index for a block list.
    roleArn string
    IAM (Identity and Access Management) role used to access the block list text file in S3.
    sourceS3Path QuerySuggestionsBlockListSourceS3Path
    S3 path where your block list text file is located. See details below.
    description string
    name string
    Name for the block list.
    tags {[key: string]: string}
    index_id str
    Identifier of the index for a block list.
    role_arn str
    IAM (Identity and Access Management) role used to access the block list text file in S3.
    source_s3_path QuerySuggestionsBlockListSourceS3PathArgs
    S3 path where your block list text file is located. See details below.
    description str
    name str
    Name for the block list.
    tags Mapping[str, str]
    indexId String
    Identifier of the index for a block list.
    roleArn String
    IAM (Identity and Access Management) role used to access the block list text file in S3.
    sourceS3Path Property Map
    S3 path where your block list text file is located. See details below.
    description String
    name String
    Name for the block list.
    tags Map<String>

    Outputs

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

    Arn string
    ARN of the block list.
    Id string
    The provider-assigned unique ID for this managed resource.
    QuerySuggestionsBlockListId string
    Unique identifier of the block list.
    Status string
    TagsAll Dictionary<string, string>
    Map of tags assigned to the resource, including those inherited from the provider's default_tags configuration block.

    Deprecated: Please use tags instead.

    Arn string
    ARN of the block list.
    Id string
    The provider-assigned unique ID for this managed resource.
    QuerySuggestionsBlockListId string
    Unique identifier of the block list.
    Status string
    TagsAll map[string]string
    Map of tags assigned to the resource, including those inherited from the provider's default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    ARN of the block list.
    id String
    The provider-assigned unique ID for this managed resource.
    querySuggestionsBlockListId String
    Unique identifier of the block list.
    status String
    tagsAll Map<String,String>
    Map of tags assigned to the resource, including those inherited from the provider's default_tags configuration block.

    Deprecated: Please use tags instead.

    arn string
    ARN of the block list.
    id string
    The provider-assigned unique ID for this managed resource.
    querySuggestionsBlockListId string
    Unique identifier of the block list.
    status string
    tagsAll {[key: string]: string}
    Map of tags assigned to the resource, including those inherited from the provider's default_tags configuration block.

    Deprecated: Please use tags instead.

    arn str
    ARN of the block list.
    id str
    The provider-assigned unique ID for this managed resource.
    query_suggestions_block_list_id str
    Unique identifier of the block list.
    status str
    tags_all Mapping[str, str]
    Map of tags assigned to the resource, including those inherited from the provider's default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    ARN of the block list.
    id String
    The provider-assigned unique ID for this managed resource.
    querySuggestionsBlockListId String
    Unique identifier of the block list.
    status String
    tagsAll Map<String>
    Map of tags assigned to the resource, including those inherited from the provider's default_tags configuration block.

    Deprecated: Please use tags instead.

    Look up Existing QuerySuggestionsBlockList Resource

    Get an existing QuerySuggestionsBlockList 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?: QuerySuggestionsBlockListState, opts?: CustomResourceOptions): QuerySuggestionsBlockList
    @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,
            query_suggestions_block_list_id: Optional[str] = None,
            role_arn: Optional[str] = None,
            source_s3_path: Optional[QuerySuggestionsBlockListSourceS3PathArgs] = None,
            status: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None) -> QuerySuggestionsBlockList
    func GetQuerySuggestionsBlockList(ctx *Context, name string, id IDInput, state *QuerySuggestionsBlockListState, opts ...ResourceOption) (*QuerySuggestionsBlockList, error)
    public static QuerySuggestionsBlockList Get(string name, Input<string> id, QuerySuggestionsBlockListState? state, CustomResourceOptions? opts = null)
    public static QuerySuggestionsBlockList get(String name, Output<String> id, QuerySuggestionsBlockListState 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 block list.
    Description string
    IndexId string
    Identifier of the index for a block list.
    Name string
    Name for the block list.
    QuerySuggestionsBlockListId string
    Unique identifier of the block list.
    RoleArn string
    IAM (Identity and Access Management) role used to access the block list text file in S3.
    SourceS3Path QuerySuggestionsBlockListSourceS3Path
    S3 path where your block list text file is located. See details below.
    Status string
    Tags Dictionary<string, string>
    TagsAll Dictionary<string, string>
    Map of tags assigned to the resource, including those inherited from the provider's default_tags configuration block.

    Deprecated: Please use tags instead.

    Arn string
    ARN of the block list.
    Description string
    IndexId string
    Identifier of the index for a block list.
    Name string
    Name for the block list.
    QuerySuggestionsBlockListId string
    Unique identifier of the block list.
    RoleArn string
    IAM (Identity and Access Management) role used to access the block list text file in S3.
    SourceS3Path QuerySuggestionsBlockListSourceS3PathArgs
    S3 path where your block list text file is located. See details below.
    Status string
    Tags map[string]string
    TagsAll map[string]string
    Map of tags assigned to the resource, including those inherited from the provider's default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    ARN of the block list.
    description String
    indexId String
    Identifier of the index for a block list.
    name String
    Name for the block list.
    querySuggestionsBlockListId String
    Unique identifier of the block list.
    roleArn String
    IAM (Identity and Access Management) role used to access the block list text file in S3.
    sourceS3Path QuerySuggestionsBlockListSourceS3Path
    S3 path where your block list text file is located. See details below.
    status String
    tags Map<String,String>
    tagsAll Map<String,String>
    Map of tags assigned to the resource, including those inherited from the provider's default_tags configuration block.

    Deprecated: Please use tags instead.

    arn string
    ARN of the block list.
    description string
    indexId string
    Identifier of the index for a block list.
    name string
    Name for the block list.
    querySuggestionsBlockListId string
    Unique identifier of the block list.
    roleArn string
    IAM (Identity and Access Management) role used to access the block list text file in S3.
    sourceS3Path QuerySuggestionsBlockListSourceS3Path
    S3 path where your block list text file is located. See details below.
    status string
    tags {[key: string]: string}
    tagsAll {[key: string]: string}
    Map of tags assigned to the resource, including those inherited from the provider's default_tags configuration block.

    Deprecated: Please use tags instead.

    arn str
    ARN of the block list.
    description str
    index_id str
    Identifier of the index for a block list.
    name str
    Name for the block list.
    query_suggestions_block_list_id str
    Unique identifier of the block list.
    role_arn str
    IAM (Identity and Access Management) role used to access the block list text file in S3.
    source_s3_path QuerySuggestionsBlockListSourceS3PathArgs
    S3 path where your block list text file is located. See details below.
    status str
    tags Mapping[str, str]
    tags_all Mapping[str, str]
    Map of tags assigned to the resource, including those inherited from the provider's default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    ARN of the block list.
    description String
    indexId String
    Identifier of the index for a block list.
    name String
    Name for the block list.
    querySuggestionsBlockListId String
    Unique identifier of the block list.
    roleArn String
    IAM (Identity and Access Management) role used to access the block list text file in S3.
    sourceS3Path Property Map
    S3 path where your block list text file is located. See details below.
    status String
    tags Map<String>
    tagsAll Map<String>
    Map of tags assigned to the resource, including those inherited from the provider's default_tags configuration block.

    Deprecated: Please use tags instead.

    Supporting Types

    QuerySuggestionsBlockListSourceS3Path, QuerySuggestionsBlockListSourceS3PathArgs

    Bucket string
    Name of the S3 bucket that contains the file.
    Key string

    Name of the file.

    The following arguments are optional:

    Bucket string
    Name of the S3 bucket that contains the file.
    Key string

    Name of the file.

    The following arguments are optional:

    bucket String
    Name of the S3 bucket that contains the file.
    key String

    Name of the file.

    The following arguments are optional:

    bucket string
    Name of the S3 bucket that contains the file.
    key string

    Name of the file.

    The following arguments are optional:

    bucket str
    Name of the S3 bucket that contains the file.
    key str

    Name of the file.

    The following arguments are optional:

    bucket String
    Name of the S3 bucket that contains the file.
    key String

    Name of the file.

    The following arguments are optional:

    Import

    Using pulumi import, import the aws_kendra_query_suggestions_block_list resource using the unique identifiers of the block list and index separated by a slash (/). For example:

    $ pulumi import aws:kendra/querySuggestionsBlockList:QuerySuggestionsBlockList example blocklist-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