github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/imagebuilder/getInfrastructureConfigurations.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 imagebuilder 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 // Use this data source to get the ARNs and names of Image Builder Infrastructure Configurations matching the specified criteria. 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/imagebuilder" 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 := imagebuilder.GetInfrastructureConfigurations(ctx, &imagebuilder.GetInfrastructureConfigurationsArgs{ 32 // Filters: []imagebuilder.GetInfrastructureConfigurationsFilter{ 33 // { 34 // Name: "name", 35 // Values: []string{ 36 // "example", 37 // }, 38 // }, 39 // }, 40 // }, nil) 41 // if err != nil { 42 // return err 43 // } 44 // return nil 45 // }) 46 // } 47 // 48 // ``` 49 // <!--End PulumiCodeChooser --> 50 func GetInfrastructureConfigurations(ctx *pulumi.Context, args *GetInfrastructureConfigurationsArgs, opts ...pulumi.InvokeOption) (*GetInfrastructureConfigurationsResult, error) { 51 opts = internal.PkgInvokeDefaultOpts(opts) 52 var rv GetInfrastructureConfigurationsResult 53 err := ctx.Invoke("aws:imagebuilder/getInfrastructureConfigurations:getInfrastructureConfigurations", args, &rv, opts...) 54 if err != nil { 55 return nil, err 56 } 57 return &rv, nil 58 } 59 60 // A collection of arguments for invoking getInfrastructureConfigurations. 61 type GetInfrastructureConfigurationsArgs struct { 62 // Configuration block(s) for filtering. Detailed below. 63 Filters []GetInfrastructureConfigurationsFilter `pulumi:"filters"` 64 } 65 66 // A collection of values returned by getInfrastructureConfigurations. 67 type GetInfrastructureConfigurationsResult struct { 68 // Set of ARNs of the matched Image Builder Infrastructure Configurations. 69 Arns []string `pulumi:"arns"` 70 Filters []GetInfrastructureConfigurationsFilter `pulumi:"filters"` 71 // The provider-assigned unique ID for this managed resource. 72 Id string `pulumi:"id"` 73 // Set of names of the matched Image Builder Infrastructure Configurations. 74 Names []string `pulumi:"names"` 75 } 76 77 func GetInfrastructureConfigurationsOutput(ctx *pulumi.Context, args GetInfrastructureConfigurationsOutputArgs, opts ...pulumi.InvokeOption) GetInfrastructureConfigurationsResultOutput { 78 return pulumi.ToOutputWithContext(context.Background(), args). 79 ApplyT(func(v interface{}) (GetInfrastructureConfigurationsResult, error) { 80 args := v.(GetInfrastructureConfigurationsArgs) 81 r, err := GetInfrastructureConfigurations(ctx, &args, opts...) 82 var s GetInfrastructureConfigurationsResult 83 if r != nil { 84 s = *r 85 } 86 return s, err 87 }).(GetInfrastructureConfigurationsResultOutput) 88 } 89 90 // A collection of arguments for invoking getInfrastructureConfigurations. 91 type GetInfrastructureConfigurationsOutputArgs struct { 92 // Configuration block(s) for filtering. Detailed below. 93 Filters GetInfrastructureConfigurationsFilterArrayInput `pulumi:"filters"` 94 } 95 96 func (GetInfrastructureConfigurationsOutputArgs) ElementType() reflect.Type { 97 return reflect.TypeOf((*GetInfrastructureConfigurationsArgs)(nil)).Elem() 98 } 99 100 // A collection of values returned by getInfrastructureConfigurations. 101 type GetInfrastructureConfigurationsResultOutput struct{ *pulumi.OutputState } 102 103 func (GetInfrastructureConfigurationsResultOutput) ElementType() reflect.Type { 104 return reflect.TypeOf((*GetInfrastructureConfigurationsResult)(nil)).Elem() 105 } 106 107 func (o GetInfrastructureConfigurationsResultOutput) ToGetInfrastructureConfigurationsResultOutput() GetInfrastructureConfigurationsResultOutput { 108 return o 109 } 110 111 func (o GetInfrastructureConfigurationsResultOutput) ToGetInfrastructureConfigurationsResultOutputWithContext(ctx context.Context) GetInfrastructureConfigurationsResultOutput { 112 return o 113 } 114 115 // Set of ARNs of the matched Image Builder Infrastructure Configurations. 116 func (o GetInfrastructureConfigurationsResultOutput) Arns() pulumi.StringArrayOutput { 117 return o.ApplyT(func(v GetInfrastructureConfigurationsResult) []string { return v.Arns }).(pulumi.StringArrayOutput) 118 } 119 120 func (o GetInfrastructureConfigurationsResultOutput) Filters() GetInfrastructureConfigurationsFilterArrayOutput { 121 return o.ApplyT(func(v GetInfrastructureConfigurationsResult) []GetInfrastructureConfigurationsFilter { 122 return v.Filters 123 }).(GetInfrastructureConfigurationsFilterArrayOutput) 124 } 125 126 // The provider-assigned unique ID for this managed resource. 127 func (o GetInfrastructureConfigurationsResultOutput) Id() pulumi.StringOutput { 128 return o.ApplyT(func(v GetInfrastructureConfigurationsResult) string { return v.Id }).(pulumi.StringOutput) 129 } 130 131 // Set of names of the matched Image Builder Infrastructure Configurations. 132 func (o GetInfrastructureConfigurationsResultOutput) Names() pulumi.StringArrayOutput { 133 return o.ApplyT(func(v GetInfrastructureConfigurationsResult) []string { return v.Names }).(pulumi.StringArrayOutput) 134 } 135 136 func init() { 137 pulumi.RegisterOutputType(GetInfrastructureConfigurationsResultOutput{}) 138 }