github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/connect/getBotAssociation.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 connect
     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 Lex (V1) Bot associated with an Amazon Connect instance.
    15  //
    16  // ## Example Usage
    17  //
    18  // ### By name
    19  //
    20  // <!--Start PulumiCodeChooser -->
    21  // ```go
    22  // package main
    23  //
    24  // import (
    25  //
    26  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/connect"
    27  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    28  //
    29  // )
    30  //
    31  //	func main() {
    32  //		pulumi.Run(func(ctx *pulumi.Context) error {
    33  //			_, err := connect.LookupBotAssociation(ctx, &connect.LookupBotAssociationArgs{
    34  //				InstanceId: "aaaaaaaa-bbbb-cccc-dddd-111111111111",
    35  //				LexBot: connect.GetBotAssociationLexBot{
    36  //					Name: "Test",
    37  //				},
    38  //			}, nil)
    39  //			if err != nil {
    40  //				return err
    41  //			}
    42  //			return nil
    43  //		})
    44  //	}
    45  //
    46  // ```
    47  // <!--End PulumiCodeChooser -->
    48  func LookupBotAssociation(ctx *pulumi.Context, args *LookupBotAssociationArgs, opts ...pulumi.InvokeOption) (*LookupBotAssociationResult, error) {
    49  	opts = internal.PkgInvokeDefaultOpts(opts)
    50  	var rv LookupBotAssociationResult
    51  	err := ctx.Invoke("aws:connect/getBotAssociation:getBotAssociation", args, &rv, opts...)
    52  	if err != nil {
    53  		return nil, err
    54  	}
    55  	return &rv, nil
    56  }
    57  
    58  // A collection of arguments for invoking getBotAssociation.
    59  type LookupBotAssociationArgs struct {
    60  	// Identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
    61  	InstanceId string `pulumi:"instanceId"`
    62  	// Configuration information of an Amazon Lex (V1) bot. Detailed below.
    63  	LexBot GetBotAssociationLexBot `pulumi:"lexBot"`
    64  }
    65  
    66  // A collection of values returned by getBotAssociation.
    67  type LookupBotAssociationResult struct {
    68  	// The provider-assigned unique ID for this managed resource.
    69  	Id         string                  `pulumi:"id"`
    70  	InstanceId string                  `pulumi:"instanceId"`
    71  	LexBot     GetBotAssociationLexBot `pulumi:"lexBot"`
    72  }
    73  
    74  func LookupBotAssociationOutput(ctx *pulumi.Context, args LookupBotAssociationOutputArgs, opts ...pulumi.InvokeOption) LookupBotAssociationResultOutput {
    75  	return pulumi.ToOutputWithContext(context.Background(), args).
    76  		ApplyT(func(v interface{}) (LookupBotAssociationResult, error) {
    77  			args := v.(LookupBotAssociationArgs)
    78  			r, err := LookupBotAssociation(ctx, &args, opts...)
    79  			var s LookupBotAssociationResult
    80  			if r != nil {
    81  				s = *r
    82  			}
    83  			return s, err
    84  		}).(LookupBotAssociationResultOutput)
    85  }
    86  
    87  // A collection of arguments for invoking getBotAssociation.
    88  type LookupBotAssociationOutputArgs struct {
    89  	// Identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
    90  	InstanceId pulumi.StringInput `pulumi:"instanceId"`
    91  	// Configuration information of an Amazon Lex (V1) bot. Detailed below.
    92  	LexBot GetBotAssociationLexBotInput `pulumi:"lexBot"`
    93  }
    94  
    95  func (LookupBotAssociationOutputArgs) ElementType() reflect.Type {
    96  	return reflect.TypeOf((*LookupBotAssociationArgs)(nil)).Elem()
    97  }
    98  
    99  // A collection of values returned by getBotAssociation.
   100  type LookupBotAssociationResultOutput struct{ *pulumi.OutputState }
   101  
   102  func (LookupBotAssociationResultOutput) ElementType() reflect.Type {
   103  	return reflect.TypeOf((*LookupBotAssociationResult)(nil)).Elem()
   104  }
   105  
   106  func (o LookupBotAssociationResultOutput) ToLookupBotAssociationResultOutput() LookupBotAssociationResultOutput {
   107  	return o
   108  }
   109  
   110  func (o LookupBotAssociationResultOutput) ToLookupBotAssociationResultOutputWithContext(ctx context.Context) LookupBotAssociationResultOutput {
   111  	return o
   112  }
   113  
   114  // The provider-assigned unique ID for this managed resource.
   115  func (o LookupBotAssociationResultOutput) Id() pulumi.StringOutput {
   116  	return o.ApplyT(func(v LookupBotAssociationResult) string { return v.Id }).(pulumi.StringOutput)
   117  }
   118  
   119  func (o LookupBotAssociationResultOutput) InstanceId() pulumi.StringOutput {
   120  	return o.ApplyT(func(v LookupBotAssociationResult) string { return v.InstanceId }).(pulumi.StringOutput)
   121  }
   122  
   123  func (o LookupBotAssociationResultOutput) LexBot() GetBotAssociationLexBotOutput {
   124  	return o.ApplyT(func(v LookupBotAssociationResult) GetBotAssociationLexBot { return v.LexBot }).(GetBotAssociationLexBotOutput)
   125  }
   126  
   127  func init() {
   128  	pulumi.RegisterOutputType(LookupBotAssociationResultOutput{})
   129  }