github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/connect/getQueue.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 Queue. 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.LookupQueue(ctx, &connect.LookupQueueArgs{ 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 `queueId` 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.LookupQueue(ctx, &connect.LookupQueueArgs{ 63 // InstanceId: "aaaaaaaa-bbbb-cccc-dddd-111111111111", 64 // QueueId: 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 LookupQueue(ctx *pulumi.Context, args *LookupQueueArgs, opts ...pulumi.InvokeOption) (*LookupQueueResult, error) { 76 opts = internal.PkgInvokeDefaultOpts(opts) 77 var rv LookupQueueResult 78 err := ctx.Invoke("aws:connect/getQueue:getQueue", 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 getQueue. 86 type LookupQueueArgs struct { 87 // Reference to the hosting Amazon Connect Instance 88 InstanceId string `pulumi:"instanceId"` 89 // Returns information on a specific Queue by name 90 Name *string `pulumi:"name"` 91 // Returns information on a specific Queue by Queue id 92 QueueId *string `pulumi:"queueId"` 93 // Map of tags assigned to the Queue. 94 Tags map[string]string `pulumi:"tags"` 95 } 96 97 // A collection of values returned by getQueue. 98 type LookupQueueResult struct { 99 // ARN of the Queue. 100 Arn string `pulumi:"arn"` 101 // Description of the Queue. 102 Description string `pulumi:"description"` 103 // Specifies the identifier of the Hours of Operation. 104 HoursOfOperationId string `pulumi:"hoursOfOperationId"` 105 // The provider-assigned unique ID for this managed resource. 106 Id string `pulumi:"id"` 107 InstanceId string `pulumi:"instanceId"` 108 // Maximum number of contacts that can be in the queue before it is considered full. Minimum value of 0. 109 MaxContacts int `pulumi:"maxContacts"` 110 Name string `pulumi:"name"` 111 // A block that defines the outbound caller ID name, number, and outbound whisper flow. The Outbound Caller Config block is documented below. 112 OutboundCallerConfigs []GetQueueOutboundCallerConfig `pulumi:"outboundCallerConfigs"` 113 // Identifier for the Queue. 114 QueueId string `pulumi:"queueId"` 115 // Description of the Queue. Values are `ENABLED` or `DISABLED`. 116 Status string `pulumi:"status"` 117 // Map of tags assigned to the Queue. 118 Tags map[string]string `pulumi:"tags"` 119 } 120 121 func LookupQueueOutput(ctx *pulumi.Context, args LookupQueueOutputArgs, opts ...pulumi.InvokeOption) LookupQueueResultOutput { 122 return pulumi.ToOutputWithContext(context.Background(), args). 123 ApplyT(func(v interface{}) (LookupQueueResult, error) { 124 args := v.(LookupQueueArgs) 125 r, err := LookupQueue(ctx, &args, opts...) 126 var s LookupQueueResult 127 if r != nil { 128 s = *r 129 } 130 return s, err 131 }).(LookupQueueResultOutput) 132 } 133 134 // A collection of arguments for invoking getQueue. 135 type LookupQueueOutputArgs struct { 136 // Reference to the hosting Amazon Connect Instance 137 InstanceId pulumi.StringInput `pulumi:"instanceId"` 138 // Returns information on a specific Queue by name 139 Name pulumi.StringPtrInput `pulumi:"name"` 140 // Returns information on a specific Queue by Queue id 141 QueueId pulumi.StringPtrInput `pulumi:"queueId"` 142 // Map of tags assigned to the Queue. 143 Tags pulumi.StringMapInput `pulumi:"tags"` 144 } 145 146 func (LookupQueueOutputArgs) ElementType() reflect.Type { 147 return reflect.TypeOf((*LookupQueueArgs)(nil)).Elem() 148 } 149 150 // A collection of values returned by getQueue. 151 type LookupQueueResultOutput struct{ *pulumi.OutputState } 152 153 func (LookupQueueResultOutput) ElementType() reflect.Type { 154 return reflect.TypeOf((*LookupQueueResult)(nil)).Elem() 155 } 156 157 func (o LookupQueueResultOutput) ToLookupQueueResultOutput() LookupQueueResultOutput { 158 return o 159 } 160 161 func (o LookupQueueResultOutput) ToLookupQueueResultOutputWithContext(ctx context.Context) LookupQueueResultOutput { 162 return o 163 } 164 165 // ARN of the Queue. 166 func (o LookupQueueResultOutput) Arn() pulumi.StringOutput { 167 return o.ApplyT(func(v LookupQueueResult) string { return v.Arn }).(pulumi.StringOutput) 168 } 169 170 // Description of the Queue. 171 func (o LookupQueueResultOutput) Description() pulumi.StringOutput { 172 return o.ApplyT(func(v LookupQueueResult) string { return v.Description }).(pulumi.StringOutput) 173 } 174 175 // Specifies the identifier of the Hours of Operation. 176 func (o LookupQueueResultOutput) HoursOfOperationId() pulumi.StringOutput { 177 return o.ApplyT(func(v LookupQueueResult) string { return v.HoursOfOperationId }).(pulumi.StringOutput) 178 } 179 180 // The provider-assigned unique ID for this managed resource. 181 func (o LookupQueueResultOutput) Id() pulumi.StringOutput { 182 return o.ApplyT(func(v LookupQueueResult) string { return v.Id }).(pulumi.StringOutput) 183 } 184 185 func (o LookupQueueResultOutput) InstanceId() pulumi.StringOutput { 186 return o.ApplyT(func(v LookupQueueResult) string { return v.InstanceId }).(pulumi.StringOutput) 187 } 188 189 // Maximum number of contacts that can be in the queue before it is considered full. Minimum value of 0. 190 func (o LookupQueueResultOutput) MaxContacts() pulumi.IntOutput { 191 return o.ApplyT(func(v LookupQueueResult) int { return v.MaxContacts }).(pulumi.IntOutput) 192 } 193 194 func (o LookupQueueResultOutput) Name() pulumi.StringOutput { 195 return o.ApplyT(func(v LookupQueueResult) string { return v.Name }).(pulumi.StringOutput) 196 } 197 198 // A block that defines the outbound caller ID name, number, and outbound whisper flow. The Outbound Caller Config block is documented below. 199 func (o LookupQueueResultOutput) OutboundCallerConfigs() GetQueueOutboundCallerConfigArrayOutput { 200 return o.ApplyT(func(v LookupQueueResult) []GetQueueOutboundCallerConfig { return v.OutboundCallerConfigs }).(GetQueueOutboundCallerConfigArrayOutput) 201 } 202 203 // Identifier for the Queue. 204 func (o LookupQueueResultOutput) QueueId() pulumi.StringOutput { 205 return o.ApplyT(func(v LookupQueueResult) string { return v.QueueId }).(pulumi.StringOutput) 206 } 207 208 // Description of the Queue. Values are `ENABLED` or `DISABLED`. 209 func (o LookupQueueResultOutput) Status() pulumi.StringOutput { 210 return o.ApplyT(func(v LookupQueueResult) string { return v.Status }).(pulumi.StringOutput) 211 } 212 213 // Map of tags assigned to the Queue. 214 func (o LookupQueueResultOutput) Tags() pulumi.StringMapOutput { 215 return o.ApplyT(func(v LookupQueueResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) 216 } 217 218 func init() { 219 pulumi.RegisterOutputType(LookupQueueResultOutput{}) 220 }