V2models Bot Args
data class V2modelsBotArgs(val dataPrivacies: Output<List<V2modelsBotDataPrivacyArgs>>? = null, val description: Output<String>? = null, val idleSessionTtlInSeconds: Output<Int>? = null, val members: Output<List<V2modelsBotMemberArgs>>? = null, val name: Output<String>? = null, val roleArn: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val testBotAliasTags: Output<Map<String, String>>? = null, val timeouts: Output<V2modelsBotTimeoutsArgs>? = null, val type: Output<String>? = null) : ConvertibleToJava<V2modelsBotArgs>
Resource for managing an AWS Lex V2 Models Bot.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const exampleRole = new aws.iam.Role("example", {
name: "example",
assumeRolePolicy: JSON.stringify({
Version: "2012-10-17",
Statement: [{
Action: "sts:AssumeRole",
Effect: "Allow",
Sid: "",
Principal: {
Service: "lexv2.amazonaws.com",
},
}],
}),
tags: {
created_by: "aws",
},
});
const example = new aws.lex.V2modelsBot("example", {
name: "example",
description: "Example description",
dataPrivacies: [{
childDirected: false,
}],
idleSessionTtlInSeconds: 60,
roleArn: exampleRole.arn,
type: "Bot",
tags: {
foo: "bar",
},
});
Content copied to clipboard
import pulumi
import json
import pulumi_aws as aws
example_role = aws.iam.Role("example",
name="example",
assume_role_policy=json.dumps({
"Version": "2012-10-17",
"Statement": [{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Sid": "",
"Principal": {
"Service": "lexv2.amazonaws.com",
},
}],
}),
tags={
"created_by": "aws",
})
example = aws.lex.V2modelsBot("example",
name="example",
description="Example description",
data_privacies=[{
"child_directed": False,
}],
idle_session_ttl_in_seconds=60,
role_arn=example_role.arn,
type="Bot",
tags={
"foo": "bar",
})
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var exampleRole = new Aws.Iam.Role("example", new()
{
Name = "example",
AssumeRolePolicy = JsonSerializer.Serialize(new Dictionary<string, object?>
{
["Version"] = "2012-10-17",
["Statement"] = new[]
{
new Dictionary<string, object?>
{
["Action"] = "sts:AssumeRole",
["Effect"] = "Allow",
["Sid"] = "",
["Principal"] = new Dictionary<string, object?>
{
["Service"] = "lexv2.amazonaws.com",
},
},
},
}),
Tags =
{
{ "created_by", "aws" },
},
});
var example = new Aws.Lex.V2modelsBot("example", new()
{
Name = "example",
Description = "Example description",
DataPrivacies = new[]
{
new Aws.Lex.Inputs.V2modelsBotDataPrivacyArgs
{
ChildDirected = false,
},
},
IdleSessionTtlInSeconds = 60,
RoleArn = exampleRole.Arn,
Type = "Bot",
Tags =
{
{ "foo", "bar" },
},
});
});
Content copied to clipboard
package main
import (
"encoding/json"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lex"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
tmpJSON0, err := json.Marshal(map[string]interface{}{
"Version": "2012-10-17",
"Statement": []map[string]interface{}{
map[string]interface{}{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Sid": "",
"Principal": map[string]interface{}{
"Service": "lexv2.amazonaws.com",
},
},
},
})
if err != nil {
return err
}
json0 := string(tmpJSON0)
exampleRole, err := iam.NewRole(ctx, "example", &iam.RoleArgs{
Name: pulumi.String("example"),
AssumeRolePolicy: pulumi.String(json0),
Tags: pulumi.StringMap{
"created_by": pulumi.String("aws"),
},
})
if err != nil {
return err
}
_, err = lex.NewV2modelsBot(ctx, "example", &lex.V2modelsBotArgs{
Name: pulumi.String("example"),
Description: pulumi.String("Example description"),
DataPrivacies: lex.V2modelsBotDataPrivacyArray{
&lex.V2modelsBotDataPrivacyArgs{
ChildDirected: pulumi.Bool(false),
},
},
IdleSessionTtlInSeconds: pulumi.Int(60),
RoleArn: exampleRole.Arn,
Type: pulumi.String("Bot"),
Tags: pulumi.StringMap{
"foo": pulumi.String("bar"),
},
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.iam.Role;
import com.pulumi.aws.iam.RoleArgs;
import com.pulumi.aws.lex.V2modelsBot;
import com.pulumi.aws.lex.V2modelsBotArgs;
import com.pulumi.aws.lex.inputs.V2modelsBotDataPrivacyArgs;
import static com.pulumi.codegen.internal.Serialization.*;
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 exampleRole = new Role("exampleRole", RoleArgs.builder()
.name("example")
.assumeRolePolicy(serializeJson(
jsonObject(
jsonProperty("Version", "2012-10-17"),
jsonProperty("Statement", jsonArray(jsonObject(
jsonProperty("Action", "sts:AssumeRole"),
jsonProperty("Effect", "Allow"),
jsonProperty("Sid", ""),
jsonProperty("Principal", jsonObject(
jsonProperty("Service", "lexv2.amazonaws.com")
))
)))
)))
.tags(Map.of("created_by", "aws"))
.build());
var example = new V2modelsBot("example", V2modelsBotArgs.builder()
.name("example")
.description("Example description")
.dataPrivacies(V2modelsBotDataPrivacyArgs.builder()
.childDirected(false)
.build())
.idleSessionTtlInSeconds(60)
.roleArn(exampleRole.arn())
.type("Bot")
.tags(Map.of("foo", "bar"))
.build());
}
}
Content copied to clipboard
resources:
example:
type: aws:lex:V2modelsBot
properties:
name: example
description: Example description
dataPrivacies:
- childDirected: false
idleSessionTtlInSeconds: 60
roleArn: ${exampleRole.arn}
type: Bot
tags:
foo: bar
exampleRole:
type: aws:iam:Role
name: example
properties:
name: example
assumeRolePolicy:
fn::toJSON:
Version: 2012-10-17
Statement:
- Action: sts:AssumeRole
Effect: Allow
Sid: ""
Principal:
Service: lexv2.amazonaws.com
tags:
created_by: aws
Content copied to clipboard
Import
Using pulumi import
, import Lex V2 Models Bot using the id
. For example:
$ pulumi import aws:lex/v2modelsBot:V2modelsBot example bot-id-12345678
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(dataPrivacies: Output<List<V2modelsBotDataPrivacyArgs>>? = null, description: Output<String>? = null, idleSessionTtlInSeconds: Output<Int>? = null, members: Output<List<V2modelsBotMemberArgs>>? = null, name: Output<String>? = null, roleArn: Output<String>? = null, tags: Output<Map<String, String>>? = null, testBotAliasTags: Output<Map<String, String>>? = null, timeouts: Output<V2modelsBotTimeoutsArgs>? = null, type: Output<String>? = null)
Properties
Link copied to clipboard
Provides information on additional privacy protections Amazon Lex should use with the bot's data. See data_privacy
Link copied to clipboard
Description of the bot. It appears in lists to help you identify a particular bot.
Link copied to clipboard
Time, in seconds, that Amazon Lex should keep information about a user's conversation with the bot. You can specify between 60 (1 minute) and 86,400 (24 hours) seconds.
Link copied to clipboard
List of bot members in a network to be created. See bot_members
.
Link copied to clipboard
List of tags to add to the test alias for a bot. You can only add tags when you create a bot.
Link copied to clipboard