github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/mediaconvert/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 mediaconvert 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 // Retrieve information about a AWS Elemental MediaConvert Queue. 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/mediaconvert" 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 := mediaconvert.LookupQueue(ctx, &mediaconvert.LookupQueueArgs{ 32 // Id: "tf-example-queue", 33 // }, nil) 34 // if err != nil { 35 // return err 36 // } 37 // return nil 38 // }) 39 // } 40 // 41 // ``` 42 // <!--End PulumiCodeChooser --> 43 func LookupQueue(ctx *pulumi.Context, args *LookupQueueArgs, opts ...pulumi.InvokeOption) (*LookupQueueResult, error) { 44 opts = internal.PkgInvokeDefaultOpts(opts) 45 var rv LookupQueueResult 46 err := ctx.Invoke("aws:mediaconvert/getQueue:getQueue", args, &rv, opts...) 47 if err != nil { 48 return nil, err 49 } 50 return &rv, nil 51 } 52 53 // A collection of arguments for invoking getQueue. 54 type LookupQueueArgs struct { 55 // Unique identifier of the queue. The same as `name`. 56 Id string `pulumi:"id"` 57 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 58 Tags map[string]string `pulumi:"tags"` 59 } 60 61 // A collection of values returned by getQueue. 62 type LookupQueueResult struct { 63 // The Arn of the queue. 64 Arn string `pulumi:"arn"` 65 Id string `pulumi:"id"` 66 // The same as `id`. 67 Name string `pulumi:"name"` 68 // The status of the queue. 69 Status string `pulumi:"status"` 70 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 71 Tags map[string]string `pulumi:"tags"` 72 } 73 74 func LookupQueueOutput(ctx *pulumi.Context, args LookupQueueOutputArgs, opts ...pulumi.InvokeOption) LookupQueueResultOutput { 75 return pulumi.ToOutputWithContext(context.Background(), args). 76 ApplyT(func(v interface{}) (LookupQueueResult, error) { 77 args := v.(LookupQueueArgs) 78 r, err := LookupQueue(ctx, &args, opts...) 79 var s LookupQueueResult 80 if r != nil { 81 s = *r 82 } 83 return s, err 84 }).(LookupQueueResultOutput) 85 } 86 87 // A collection of arguments for invoking getQueue. 88 type LookupQueueOutputArgs struct { 89 // Unique identifier of the queue. The same as `name`. 90 Id pulumi.StringInput `pulumi:"id"` 91 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 92 Tags pulumi.StringMapInput `pulumi:"tags"` 93 } 94 95 func (LookupQueueOutputArgs) ElementType() reflect.Type { 96 return reflect.TypeOf((*LookupQueueArgs)(nil)).Elem() 97 } 98 99 // A collection of values returned by getQueue. 100 type LookupQueueResultOutput struct{ *pulumi.OutputState } 101 102 func (LookupQueueResultOutput) ElementType() reflect.Type { 103 return reflect.TypeOf((*LookupQueueResult)(nil)).Elem() 104 } 105 106 func (o LookupQueueResultOutput) ToLookupQueueResultOutput() LookupQueueResultOutput { 107 return o 108 } 109 110 func (o LookupQueueResultOutput) ToLookupQueueResultOutputWithContext(ctx context.Context) LookupQueueResultOutput { 111 return o 112 } 113 114 // The Arn of the queue. 115 func (o LookupQueueResultOutput) Arn() pulumi.StringOutput { 116 return o.ApplyT(func(v LookupQueueResult) string { return v.Arn }).(pulumi.StringOutput) 117 } 118 119 func (o LookupQueueResultOutput) Id() pulumi.StringOutput { 120 return o.ApplyT(func(v LookupQueueResult) string { return v.Id }).(pulumi.StringOutput) 121 } 122 123 // The same as `id`. 124 func (o LookupQueueResultOutput) Name() pulumi.StringOutput { 125 return o.ApplyT(func(v LookupQueueResult) string { return v.Name }).(pulumi.StringOutput) 126 } 127 128 // The status of the queue. 129 func (o LookupQueueResultOutput) Status() pulumi.StringOutput { 130 return o.ApplyT(func(v LookupQueueResult) string { return v.Status }).(pulumi.StringOutput) 131 } 132 133 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 134 func (o LookupQueueResultOutput) Tags() pulumi.StringMapOutput { 135 return o.ApplyT(func(v LookupQueueResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) 136 } 137 138 func init() { 139 pulumi.RegisterOutputType(LookupQueueResultOutput{}) 140 }