github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/lex/getBot.go (about)

     1  // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
     2  // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  package lex
     5  
     6  import (
     7  	"context"
     8  	"reflect"
     9  
    10  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    11  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    12  )
    13  
    14  // Provides details about a specific Amazon Lex Bot.
    15  //
    16  // ## Example Usage
    17  //
    18  // <!--Start PulumiCodeChooser -->
    19  // ```go
    20  // package main
    21  //
    22  // import (
    23  //
    24  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lex"
    25  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    26  //
    27  // )
    28  //
    29  //	func main() {
    30  //		pulumi.Run(func(ctx *pulumi.Context) error {
    31  //			_, err := lex.LookupBot(ctx, &lex.LookupBotArgs{
    32  //				Name:    "OrderFlowers",
    33  //				Version: pulumi.StringRef("$LATEST"),
    34  //			}, nil)
    35  //			if err != nil {
    36  //				return err
    37  //			}
    38  //			return nil
    39  //		})
    40  //	}
    41  //
    42  // ```
    43  // <!--End PulumiCodeChooser -->
    44  func LookupBot(ctx *pulumi.Context, args *LookupBotArgs, opts ...pulumi.InvokeOption) (*LookupBotResult, error) {
    45  	opts = internal.PkgInvokeDefaultOpts(opts)
    46  	var rv LookupBotResult
    47  	err := ctx.Invoke("aws:lex/getBot:getBot", args, &rv, opts...)
    48  	if err != nil {
    49  		return nil, err
    50  	}
    51  	return &rv, nil
    52  }
    53  
    54  // A collection of arguments for invoking getBot.
    55  type LookupBotArgs struct {
    56  	// Name of the bot. The name is case sensitive.
    57  	Name string `pulumi:"name"`
    58  	// Version or alias of the bot.
    59  	Version *string `pulumi:"version"`
    60  }
    61  
    62  // A collection of values returned by getBot.
    63  type LookupBotResult struct {
    64  	// ARN of the bot.
    65  	Arn string `pulumi:"arn"`
    66  	// Checksum of the bot used to identify a specific revision of the bot's `$LATEST` version.
    67  	Checksum string `pulumi:"checksum"`
    68  	// If this Amazon Lex Bot is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA.
    69  	ChildDirected bool `pulumi:"childDirected"`
    70  	// Date that the bot was created.
    71  	CreatedDate string `pulumi:"createdDate"`
    72  	// Description of the bot.
    73  	Description string `pulumi:"description"`
    74  	// When set to true user utterances are sent to Amazon Comprehend for sentiment analysis.
    75  	DetectSentiment bool `pulumi:"detectSentiment"`
    76  	// Set to true if natural language understanding improvements are enabled.
    77  	EnableModelImprovements bool `pulumi:"enableModelImprovements"`
    78  	// If the `status` is `FAILED`, the reason why the bot failed to build.
    79  	FailureReason string `pulumi:"failureReason"`
    80  	// The provider-assigned unique ID for this managed resource.
    81  	Id string `pulumi:"id"`
    82  	// The maximum time in seconds that Amazon Lex retains the data gathered in a conversation.
    83  	IdleSessionTtlInSeconds int `pulumi:"idleSessionTtlInSeconds"`
    84  	// Date that the bot was updated.
    85  	LastUpdatedDate string `pulumi:"lastUpdatedDate"`
    86  	// Target locale for the bot. Any intent used in the bot must be compatible with the locale of the bot.
    87  	Locale string `pulumi:"locale"`
    88  	// Name of the bot, case sensitive.
    89  	Name string `pulumi:"name"`
    90  	// The threshold where Amazon Lex will insert the AMAZON.FallbackIntent, AMAZON.KendraSearchIntent, or both when returning alternative intents in a PostContent or PostText response. AMAZON.FallbackIntent and AMAZON.KendraSearchIntent are only inserted if they are configured for the bot.
    91  	NluIntentConfidenceThreshold float64 `pulumi:"nluIntentConfidenceThreshold"`
    92  	// Status of the bot.
    93  	Status string `pulumi:"status"`
    94  	// Version of the bot. For a new bot, the version is always `$LATEST`.
    95  	Version *string `pulumi:"version"`
    96  	// Amazon Polly voice ID that the Amazon Lex Bot uses for voice interactions with the user.
    97  	VoiceId string `pulumi:"voiceId"`
    98  }
    99  
   100  func LookupBotOutput(ctx *pulumi.Context, args LookupBotOutputArgs, opts ...pulumi.InvokeOption) LookupBotResultOutput {
   101  	return pulumi.ToOutputWithContext(context.Background(), args).
   102  		ApplyT(func(v interface{}) (LookupBotResult, error) {
   103  			args := v.(LookupBotArgs)
   104  			r, err := LookupBot(ctx, &args, opts...)
   105  			var s LookupBotResult
   106  			if r != nil {
   107  				s = *r
   108  			}
   109  			return s, err
   110  		}).(LookupBotResultOutput)
   111  }
   112  
   113  // A collection of arguments for invoking getBot.
   114  type LookupBotOutputArgs struct {
   115  	// Name of the bot. The name is case sensitive.
   116  	Name pulumi.StringInput `pulumi:"name"`
   117  	// Version or alias of the bot.
   118  	Version pulumi.StringPtrInput `pulumi:"version"`
   119  }
   120  
   121  func (LookupBotOutputArgs) ElementType() reflect.Type {
   122  	return reflect.TypeOf((*LookupBotArgs)(nil)).Elem()
   123  }
   124  
   125  // A collection of values returned by getBot.
   126  type LookupBotResultOutput struct{ *pulumi.OutputState }
   127  
   128  func (LookupBotResultOutput) ElementType() reflect.Type {
   129  	return reflect.TypeOf((*LookupBotResult)(nil)).Elem()
   130  }
   131  
   132  func (o LookupBotResultOutput) ToLookupBotResultOutput() LookupBotResultOutput {
   133  	return o
   134  }
   135  
   136  func (o LookupBotResultOutput) ToLookupBotResultOutputWithContext(ctx context.Context) LookupBotResultOutput {
   137  	return o
   138  }
   139  
   140  // ARN of the bot.
   141  func (o LookupBotResultOutput) Arn() pulumi.StringOutput {
   142  	return o.ApplyT(func(v LookupBotResult) string { return v.Arn }).(pulumi.StringOutput)
   143  }
   144  
   145  // Checksum of the bot used to identify a specific revision of the bot's `$LATEST` version.
   146  func (o LookupBotResultOutput) Checksum() pulumi.StringOutput {
   147  	return o.ApplyT(func(v LookupBotResult) string { return v.Checksum }).(pulumi.StringOutput)
   148  }
   149  
   150  // If this Amazon Lex Bot is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA.
   151  func (o LookupBotResultOutput) ChildDirected() pulumi.BoolOutput {
   152  	return o.ApplyT(func(v LookupBotResult) bool { return v.ChildDirected }).(pulumi.BoolOutput)
   153  }
   154  
   155  // Date that the bot was created.
   156  func (o LookupBotResultOutput) CreatedDate() pulumi.StringOutput {
   157  	return o.ApplyT(func(v LookupBotResult) string { return v.CreatedDate }).(pulumi.StringOutput)
   158  }
   159  
   160  // Description of the bot.
   161  func (o LookupBotResultOutput) Description() pulumi.StringOutput {
   162  	return o.ApplyT(func(v LookupBotResult) string { return v.Description }).(pulumi.StringOutput)
   163  }
   164  
   165  // When set to true user utterances are sent to Amazon Comprehend for sentiment analysis.
   166  func (o LookupBotResultOutput) DetectSentiment() pulumi.BoolOutput {
   167  	return o.ApplyT(func(v LookupBotResult) bool { return v.DetectSentiment }).(pulumi.BoolOutput)
   168  }
   169  
   170  // Set to true if natural language understanding improvements are enabled.
   171  func (o LookupBotResultOutput) EnableModelImprovements() pulumi.BoolOutput {
   172  	return o.ApplyT(func(v LookupBotResult) bool { return v.EnableModelImprovements }).(pulumi.BoolOutput)
   173  }
   174  
   175  // If the `status` is `FAILED`, the reason why the bot failed to build.
   176  func (o LookupBotResultOutput) FailureReason() pulumi.StringOutput {
   177  	return o.ApplyT(func(v LookupBotResult) string { return v.FailureReason }).(pulumi.StringOutput)
   178  }
   179  
   180  // The provider-assigned unique ID for this managed resource.
   181  func (o LookupBotResultOutput) Id() pulumi.StringOutput {
   182  	return o.ApplyT(func(v LookupBotResult) string { return v.Id }).(pulumi.StringOutput)
   183  }
   184  
   185  // The maximum time in seconds that Amazon Lex retains the data gathered in a conversation.
   186  func (o LookupBotResultOutput) IdleSessionTtlInSeconds() pulumi.IntOutput {
   187  	return o.ApplyT(func(v LookupBotResult) int { return v.IdleSessionTtlInSeconds }).(pulumi.IntOutput)
   188  }
   189  
   190  // Date that the bot was updated.
   191  func (o LookupBotResultOutput) LastUpdatedDate() pulumi.StringOutput {
   192  	return o.ApplyT(func(v LookupBotResult) string { return v.LastUpdatedDate }).(pulumi.StringOutput)
   193  }
   194  
   195  // Target locale for the bot. Any intent used in the bot must be compatible with the locale of the bot.
   196  func (o LookupBotResultOutput) Locale() pulumi.StringOutput {
   197  	return o.ApplyT(func(v LookupBotResult) string { return v.Locale }).(pulumi.StringOutput)
   198  }
   199  
   200  // Name of the bot, case sensitive.
   201  func (o LookupBotResultOutput) Name() pulumi.StringOutput {
   202  	return o.ApplyT(func(v LookupBotResult) string { return v.Name }).(pulumi.StringOutput)
   203  }
   204  
   205  // The threshold where Amazon Lex will insert the AMAZON.FallbackIntent, AMAZON.KendraSearchIntent, or both when returning alternative intents in a PostContent or PostText response. AMAZON.FallbackIntent and AMAZON.KendraSearchIntent are only inserted if they are configured for the bot.
   206  func (o LookupBotResultOutput) NluIntentConfidenceThreshold() pulumi.Float64Output {
   207  	return o.ApplyT(func(v LookupBotResult) float64 { return v.NluIntentConfidenceThreshold }).(pulumi.Float64Output)
   208  }
   209  
   210  // Status of the bot.
   211  func (o LookupBotResultOutput) Status() pulumi.StringOutput {
   212  	return o.ApplyT(func(v LookupBotResult) string { return v.Status }).(pulumi.StringOutput)
   213  }
   214  
   215  // Version of the bot. For a new bot, the version is always `$LATEST`.
   216  func (o LookupBotResultOutput) Version() pulumi.StringPtrOutput {
   217  	return o.ApplyT(func(v LookupBotResult) *string { return v.Version }).(pulumi.StringPtrOutput)
   218  }
   219  
   220  // Amazon Polly voice ID that the Amazon Lex Bot uses for voice interactions with the user.
   221  func (o LookupBotResultOutput) VoiceId() pulumi.StringOutput {
   222  	return o.ApplyT(func(v LookupBotResult) string { return v.VoiceId }).(pulumi.StringOutput)
   223  }
   224  
   225  func init() {
   226  	pulumi.RegisterOutputType(LookupBotResultOutput{})
   227  }