/
pulumiTypes.go
387 lines (315 loc) · 18.5 KB
/
pulumiTypes.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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
// Code generated by pulumi-gen-awsx DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package ecr
import (
"context"
"reflect"
"github.com/pulumi/pulumi-awsx/sdk/go/awsx/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumix"
)
var _ = internal.GetEnvOrDefault
// Arguments for building a docker image
type DockerBuild struct {
// An optional map of named build-time argument variables to set during the Docker build. This flag allows you to pass built-time variables that can be accessed like environment variables inside the `RUN` instruction.
Args map[string]string `pulumi:"args"`
// Images to consider as cache sources
CacheFrom []string `pulumi:"cacheFrom"`
// dockerfile may be used to override the default Dockerfile name and/or location. By default, it is assumed to be a file named Dockerfile in the root of the build context.
Dockerfile *string `pulumi:"dockerfile"`
// Environment variables to set on the invocation of `docker build`, for example to support `DOCKER_BUILDKIT=1 docker build`.
Env map[string]string `pulumi:"env"`
// An optional catch-all list of arguments to provide extra CLI options to the docker build command. For example `['--network', 'host']`.
ExtraOptions []string `pulumi:"extraOptions"`
// Path to a directory to use for the Docker build context, usually the directory in which the Dockerfile resides (although dockerfile may be used to choose a custom location independent of this choice). If not specified, the context defaults to the current working directory; if a relative path is used, it is relative to the current working directory that Pulumi is evaluating.
Path *string `pulumi:"path"`
// The target of the dockerfile to build
Target *string `pulumi:"target"`
}
// Simplified lifecycle policy model consisting of one or more rules that determine which images in a repository should be expired. See https://docs.aws.amazon.com/AmazonECR/latest/userguide/lifecycle_policy_examples.html for more details.
type LifecyclePolicy struct {
// Specifies the rules to determine how images should be retired from this repository. Rules are ordered from lowest priority to highest. If there is a rule with a `selection` value of `any`, then it will have the highest priority.
Rules []LifecyclePolicyRule `pulumi:"rules"`
// Skips creation of the policy if set to `true`.
Skip *bool `pulumi:"skip"`
}
// LifecyclePolicyInput is an input type that accepts LifecyclePolicyArgs and LifecyclePolicyOutput values.
// You can construct a concrete instance of `LifecyclePolicyInput` via:
//
// LifecyclePolicyArgs{...}
type LifecyclePolicyInput interface {
pulumi.Input
ToLifecyclePolicyOutput() LifecyclePolicyOutput
ToLifecyclePolicyOutputWithContext(context.Context) LifecyclePolicyOutput
}
// Simplified lifecycle policy model consisting of one or more rules that determine which images in a repository should be expired. See https://docs.aws.amazon.com/AmazonECR/latest/userguide/lifecycle_policy_examples.html for more details.
type LifecyclePolicyArgs struct {
// Specifies the rules to determine how images should be retired from this repository. Rules are ordered from lowest priority to highest. If there is a rule with a `selection` value of `any`, then it will have the highest priority.
Rules LifecyclePolicyRuleArrayInput `pulumi:"rules"`
// Skips creation of the policy if set to `true`.
Skip *bool `pulumi:"skip"`
}
func (LifecyclePolicyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LifecyclePolicy)(nil)).Elem()
}
func (i LifecyclePolicyArgs) ToLifecyclePolicyOutput() LifecyclePolicyOutput {
return i.ToLifecyclePolicyOutputWithContext(context.Background())
}
func (i LifecyclePolicyArgs) ToLifecyclePolicyOutputWithContext(ctx context.Context) LifecyclePolicyOutput {
return pulumi.ToOutputWithContext(ctx, i).(LifecyclePolicyOutput)
}
func (i LifecyclePolicyArgs) ToOutput(ctx context.Context) pulumix.Output[LifecyclePolicy] {
return pulumix.Output[LifecyclePolicy]{
OutputState: i.ToLifecyclePolicyOutputWithContext(ctx).OutputState,
}
}
func (i LifecyclePolicyArgs) ToLifecyclePolicyPtrOutput() LifecyclePolicyPtrOutput {
return i.ToLifecyclePolicyPtrOutputWithContext(context.Background())
}
func (i LifecyclePolicyArgs) ToLifecyclePolicyPtrOutputWithContext(ctx context.Context) LifecyclePolicyPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(LifecyclePolicyOutput).ToLifecyclePolicyPtrOutputWithContext(ctx)
}
// LifecyclePolicyPtrInput is an input type that accepts LifecyclePolicyArgs, LifecyclePolicyPtr and LifecyclePolicyPtrOutput values.
// You can construct a concrete instance of `LifecyclePolicyPtrInput` via:
//
// LifecyclePolicyArgs{...}
//
// or:
//
// nil
type LifecyclePolicyPtrInput interface {
pulumi.Input
ToLifecyclePolicyPtrOutput() LifecyclePolicyPtrOutput
ToLifecyclePolicyPtrOutputWithContext(context.Context) LifecyclePolicyPtrOutput
}
type lifecyclePolicyPtrType LifecyclePolicyArgs
func LifecyclePolicyPtr(v *LifecyclePolicyArgs) LifecyclePolicyPtrInput {
return (*lifecyclePolicyPtrType)(v)
}
func (*lifecyclePolicyPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**LifecyclePolicy)(nil)).Elem()
}
func (i *lifecyclePolicyPtrType) ToLifecyclePolicyPtrOutput() LifecyclePolicyPtrOutput {
return i.ToLifecyclePolicyPtrOutputWithContext(context.Background())
}
func (i *lifecyclePolicyPtrType) ToLifecyclePolicyPtrOutputWithContext(ctx context.Context) LifecyclePolicyPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(LifecyclePolicyPtrOutput)
}
func (i *lifecyclePolicyPtrType) ToOutput(ctx context.Context) pulumix.Output[*LifecyclePolicy] {
return pulumix.Output[*LifecyclePolicy]{
OutputState: i.ToLifecyclePolicyPtrOutputWithContext(ctx).OutputState,
}
}
// Simplified lifecycle policy model consisting of one or more rules that determine which images in a repository should be expired. See https://docs.aws.amazon.com/AmazonECR/latest/userguide/lifecycle_policy_examples.html for more details.
type LifecyclePolicyOutput struct{ *pulumi.OutputState }
func (LifecyclePolicyOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LifecyclePolicy)(nil)).Elem()
}
func (o LifecyclePolicyOutput) ToLifecyclePolicyOutput() LifecyclePolicyOutput {
return o
}
func (o LifecyclePolicyOutput) ToLifecyclePolicyOutputWithContext(ctx context.Context) LifecyclePolicyOutput {
return o
}
func (o LifecyclePolicyOutput) ToLifecyclePolicyPtrOutput() LifecyclePolicyPtrOutput {
return o.ToLifecyclePolicyPtrOutputWithContext(context.Background())
}
func (o LifecyclePolicyOutput) ToLifecyclePolicyPtrOutputWithContext(ctx context.Context) LifecyclePolicyPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v LifecyclePolicy) *LifecyclePolicy {
return &v
}).(LifecyclePolicyPtrOutput)
}
func (o LifecyclePolicyOutput) ToOutput(ctx context.Context) pulumix.Output[LifecyclePolicy] {
return pulumix.Output[LifecyclePolicy]{
OutputState: o.OutputState,
}
}
// Specifies the rules to determine how images should be retired from this repository. Rules are ordered from lowest priority to highest. If there is a rule with a `selection` value of `any`, then it will have the highest priority.
func (o LifecyclePolicyOutput) Rules() LifecyclePolicyRuleArrayOutput {
return o.ApplyT(func(v LifecyclePolicy) []LifecyclePolicyRule { return v.Rules }).(LifecyclePolicyRuleArrayOutput)
}
// Skips creation of the policy if set to `true`.
func (o LifecyclePolicyOutput) Skip() pulumi.BoolPtrOutput {
return o.ApplyT(func(v LifecyclePolicy) *bool { return v.Skip }).(pulumi.BoolPtrOutput)
}
type LifecyclePolicyPtrOutput struct{ *pulumi.OutputState }
func (LifecyclePolicyPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**LifecyclePolicy)(nil)).Elem()
}
func (o LifecyclePolicyPtrOutput) ToLifecyclePolicyPtrOutput() LifecyclePolicyPtrOutput {
return o
}
func (o LifecyclePolicyPtrOutput) ToLifecyclePolicyPtrOutputWithContext(ctx context.Context) LifecyclePolicyPtrOutput {
return o
}
func (o LifecyclePolicyPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*LifecyclePolicy] {
return pulumix.Output[*LifecyclePolicy]{
OutputState: o.OutputState,
}
}
func (o LifecyclePolicyPtrOutput) Elem() LifecyclePolicyOutput {
return o.ApplyT(func(v *LifecyclePolicy) LifecyclePolicy {
if v != nil {
return *v
}
var ret LifecyclePolicy
return ret
}).(LifecyclePolicyOutput)
}
// Specifies the rules to determine how images should be retired from this repository. Rules are ordered from lowest priority to highest. If there is a rule with a `selection` value of `any`, then it will have the highest priority.
func (o LifecyclePolicyPtrOutput) Rules() LifecyclePolicyRuleArrayOutput {
return o.ApplyT(func(v *LifecyclePolicy) []LifecyclePolicyRule {
if v == nil {
return nil
}
return v.Rules
}).(LifecyclePolicyRuleArrayOutput)
}
// Skips creation of the policy if set to `true`.
func (o LifecyclePolicyPtrOutput) Skip() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *LifecyclePolicy) *bool {
if v == nil {
return nil
}
return v.Skip
}).(pulumi.BoolPtrOutput)
}
// A lifecycle policy rule that determine which images in a repository should be expired.
type LifecyclePolicyRule struct {
// Describes the purpose of a rule within a lifecycle policy.
Description *string `pulumi:"description"`
// The maximum age limit (in days) for your images. Either [maximumNumberOfImages] or [maximumAgeLimit] must be provided.
MaximumAgeLimit *float64 `pulumi:"maximumAgeLimit"`
// The maximum number of images that you want to retain in your repository. Either [maximumNumberOfImages] or [maximumAgeLimit] must be provided.
MaximumNumberOfImages *float64 `pulumi:"maximumNumberOfImages"`
// A list of image tag prefixes on which to take action with your lifecycle policy. Only used if you specified "tagStatus": "tagged". For example, if your images are tagged as prod, prod1, prod2, and so on, you would use the tag prefix prod to specify all of them. If you specify multiple tags, only the images with all specified tags are selected.
TagPrefixList []string `pulumi:"tagPrefixList"`
// Determines whether the lifecycle policy rule that you are adding specifies a tag for an image. Acceptable options are tagged, untagged, or any. If you specify any, then all images have the rule evaluated against them. If you specify tagged, then you must also specify a tagPrefixList value. If you specify untagged, then you must omit tagPrefixList.
TagStatus LifecycleTagStatus `pulumi:"tagStatus"`
}
// LifecyclePolicyRuleInput is an input type that accepts LifecyclePolicyRuleArgs and LifecyclePolicyRuleOutput values.
// You can construct a concrete instance of `LifecyclePolicyRuleInput` via:
//
// LifecyclePolicyRuleArgs{...}
type LifecyclePolicyRuleInput interface {
pulumi.Input
ToLifecyclePolicyRuleOutput() LifecyclePolicyRuleOutput
ToLifecyclePolicyRuleOutputWithContext(context.Context) LifecyclePolicyRuleOutput
}
// A lifecycle policy rule that determine which images in a repository should be expired.
type LifecyclePolicyRuleArgs struct {
// Describes the purpose of a rule within a lifecycle policy.
Description pulumi.StringPtrInput `pulumi:"description"`
// The maximum age limit (in days) for your images. Either [maximumNumberOfImages] or [maximumAgeLimit] must be provided.
MaximumAgeLimit pulumi.Float64PtrInput `pulumi:"maximumAgeLimit"`
// The maximum number of images that you want to retain in your repository. Either [maximumNumberOfImages] or [maximumAgeLimit] must be provided.
MaximumNumberOfImages pulumi.Float64PtrInput `pulumi:"maximumNumberOfImages"`
// A list of image tag prefixes on which to take action with your lifecycle policy. Only used if you specified "tagStatus": "tagged". For example, if your images are tagged as prod, prod1, prod2, and so on, you would use the tag prefix prod to specify all of them. If you specify multiple tags, only the images with all specified tags are selected.
TagPrefixList pulumi.StringArrayInput `pulumi:"tagPrefixList"`
// Determines whether the lifecycle policy rule that you are adding specifies a tag for an image. Acceptable options are tagged, untagged, or any. If you specify any, then all images have the rule evaluated against them. If you specify tagged, then you must also specify a tagPrefixList value. If you specify untagged, then you must omit tagPrefixList.
TagStatus LifecycleTagStatusInput `pulumi:"tagStatus"`
}
func (LifecyclePolicyRuleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LifecyclePolicyRule)(nil)).Elem()
}
func (i LifecyclePolicyRuleArgs) ToLifecyclePolicyRuleOutput() LifecyclePolicyRuleOutput {
return i.ToLifecyclePolicyRuleOutputWithContext(context.Background())
}
func (i LifecyclePolicyRuleArgs) ToLifecyclePolicyRuleOutputWithContext(ctx context.Context) LifecyclePolicyRuleOutput {
return pulumi.ToOutputWithContext(ctx, i).(LifecyclePolicyRuleOutput)
}
func (i LifecyclePolicyRuleArgs) ToOutput(ctx context.Context) pulumix.Output[LifecyclePolicyRule] {
return pulumix.Output[LifecyclePolicyRule]{
OutputState: i.ToLifecyclePolicyRuleOutputWithContext(ctx).OutputState,
}
}
// LifecyclePolicyRuleArrayInput is an input type that accepts LifecyclePolicyRuleArray and LifecyclePolicyRuleArrayOutput values.
// You can construct a concrete instance of `LifecyclePolicyRuleArrayInput` via:
//
// LifecyclePolicyRuleArray{ LifecyclePolicyRuleArgs{...} }
type LifecyclePolicyRuleArrayInput interface {
pulumi.Input
ToLifecyclePolicyRuleArrayOutput() LifecyclePolicyRuleArrayOutput
ToLifecyclePolicyRuleArrayOutputWithContext(context.Context) LifecyclePolicyRuleArrayOutput
}
type LifecyclePolicyRuleArray []LifecyclePolicyRuleInput
func (LifecyclePolicyRuleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]LifecyclePolicyRule)(nil)).Elem()
}
func (i LifecyclePolicyRuleArray) ToLifecyclePolicyRuleArrayOutput() LifecyclePolicyRuleArrayOutput {
return i.ToLifecyclePolicyRuleArrayOutputWithContext(context.Background())
}
func (i LifecyclePolicyRuleArray) ToLifecyclePolicyRuleArrayOutputWithContext(ctx context.Context) LifecyclePolicyRuleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(LifecyclePolicyRuleArrayOutput)
}
func (i LifecyclePolicyRuleArray) ToOutput(ctx context.Context) pulumix.Output[[]LifecyclePolicyRule] {
return pulumix.Output[[]LifecyclePolicyRule]{
OutputState: i.ToLifecyclePolicyRuleArrayOutputWithContext(ctx).OutputState,
}
}
// A lifecycle policy rule that determine which images in a repository should be expired.
type LifecyclePolicyRuleOutput struct{ *pulumi.OutputState }
func (LifecyclePolicyRuleOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LifecyclePolicyRule)(nil)).Elem()
}
func (o LifecyclePolicyRuleOutput) ToLifecyclePolicyRuleOutput() LifecyclePolicyRuleOutput {
return o
}
func (o LifecyclePolicyRuleOutput) ToLifecyclePolicyRuleOutputWithContext(ctx context.Context) LifecyclePolicyRuleOutput {
return o
}
func (o LifecyclePolicyRuleOutput) ToOutput(ctx context.Context) pulumix.Output[LifecyclePolicyRule] {
return pulumix.Output[LifecyclePolicyRule]{
OutputState: o.OutputState,
}
}
// Describes the purpose of a rule within a lifecycle policy.
func (o LifecyclePolicyRuleOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v LifecyclePolicyRule) *string { return v.Description }).(pulumi.StringPtrOutput)
}
// The maximum age limit (in days) for your images. Either [maximumNumberOfImages] or [maximumAgeLimit] must be provided.
func (o LifecyclePolicyRuleOutput) MaximumAgeLimit() pulumi.Float64PtrOutput {
return o.ApplyT(func(v LifecyclePolicyRule) *float64 { return v.MaximumAgeLimit }).(pulumi.Float64PtrOutput)
}
// The maximum number of images that you want to retain in your repository. Either [maximumNumberOfImages] or [maximumAgeLimit] must be provided.
func (o LifecyclePolicyRuleOutput) MaximumNumberOfImages() pulumi.Float64PtrOutput {
return o.ApplyT(func(v LifecyclePolicyRule) *float64 { return v.MaximumNumberOfImages }).(pulumi.Float64PtrOutput)
}
// A list of image tag prefixes on which to take action with your lifecycle policy. Only used if you specified "tagStatus": "tagged". For example, if your images are tagged as prod, prod1, prod2, and so on, you would use the tag prefix prod to specify all of them. If you specify multiple tags, only the images with all specified tags are selected.
func (o LifecyclePolicyRuleOutput) TagPrefixList() pulumi.StringArrayOutput {
return o.ApplyT(func(v LifecyclePolicyRule) []string { return v.TagPrefixList }).(pulumi.StringArrayOutput)
}
// Determines whether the lifecycle policy rule that you are adding specifies a tag for an image. Acceptable options are tagged, untagged, or any. If you specify any, then all images have the rule evaluated against them. If you specify tagged, then you must also specify a tagPrefixList value. If you specify untagged, then you must omit tagPrefixList.
func (o LifecyclePolicyRuleOutput) TagStatus() LifecycleTagStatusOutput {
return o.ApplyT(func(v LifecyclePolicyRule) LifecycleTagStatus { return v.TagStatus }).(LifecycleTagStatusOutput)
}
type LifecyclePolicyRuleArrayOutput struct{ *pulumi.OutputState }
func (LifecyclePolicyRuleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]LifecyclePolicyRule)(nil)).Elem()
}
func (o LifecyclePolicyRuleArrayOutput) ToLifecyclePolicyRuleArrayOutput() LifecyclePolicyRuleArrayOutput {
return o
}
func (o LifecyclePolicyRuleArrayOutput) ToLifecyclePolicyRuleArrayOutputWithContext(ctx context.Context) LifecyclePolicyRuleArrayOutput {
return o
}
func (o LifecyclePolicyRuleArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]LifecyclePolicyRule] {
return pulumix.Output[[]LifecyclePolicyRule]{
OutputState: o.OutputState,
}
}
func (o LifecyclePolicyRuleArrayOutput) Index(i pulumi.IntInput) LifecyclePolicyRuleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) LifecyclePolicyRule {
return vs[0].([]LifecyclePolicyRule)[vs[1].(int)]
}).(LifecyclePolicyRuleOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*LifecyclePolicyInput)(nil)).Elem(), LifecyclePolicyArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*LifecyclePolicyPtrInput)(nil)).Elem(), LifecyclePolicyArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*LifecyclePolicyRuleInput)(nil)).Elem(), LifecyclePolicyRuleArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*LifecyclePolicyRuleArrayInput)(nil)).Elem(), LifecyclePolicyRuleArray{})
pulumi.RegisterOutputType(LifecyclePolicyOutput{})
pulumi.RegisterOutputType(LifecyclePolicyPtrOutput{})
pulumi.RegisterOutputType(LifecyclePolicyRuleOutput{})
pulumi.RegisterOutputType(LifecyclePolicyRuleArrayOutput{})
}