github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/connect/getContactFlow.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. 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.LookupContactFlow(ctx, &connect.LookupContactFlowArgs{ 34 // InstanceId: "aaaaaaaa-bbbb-cccc-dddd-111111111111", 35 // Name: pulumi.StringRef("Test"), 36 // }, nil) 37 // if err != nil { 38 // return err 39 // } 40 // return nil 41 // }) 42 // } 43 // 44 // ``` 45 // <!--End PulumiCodeChooser --> 46 // 47 // # By contactFlowId 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.LookupContactFlow(ctx, &connect.LookupContactFlowArgs{ 63 // InstanceId: "aaaaaaaa-bbbb-cccc-dddd-111111111111", 64 // ContactFlowId: 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 LookupContactFlow(ctx *pulumi.Context, args *LookupContactFlowArgs, opts ...pulumi.InvokeOption) (*LookupContactFlowResult, error) { 76 opts = internal.PkgInvokeDefaultOpts(opts) 77 var rv LookupContactFlowResult 78 err := ctx.Invoke("aws:connect/getContactFlow:getContactFlow", 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 getContactFlow. 86 type LookupContactFlowArgs struct { 87 // Returns information on a specific Contact Flow by contact flow id 88 ContactFlowId *string `pulumi:"contactFlowId"` 89 // Reference to the hosting Amazon Connect Instance 90 InstanceId string `pulumi:"instanceId"` 91 // Returns information on a specific Contact Flow by name 92 Name *string `pulumi:"name"` 93 // Tags to assign to the Contact Flow. 94 Tags map[string]string `pulumi:"tags"` 95 // Type of Contact Flow. 96 Type *string `pulumi:"type"` 97 } 98 99 // A collection of values returned by getContactFlow. 100 type LookupContactFlowResult struct { 101 // ARN of the Contact Flow. 102 Arn string `pulumi:"arn"` 103 ContactFlowId string `pulumi:"contactFlowId"` 104 // Logic of the Contact Flow. 105 Content string `pulumi:"content"` 106 // Description of the Contact Flow. 107 Description string `pulumi:"description"` 108 // The provider-assigned unique ID for this managed resource. 109 Id string `pulumi:"id"` 110 InstanceId string `pulumi:"instanceId"` 111 Name string `pulumi:"name"` 112 // Tags to assign to the Contact Flow. 113 Tags map[string]string `pulumi:"tags"` 114 // Type of Contact Flow. 115 Type *string `pulumi:"type"` 116 } 117 118 func LookupContactFlowOutput(ctx *pulumi.Context, args LookupContactFlowOutputArgs, opts ...pulumi.InvokeOption) LookupContactFlowResultOutput { 119 return pulumi.ToOutputWithContext(context.Background(), args). 120 ApplyT(func(v interface{}) (LookupContactFlowResult, error) { 121 args := v.(LookupContactFlowArgs) 122 r, err := LookupContactFlow(ctx, &args, opts...) 123 var s LookupContactFlowResult 124 if r != nil { 125 s = *r 126 } 127 return s, err 128 }).(LookupContactFlowResultOutput) 129 } 130 131 // A collection of arguments for invoking getContactFlow. 132 type LookupContactFlowOutputArgs struct { 133 // Returns information on a specific Contact Flow by contact flow id 134 ContactFlowId pulumi.StringPtrInput `pulumi:"contactFlowId"` 135 // Reference to the hosting Amazon Connect Instance 136 InstanceId pulumi.StringInput `pulumi:"instanceId"` 137 // Returns information on a specific Contact Flow by name 138 Name pulumi.StringPtrInput `pulumi:"name"` 139 // Tags to assign to the Contact Flow. 140 Tags pulumi.StringMapInput `pulumi:"tags"` 141 // Type of Contact Flow. 142 Type pulumi.StringPtrInput `pulumi:"type"` 143 } 144 145 func (LookupContactFlowOutputArgs) ElementType() reflect.Type { 146 return reflect.TypeOf((*LookupContactFlowArgs)(nil)).Elem() 147 } 148 149 // A collection of values returned by getContactFlow. 150 type LookupContactFlowResultOutput struct{ *pulumi.OutputState } 151 152 func (LookupContactFlowResultOutput) ElementType() reflect.Type { 153 return reflect.TypeOf((*LookupContactFlowResult)(nil)).Elem() 154 } 155 156 func (o LookupContactFlowResultOutput) ToLookupContactFlowResultOutput() LookupContactFlowResultOutput { 157 return o 158 } 159 160 func (o LookupContactFlowResultOutput) ToLookupContactFlowResultOutputWithContext(ctx context.Context) LookupContactFlowResultOutput { 161 return o 162 } 163 164 // ARN of the Contact Flow. 165 func (o LookupContactFlowResultOutput) Arn() pulumi.StringOutput { 166 return o.ApplyT(func(v LookupContactFlowResult) string { return v.Arn }).(pulumi.StringOutput) 167 } 168 169 func (o LookupContactFlowResultOutput) ContactFlowId() pulumi.StringOutput { 170 return o.ApplyT(func(v LookupContactFlowResult) string { return v.ContactFlowId }).(pulumi.StringOutput) 171 } 172 173 // Logic of the Contact Flow. 174 func (o LookupContactFlowResultOutput) Content() pulumi.StringOutput { 175 return o.ApplyT(func(v LookupContactFlowResult) string { return v.Content }).(pulumi.StringOutput) 176 } 177 178 // Description of the Contact Flow. 179 func (o LookupContactFlowResultOutput) Description() pulumi.StringOutput { 180 return o.ApplyT(func(v LookupContactFlowResult) string { return v.Description }).(pulumi.StringOutput) 181 } 182 183 // The provider-assigned unique ID for this managed resource. 184 func (o LookupContactFlowResultOutput) Id() pulumi.StringOutput { 185 return o.ApplyT(func(v LookupContactFlowResult) string { return v.Id }).(pulumi.StringOutput) 186 } 187 188 func (o LookupContactFlowResultOutput) InstanceId() pulumi.StringOutput { 189 return o.ApplyT(func(v LookupContactFlowResult) string { return v.InstanceId }).(pulumi.StringOutput) 190 } 191 192 func (o LookupContactFlowResultOutput) Name() pulumi.StringOutput { 193 return o.ApplyT(func(v LookupContactFlowResult) string { return v.Name }).(pulumi.StringOutput) 194 } 195 196 // Tags to assign to the Contact Flow. 197 func (o LookupContactFlowResultOutput) Tags() pulumi.StringMapOutput { 198 return o.ApplyT(func(v LookupContactFlowResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) 199 } 200 201 // Type of Contact Flow. 202 func (o LookupContactFlowResultOutput) Type() pulumi.StringPtrOutput { 203 return o.ApplyT(func(v LookupContactFlowResult) *string { return v.Type }).(pulumi.StringPtrOutput) 204 } 205 206 func init() { 207 pulumi.RegisterOutputType(LookupContactFlowResultOutput{}) 208 }