github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/appflow/flow.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 appflow 5 6 import ( 7 "context" 8 "reflect" 9 10 "errors" 11 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 12 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 13 ) 14 15 // Provides an AppFlow flow resource. 16 // 17 // ## Example Usage 18 // 19 // <!--Start PulumiCodeChooser --> 20 // ```go 21 // package main 22 // 23 // import ( 24 // 25 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appflow" 26 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam" 27 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3" 28 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 29 // 30 // ) 31 // 32 // func main() { 33 // pulumi.Run(func(ctx *pulumi.Context) error { 34 // exampleSourceBucketV2, err := s3.NewBucketV2(ctx, "example_source", &s3.BucketV2Args{ 35 // Bucket: pulumi.String("example-source"), 36 // }) 37 // if err != nil { 38 // return err 39 // } 40 // exampleSource, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{ 41 // Statements: []iam.GetPolicyDocumentStatement{ 42 // { 43 // Sid: pulumi.StringRef("AllowAppFlowSourceActions"), 44 // Effect: pulumi.StringRef("Allow"), 45 // Principals: []iam.GetPolicyDocumentStatementPrincipal{ 46 // { 47 // Type: "Service", 48 // Identifiers: []string{ 49 // "appflow.amazonaws.com", 50 // }, 51 // }, 52 // }, 53 // Actions: []string{ 54 // "s3:ListBucket", 55 // "s3:GetObject", 56 // }, 57 // Resources: []string{ 58 // "arn:aws:s3:::example-source", 59 // "arn:aws:s3:::example-source/*", 60 // }, 61 // }, 62 // }, 63 // }, nil) 64 // if err != nil { 65 // return err 66 // } 67 // exampleSourceBucketPolicy, err := s3.NewBucketPolicy(ctx, "example_source", &s3.BucketPolicyArgs{ 68 // Bucket: exampleSourceBucketV2.ID(), 69 // Policy: pulumi.String(exampleSource.Json), 70 // }) 71 // if err != nil { 72 // return err 73 // } 74 // _, err = s3.NewBucketObjectv2(ctx, "example", &s3.BucketObjectv2Args{ 75 // Bucket: exampleSourceBucketV2.ID(), 76 // Key: pulumi.String("example_source.csv"), 77 // Source: pulumi.NewFileAsset("example_source.csv"), 78 // }) 79 // if err != nil { 80 // return err 81 // } 82 // exampleDestinationBucketV2, err := s3.NewBucketV2(ctx, "example_destination", &s3.BucketV2Args{ 83 // Bucket: pulumi.String("example-destination"), 84 // }) 85 // if err != nil { 86 // return err 87 // } 88 // exampleDestination, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{ 89 // Statements: []iam.GetPolicyDocumentStatement{ 90 // { 91 // Sid: pulumi.StringRef("AllowAppFlowDestinationActions"), 92 // Effect: pulumi.StringRef("Allow"), 93 // Principals: []iam.GetPolicyDocumentStatementPrincipal{ 94 // { 95 // Type: "Service", 96 // Identifiers: []string{ 97 // "appflow.amazonaws.com", 98 // }, 99 // }, 100 // }, 101 // Actions: []string{ 102 // "s3:PutObject", 103 // "s3:AbortMultipartUpload", 104 // "s3:ListMultipartUploadParts", 105 // "s3:ListBucketMultipartUploads", 106 // "s3:GetBucketAcl", 107 // "s3:PutObjectAcl", 108 // }, 109 // Resources: []string{ 110 // "arn:aws:s3:::example-destination", 111 // "arn:aws:s3:::example-destination/*", 112 // }, 113 // }, 114 // }, 115 // }, nil) 116 // if err != nil { 117 // return err 118 // } 119 // exampleDestinationBucketPolicy, err := s3.NewBucketPolicy(ctx, "example_destination", &s3.BucketPolicyArgs{ 120 // Bucket: exampleDestinationBucketV2.ID(), 121 // Policy: pulumi.String(exampleDestination.Json), 122 // }) 123 // if err != nil { 124 // return err 125 // } 126 // _, err = appflow.NewFlow(ctx, "example", &appflow.FlowArgs{ 127 // Name: pulumi.String("example"), 128 // SourceFlowConfig: &appflow.FlowSourceFlowConfigArgs{ 129 // ConnectorType: pulumi.String("S3"), 130 // SourceConnectorProperties: &appflow.FlowSourceFlowConfigSourceConnectorPropertiesArgs{ 131 // S3: &appflow.FlowSourceFlowConfigSourceConnectorPropertiesS3Args{ 132 // BucketName: exampleSourceBucketPolicy.Bucket, 133 // BucketPrefix: pulumi.String("example"), 134 // }, 135 // }, 136 // }, 137 // DestinationFlowConfigs: appflow.FlowDestinationFlowConfigArray{ 138 // &appflow.FlowDestinationFlowConfigArgs{ 139 // ConnectorType: pulumi.String("S3"), 140 // DestinationConnectorProperties: &appflow.FlowDestinationFlowConfigDestinationConnectorPropertiesArgs{ 141 // S3: &appflow.FlowDestinationFlowConfigDestinationConnectorPropertiesS3Args{ 142 // BucketName: exampleDestinationBucketPolicy.Bucket, 143 // S3OutputFormatConfig: &appflow.FlowDestinationFlowConfigDestinationConnectorPropertiesS3S3OutputFormatConfigArgs{ 144 // PrefixConfig: &appflow.FlowDestinationFlowConfigDestinationConnectorPropertiesS3S3OutputFormatConfigPrefixConfigArgs{ 145 // PrefixType: pulumi.String("PATH"), 146 // }, 147 // }, 148 // }, 149 // }, 150 // }, 151 // }, 152 // Tasks: appflow.FlowTaskArray{ 153 // &appflow.FlowTaskArgs{ 154 // SourceFields: pulumi.StringArray{ 155 // pulumi.String("exampleField"), 156 // }, 157 // DestinationField: pulumi.String("exampleField"), 158 // TaskType: pulumi.String("Map"), 159 // ConnectorOperators: appflow.FlowTaskConnectorOperatorArray{ 160 // &appflow.FlowTaskConnectorOperatorArgs{ 161 // S3: pulumi.String("NO_OP"), 162 // }, 163 // }, 164 // }, 165 // }, 166 // TriggerConfig: &appflow.FlowTriggerConfigArgs{ 167 // TriggerType: pulumi.String("OnDemand"), 168 // }, 169 // }) 170 // if err != nil { 171 // return err 172 // } 173 // return nil 174 // }) 175 // } 176 // 177 // ``` 178 // <!--End PulumiCodeChooser --> 179 // 180 // ## Import 181 // 182 // Using `pulumi import`, import AppFlow flows using the `arn`. For example: 183 // 184 // ```sh 185 // $ pulumi import aws:appflow/flow:Flow example arn:aws:appflow:us-west-2:123456789012:flow/example-flow 186 // ``` 187 type Flow struct { 188 pulumi.CustomResourceState 189 190 // Flow's ARN. 191 Arn pulumi.StringOutput `pulumi:"arn"` 192 // Description of the flow you want to create. 193 Description pulumi.StringPtrOutput `pulumi:"description"` 194 // A Destination Flow Config that controls how Amazon AppFlow places data in the destination connector. 195 DestinationFlowConfigs FlowDestinationFlowConfigArrayOutput `pulumi:"destinationFlowConfigs"` 196 // The current status of the flow. 197 FlowStatus pulumi.StringOutput `pulumi:"flowStatus"` 198 // ARN (Amazon Resource Name) of the Key Management Service (KMS) key you provide for encryption. This is required if you do not want to use the Amazon AppFlow-managed KMS key. If you don't provide anything here, Amazon AppFlow uses the Amazon AppFlow-managed KMS key. 199 KmsArn pulumi.StringOutput `pulumi:"kmsArn"` 200 // Name of the flow. 201 Name pulumi.StringOutput `pulumi:"name"` 202 // The Source Flow Config that controls how Amazon AppFlow retrieves data from the source connector. 203 SourceFlowConfig FlowSourceFlowConfigOutput `pulumi:"sourceFlowConfig"` 204 // Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 205 Tags pulumi.StringMapOutput `pulumi:"tags"` 206 // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 207 // 208 // Deprecated: Please use `tags` instead. 209 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 210 // A Task that Amazon AppFlow performs while transferring the data in the flow run. 211 Tasks FlowTaskArrayOutput `pulumi:"tasks"` 212 // A Trigger that determine how and when the flow runs. 213 TriggerConfig FlowTriggerConfigOutput `pulumi:"triggerConfig"` 214 } 215 216 // NewFlow registers a new resource with the given unique name, arguments, and options. 217 func NewFlow(ctx *pulumi.Context, 218 name string, args *FlowArgs, opts ...pulumi.ResourceOption) (*Flow, error) { 219 if args == nil { 220 return nil, errors.New("missing one or more required arguments") 221 } 222 223 if args.DestinationFlowConfigs == nil { 224 return nil, errors.New("invalid value for required argument 'DestinationFlowConfigs'") 225 } 226 if args.SourceFlowConfig == nil { 227 return nil, errors.New("invalid value for required argument 'SourceFlowConfig'") 228 } 229 if args.Tasks == nil { 230 return nil, errors.New("invalid value for required argument 'Tasks'") 231 } 232 if args.TriggerConfig == nil { 233 return nil, errors.New("invalid value for required argument 'TriggerConfig'") 234 } 235 opts = internal.PkgResourceDefaultOpts(opts) 236 var resource Flow 237 err := ctx.RegisterResource("aws:appflow/flow:Flow", name, args, &resource, opts...) 238 if err != nil { 239 return nil, err 240 } 241 return &resource, nil 242 } 243 244 // GetFlow gets an existing Flow resource's state with the given name, ID, and optional 245 // state properties that are used to uniquely qualify the lookup (nil if not required). 246 func GetFlow(ctx *pulumi.Context, 247 name string, id pulumi.IDInput, state *FlowState, opts ...pulumi.ResourceOption) (*Flow, error) { 248 var resource Flow 249 err := ctx.ReadResource("aws:appflow/flow:Flow", name, id, state, &resource, opts...) 250 if err != nil { 251 return nil, err 252 } 253 return &resource, nil 254 } 255 256 // Input properties used for looking up and filtering Flow resources. 257 type flowState struct { 258 // Flow's ARN. 259 Arn *string `pulumi:"arn"` 260 // Description of the flow you want to create. 261 Description *string `pulumi:"description"` 262 // A Destination Flow Config that controls how Amazon AppFlow places data in the destination connector. 263 DestinationFlowConfigs []FlowDestinationFlowConfig `pulumi:"destinationFlowConfigs"` 264 // The current status of the flow. 265 FlowStatus *string `pulumi:"flowStatus"` 266 // ARN (Amazon Resource Name) of the Key Management Service (KMS) key you provide for encryption. This is required if you do not want to use the Amazon AppFlow-managed KMS key. If you don't provide anything here, Amazon AppFlow uses the Amazon AppFlow-managed KMS key. 267 KmsArn *string `pulumi:"kmsArn"` 268 // Name of the flow. 269 Name *string `pulumi:"name"` 270 // The Source Flow Config that controls how Amazon AppFlow retrieves data from the source connector. 271 SourceFlowConfig *FlowSourceFlowConfig `pulumi:"sourceFlowConfig"` 272 // Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 273 Tags map[string]string `pulumi:"tags"` 274 // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 275 // 276 // Deprecated: Please use `tags` instead. 277 TagsAll map[string]string `pulumi:"tagsAll"` 278 // A Task that Amazon AppFlow performs while transferring the data in the flow run. 279 Tasks []FlowTask `pulumi:"tasks"` 280 // A Trigger that determine how and when the flow runs. 281 TriggerConfig *FlowTriggerConfig `pulumi:"triggerConfig"` 282 } 283 284 type FlowState struct { 285 // Flow's ARN. 286 Arn pulumi.StringPtrInput 287 // Description of the flow you want to create. 288 Description pulumi.StringPtrInput 289 // A Destination Flow Config that controls how Amazon AppFlow places data in the destination connector. 290 DestinationFlowConfigs FlowDestinationFlowConfigArrayInput 291 // The current status of the flow. 292 FlowStatus pulumi.StringPtrInput 293 // ARN (Amazon Resource Name) of the Key Management Service (KMS) key you provide for encryption. This is required if you do not want to use the Amazon AppFlow-managed KMS key. If you don't provide anything here, Amazon AppFlow uses the Amazon AppFlow-managed KMS key. 294 KmsArn pulumi.StringPtrInput 295 // Name of the flow. 296 Name pulumi.StringPtrInput 297 // The Source Flow Config that controls how Amazon AppFlow retrieves data from the source connector. 298 SourceFlowConfig FlowSourceFlowConfigPtrInput 299 // Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 300 Tags pulumi.StringMapInput 301 // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 302 // 303 // Deprecated: Please use `tags` instead. 304 TagsAll pulumi.StringMapInput 305 // A Task that Amazon AppFlow performs while transferring the data in the flow run. 306 Tasks FlowTaskArrayInput 307 // A Trigger that determine how and when the flow runs. 308 TriggerConfig FlowTriggerConfigPtrInput 309 } 310 311 func (FlowState) ElementType() reflect.Type { 312 return reflect.TypeOf((*flowState)(nil)).Elem() 313 } 314 315 type flowArgs struct { 316 // Description of the flow you want to create. 317 Description *string `pulumi:"description"` 318 // A Destination Flow Config that controls how Amazon AppFlow places data in the destination connector. 319 DestinationFlowConfigs []FlowDestinationFlowConfig `pulumi:"destinationFlowConfigs"` 320 // ARN (Amazon Resource Name) of the Key Management Service (KMS) key you provide for encryption. This is required if you do not want to use the Amazon AppFlow-managed KMS key. If you don't provide anything here, Amazon AppFlow uses the Amazon AppFlow-managed KMS key. 321 KmsArn *string `pulumi:"kmsArn"` 322 // Name of the flow. 323 Name *string `pulumi:"name"` 324 // The Source Flow Config that controls how Amazon AppFlow retrieves data from the source connector. 325 SourceFlowConfig FlowSourceFlowConfig `pulumi:"sourceFlowConfig"` 326 // Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 327 Tags map[string]string `pulumi:"tags"` 328 // A Task that Amazon AppFlow performs while transferring the data in the flow run. 329 Tasks []FlowTask `pulumi:"tasks"` 330 // A Trigger that determine how and when the flow runs. 331 TriggerConfig FlowTriggerConfig `pulumi:"triggerConfig"` 332 } 333 334 // The set of arguments for constructing a Flow resource. 335 type FlowArgs struct { 336 // Description of the flow you want to create. 337 Description pulumi.StringPtrInput 338 // A Destination Flow Config that controls how Amazon AppFlow places data in the destination connector. 339 DestinationFlowConfigs FlowDestinationFlowConfigArrayInput 340 // ARN (Amazon Resource Name) of the Key Management Service (KMS) key you provide for encryption. This is required if you do not want to use the Amazon AppFlow-managed KMS key. If you don't provide anything here, Amazon AppFlow uses the Amazon AppFlow-managed KMS key. 341 KmsArn pulumi.StringPtrInput 342 // Name of the flow. 343 Name pulumi.StringPtrInput 344 // The Source Flow Config that controls how Amazon AppFlow retrieves data from the source connector. 345 SourceFlowConfig FlowSourceFlowConfigInput 346 // Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 347 Tags pulumi.StringMapInput 348 // A Task that Amazon AppFlow performs while transferring the data in the flow run. 349 Tasks FlowTaskArrayInput 350 // A Trigger that determine how and when the flow runs. 351 TriggerConfig FlowTriggerConfigInput 352 } 353 354 func (FlowArgs) ElementType() reflect.Type { 355 return reflect.TypeOf((*flowArgs)(nil)).Elem() 356 } 357 358 type FlowInput interface { 359 pulumi.Input 360 361 ToFlowOutput() FlowOutput 362 ToFlowOutputWithContext(ctx context.Context) FlowOutput 363 } 364 365 func (*Flow) ElementType() reflect.Type { 366 return reflect.TypeOf((**Flow)(nil)).Elem() 367 } 368 369 func (i *Flow) ToFlowOutput() FlowOutput { 370 return i.ToFlowOutputWithContext(context.Background()) 371 } 372 373 func (i *Flow) ToFlowOutputWithContext(ctx context.Context) FlowOutput { 374 return pulumi.ToOutputWithContext(ctx, i).(FlowOutput) 375 } 376 377 // FlowArrayInput is an input type that accepts FlowArray and FlowArrayOutput values. 378 // You can construct a concrete instance of `FlowArrayInput` via: 379 // 380 // FlowArray{ FlowArgs{...} } 381 type FlowArrayInput interface { 382 pulumi.Input 383 384 ToFlowArrayOutput() FlowArrayOutput 385 ToFlowArrayOutputWithContext(context.Context) FlowArrayOutput 386 } 387 388 type FlowArray []FlowInput 389 390 func (FlowArray) ElementType() reflect.Type { 391 return reflect.TypeOf((*[]*Flow)(nil)).Elem() 392 } 393 394 func (i FlowArray) ToFlowArrayOutput() FlowArrayOutput { 395 return i.ToFlowArrayOutputWithContext(context.Background()) 396 } 397 398 func (i FlowArray) ToFlowArrayOutputWithContext(ctx context.Context) FlowArrayOutput { 399 return pulumi.ToOutputWithContext(ctx, i).(FlowArrayOutput) 400 } 401 402 // FlowMapInput is an input type that accepts FlowMap and FlowMapOutput values. 403 // You can construct a concrete instance of `FlowMapInput` via: 404 // 405 // FlowMap{ "key": FlowArgs{...} } 406 type FlowMapInput interface { 407 pulumi.Input 408 409 ToFlowMapOutput() FlowMapOutput 410 ToFlowMapOutputWithContext(context.Context) FlowMapOutput 411 } 412 413 type FlowMap map[string]FlowInput 414 415 func (FlowMap) ElementType() reflect.Type { 416 return reflect.TypeOf((*map[string]*Flow)(nil)).Elem() 417 } 418 419 func (i FlowMap) ToFlowMapOutput() FlowMapOutput { 420 return i.ToFlowMapOutputWithContext(context.Background()) 421 } 422 423 func (i FlowMap) ToFlowMapOutputWithContext(ctx context.Context) FlowMapOutput { 424 return pulumi.ToOutputWithContext(ctx, i).(FlowMapOutput) 425 } 426 427 type FlowOutput struct{ *pulumi.OutputState } 428 429 func (FlowOutput) ElementType() reflect.Type { 430 return reflect.TypeOf((**Flow)(nil)).Elem() 431 } 432 433 func (o FlowOutput) ToFlowOutput() FlowOutput { 434 return o 435 } 436 437 func (o FlowOutput) ToFlowOutputWithContext(ctx context.Context) FlowOutput { 438 return o 439 } 440 441 // Flow's ARN. 442 func (o FlowOutput) Arn() pulumi.StringOutput { 443 return o.ApplyT(func(v *Flow) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 444 } 445 446 // Description of the flow you want to create. 447 func (o FlowOutput) Description() pulumi.StringPtrOutput { 448 return o.ApplyT(func(v *Flow) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) 449 } 450 451 // A Destination Flow Config that controls how Amazon AppFlow places data in the destination connector. 452 func (o FlowOutput) DestinationFlowConfigs() FlowDestinationFlowConfigArrayOutput { 453 return o.ApplyT(func(v *Flow) FlowDestinationFlowConfigArrayOutput { return v.DestinationFlowConfigs }).(FlowDestinationFlowConfigArrayOutput) 454 } 455 456 // The current status of the flow. 457 func (o FlowOutput) FlowStatus() pulumi.StringOutput { 458 return o.ApplyT(func(v *Flow) pulumi.StringOutput { return v.FlowStatus }).(pulumi.StringOutput) 459 } 460 461 // ARN (Amazon Resource Name) of the Key Management Service (KMS) key you provide for encryption. This is required if you do not want to use the Amazon AppFlow-managed KMS key. If you don't provide anything here, Amazon AppFlow uses the Amazon AppFlow-managed KMS key. 462 func (o FlowOutput) KmsArn() pulumi.StringOutput { 463 return o.ApplyT(func(v *Flow) pulumi.StringOutput { return v.KmsArn }).(pulumi.StringOutput) 464 } 465 466 // Name of the flow. 467 func (o FlowOutput) Name() pulumi.StringOutput { 468 return o.ApplyT(func(v *Flow) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 469 } 470 471 // The Source Flow Config that controls how Amazon AppFlow retrieves data from the source connector. 472 func (o FlowOutput) SourceFlowConfig() FlowSourceFlowConfigOutput { 473 return o.ApplyT(func(v *Flow) FlowSourceFlowConfigOutput { return v.SourceFlowConfig }).(FlowSourceFlowConfigOutput) 474 } 475 476 // Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 477 func (o FlowOutput) Tags() pulumi.StringMapOutput { 478 return o.ApplyT(func(v *Flow) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 479 } 480 481 // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 482 // 483 // Deprecated: Please use `tags` instead. 484 func (o FlowOutput) TagsAll() pulumi.StringMapOutput { 485 return o.ApplyT(func(v *Flow) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 486 } 487 488 // A Task that Amazon AppFlow performs while transferring the data in the flow run. 489 func (o FlowOutput) Tasks() FlowTaskArrayOutput { 490 return o.ApplyT(func(v *Flow) FlowTaskArrayOutput { return v.Tasks }).(FlowTaskArrayOutput) 491 } 492 493 // A Trigger that determine how and when the flow runs. 494 func (o FlowOutput) TriggerConfig() FlowTriggerConfigOutput { 495 return o.ApplyT(func(v *Flow) FlowTriggerConfigOutput { return v.TriggerConfig }).(FlowTriggerConfigOutput) 496 } 497 498 type FlowArrayOutput struct{ *pulumi.OutputState } 499 500 func (FlowArrayOutput) ElementType() reflect.Type { 501 return reflect.TypeOf((*[]*Flow)(nil)).Elem() 502 } 503 504 func (o FlowArrayOutput) ToFlowArrayOutput() FlowArrayOutput { 505 return o 506 } 507 508 func (o FlowArrayOutput) ToFlowArrayOutputWithContext(ctx context.Context) FlowArrayOutput { 509 return o 510 } 511 512 func (o FlowArrayOutput) Index(i pulumi.IntInput) FlowOutput { 513 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Flow { 514 return vs[0].([]*Flow)[vs[1].(int)] 515 }).(FlowOutput) 516 } 517 518 type FlowMapOutput struct{ *pulumi.OutputState } 519 520 func (FlowMapOutput) ElementType() reflect.Type { 521 return reflect.TypeOf((*map[string]*Flow)(nil)).Elem() 522 } 523 524 func (o FlowMapOutput) ToFlowMapOutput() FlowMapOutput { 525 return o 526 } 527 528 func (o FlowMapOutput) ToFlowMapOutputWithContext(ctx context.Context) FlowMapOutput { 529 return o 530 } 531 532 func (o FlowMapOutput) MapIndex(k pulumi.StringInput) FlowOutput { 533 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Flow { 534 return vs[0].(map[string]*Flow)[vs[1].(string)] 535 }).(FlowOutput) 536 } 537 538 func init() { 539 pulumi.RegisterInputType(reflect.TypeOf((*FlowInput)(nil)).Elem(), &Flow{}) 540 pulumi.RegisterInputType(reflect.TypeOf((*FlowArrayInput)(nil)).Elem(), FlowArray{}) 541 pulumi.RegisterInputType(reflect.TypeOf((*FlowMapInput)(nil)).Elem(), FlowMap{}) 542 pulumi.RegisterOutputType(FlowOutput{}) 543 pulumi.RegisterOutputType(FlowArrayOutput{}) 544 pulumi.RegisterOutputType(FlowMapOutput{}) 545 }