github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/imagebuilder/getImageRecipe.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 // Provides details about an Image Builder Image Recipe. 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.LookupImageRecipe(ctx, &imagebuilder.LookupImageRecipeArgs{ 32 // Arn: "arn:aws:imagebuilder:us-east-1:aws:image-recipe/example/1.0.0", 33 // }, nil) 34 // if err != nil { 35 // return err 36 // } 37 // return nil 38 // }) 39 // } 40 // 41 // ``` 42 // <!--End PulumiCodeChooser --> 43 func LookupImageRecipe(ctx *pulumi.Context, args *LookupImageRecipeArgs, opts ...pulumi.InvokeOption) (*LookupImageRecipeResult, error) { 44 opts = internal.PkgInvokeDefaultOpts(opts) 45 var rv LookupImageRecipeResult 46 err := ctx.Invoke("aws:imagebuilder/getImageRecipe:getImageRecipe", 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 getImageRecipe. 54 type LookupImageRecipeArgs struct { 55 // ARN of the image recipe. 56 Arn string `pulumi:"arn"` 57 // Key-value map of resource tags for the image recipe. 58 Tags map[string]string `pulumi:"tags"` 59 } 60 61 // A collection of values returned by getImageRecipe. 62 type LookupImageRecipeResult struct { 63 Arn string `pulumi:"arn"` 64 // Set of objects with block device mappings for the image recipe. 65 BlockDeviceMappings []GetImageRecipeBlockDeviceMapping `pulumi:"blockDeviceMappings"` 66 // List of objects with components for the image recipe. 67 Components []GetImageRecipeComponent `pulumi:"components"` 68 // Date the image recipe was created. 69 DateCreated string `pulumi:"dateCreated"` 70 // Description of the image recipe. 71 Description string `pulumi:"description"` 72 // The provider-assigned unique ID for this managed resource. 73 Id string `pulumi:"id"` 74 // Name of the image recipe. 75 Name string `pulumi:"name"` 76 // Owner of the image recipe. 77 Owner string `pulumi:"owner"` 78 // Base image of the image recipe. 79 ParentImage string `pulumi:"parentImage"` 80 // Platform of the image recipe. 81 Platform string `pulumi:"platform"` 82 // Key-value map of resource tags for the image recipe. 83 Tags map[string]string `pulumi:"tags"` 84 // Base64 encoded contents of user data. Commands or a command script to run when build instance is launched. 85 UserDataBase64 string `pulumi:"userDataBase64"` 86 // Version of the image recipe. 87 Version string `pulumi:"version"` 88 // Working directory used during build and test workflows. 89 WorkingDirectory string `pulumi:"workingDirectory"` 90 } 91 92 func LookupImageRecipeOutput(ctx *pulumi.Context, args LookupImageRecipeOutputArgs, opts ...pulumi.InvokeOption) LookupImageRecipeResultOutput { 93 return pulumi.ToOutputWithContext(context.Background(), args). 94 ApplyT(func(v interface{}) (LookupImageRecipeResult, error) { 95 args := v.(LookupImageRecipeArgs) 96 r, err := LookupImageRecipe(ctx, &args, opts...) 97 var s LookupImageRecipeResult 98 if r != nil { 99 s = *r 100 } 101 return s, err 102 }).(LookupImageRecipeResultOutput) 103 } 104 105 // A collection of arguments for invoking getImageRecipe. 106 type LookupImageRecipeOutputArgs struct { 107 // ARN of the image recipe. 108 Arn pulumi.StringInput `pulumi:"arn"` 109 // Key-value map of resource tags for the image recipe. 110 Tags pulumi.StringMapInput `pulumi:"tags"` 111 } 112 113 func (LookupImageRecipeOutputArgs) ElementType() reflect.Type { 114 return reflect.TypeOf((*LookupImageRecipeArgs)(nil)).Elem() 115 } 116 117 // A collection of values returned by getImageRecipe. 118 type LookupImageRecipeResultOutput struct{ *pulumi.OutputState } 119 120 func (LookupImageRecipeResultOutput) ElementType() reflect.Type { 121 return reflect.TypeOf((*LookupImageRecipeResult)(nil)).Elem() 122 } 123 124 func (o LookupImageRecipeResultOutput) ToLookupImageRecipeResultOutput() LookupImageRecipeResultOutput { 125 return o 126 } 127 128 func (o LookupImageRecipeResultOutput) ToLookupImageRecipeResultOutputWithContext(ctx context.Context) LookupImageRecipeResultOutput { 129 return o 130 } 131 132 func (o LookupImageRecipeResultOutput) Arn() pulumi.StringOutput { 133 return o.ApplyT(func(v LookupImageRecipeResult) string { return v.Arn }).(pulumi.StringOutput) 134 } 135 136 // Set of objects with block device mappings for the image recipe. 137 func (o LookupImageRecipeResultOutput) BlockDeviceMappings() GetImageRecipeBlockDeviceMappingArrayOutput { 138 return o.ApplyT(func(v LookupImageRecipeResult) []GetImageRecipeBlockDeviceMapping { return v.BlockDeviceMappings }).(GetImageRecipeBlockDeviceMappingArrayOutput) 139 } 140 141 // List of objects with components for the image recipe. 142 func (o LookupImageRecipeResultOutput) Components() GetImageRecipeComponentArrayOutput { 143 return o.ApplyT(func(v LookupImageRecipeResult) []GetImageRecipeComponent { return v.Components }).(GetImageRecipeComponentArrayOutput) 144 } 145 146 // Date the image recipe was created. 147 func (o LookupImageRecipeResultOutput) DateCreated() pulumi.StringOutput { 148 return o.ApplyT(func(v LookupImageRecipeResult) string { return v.DateCreated }).(pulumi.StringOutput) 149 } 150 151 // Description of the image recipe. 152 func (o LookupImageRecipeResultOutput) Description() pulumi.StringOutput { 153 return o.ApplyT(func(v LookupImageRecipeResult) string { return v.Description }).(pulumi.StringOutput) 154 } 155 156 // The provider-assigned unique ID for this managed resource. 157 func (o LookupImageRecipeResultOutput) Id() pulumi.StringOutput { 158 return o.ApplyT(func(v LookupImageRecipeResult) string { return v.Id }).(pulumi.StringOutput) 159 } 160 161 // Name of the image recipe. 162 func (o LookupImageRecipeResultOutput) Name() pulumi.StringOutput { 163 return o.ApplyT(func(v LookupImageRecipeResult) string { return v.Name }).(pulumi.StringOutput) 164 } 165 166 // Owner of the image recipe. 167 func (o LookupImageRecipeResultOutput) Owner() pulumi.StringOutput { 168 return o.ApplyT(func(v LookupImageRecipeResult) string { return v.Owner }).(pulumi.StringOutput) 169 } 170 171 // Base image of the image recipe. 172 func (o LookupImageRecipeResultOutput) ParentImage() pulumi.StringOutput { 173 return o.ApplyT(func(v LookupImageRecipeResult) string { return v.ParentImage }).(pulumi.StringOutput) 174 } 175 176 // Platform of the image recipe. 177 func (o LookupImageRecipeResultOutput) Platform() pulumi.StringOutput { 178 return o.ApplyT(func(v LookupImageRecipeResult) string { return v.Platform }).(pulumi.StringOutput) 179 } 180 181 // Key-value map of resource tags for the image recipe. 182 func (o LookupImageRecipeResultOutput) Tags() pulumi.StringMapOutput { 183 return o.ApplyT(func(v LookupImageRecipeResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) 184 } 185 186 // Base64 encoded contents of user data. Commands or a command script to run when build instance is launched. 187 func (o LookupImageRecipeResultOutput) UserDataBase64() pulumi.StringOutput { 188 return o.ApplyT(func(v LookupImageRecipeResult) string { return v.UserDataBase64 }).(pulumi.StringOutput) 189 } 190 191 // Version of the image recipe. 192 func (o LookupImageRecipeResultOutput) Version() pulumi.StringOutput { 193 return o.ApplyT(func(v LookupImageRecipeResult) string { return v.Version }).(pulumi.StringOutput) 194 } 195 196 // Working directory used during build and test workflows. 197 func (o LookupImageRecipeResultOutput) WorkingDirectory() pulumi.StringOutput { 198 return o.ApplyT(func(v LookupImageRecipeResult) string { return v.WorkingDirectory }).(pulumi.StringOutput) 199 } 200 201 func init() { 202 pulumi.RegisterOutputType(LookupImageRecipeResultOutput{}) 203 }