github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/datapipeline/getPipeline.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 datapipeline 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 DataPipeline Pipeline. 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/datapipeline" 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 := datapipeline.LookupPipeline(ctx, &datapipeline.LookupPipelineArgs{ 32 // PipelineId: "pipelineID", 33 // }, nil) 34 // if err != nil { 35 // return err 36 // } 37 // return nil 38 // }) 39 // } 40 // 41 // ``` 42 // <!--End PulumiCodeChooser --> 43 func LookupPipeline(ctx *pulumi.Context, args *LookupPipelineArgs, opts ...pulumi.InvokeOption) (*LookupPipelineResult, error) { 44 opts = internal.PkgInvokeDefaultOpts(opts) 45 var rv LookupPipelineResult 46 err := ctx.Invoke("aws:datapipeline/getPipeline:getPipeline", 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 getPipeline. 54 type LookupPipelineArgs struct { 55 // ID of the pipeline. 56 PipelineId string `pulumi:"pipelineId"` 57 // Map of tags assigned to the resource. 58 Tags map[string]string `pulumi:"tags"` 59 } 60 61 // A collection of values returned by getPipeline. 62 type LookupPipelineResult struct { 63 // Description of Pipeline. 64 Description string `pulumi:"description"` 65 // The provider-assigned unique ID for this managed resource. 66 Id string `pulumi:"id"` 67 // Name of Pipeline. 68 Name string `pulumi:"name"` 69 PipelineId string `pulumi:"pipelineId"` 70 // Map of tags assigned to the resource. 71 Tags map[string]string `pulumi:"tags"` 72 } 73 74 func LookupPipelineOutput(ctx *pulumi.Context, args LookupPipelineOutputArgs, opts ...pulumi.InvokeOption) LookupPipelineResultOutput { 75 return pulumi.ToOutputWithContext(context.Background(), args). 76 ApplyT(func(v interface{}) (LookupPipelineResult, error) { 77 args := v.(LookupPipelineArgs) 78 r, err := LookupPipeline(ctx, &args, opts...) 79 var s LookupPipelineResult 80 if r != nil { 81 s = *r 82 } 83 return s, err 84 }).(LookupPipelineResultOutput) 85 } 86 87 // A collection of arguments for invoking getPipeline. 88 type LookupPipelineOutputArgs struct { 89 // ID of the pipeline. 90 PipelineId pulumi.StringInput `pulumi:"pipelineId"` 91 // Map of tags assigned to the resource. 92 Tags pulumi.StringMapInput `pulumi:"tags"` 93 } 94 95 func (LookupPipelineOutputArgs) ElementType() reflect.Type { 96 return reflect.TypeOf((*LookupPipelineArgs)(nil)).Elem() 97 } 98 99 // A collection of values returned by getPipeline. 100 type LookupPipelineResultOutput struct{ *pulumi.OutputState } 101 102 func (LookupPipelineResultOutput) ElementType() reflect.Type { 103 return reflect.TypeOf((*LookupPipelineResult)(nil)).Elem() 104 } 105 106 func (o LookupPipelineResultOutput) ToLookupPipelineResultOutput() LookupPipelineResultOutput { 107 return o 108 } 109 110 func (o LookupPipelineResultOutput) ToLookupPipelineResultOutputWithContext(ctx context.Context) LookupPipelineResultOutput { 111 return o 112 } 113 114 // Description of Pipeline. 115 func (o LookupPipelineResultOutput) Description() pulumi.StringOutput { 116 return o.ApplyT(func(v LookupPipelineResult) string { return v.Description }).(pulumi.StringOutput) 117 } 118 119 // The provider-assigned unique ID for this managed resource. 120 func (o LookupPipelineResultOutput) Id() pulumi.StringOutput { 121 return o.ApplyT(func(v LookupPipelineResult) string { return v.Id }).(pulumi.StringOutput) 122 } 123 124 // Name of Pipeline. 125 func (o LookupPipelineResultOutput) Name() pulumi.StringOutput { 126 return o.ApplyT(func(v LookupPipelineResult) string { return v.Name }).(pulumi.StringOutput) 127 } 128 129 func (o LookupPipelineResultOutput) PipelineId() pulumi.StringOutput { 130 return o.ApplyT(func(v LookupPipelineResult) string { return v.PipelineId }).(pulumi.StringOutput) 131 } 132 133 // Map of tags assigned to the resource. 134 func (o LookupPipelineResultOutput) Tags() pulumi.StringMapOutput { 135 return o.ApplyT(func(v LookupPipelineResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) 136 } 137 138 func init() { 139 pulumi.RegisterOutputType(LookupPipelineResultOutput{}) 140 }