/
backup.go
566 lines (500 loc) · 22.3 KB
/
backup.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
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package filestore
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumix"
)
// A Google Cloud Filestore backup.
//
// To get more information about Backup, see:
//
// * [API documentation](https://cloud.google.com/filestore/docs/reference/rest/v1/projects.locations.instances.backups)
// * How-to Guides
// - [Official Documentation](https://cloud.google.com/filestore/docs/backups)
// - [Creating Backups](https://cloud.google.com/filestore/docs/create-backups)
//
// ## Example Usage
// ### Filestore Backup Basic
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/filestore"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// instance, err := filestore.NewInstance(ctx, "instance", &filestore.InstanceArgs{
// Location: pulumi.String("us-central1-b"),
// Tier: pulumi.String("BASIC_HDD"),
// FileShares: &filestore.InstanceFileSharesArgs{
// CapacityGb: pulumi.Int(1024),
// Name: pulumi.String("share1"),
// },
// Networks: filestore.InstanceNetworkArray{
// &filestore.InstanceNetworkArgs{
// Network: pulumi.String("default"),
// Modes: pulumi.StringArray{
// pulumi.String("MODE_IPV4"),
// },
// ConnectMode: pulumi.String("DIRECT_PEERING"),
// },
// },
// })
// if err != nil {
// return err
// }
// _, err = filestore.NewBackup(ctx, "backup", &filestore.BackupArgs{
// Location: pulumi.String("us-central1"),
// Description: pulumi.String("This is a filestore backup for the test instance"),
// SourceInstance: instance.ID(),
// SourceFileShare: pulumi.String("share1"),
// Labels: pulumi.StringMap{
// "files": pulumi.String("label1"),
// "other-label": pulumi.String("label2"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// # Backup can be imported using any of these accepted formats
//
// ```sh
//
// $ pulumi import gcp:filestore/backup:Backup default projects/{{project}}/locations/{{location}}/backups/{{name}}
//
// ```
//
// ```sh
//
// $ pulumi import gcp:filestore/backup:Backup default {{project}}/{{location}}/{{name}}
//
// ```
//
// ```sh
//
// $ pulumi import gcp:filestore/backup:Backup default {{location}}/{{name}}
//
// ```
type Backup struct {
pulumi.CustomResourceState
// The amount of bytes needed to allocate a full copy of the snapshot content.
CapacityGb pulumi.StringOutput `pulumi:"capacityGb"`
// The time when the snapshot was created in RFC3339 text format.
CreateTime pulumi.StringOutput `pulumi:"createTime"`
// A description of the backup with 2048 characters or less. Requests with longer descriptions will be rejected.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Amount of bytes that will be downloaded if the backup is restored.
DownloadBytes pulumi.StringOutput `pulumi:"downloadBytes"`
// KMS key name used for data encryption.
KmsKeyName pulumi.StringOutput `pulumi:"kmsKeyName"`
// Resource labels to represent user-provided metadata.
Labels pulumi.StringMapOutput `pulumi:"labels"`
// The name of the location of the instance. This can be a region for ENTERPRISE tier instances.
//
// ***
Location pulumi.StringOutput `pulumi:"location"`
// The resource name of the backup. The name must be unique within the specified instance.
// The name must be 1-63 characters long, and comply with
// RFC1035. Specifically, the name must be 1-63 characters long and match
// the regular expression `a-z?` which means the
// first character must be a lowercase letter, and all following
// characters must be a dash, lowercase letter, or digit, except the last
// character, which cannot be a dash.
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project pulumi.StringOutput `pulumi:"project"`
// Name of the file share in the source Cloud Filestore instance that the backup is created from.
SourceFileShare pulumi.StringOutput `pulumi:"sourceFileShare"`
// The resource name of the source Cloud Filestore instance, in the format projects/{projectId}/locations/{locationId}/instances/{instanceId}, used to create this backup.
SourceInstance pulumi.StringOutput `pulumi:"sourceInstance"`
// The service tier of the source Cloud Filestore instance that this backup is created from.
SourceInstanceTier pulumi.StringOutput `pulumi:"sourceInstanceTier"`
// The backup state.
State pulumi.StringOutput `pulumi:"state"`
// The size of the storage used by the backup. As backups share storage, this number is expected to change with backup creation/deletion.
StorageBytes pulumi.StringOutput `pulumi:"storageBytes"`
}
// NewBackup registers a new resource with the given unique name, arguments, and options.
func NewBackup(ctx *pulumi.Context,
name string, args *BackupArgs, opts ...pulumi.ResourceOption) (*Backup, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Location == nil {
return nil, errors.New("invalid value for required argument 'Location'")
}
if args.SourceFileShare == nil {
return nil, errors.New("invalid value for required argument 'SourceFileShare'")
}
if args.SourceInstance == nil {
return nil, errors.New("invalid value for required argument 'SourceInstance'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Backup
err := ctx.RegisterResource("gcp:filestore/backup:Backup", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetBackup gets an existing Backup resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetBackup(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *BackupState, opts ...pulumi.ResourceOption) (*Backup, error) {
var resource Backup
err := ctx.ReadResource("gcp:filestore/backup:Backup", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Backup resources.
type backupState struct {
// The amount of bytes needed to allocate a full copy of the snapshot content.
CapacityGb *string `pulumi:"capacityGb"`
// The time when the snapshot was created in RFC3339 text format.
CreateTime *string `pulumi:"createTime"`
// A description of the backup with 2048 characters or less. Requests with longer descriptions will be rejected.
Description *string `pulumi:"description"`
// Amount of bytes that will be downloaded if the backup is restored.
DownloadBytes *string `pulumi:"downloadBytes"`
// KMS key name used for data encryption.
KmsKeyName *string `pulumi:"kmsKeyName"`
// Resource labels to represent user-provided metadata.
Labels map[string]string `pulumi:"labels"`
// The name of the location of the instance. This can be a region for ENTERPRISE tier instances.
//
// ***
Location *string `pulumi:"location"`
// The resource name of the backup. The name must be unique within the specified instance.
// The name must be 1-63 characters long, and comply with
// RFC1035. Specifically, the name must be 1-63 characters long and match
// the regular expression `a-z?` which means the
// first character must be a lowercase letter, and all following
// characters must be a dash, lowercase letter, or digit, except the last
// character, which cannot be a dash.
Name *string `pulumi:"name"`
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project *string `pulumi:"project"`
// Name of the file share in the source Cloud Filestore instance that the backup is created from.
SourceFileShare *string `pulumi:"sourceFileShare"`
// The resource name of the source Cloud Filestore instance, in the format projects/{projectId}/locations/{locationId}/instances/{instanceId}, used to create this backup.
SourceInstance *string `pulumi:"sourceInstance"`
// The service tier of the source Cloud Filestore instance that this backup is created from.
SourceInstanceTier *string `pulumi:"sourceInstanceTier"`
// The backup state.
State *string `pulumi:"state"`
// The size of the storage used by the backup. As backups share storage, this number is expected to change with backup creation/deletion.
StorageBytes *string `pulumi:"storageBytes"`
}
type BackupState struct {
// The amount of bytes needed to allocate a full copy of the snapshot content.
CapacityGb pulumi.StringPtrInput
// The time when the snapshot was created in RFC3339 text format.
CreateTime pulumi.StringPtrInput
// A description of the backup with 2048 characters or less. Requests with longer descriptions will be rejected.
Description pulumi.StringPtrInput
// Amount of bytes that will be downloaded if the backup is restored.
DownloadBytes pulumi.StringPtrInput
// KMS key name used for data encryption.
KmsKeyName pulumi.StringPtrInput
// Resource labels to represent user-provided metadata.
Labels pulumi.StringMapInput
// The name of the location of the instance. This can be a region for ENTERPRISE tier instances.
//
// ***
Location pulumi.StringPtrInput
// The resource name of the backup. The name must be unique within the specified instance.
// The name must be 1-63 characters long, and comply with
// RFC1035. Specifically, the name must be 1-63 characters long and match
// the regular expression `a-z?` which means the
// first character must be a lowercase letter, and all following
// characters must be a dash, lowercase letter, or digit, except the last
// character, which cannot be a dash.
Name pulumi.StringPtrInput
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project pulumi.StringPtrInput
// Name of the file share in the source Cloud Filestore instance that the backup is created from.
SourceFileShare pulumi.StringPtrInput
// The resource name of the source Cloud Filestore instance, in the format projects/{projectId}/locations/{locationId}/instances/{instanceId}, used to create this backup.
SourceInstance pulumi.StringPtrInput
// The service tier of the source Cloud Filestore instance that this backup is created from.
SourceInstanceTier pulumi.StringPtrInput
// The backup state.
State pulumi.StringPtrInput
// The size of the storage used by the backup. As backups share storage, this number is expected to change with backup creation/deletion.
StorageBytes pulumi.StringPtrInput
}
func (BackupState) ElementType() reflect.Type {
return reflect.TypeOf((*backupState)(nil)).Elem()
}
type backupArgs struct {
// A description of the backup with 2048 characters or less. Requests with longer descriptions will be rejected.
Description *string `pulumi:"description"`
// Resource labels to represent user-provided metadata.
Labels map[string]string `pulumi:"labels"`
// The name of the location of the instance. This can be a region for ENTERPRISE tier instances.
//
// ***
Location string `pulumi:"location"`
// The resource name of the backup. The name must be unique within the specified instance.
// The name must be 1-63 characters long, and comply with
// RFC1035. Specifically, the name must be 1-63 characters long and match
// the regular expression `a-z?` which means the
// first character must be a lowercase letter, and all following
// characters must be a dash, lowercase letter, or digit, except the last
// character, which cannot be a dash.
Name *string `pulumi:"name"`
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project *string `pulumi:"project"`
// Name of the file share in the source Cloud Filestore instance that the backup is created from.
SourceFileShare string `pulumi:"sourceFileShare"`
// The resource name of the source Cloud Filestore instance, in the format projects/{projectId}/locations/{locationId}/instances/{instanceId}, used to create this backup.
SourceInstance string `pulumi:"sourceInstance"`
}
// The set of arguments for constructing a Backup resource.
type BackupArgs struct {
// A description of the backup with 2048 characters or less. Requests with longer descriptions will be rejected.
Description pulumi.StringPtrInput
// Resource labels to represent user-provided metadata.
Labels pulumi.StringMapInput
// The name of the location of the instance. This can be a region for ENTERPRISE tier instances.
//
// ***
Location pulumi.StringInput
// The resource name of the backup. The name must be unique within the specified instance.
// The name must be 1-63 characters long, and comply with
// RFC1035. Specifically, the name must be 1-63 characters long and match
// the regular expression `a-z?` which means the
// first character must be a lowercase letter, and all following
// characters must be a dash, lowercase letter, or digit, except the last
// character, which cannot be a dash.
Name pulumi.StringPtrInput
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project pulumi.StringPtrInput
// Name of the file share in the source Cloud Filestore instance that the backup is created from.
SourceFileShare pulumi.StringInput
// The resource name of the source Cloud Filestore instance, in the format projects/{projectId}/locations/{locationId}/instances/{instanceId}, used to create this backup.
SourceInstance pulumi.StringInput
}
func (BackupArgs) ElementType() reflect.Type {
return reflect.TypeOf((*backupArgs)(nil)).Elem()
}
type BackupInput interface {
pulumi.Input
ToBackupOutput() BackupOutput
ToBackupOutputWithContext(ctx context.Context) BackupOutput
}
func (*Backup) ElementType() reflect.Type {
return reflect.TypeOf((**Backup)(nil)).Elem()
}
func (i *Backup) ToBackupOutput() BackupOutput {
return i.ToBackupOutputWithContext(context.Background())
}
func (i *Backup) ToBackupOutputWithContext(ctx context.Context) BackupOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupOutput)
}
func (i *Backup) ToOutput(ctx context.Context) pulumix.Output[*Backup] {
return pulumix.Output[*Backup]{
OutputState: i.ToBackupOutputWithContext(ctx).OutputState,
}
}
// BackupArrayInput is an input type that accepts BackupArray and BackupArrayOutput values.
// You can construct a concrete instance of `BackupArrayInput` via:
//
// BackupArray{ BackupArgs{...} }
type BackupArrayInput interface {
pulumi.Input
ToBackupArrayOutput() BackupArrayOutput
ToBackupArrayOutputWithContext(context.Context) BackupArrayOutput
}
type BackupArray []BackupInput
func (BackupArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Backup)(nil)).Elem()
}
func (i BackupArray) ToBackupArrayOutput() BackupArrayOutput {
return i.ToBackupArrayOutputWithContext(context.Background())
}
func (i BackupArray) ToBackupArrayOutputWithContext(ctx context.Context) BackupArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupArrayOutput)
}
func (i BackupArray) ToOutput(ctx context.Context) pulumix.Output[[]*Backup] {
return pulumix.Output[[]*Backup]{
OutputState: i.ToBackupArrayOutputWithContext(ctx).OutputState,
}
}
// BackupMapInput is an input type that accepts BackupMap and BackupMapOutput values.
// You can construct a concrete instance of `BackupMapInput` via:
//
// BackupMap{ "key": BackupArgs{...} }
type BackupMapInput interface {
pulumi.Input
ToBackupMapOutput() BackupMapOutput
ToBackupMapOutputWithContext(context.Context) BackupMapOutput
}
type BackupMap map[string]BackupInput
func (BackupMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Backup)(nil)).Elem()
}
func (i BackupMap) ToBackupMapOutput() BackupMapOutput {
return i.ToBackupMapOutputWithContext(context.Background())
}
func (i BackupMap) ToBackupMapOutputWithContext(ctx context.Context) BackupMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(BackupMapOutput)
}
func (i BackupMap) ToOutput(ctx context.Context) pulumix.Output[map[string]*Backup] {
return pulumix.Output[map[string]*Backup]{
OutputState: i.ToBackupMapOutputWithContext(ctx).OutputState,
}
}
type BackupOutput struct{ *pulumi.OutputState }
func (BackupOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Backup)(nil)).Elem()
}
func (o BackupOutput) ToBackupOutput() BackupOutput {
return o
}
func (o BackupOutput) ToBackupOutputWithContext(ctx context.Context) BackupOutput {
return o
}
func (o BackupOutput) ToOutput(ctx context.Context) pulumix.Output[*Backup] {
return pulumix.Output[*Backup]{
OutputState: o.OutputState,
}
}
// The amount of bytes needed to allocate a full copy of the snapshot content.
func (o BackupOutput) CapacityGb() pulumi.StringOutput {
return o.ApplyT(func(v *Backup) pulumi.StringOutput { return v.CapacityGb }).(pulumi.StringOutput)
}
// The time when the snapshot was created in RFC3339 text format.
func (o BackupOutput) CreateTime() pulumi.StringOutput {
return o.ApplyT(func(v *Backup) pulumi.StringOutput { return v.CreateTime }).(pulumi.StringOutput)
}
// A description of the backup with 2048 characters or less. Requests with longer descriptions will be rejected.
func (o BackupOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Backup) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Amount of bytes that will be downloaded if the backup is restored.
func (o BackupOutput) DownloadBytes() pulumi.StringOutput {
return o.ApplyT(func(v *Backup) pulumi.StringOutput { return v.DownloadBytes }).(pulumi.StringOutput)
}
// KMS key name used for data encryption.
func (o BackupOutput) KmsKeyName() pulumi.StringOutput {
return o.ApplyT(func(v *Backup) pulumi.StringOutput { return v.KmsKeyName }).(pulumi.StringOutput)
}
// Resource labels to represent user-provided metadata.
func (o BackupOutput) Labels() pulumi.StringMapOutput {
return o.ApplyT(func(v *Backup) pulumi.StringMapOutput { return v.Labels }).(pulumi.StringMapOutput)
}
// The name of the location of the instance. This can be a region for ENTERPRISE tier instances.
//
// ***
func (o BackupOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Backup) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The resource name of the backup. The name must be unique within the specified instance.
// The name must be 1-63 characters long, and comply with
// RFC1035. Specifically, the name must be 1-63 characters long and match
// the regular expression `a-z?` which means the
// first character must be a lowercase letter, and all following
// characters must be a dash, lowercase letter, or digit, except the last
// character, which cannot be a dash.
func (o BackupOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Backup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
func (o BackupOutput) Project() pulumi.StringOutput {
return o.ApplyT(func(v *Backup) pulumi.StringOutput { return v.Project }).(pulumi.StringOutput)
}
// Name of the file share in the source Cloud Filestore instance that the backup is created from.
func (o BackupOutput) SourceFileShare() pulumi.StringOutput {
return o.ApplyT(func(v *Backup) pulumi.StringOutput { return v.SourceFileShare }).(pulumi.StringOutput)
}
// The resource name of the source Cloud Filestore instance, in the format projects/{projectId}/locations/{locationId}/instances/{instanceId}, used to create this backup.
func (o BackupOutput) SourceInstance() pulumi.StringOutput {
return o.ApplyT(func(v *Backup) pulumi.StringOutput { return v.SourceInstance }).(pulumi.StringOutput)
}
// The service tier of the source Cloud Filestore instance that this backup is created from.
func (o BackupOutput) SourceInstanceTier() pulumi.StringOutput {
return o.ApplyT(func(v *Backup) pulumi.StringOutput { return v.SourceInstanceTier }).(pulumi.StringOutput)
}
// The backup state.
func (o BackupOutput) State() pulumi.StringOutput {
return o.ApplyT(func(v *Backup) pulumi.StringOutput { return v.State }).(pulumi.StringOutput)
}
// The size of the storage used by the backup. As backups share storage, this number is expected to change with backup creation/deletion.
func (o BackupOutput) StorageBytes() pulumi.StringOutput {
return o.ApplyT(func(v *Backup) pulumi.StringOutput { return v.StorageBytes }).(pulumi.StringOutput)
}
type BackupArrayOutput struct{ *pulumi.OutputState }
func (BackupArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Backup)(nil)).Elem()
}
func (o BackupArrayOutput) ToBackupArrayOutput() BackupArrayOutput {
return o
}
func (o BackupArrayOutput) ToBackupArrayOutputWithContext(ctx context.Context) BackupArrayOutput {
return o
}
func (o BackupArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]*Backup] {
return pulumix.Output[[]*Backup]{
OutputState: o.OutputState,
}
}
func (o BackupArrayOutput) Index(i pulumi.IntInput) BackupOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Backup {
return vs[0].([]*Backup)[vs[1].(int)]
}).(BackupOutput)
}
type BackupMapOutput struct{ *pulumi.OutputState }
func (BackupMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Backup)(nil)).Elem()
}
func (o BackupMapOutput) ToBackupMapOutput() BackupMapOutput {
return o
}
func (o BackupMapOutput) ToBackupMapOutputWithContext(ctx context.Context) BackupMapOutput {
return o
}
func (o BackupMapOutput) ToOutput(ctx context.Context) pulumix.Output[map[string]*Backup] {
return pulumix.Output[map[string]*Backup]{
OutputState: o.OutputState,
}
}
func (o BackupMapOutput) MapIndex(k pulumi.StringInput) BackupOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Backup {
return vs[0].(map[string]*Backup)[vs[1].(string)]
}).(BackupOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*BackupInput)(nil)).Elem(), &Backup{})
pulumi.RegisterInputType(reflect.TypeOf((*BackupArrayInput)(nil)).Elem(), BackupArray{})
pulumi.RegisterInputType(reflect.TypeOf((*BackupMapInput)(nil)).Elem(), BackupMap{})
pulumi.RegisterOutputType(BackupOutput{})
pulumi.RegisterOutputType(BackupArrayOutput{})
pulumi.RegisterOutputType(BackupMapOutput{})
}