github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/connect/getContactFlowModule.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 Amazon Connect Contact Flow Module.
    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.LookupContactFlowModule(ctx, &connect.LookupContactFlowModuleArgs{
    34  //				InstanceId: "aaaaaaaa-bbbb-cccc-dddd-111111111111",
    35  //				Name:       pulumi.StringRef("example"),
    36  //			}, nil)
    37  //			if err != nil {
    38  //				return err
    39  //			}
    40  //			return nil
    41  //		})
    42  //	}
    43  //
    44  // ```
    45  // <!--End PulumiCodeChooser -->
    46  //
    47  // By `contactFlowModuleId`
    48  //
    49  // <!--Start PulumiCodeChooser -->
    50  // ```go
    51  // package main
    52  //
    53  // import (
    54  //
    55  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/connect"
    56  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    57  //
    58  // )
    59  //
    60  //	func main() {
    61  //		pulumi.Run(func(ctx *pulumi.Context) error {
    62  //			_, err := connect.LookupContactFlowModule(ctx, &connect.LookupContactFlowModuleArgs{
    63  //				InstanceId:          "aaaaaaaa-bbbb-cccc-dddd-111111111111",
    64  //				ContactFlowModuleId: pulumi.StringRef("cccccccc-bbbb-cccc-dddd-111111111111"),
    65  //			}, nil)
    66  //			if err != nil {
    67  //				return err
    68  //			}
    69  //			return nil
    70  //		})
    71  //	}
    72  //
    73  // ```
    74  // <!--End PulumiCodeChooser -->
    75  func LookupContactFlowModule(ctx *pulumi.Context, args *LookupContactFlowModuleArgs, opts ...pulumi.InvokeOption) (*LookupContactFlowModuleResult, error) {
    76  	opts = internal.PkgInvokeDefaultOpts(opts)
    77  	var rv LookupContactFlowModuleResult
    78  	err := ctx.Invoke("aws:connect/getContactFlowModule:getContactFlowModule", args, &rv, opts...)
    79  	if err != nil {
    80  		return nil, err
    81  	}
    82  	return &rv, nil
    83  }
    84  
    85  // A collection of arguments for invoking getContactFlowModule.
    86  type LookupContactFlowModuleArgs struct {
    87  	// Returns information on a specific Contact Flow Module by contact flow module id
    88  	ContactFlowModuleId *string `pulumi:"contactFlowModuleId"`
    89  	// Reference to the hosting Amazon Connect Instance
    90  	InstanceId string `pulumi:"instanceId"`
    91  	// Returns information on a specific Contact Flow Module by name
    92  	Name *string `pulumi:"name"`
    93  	// Map of tags to assign to the Contact Flow Module.
    94  	Tags map[string]string `pulumi:"tags"`
    95  }
    96  
    97  // A collection of values returned by getContactFlowModule.
    98  type LookupContactFlowModuleResult struct {
    99  	// ARN of the Contact Flow Module.
   100  	Arn                 string `pulumi:"arn"`
   101  	ContactFlowModuleId string `pulumi:"contactFlowModuleId"`
   102  	// Logic of the Contact Flow Module.
   103  	Content string `pulumi:"content"`
   104  	// Description of the Contact Flow Module.
   105  	Description string `pulumi:"description"`
   106  	// The provider-assigned unique ID for this managed resource.
   107  	Id         string `pulumi:"id"`
   108  	InstanceId string `pulumi:"instanceId"`
   109  	Name       string `pulumi:"name"`
   110  	// Type of Contact Flow Module Module. Values are either `ACTIVE` or `ARCHIVED`.
   111  	State string `pulumi:"state"`
   112  	// Status of the Contact Flow Module Module. Values are either `PUBLISHED` or `SAVED`.
   113  	Status string `pulumi:"status"`
   114  	// Map of tags to assign to the Contact Flow Module.
   115  	Tags map[string]string `pulumi:"tags"`
   116  }
   117  
   118  func LookupContactFlowModuleOutput(ctx *pulumi.Context, args LookupContactFlowModuleOutputArgs, opts ...pulumi.InvokeOption) LookupContactFlowModuleResultOutput {
   119  	return pulumi.ToOutputWithContext(context.Background(), args).
   120  		ApplyT(func(v interface{}) (LookupContactFlowModuleResult, error) {
   121  			args := v.(LookupContactFlowModuleArgs)
   122  			r, err := LookupContactFlowModule(ctx, &args, opts...)
   123  			var s LookupContactFlowModuleResult
   124  			if r != nil {
   125  				s = *r
   126  			}
   127  			return s, err
   128  		}).(LookupContactFlowModuleResultOutput)
   129  }
   130  
   131  // A collection of arguments for invoking getContactFlowModule.
   132  type LookupContactFlowModuleOutputArgs struct {
   133  	// Returns information on a specific Contact Flow Module by contact flow module id
   134  	ContactFlowModuleId pulumi.StringPtrInput `pulumi:"contactFlowModuleId"`
   135  	// Reference to the hosting Amazon Connect Instance
   136  	InstanceId pulumi.StringInput `pulumi:"instanceId"`
   137  	// Returns information on a specific Contact Flow Module by name
   138  	Name pulumi.StringPtrInput `pulumi:"name"`
   139  	// Map of tags to assign to the Contact Flow Module.
   140  	Tags pulumi.StringMapInput `pulumi:"tags"`
   141  }
   142  
   143  func (LookupContactFlowModuleOutputArgs) ElementType() reflect.Type {
   144  	return reflect.TypeOf((*LookupContactFlowModuleArgs)(nil)).Elem()
   145  }
   146  
   147  // A collection of values returned by getContactFlowModule.
   148  type LookupContactFlowModuleResultOutput struct{ *pulumi.OutputState }
   149  
   150  func (LookupContactFlowModuleResultOutput) ElementType() reflect.Type {
   151  	return reflect.TypeOf((*LookupContactFlowModuleResult)(nil)).Elem()
   152  }
   153  
   154  func (o LookupContactFlowModuleResultOutput) ToLookupContactFlowModuleResultOutput() LookupContactFlowModuleResultOutput {
   155  	return o
   156  }
   157  
   158  func (o LookupContactFlowModuleResultOutput) ToLookupContactFlowModuleResultOutputWithContext(ctx context.Context) LookupContactFlowModuleResultOutput {
   159  	return o
   160  }
   161  
   162  // ARN of the Contact Flow Module.
   163  func (o LookupContactFlowModuleResultOutput) Arn() pulumi.StringOutput {
   164  	return o.ApplyT(func(v LookupContactFlowModuleResult) string { return v.Arn }).(pulumi.StringOutput)
   165  }
   166  
   167  func (o LookupContactFlowModuleResultOutput) ContactFlowModuleId() pulumi.StringOutput {
   168  	return o.ApplyT(func(v LookupContactFlowModuleResult) string { return v.ContactFlowModuleId }).(pulumi.StringOutput)
   169  }
   170  
   171  // Logic of the Contact Flow Module.
   172  func (o LookupContactFlowModuleResultOutput) Content() pulumi.StringOutput {
   173  	return o.ApplyT(func(v LookupContactFlowModuleResult) string { return v.Content }).(pulumi.StringOutput)
   174  }
   175  
   176  // Description of the Contact Flow Module.
   177  func (o LookupContactFlowModuleResultOutput) Description() pulumi.StringOutput {
   178  	return o.ApplyT(func(v LookupContactFlowModuleResult) string { return v.Description }).(pulumi.StringOutput)
   179  }
   180  
   181  // The provider-assigned unique ID for this managed resource.
   182  func (o LookupContactFlowModuleResultOutput) Id() pulumi.StringOutput {
   183  	return o.ApplyT(func(v LookupContactFlowModuleResult) string { return v.Id }).(pulumi.StringOutput)
   184  }
   185  
   186  func (o LookupContactFlowModuleResultOutput) InstanceId() pulumi.StringOutput {
   187  	return o.ApplyT(func(v LookupContactFlowModuleResult) string { return v.InstanceId }).(pulumi.StringOutput)
   188  }
   189  
   190  func (o LookupContactFlowModuleResultOutput) Name() pulumi.StringOutput {
   191  	return o.ApplyT(func(v LookupContactFlowModuleResult) string { return v.Name }).(pulumi.StringOutput)
   192  }
   193  
   194  // Type of Contact Flow Module Module. Values are either `ACTIVE` or `ARCHIVED`.
   195  func (o LookupContactFlowModuleResultOutput) State() pulumi.StringOutput {
   196  	return o.ApplyT(func(v LookupContactFlowModuleResult) string { return v.State }).(pulumi.StringOutput)
   197  }
   198  
   199  // Status of the Contact Flow Module Module. Values are either `PUBLISHED` or `SAVED`.
   200  func (o LookupContactFlowModuleResultOutput) Status() pulumi.StringOutput {
   201  	return o.ApplyT(func(v LookupContactFlowModuleResult) string { return v.Status }).(pulumi.StringOutput)
   202  }
   203  
   204  // Map of tags to assign to the Contact Flow Module.
   205  func (o LookupContactFlowModuleResultOutput) Tags() pulumi.StringMapOutput {
   206  	return o.ApplyT(func(v LookupContactFlowModuleResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
   207  }
   208  
   209  func init() {
   210  	pulumi.RegisterOutputType(LookupContactFlowModuleResultOutput{})
   211  }