github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/lex/getIntent.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 Intent.
    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.LookupIntent(ctx, &lex.LookupIntentArgs{
    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 LookupIntent(ctx *pulumi.Context, args *LookupIntentArgs, opts ...pulumi.InvokeOption) (*LookupIntentResult, error) {
    45  	opts = internal.PkgInvokeDefaultOpts(opts)
    46  	var rv LookupIntentResult
    47  	err := ctx.Invoke("aws:lex/getIntent:getIntent", 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 getIntent.
    55  type LookupIntentArgs struct {
    56  	// Name of the intent. The name is case sensitive.
    57  	Name string `pulumi:"name"`
    58  	// Version of the intent.
    59  	Version *string `pulumi:"version"`
    60  }
    61  
    62  // A collection of values returned by getIntent.
    63  type LookupIntentResult struct {
    64  	// ARN of the Lex intent.
    65  	Arn string `pulumi:"arn"`
    66  	// Checksum identifying the version of the intent that was created. The checksum is not
    67  	// included as an argument because the resource will add it automatically when updating the intent.
    68  	Checksum string `pulumi:"checksum"`
    69  	// Date when the intent version was created.
    70  	CreatedDate string `pulumi:"createdDate"`
    71  	// Description of the intent.
    72  	Description string `pulumi:"description"`
    73  	// The provider-assigned unique ID for this managed resource.
    74  	Id string `pulumi:"id"`
    75  	// Date when the $LATEST version of this intent was updated.
    76  	LastUpdatedDate string `pulumi:"lastUpdatedDate"`
    77  	// Name of the intent, not case sensitive.
    78  	Name string `pulumi:"name"`
    79  	// A unique identifier for the built-in intent to base this
    80  	// intent on. To find the signature for an intent, see
    81  	// [Standard Built-in Intents](https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/standard-intents)
    82  	// in the Alexa Skills Kit.
    83  	ParentIntentSignature string `pulumi:"parentIntentSignature"`
    84  	// Version of the bot.
    85  	Version *string `pulumi:"version"`
    86  }
    87  
    88  func LookupIntentOutput(ctx *pulumi.Context, args LookupIntentOutputArgs, opts ...pulumi.InvokeOption) LookupIntentResultOutput {
    89  	return pulumi.ToOutputWithContext(context.Background(), args).
    90  		ApplyT(func(v interface{}) (LookupIntentResult, error) {
    91  			args := v.(LookupIntentArgs)
    92  			r, err := LookupIntent(ctx, &args, opts...)
    93  			var s LookupIntentResult
    94  			if r != nil {
    95  				s = *r
    96  			}
    97  			return s, err
    98  		}).(LookupIntentResultOutput)
    99  }
   100  
   101  // A collection of arguments for invoking getIntent.
   102  type LookupIntentOutputArgs struct {
   103  	// Name of the intent. The name is case sensitive.
   104  	Name pulumi.StringInput `pulumi:"name"`
   105  	// Version of the intent.
   106  	Version pulumi.StringPtrInput `pulumi:"version"`
   107  }
   108  
   109  func (LookupIntentOutputArgs) ElementType() reflect.Type {
   110  	return reflect.TypeOf((*LookupIntentArgs)(nil)).Elem()
   111  }
   112  
   113  // A collection of values returned by getIntent.
   114  type LookupIntentResultOutput struct{ *pulumi.OutputState }
   115  
   116  func (LookupIntentResultOutput) ElementType() reflect.Type {
   117  	return reflect.TypeOf((*LookupIntentResult)(nil)).Elem()
   118  }
   119  
   120  func (o LookupIntentResultOutput) ToLookupIntentResultOutput() LookupIntentResultOutput {
   121  	return o
   122  }
   123  
   124  func (o LookupIntentResultOutput) ToLookupIntentResultOutputWithContext(ctx context.Context) LookupIntentResultOutput {
   125  	return o
   126  }
   127  
   128  // ARN of the Lex intent.
   129  func (o LookupIntentResultOutput) Arn() pulumi.StringOutput {
   130  	return o.ApplyT(func(v LookupIntentResult) string { return v.Arn }).(pulumi.StringOutput)
   131  }
   132  
   133  // Checksum identifying the version of the intent that was created. The checksum is not
   134  // included as an argument because the resource will add it automatically when updating the intent.
   135  func (o LookupIntentResultOutput) Checksum() pulumi.StringOutput {
   136  	return o.ApplyT(func(v LookupIntentResult) string { return v.Checksum }).(pulumi.StringOutput)
   137  }
   138  
   139  // Date when the intent version was created.
   140  func (o LookupIntentResultOutput) CreatedDate() pulumi.StringOutput {
   141  	return o.ApplyT(func(v LookupIntentResult) string { return v.CreatedDate }).(pulumi.StringOutput)
   142  }
   143  
   144  // Description of the intent.
   145  func (o LookupIntentResultOutput) Description() pulumi.StringOutput {
   146  	return o.ApplyT(func(v LookupIntentResult) string { return v.Description }).(pulumi.StringOutput)
   147  }
   148  
   149  // The provider-assigned unique ID for this managed resource.
   150  func (o LookupIntentResultOutput) Id() pulumi.StringOutput {
   151  	return o.ApplyT(func(v LookupIntentResult) string { return v.Id }).(pulumi.StringOutput)
   152  }
   153  
   154  // Date when the $LATEST version of this intent was updated.
   155  func (o LookupIntentResultOutput) LastUpdatedDate() pulumi.StringOutput {
   156  	return o.ApplyT(func(v LookupIntentResult) string { return v.LastUpdatedDate }).(pulumi.StringOutput)
   157  }
   158  
   159  // Name of the intent, not case sensitive.
   160  func (o LookupIntentResultOutput) Name() pulumi.StringOutput {
   161  	return o.ApplyT(func(v LookupIntentResult) string { return v.Name }).(pulumi.StringOutput)
   162  }
   163  
   164  // A unique identifier for the built-in intent to base this
   165  // intent on. To find the signature for an intent, see
   166  // [Standard Built-in Intents](https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/standard-intents)
   167  // in the Alexa Skills Kit.
   168  func (o LookupIntentResultOutput) ParentIntentSignature() pulumi.StringOutput {
   169  	return o.ApplyT(func(v LookupIntentResult) string { return v.ParentIntentSignature }).(pulumi.StringOutput)
   170  }
   171  
   172  // Version of the bot.
   173  func (o LookupIntentResultOutput) Version() pulumi.StringPtrOutput {
   174  	return o.ApplyT(func(v LookupIntentResult) *string { return v.Version }).(pulumi.StringPtrOutput)
   175  }
   176  
   177  func init() {
   178  	pulumi.RegisterOutputType(LookupIntentResultOutput{})
   179  }