Try AWS Native preview for resources not in the classic version.
aws.kendra.QuerySuggestionsBlockList
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
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:
- Index
Id string - Identifier of the index for a block list.
- Role
Arn string - IAM (Identity and Access Management) role used to access the block list text file in S3.
- Source
S3Path QuerySuggestions Block List Source S3Path - S3 path where your block list text file is located. See details below.
- Description string
- Name string
- Name for the block list.
- Dictionary<string, string>
- Index
Id string - Identifier of the index for a block list.
- Role
Arn string - IAM (Identity and Access Management) role used to access the block list text file in S3.
- Source
S3Path QuerySuggestions Block List Source S3Path Args - S3 path where your block list text file is located. See details below.
- Description string
- Name string
- Name for the block list.
- map[string]string
- index
Id String - Identifier of the index for a block list.
- role
Arn String - IAM (Identity and Access Management) role used to access the block list text file in S3.
- source
S3Path QuerySuggestions Block List Source S3Path - S3 path where your block list text file is located. See details below.
- description String
- name String
- Name for the block list.
- Map<String,String>
- index
Id string - Identifier of the index for a block list.
- role
Arn string - IAM (Identity and Access Management) role used to access the block list text file in S3.
- source
S3Path QuerySuggestions Block List Source S3Path - S3 path where your block list text file is located. See details below.
- description string
- name string
- Name for the block list.
- {[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_ Querypath Suggestions Block List Source S3Path Args - S3 path where your block list text file is located. See details below.
- description str
- name str
- Name for the block list.
- Mapping[str, str]
- index
Id String - Identifier of the index for a block list.
- role
Arn String - IAM (Identity and Access Management) role used to access the block list text file in S3.
- source
S3Path Property Map - S3 path where your block list text file is located. See details below.
- description String
- name String
- Name for the block list.
- 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.
- Query
Suggestions stringBlock List Id - Unique identifier of the block list.
- Status string
- Dictionary<string, string>
- Map of tags assigned to the resource, including those inherited from the provider's default_tags configuration block.
- Arn string
- ARN of the block list.
- Id string
- The provider-assigned unique ID for this managed resource.
- Query
Suggestions stringBlock List Id - Unique identifier of the block list.
- Status string
- map[string]string
- Map of tags assigned to the resource, including those inherited from the provider's default_tags configuration block.
- arn String
- ARN of the block list.
- id String
- The provider-assigned unique ID for this managed resource.
- query
Suggestions StringBlock List Id - Unique identifier of the block list.
- status String
- Map<String,String>
- Map of tags assigned to the resource, including those inherited from the provider's default_tags configuration block.
- arn string
- ARN of the block list.
- id string
- The provider-assigned unique ID for this managed resource.
- query
Suggestions stringBlock List Id - Unique identifier of the block list.
- status string
- {[key: string]: string}
- Map of tags assigned to the resource, including those inherited from the provider's default_tags configuration block.
- arn str
- ARN of the block list.
- id str
- The provider-assigned unique ID for this managed resource.
- query_
suggestions_ strblock_ list_ id - Unique identifier of the block list.
- status str
- Mapping[str, str]
- Map of tags assigned to the resource, including those inherited from the provider's default_tags configuration block.
- arn String
- ARN of the block list.
- id String
- The provider-assigned unique ID for this managed resource.
- query
Suggestions StringBlock List Id - Unique identifier of the block list.
- status String
- Map<String>
- Map of tags assigned to the resource, including those inherited from the provider's default_tags configuration block.
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.
- Arn string
- ARN of the block list.
- Description string
- Index
Id string - Identifier of the index for a block list.
- Name string
- Name for the block list.
- Query
Suggestions stringBlock List Id - Unique identifier of the block list.
- Role
Arn string - IAM (Identity and Access Management) role used to access the block list text file in S3.
- Source
S3Path QuerySuggestions Block List Source S3Path - S3 path where your block list text file is located. See details below.
- Status string
- Dictionary<string, string>
- Dictionary<string, string>
- Map of tags assigned to the resource, including those inherited from the provider's default_tags configuration block.
- Arn string
- ARN of the block list.
- Description string
- Index
Id string - Identifier of the index for a block list.
- Name string
- Name for the block list.
- Query
Suggestions stringBlock List Id - Unique identifier of the block list.
- Role
Arn string - IAM (Identity and Access Management) role used to access the block list text file in S3.
- Source
S3Path QuerySuggestions Block List Source S3Path Args - S3 path where your block list text file is located. See details below.
- Status string
- map[string]string
- map[string]string
- Map of tags assigned to the resource, including those inherited from the provider's default_tags configuration block.
- arn String
- ARN of the block list.
- description String
- index
Id String - Identifier of the index for a block list.
- name String
- Name for the block list.
- query
Suggestions StringBlock List Id - Unique identifier of the block list.
- role
Arn String - IAM (Identity and Access Management) role used to access the block list text file in S3.
- source
S3Path QuerySuggestions Block List Source S3Path - S3 path where your block list text file is located. See details below.
- status String
- Map<String,String>
- Map<String,String>
- Map of tags assigned to the resource, including those inherited from the provider's default_tags configuration block.
- arn string
- ARN of the block list.
- description string
- index
Id string - Identifier of the index for a block list.
- name string
- Name for the block list.
- query
Suggestions stringBlock List Id - Unique identifier of the block list.
- role
Arn string - IAM (Identity and Access Management) role used to access the block list text file in S3.
- source
S3Path QuerySuggestions Block List Source S3Path - S3 path where your block list text file is located. See details below.
- status string
- {[key: string]: string}
- {[key: string]: string}
- Map of tags assigned to the resource, including those inherited from the provider's default_tags configuration block.
- 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_ strblock_ list_ id - 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_ Querypath Suggestions Block List Source S3Path Args - S3 path where your block list text file is located. See details below.
- status str
- Mapping[str, str]
- Mapping[str, str]
- Map of tags assigned to the resource, including those inherited from the provider's default_tags configuration block.
- arn String
- ARN of the block list.
- description String
- index
Id String - Identifier of the index for a block list.
- name String
- Name for the block list.
- query
Suggestions StringBlock List Id - Unique identifier of the block list.
- role
Arn String - IAM (Identity and Access Management) role used to access the block list text file in S3.
- source
S3Path Property Map - S3 path where your block list text file is located. See details below.
- status String
- Map<String>
- Map<String>
- Map of tags assigned to the resource, including those inherited from the provider's default_tags configuration block.
Supporting Types
QuerySuggestionsBlockListSourceS3Path, QuerySuggestionsBlockListSourceS3PathArgs
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.
Try AWS Native preview for resources not in the classic version.