github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/datapipeline/pipeline.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 a DataPipeline Pipeline resource. 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.NewPipeline(ctx, "default", &datapipeline.PipelineArgs{ 32 // Name: pulumi.String("tf-pipeline-default"), 33 // }) 34 // if err != nil { 35 // return err 36 // } 37 // return nil 38 // }) 39 // } 40 // 41 // ``` 42 // <!--End PulumiCodeChooser --> 43 // 44 // ## Import 45 // 46 // Using `pulumi import`, import `aws_datapipeline_pipeline` using the id (Pipeline ID). For example: 47 // 48 // ```sh 49 // $ pulumi import aws:datapipeline/pipeline:Pipeline default df-1234567890 50 // ``` 51 type Pipeline struct { 52 pulumi.CustomResourceState 53 54 // The description of Pipeline. 55 Description pulumi.StringPtrOutput `pulumi:"description"` 56 // The name of Pipeline. 57 Name pulumi.StringOutput `pulumi:"name"` 58 // A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 59 Tags pulumi.StringMapOutput `pulumi:"tags"` 60 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 61 // 62 // Deprecated: Please use `tags` instead. 63 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 64 } 65 66 // NewPipeline registers a new resource with the given unique name, arguments, and options. 67 func NewPipeline(ctx *pulumi.Context, 68 name string, args *PipelineArgs, opts ...pulumi.ResourceOption) (*Pipeline, error) { 69 if args == nil { 70 args = &PipelineArgs{} 71 } 72 73 opts = internal.PkgResourceDefaultOpts(opts) 74 var resource Pipeline 75 err := ctx.RegisterResource("aws:datapipeline/pipeline:Pipeline", name, args, &resource, opts...) 76 if err != nil { 77 return nil, err 78 } 79 return &resource, nil 80 } 81 82 // GetPipeline gets an existing Pipeline resource's state with the given name, ID, and optional 83 // state properties that are used to uniquely qualify the lookup (nil if not required). 84 func GetPipeline(ctx *pulumi.Context, 85 name string, id pulumi.IDInput, state *PipelineState, opts ...pulumi.ResourceOption) (*Pipeline, error) { 86 var resource Pipeline 87 err := ctx.ReadResource("aws:datapipeline/pipeline:Pipeline", name, id, state, &resource, opts...) 88 if err != nil { 89 return nil, err 90 } 91 return &resource, nil 92 } 93 94 // Input properties used for looking up and filtering Pipeline resources. 95 type pipelineState struct { 96 // The description of Pipeline. 97 Description *string `pulumi:"description"` 98 // The name of Pipeline. 99 Name *string `pulumi:"name"` 100 // A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 101 Tags map[string]string `pulumi:"tags"` 102 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 103 // 104 // Deprecated: Please use `tags` instead. 105 TagsAll map[string]string `pulumi:"tagsAll"` 106 } 107 108 type PipelineState struct { 109 // The description of Pipeline. 110 Description pulumi.StringPtrInput 111 // The name of Pipeline. 112 Name pulumi.StringPtrInput 113 // A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 114 Tags pulumi.StringMapInput 115 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 116 // 117 // Deprecated: Please use `tags` instead. 118 TagsAll pulumi.StringMapInput 119 } 120 121 func (PipelineState) ElementType() reflect.Type { 122 return reflect.TypeOf((*pipelineState)(nil)).Elem() 123 } 124 125 type pipelineArgs struct { 126 // The description of Pipeline. 127 Description *string `pulumi:"description"` 128 // The name of Pipeline. 129 Name *string `pulumi:"name"` 130 // A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 131 Tags map[string]string `pulumi:"tags"` 132 } 133 134 // The set of arguments for constructing a Pipeline resource. 135 type PipelineArgs struct { 136 // The description of Pipeline. 137 Description pulumi.StringPtrInput 138 // The name of Pipeline. 139 Name pulumi.StringPtrInput 140 // A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 141 Tags pulumi.StringMapInput 142 } 143 144 func (PipelineArgs) ElementType() reflect.Type { 145 return reflect.TypeOf((*pipelineArgs)(nil)).Elem() 146 } 147 148 type PipelineInput interface { 149 pulumi.Input 150 151 ToPipelineOutput() PipelineOutput 152 ToPipelineOutputWithContext(ctx context.Context) PipelineOutput 153 } 154 155 func (*Pipeline) ElementType() reflect.Type { 156 return reflect.TypeOf((**Pipeline)(nil)).Elem() 157 } 158 159 func (i *Pipeline) ToPipelineOutput() PipelineOutput { 160 return i.ToPipelineOutputWithContext(context.Background()) 161 } 162 163 func (i *Pipeline) ToPipelineOutputWithContext(ctx context.Context) PipelineOutput { 164 return pulumi.ToOutputWithContext(ctx, i).(PipelineOutput) 165 } 166 167 // PipelineArrayInput is an input type that accepts PipelineArray and PipelineArrayOutput values. 168 // You can construct a concrete instance of `PipelineArrayInput` via: 169 // 170 // PipelineArray{ PipelineArgs{...} } 171 type PipelineArrayInput interface { 172 pulumi.Input 173 174 ToPipelineArrayOutput() PipelineArrayOutput 175 ToPipelineArrayOutputWithContext(context.Context) PipelineArrayOutput 176 } 177 178 type PipelineArray []PipelineInput 179 180 func (PipelineArray) ElementType() reflect.Type { 181 return reflect.TypeOf((*[]*Pipeline)(nil)).Elem() 182 } 183 184 func (i PipelineArray) ToPipelineArrayOutput() PipelineArrayOutput { 185 return i.ToPipelineArrayOutputWithContext(context.Background()) 186 } 187 188 func (i PipelineArray) ToPipelineArrayOutputWithContext(ctx context.Context) PipelineArrayOutput { 189 return pulumi.ToOutputWithContext(ctx, i).(PipelineArrayOutput) 190 } 191 192 // PipelineMapInput is an input type that accepts PipelineMap and PipelineMapOutput values. 193 // You can construct a concrete instance of `PipelineMapInput` via: 194 // 195 // PipelineMap{ "key": PipelineArgs{...} } 196 type PipelineMapInput interface { 197 pulumi.Input 198 199 ToPipelineMapOutput() PipelineMapOutput 200 ToPipelineMapOutputWithContext(context.Context) PipelineMapOutput 201 } 202 203 type PipelineMap map[string]PipelineInput 204 205 func (PipelineMap) ElementType() reflect.Type { 206 return reflect.TypeOf((*map[string]*Pipeline)(nil)).Elem() 207 } 208 209 func (i PipelineMap) ToPipelineMapOutput() PipelineMapOutput { 210 return i.ToPipelineMapOutputWithContext(context.Background()) 211 } 212 213 func (i PipelineMap) ToPipelineMapOutputWithContext(ctx context.Context) PipelineMapOutput { 214 return pulumi.ToOutputWithContext(ctx, i).(PipelineMapOutput) 215 } 216 217 type PipelineOutput struct{ *pulumi.OutputState } 218 219 func (PipelineOutput) ElementType() reflect.Type { 220 return reflect.TypeOf((**Pipeline)(nil)).Elem() 221 } 222 223 func (o PipelineOutput) ToPipelineOutput() PipelineOutput { 224 return o 225 } 226 227 func (o PipelineOutput) ToPipelineOutputWithContext(ctx context.Context) PipelineOutput { 228 return o 229 } 230 231 // The description of Pipeline. 232 func (o PipelineOutput) Description() pulumi.StringPtrOutput { 233 return o.ApplyT(func(v *Pipeline) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) 234 } 235 236 // The name of Pipeline. 237 func (o PipelineOutput) Name() pulumi.StringOutput { 238 return o.ApplyT(func(v *Pipeline) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 239 } 240 241 // A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 242 func (o PipelineOutput) Tags() pulumi.StringMapOutput { 243 return o.ApplyT(func(v *Pipeline) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 244 } 245 246 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 247 // 248 // Deprecated: Please use `tags` instead. 249 func (o PipelineOutput) TagsAll() pulumi.StringMapOutput { 250 return o.ApplyT(func(v *Pipeline) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 251 } 252 253 type PipelineArrayOutput struct{ *pulumi.OutputState } 254 255 func (PipelineArrayOutput) ElementType() reflect.Type { 256 return reflect.TypeOf((*[]*Pipeline)(nil)).Elem() 257 } 258 259 func (o PipelineArrayOutput) ToPipelineArrayOutput() PipelineArrayOutput { 260 return o 261 } 262 263 func (o PipelineArrayOutput) ToPipelineArrayOutputWithContext(ctx context.Context) PipelineArrayOutput { 264 return o 265 } 266 267 func (o PipelineArrayOutput) Index(i pulumi.IntInput) PipelineOutput { 268 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Pipeline { 269 return vs[0].([]*Pipeline)[vs[1].(int)] 270 }).(PipelineOutput) 271 } 272 273 type PipelineMapOutput struct{ *pulumi.OutputState } 274 275 func (PipelineMapOutput) ElementType() reflect.Type { 276 return reflect.TypeOf((*map[string]*Pipeline)(nil)).Elem() 277 } 278 279 func (o PipelineMapOutput) ToPipelineMapOutput() PipelineMapOutput { 280 return o 281 } 282 283 func (o PipelineMapOutput) ToPipelineMapOutputWithContext(ctx context.Context) PipelineMapOutput { 284 return o 285 } 286 287 func (o PipelineMapOutput) MapIndex(k pulumi.StringInput) PipelineOutput { 288 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Pipeline { 289 return vs[0].(map[string]*Pipeline)[vs[1].(string)] 290 }).(PipelineOutput) 291 } 292 293 func init() { 294 pulumi.RegisterInputType(reflect.TypeOf((*PipelineInput)(nil)).Elem(), &Pipeline{}) 295 pulumi.RegisterInputType(reflect.TypeOf((*PipelineArrayInput)(nil)).Elem(), PipelineArray{}) 296 pulumi.RegisterInputType(reflect.TypeOf((*PipelineMapInput)(nil)).Elem(), PipelineMap{}) 297 pulumi.RegisterOutputType(PipelineOutput{}) 298 pulumi.RegisterOutputType(PipelineArrayOutput{}) 299 pulumi.RegisterOutputType(PipelineMapOutput{}) 300 }