-
Notifications
You must be signed in to change notification settings - Fork 152
/
getImageRecipe.go
192 lines (164 loc) · 7.33 KB
/
getImageRecipe.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package imagebuilder
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Provides details about an Image Builder Image Recipe.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-aws/sdk/v4/go/aws/imagebuilder"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := imagebuilder.LookupImageRecipe(ctx, &imagebuilder.LookupImageRecipeArgs{
// Arn: "arn:aws:imagebuilder:us-east-1:aws:image-recipe/example/1.0.0",
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
func LookupImageRecipe(ctx *pulumi.Context, args *LookupImageRecipeArgs, opts ...pulumi.InvokeOption) (*LookupImageRecipeResult, error) {
var rv LookupImageRecipeResult
err := ctx.Invoke("aws:imagebuilder/getImageRecipe:getImageRecipe", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getImageRecipe.
type LookupImageRecipeArgs struct {
// Amazon Resource Name (ARN) of the image recipe.
Arn string `pulumi:"arn"`
// Key-value map of resource tags for the image recipe.
Tags map[string]string `pulumi:"tags"`
}
// A collection of values returned by getImageRecipe.
type LookupImageRecipeResult struct {
Arn string `pulumi:"arn"`
// Set of objects with block device mappings for the the image recipe.
BlockDeviceMappings []GetImageRecipeBlockDeviceMapping `pulumi:"blockDeviceMappings"`
// List of objects with components for the image recipe.
Components []GetImageRecipeComponent `pulumi:"components"`
// Date the image recipe was created.
DateCreated string `pulumi:"dateCreated"`
// Description of the image recipe.
Description string `pulumi:"description"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// Name of the image recipe.
Name string `pulumi:"name"`
// Owner of the image recipe.
Owner string `pulumi:"owner"`
// Platform of the image recipe.
ParentImage string `pulumi:"parentImage"`
// Platform of the image recipe.
Platform string `pulumi:"platform"`
// Key-value map of resource tags for the image recipe.
Tags map[string]string `pulumi:"tags"`
// Base64 encoded contents of user data. Commands or a command script to run when build instance is launched.
UserDataBase64 string `pulumi:"userDataBase64"`
// Version of the image recipe.
Version string `pulumi:"version"`
// The working directory used during build and test workflows.
WorkingDirectory string `pulumi:"workingDirectory"`
}
func LookupImageRecipeOutput(ctx *pulumi.Context, args LookupImageRecipeOutputArgs, opts ...pulumi.InvokeOption) LookupImageRecipeResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupImageRecipeResult, error) {
args := v.(LookupImageRecipeArgs)
r, err := LookupImageRecipe(ctx, &args, opts...)
return *r, err
}).(LookupImageRecipeResultOutput)
}
// A collection of arguments for invoking getImageRecipe.
type LookupImageRecipeOutputArgs struct {
// Amazon Resource Name (ARN) of the image recipe.
Arn pulumi.StringInput `pulumi:"arn"`
// Key-value map of resource tags for the image recipe.
Tags pulumi.StringMapInput `pulumi:"tags"`
}
func (LookupImageRecipeOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupImageRecipeArgs)(nil)).Elem()
}
// A collection of values returned by getImageRecipe.
type LookupImageRecipeResultOutput struct{ *pulumi.OutputState }
func (LookupImageRecipeResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupImageRecipeResult)(nil)).Elem()
}
func (o LookupImageRecipeResultOutput) ToLookupImageRecipeResultOutput() LookupImageRecipeResultOutput {
return o
}
func (o LookupImageRecipeResultOutput) ToLookupImageRecipeResultOutputWithContext(ctx context.Context) LookupImageRecipeResultOutput {
return o
}
func (o LookupImageRecipeResultOutput) Arn() pulumi.StringOutput {
return o.ApplyT(func(v LookupImageRecipeResult) string { return v.Arn }).(pulumi.StringOutput)
}
// Set of objects with block device mappings for the the image recipe.
func (o LookupImageRecipeResultOutput) BlockDeviceMappings() GetImageRecipeBlockDeviceMappingArrayOutput {
return o.ApplyT(func(v LookupImageRecipeResult) []GetImageRecipeBlockDeviceMapping { return v.BlockDeviceMappings }).(GetImageRecipeBlockDeviceMappingArrayOutput)
}
// List of objects with components for the image recipe.
func (o LookupImageRecipeResultOutput) Components() GetImageRecipeComponentArrayOutput {
return o.ApplyT(func(v LookupImageRecipeResult) []GetImageRecipeComponent { return v.Components }).(GetImageRecipeComponentArrayOutput)
}
// Date the image recipe was created.
func (o LookupImageRecipeResultOutput) DateCreated() pulumi.StringOutput {
return o.ApplyT(func(v LookupImageRecipeResult) string { return v.DateCreated }).(pulumi.StringOutput)
}
// Description of the image recipe.
func (o LookupImageRecipeResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupImageRecipeResult) string { return v.Description }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupImageRecipeResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupImageRecipeResult) string { return v.Id }).(pulumi.StringOutput)
}
// Name of the image recipe.
func (o LookupImageRecipeResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupImageRecipeResult) string { return v.Name }).(pulumi.StringOutput)
}
// Owner of the image recipe.
func (o LookupImageRecipeResultOutput) Owner() pulumi.StringOutput {
return o.ApplyT(func(v LookupImageRecipeResult) string { return v.Owner }).(pulumi.StringOutput)
}
// Platform of the image recipe.
func (o LookupImageRecipeResultOutput) ParentImage() pulumi.StringOutput {
return o.ApplyT(func(v LookupImageRecipeResult) string { return v.ParentImage }).(pulumi.StringOutput)
}
// Platform of the image recipe.
func (o LookupImageRecipeResultOutput) Platform() pulumi.StringOutput {
return o.ApplyT(func(v LookupImageRecipeResult) string { return v.Platform }).(pulumi.StringOutput)
}
// Key-value map of resource tags for the image recipe.
func (o LookupImageRecipeResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupImageRecipeResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
// Base64 encoded contents of user data. Commands or a command script to run when build instance is launched.
func (o LookupImageRecipeResultOutput) UserDataBase64() pulumi.StringOutput {
return o.ApplyT(func(v LookupImageRecipeResult) string { return v.UserDataBase64 }).(pulumi.StringOutput)
}
// Version of the image recipe.
func (o LookupImageRecipeResultOutput) Version() pulumi.StringOutput {
return o.ApplyT(func(v LookupImageRecipeResult) string { return v.Version }).(pulumi.StringOutput)
}
// The working directory used during build and test workflows.
func (o LookupImageRecipeResultOutput) WorkingDirectory() pulumi.StringOutput {
return o.ApplyT(func(v LookupImageRecipeResult) string { return v.WorkingDirectory }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupImageRecipeResultOutput{})
}