github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/lex/getBotAlias.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 Alias.
    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.LookupBotAlias(ctx, &lex.LookupBotAliasArgs{
    32  //				BotName: "OrderFlowers",
    33  //				Name:    "OrderFlowersProd",
    34  //			}, nil)
    35  //			if err != nil {
    36  //				return err
    37  //			}
    38  //			return nil
    39  //		})
    40  //	}
    41  //
    42  // ```
    43  // <!--End PulumiCodeChooser -->
    44  func LookupBotAlias(ctx *pulumi.Context, args *LookupBotAliasArgs, opts ...pulumi.InvokeOption) (*LookupBotAliasResult, error) {
    45  	opts = internal.PkgInvokeDefaultOpts(opts)
    46  	var rv LookupBotAliasResult
    47  	err := ctx.Invoke("aws:lex/getBotAlias:getBotAlias", 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 getBotAlias.
    55  type LookupBotAliasArgs struct {
    56  	// Name of the bot.
    57  	BotName string `pulumi:"botName"`
    58  	// Name of the bot alias. The name is case sensitive.
    59  	Name string `pulumi:"name"`
    60  }
    61  
    62  // A collection of values returned by getBotAlias.
    63  type LookupBotAliasResult struct {
    64  	// ARN of the bot alias.
    65  	Arn string `pulumi:"arn"`
    66  	// Name of the bot.
    67  	BotName string `pulumi:"botName"`
    68  	// Version of the bot that the alias points to.
    69  	BotVersion string `pulumi:"botVersion"`
    70  	// Checksum of the bot alias.
    71  	Checksum string `pulumi:"checksum"`
    72  	// Date that the bot alias was created.
    73  	CreatedDate string `pulumi:"createdDate"`
    74  	// Description of the alias.
    75  	Description string `pulumi:"description"`
    76  	// The provider-assigned unique ID for this managed resource.
    77  	Id string `pulumi:"id"`
    78  	// Date that the bot alias was updated. When you create a resource, the creation date and the last updated date are the same.
    79  	LastUpdatedDate string `pulumi:"lastUpdatedDate"`
    80  	// Name of the alias. The name is not case sensitive.
    81  	Name string `pulumi:"name"`
    82  }
    83  
    84  func LookupBotAliasOutput(ctx *pulumi.Context, args LookupBotAliasOutputArgs, opts ...pulumi.InvokeOption) LookupBotAliasResultOutput {
    85  	return pulumi.ToOutputWithContext(context.Background(), args).
    86  		ApplyT(func(v interface{}) (LookupBotAliasResult, error) {
    87  			args := v.(LookupBotAliasArgs)
    88  			r, err := LookupBotAlias(ctx, &args, opts...)
    89  			var s LookupBotAliasResult
    90  			if r != nil {
    91  				s = *r
    92  			}
    93  			return s, err
    94  		}).(LookupBotAliasResultOutput)
    95  }
    96  
    97  // A collection of arguments for invoking getBotAlias.
    98  type LookupBotAliasOutputArgs struct {
    99  	// Name of the bot.
   100  	BotName pulumi.StringInput `pulumi:"botName"`
   101  	// Name of the bot alias. The name is case sensitive.
   102  	Name pulumi.StringInput `pulumi:"name"`
   103  }
   104  
   105  func (LookupBotAliasOutputArgs) ElementType() reflect.Type {
   106  	return reflect.TypeOf((*LookupBotAliasArgs)(nil)).Elem()
   107  }
   108  
   109  // A collection of values returned by getBotAlias.
   110  type LookupBotAliasResultOutput struct{ *pulumi.OutputState }
   111  
   112  func (LookupBotAliasResultOutput) ElementType() reflect.Type {
   113  	return reflect.TypeOf((*LookupBotAliasResult)(nil)).Elem()
   114  }
   115  
   116  func (o LookupBotAliasResultOutput) ToLookupBotAliasResultOutput() LookupBotAliasResultOutput {
   117  	return o
   118  }
   119  
   120  func (o LookupBotAliasResultOutput) ToLookupBotAliasResultOutputWithContext(ctx context.Context) LookupBotAliasResultOutput {
   121  	return o
   122  }
   123  
   124  // ARN of the bot alias.
   125  func (o LookupBotAliasResultOutput) Arn() pulumi.StringOutput {
   126  	return o.ApplyT(func(v LookupBotAliasResult) string { return v.Arn }).(pulumi.StringOutput)
   127  }
   128  
   129  // Name of the bot.
   130  func (o LookupBotAliasResultOutput) BotName() pulumi.StringOutput {
   131  	return o.ApplyT(func(v LookupBotAliasResult) string { return v.BotName }).(pulumi.StringOutput)
   132  }
   133  
   134  // Version of the bot that the alias points to.
   135  func (o LookupBotAliasResultOutput) BotVersion() pulumi.StringOutput {
   136  	return o.ApplyT(func(v LookupBotAliasResult) string { return v.BotVersion }).(pulumi.StringOutput)
   137  }
   138  
   139  // Checksum of the bot alias.
   140  func (o LookupBotAliasResultOutput) Checksum() pulumi.StringOutput {
   141  	return o.ApplyT(func(v LookupBotAliasResult) string { return v.Checksum }).(pulumi.StringOutput)
   142  }
   143  
   144  // Date that the bot alias was created.
   145  func (o LookupBotAliasResultOutput) CreatedDate() pulumi.StringOutput {
   146  	return o.ApplyT(func(v LookupBotAliasResult) string { return v.CreatedDate }).(pulumi.StringOutput)
   147  }
   148  
   149  // Description of the alias.
   150  func (o LookupBotAliasResultOutput) Description() pulumi.StringOutput {
   151  	return o.ApplyT(func(v LookupBotAliasResult) string { return v.Description }).(pulumi.StringOutput)
   152  }
   153  
   154  // The provider-assigned unique ID for this managed resource.
   155  func (o LookupBotAliasResultOutput) Id() pulumi.StringOutput {
   156  	return o.ApplyT(func(v LookupBotAliasResult) string { return v.Id }).(pulumi.StringOutput)
   157  }
   158  
   159  // Date that the bot alias was updated. When you create a resource, the creation date and the last updated date are the same.
   160  func (o LookupBotAliasResultOutput) LastUpdatedDate() pulumi.StringOutput {
   161  	return o.ApplyT(func(v LookupBotAliasResult) string { return v.LastUpdatedDate }).(pulumi.StringOutput)
   162  }
   163  
   164  // Name of the alias. The name is not case sensitive.
   165  func (o LookupBotAliasResultOutput) Name() pulumi.StringOutput {
   166  	return o.ApplyT(func(v LookupBotAliasResult) string { return v.Name }).(pulumi.StringOutput)
   167  }
   168  
   169  func init() {
   170  	pulumi.RegisterOutputType(LookupBotAliasResultOutput{})
   171  }