/
fileCache.go
538 lines (474 loc) · 28.4 KB
/
fileCache.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
// 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 fsx
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Resource for managing an Amazon File Cache cache.
// See the [Create File Cache](https://docs.aws.amazon.com/fsx/latest/APIReference/API_CreateFileCache.html) for more information.
//
// ## Example Usage
//
// <!--Start PulumiCodeChooser -->
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/fsx"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := fsx.NewFileCache(ctx, "example", &fsx.FileCacheArgs{
// DataRepositoryAssociations: fsx.FileCacheDataRepositoryAssociationArray{
// &fsx.FileCacheDataRepositoryAssociationArgs{
// DataRepositoryPath: pulumi.String("nfs://filer.domain.com"),
// DataRepositorySubdirectories: pulumi.StringArray{
// pulumi.String("test"),
// pulumi.String("test2"),
// },
// FileCachePath: pulumi.String("/ns1"),
// Nfs: fsx.FileCacheDataRepositoryAssociationNfArray{
// &fsx.FileCacheDataRepositoryAssociationNfArgs{
// DnsIps: pulumi.StringArray{
// pulumi.String("192.168.0.1"),
// pulumi.String("192.168.0.2"),
// },
// Version: pulumi.String("NFS3"),
// },
// },
// },
// },
// FileCacheType: pulumi.String("LUSTRE"),
// FileCacheTypeVersion: pulumi.String("2.12"),
// LustreConfigurations: fsx.FileCacheLustreConfigurationArray{
// &fsx.FileCacheLustreConfigurationArgs{
// DeploymentType: pulumi.String("CACHE_1"),
// MetadataConfigurations: fsx.FileCacheLustreConfigurationMetadataConfigurationArray{
// &fsx.FileCacheLustreConfigurationMetadataConfigurationArgs{
// StorageCapacity: pulumi.Int(2400),
// },
// },
// PerUnitStorageThroughput: pulumi.Int(1000),
// WeeklyMaintenanceStartTime: pulumi.String("2:05:00"),
// },
// },
// SubnetIds: pulumi.StringArray{
// test1.Id,
// },
// StorageCapacity: pulumi.Int(1200),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
// <!--End PulumiCodeChooser -->
//
// ## Import
//
// Using `pulumi import`, import Amazon File Cache cache using the resource `id`. For example:
//
// ```sh
// $ pulumi import aws:fsx/fileCache:FileCache example fc-8012925589
// ```
type FileCache struct {
pulumi.CustomResourceState
// The Amazon Resource Name (ARN) for the resource.
Arn pulumi.StringOutput `pulumi:"arn"`
// A boolean flag indicating whether tags for the cache should be copied to data repository associations. This value defaults to false.
CopyTagsToDataRepositoryAssociations pulumi.BoolPtrOutput `pulumi:"copyTagsToDataRepositoryAssociations"`
// A list of IDs of data repository associations that are associated with this cache.
DataRepositoryAssociationIds pulumi.StringArrayOutput `pulumi:"dataRepositoryAssociationIds"`
// See the `dataRepositoryAssociation` configuration block. Max of 8.
// A list of up to 8 configurations for data repository associations (DRAs) to be created during the cache creation. The DRAs link the cache to either an Amazon S3 data repository or a Network File System (NFS) data repository that supports the NFSv3 protocol. The DRA configurations must meet the following requirements: 1) All configurations on the list must be of the same data repository type, either all S3 or all NFS. A cache can't link to different data repository types at the same time. 2) An NFS DRA must link to an NFS file system that supports the NFSv3 protocol. DRA automatic import and automatic export is not supported.
DataRepositoryAssociations FileCacheDataRepositoryAssociationArrayOutput `pulumi:"dataRepositoryAssociations"`
// The Domain Name System (DNS) name for the cache.
DnsName pulumi.StringOutput `pulumi:"dnsName"`
// The system-generated, unique ID of the cache.
FileCacheId pulumi.StringOutput `pulumi:"fileCacheId"`
// The type of cache that you're creating. The only supported value is `LUSTRE`.
FileCacheType pulumi.StringOutput `pulumi:"fileCacheType"`
// The version for the type of cache that you're creating. The only supported value is `2.12`.
FileCacheTypeVersion pulumi.StringOutput `pulumi:"fileCacheTypeVersion"`
// Specifies the ID of the AWS Key Management Service (AWS KMS) key to use for encrypting data on an Amazon File Cache. If a KmsKeyId isn't specified, the Amazon FSx-managed AWS KMS key for your account is used.
KmsKeyId pulumi.StringOutput `pulumi:"kmsKeyId"`
// See the `lustreConfiguration` block. Required when `fileCacheType` is `LUSTRE`.
LustreConfigurations FileCacheLustreConfigurationArrayOutput `pulumi:"lustreConfigurations"`
// A list of network interface IDs.
NetworkInterfaceIds pulumi.StringArrayOutput `pulumi:"networkInterfaceIds"`
OwnerId pulumi.StringOutput `pulumi:"ownerId"`
// A list of IDs specifying the security groups to apply to all network interfaces created for Amazon File Cache access.
SecurityGroupIds pulumi.StringArrayOutput `pulumi:"securityGroupIds"`
// The storage capacity of the cache in gibibytes (GiB). Valid values are `1200` GiB, `2400` GiB, and increments of `2400` GiB.
StorageCapacity pulumi.IntOutput `pulumi:"storageCapacity"`
// A list of subnet IDs that the cache will be accessible from. You can specify only one subnet ID.
//
// The following arguments are optional:
SubnetIds pulumi.StringArrayOutput `pulumi:"subnetIds"`
// A map of tags to assign to the file cache. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// Deprecated: Please use `tags` instead.
TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
// The ID of your virtual private cloud (VPC).
VpcId pulumi.StringOutput `pulumi:"vpcId"`
}
// NewFileCache registers a new resource with the given unique name, arguments, and options.
func NewFileCache(ctx *pulumi.Context,
name string, args *FileCacheArgs, opts ...pulumi.ResourceOption) (*FileCache, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.FileCacheType == nil {
return nil, errors.New("invalid value for required argument 'FileCacheType'")
}
if args.FileCacheTypeVersion == nil {
return nil, errors.New("invalid value for required argument 'FileCacheTypeVersion'")
}
if args.StorageCapacity == nil {
return nil, errors.New("invalid value for required argument 'StorageCapacity'")
}
if args.SubnetIds == nil {
return nil, errors.New("invalid value for required argument 'SubnetIds'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource FileCache
err := ctx.RegisterResource("aws:fsx/fileCache:FileCache", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetFileCache gets an existing FileCache 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 GetFileCache(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *FileCacheState, opts ...pulumi.ResourceOption) (*FileCache, error) {
var resource FileCache
err := ctx.ReadResource("aws:fsx/fileCache:FileCache", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering FileCache resources.
type fileCacheState struct {
// The Amazon Resource Name (ARN) for the resource.
Arn *string `pulumi:"arn"`
// A boolean flag indicating whether tags for the cache should be copied to data repository associations. This value defaults to false.
CopyTagsToDataRepositoryAssociations *bool `pulumi:"copyTagsToDataRepositoryAssociations"`
// A list of IDs of data repository associations that are associated with this cache.
DataRepositoryAssociationIds []string `pulumi:"dataRepositoryAssociationIds"`
// See the `dataRepositoryAssociation` configuration block. Max of 8.
// A list of up to 8 configurations for data repository associations (DRAs) to be created during the cache creation. The DRAs link the cache to either an Amazon S3 data repository or a Network File System (NFS) data repository that supports the NFSv3 protocol. The DRA configurations must meet the following requirements: 1) All configurations on the list must be of the same data repository type, either all S3 or all NFS. A cache can't link to different data repository types at the same time. 2) An NFS DRA must link to an NFS file system that supports the NFSv3 protocol. DRA automatic import and automatic export is not supported.
DataRepositoryAssociations []FileCacheDataRepositoryAssociation `pulumi:"dataRepositoryAssociations"`
// The Domain Name System (DNS) name for the cache.
DnsName *string `pulumi:"dnsName"`
// The system-generated, unique ID of the cache.
FileCacheId *string `pulumi:"fileCacheId"`
// The type of cache that you're creating. The only supported value is `LUSTRE`.
FileCacheType *string `pulumi:"fileCacheType"`
// The version for the type of cache that you're creating. The only supported value is `2.12`.
FileCacheTypeVersion *string `pulumi:"fileCacheTypeVersion"`
// Specifies the ID of the AWS Key Management Service (AWS KMS) key to use for encrypting data on an Amazon File Cache. If a KmsKeyId isn't specified, the Amazon FSx-managed AWS KMS key for your account is used.
KmsKeyId *string `pulumi:"kmsKeyId"`
// See the `lustreConfiguration` block. Required when `fileCacheType` is `LUSTRE`.
LustreConfigurations []FileCacheLustreConfiguration `pulumi:"lustreConfigurations"`
// A list of network interface IDs.
NetworkInterfaceIds []string `pulumi:"networkInterfaceIds"`
OwnerId *string `pulumi:"ownerId"`
// A list of IDs specifying the security groups to apply to all network interfaces created for Amazon File Cache access.
SecurityGroupIds []string `pulumi:"securityGroupIds"`
// The storage capacity of the cache in gibibytes (GiB). Valid values are `1200` GiB, `2400` GiB, and increments of `2400` GiB.
StorageCapacity *int `pulumi:"storageCapacity"`
// A list of subnet IDs that the cache will be accessible from. You can specify only one subnet ID.
//
// The following arguments are optional:
SubnetIds []string `pulumi:"subnetIds"`
// A map of tags to assign to the file cache. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags map[string]string `pulumi:"tags"`
// Deprecated: Please use `tags` instead.
TagsAll map[string]string `pulumi:"tagsAll"`
// The ID of your virtual private cloud (VPC).
VpcId *string `pulumi:"vpcId"`
}
type FileCacheState struct {
// The Amazon Resource Name (ARN) for the resource.
Arn pulumi.StringPtrInput
// A boolean flag indicating whether tags for the cache should be copied to data repository associations. This value defaults to false.
CopyTagsToDataRepositoryAssociations pulumi.BoolPtrInput
// A list of IDs of data repository associations that are associated with this cache.
DataRepositoryAssociationIds pulumi.StringArrayInput
// See the `dataRepositoryAssociation` configuration block. Max of 8.
// A list of up to 8 configurations for data repository associations (DRAs) to be created during the cache creation. The DRAs link the cache to either an Amazon S3 data repository or a Network File System (NFS) data repository that supports the NFSv3 protocol. The DRA configurations must meet the following requirements: 1) All configurations on the list must be of the same data repository type, either all S3 or all NFS. A cache can't link to different data repository types at the same time. 2) An NFS DRA must link to an NFS file system that supports the NFSv3 protocol. DRA automatic import and automatic export is not supported.
DataRepositoryAssociations FileCacheDataRepositoryAssociationArrayInput
// The Domain Name System (DNS) name for the cache.
DnsName pulumi.StringPtrInput
// The system-generated, unique ID of the cache.
FileCacheId pulumi.StringPtrInput
// The type of cache that you're creating. The only supported value is `LUSTRE`.
FileCacheType pulumi.StringPtrInput
// The version for the type of cache that you're creating. The only supported value is `2.12`.
FileCacheTypeVersion pulumi.StringPtrInput
// Specifies the ID of the AWS Key Management Service (AWS KMS) key to use for encrypting data on an Amazon File Cache. If a KmsKeyId isn't specified, the Amazon FSx-managed AWS KMS key for your account is used.
KmsKeyId pulumi.StringPtrInput
// See the `lustreConfiguration` block. Required when `fileCacheType` is `LUSTRE`.
LustreConfigurations FileCacheLustreConfigurationArrayInput
// A list of network interface IDs.
NetworkInterfaceIds pulumi.StringArrayInput
OwnerId pulumi.StringPtrInput
// A list of IDs specifying the security groups to apply to all network interfaces created for Amazon File Cache access.
SecurityGroupIds pulumi.StringArrayInput
// The storage capacity of the cache in gibibytes (GiB). Valid values are `1200` GiB, `2400` GiB, and increments of `2400` GiB.
StorageCapacity pulumi.IntPtrInput
// A list of subnet IDs that the cache will be accessible from. You can specify only one subnet ID.
//
// The following arguments are optional:
SubnetIds pulumi.StringArrayInput
// A map of tags to assign to the file cache. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags pulumi.StringMapInput
// Deprecated: Please use `tags` instead.
TagsAll pulumi.StringMapInput
// The ID of your virtual private cloud (VPC).
VpcId pulumi.StringPtrInput
}
func (FileCacheState) ElementType() reflect.Type {
return reflect.TypeOf((*fileCacheState)(nil)).Elem()
}
type fileCacheArgs struct {
// A boolean flag indicating whether tags for the cache should be copied to data repository associations. This value defaults to false.
CopyTagsToDataRepositoryAssociations *bool `pulumi:"copyTagsToDataRepositoryAssociations"`
// See the `dataRepositoryAssociation` configuration block. Max of 8.
// A list of up to 8 configurations for data repository associations (DRAs) to be created during the cache creation. The DRAs link the cache to either an Amazon S3 data repository or a Network File System (NFS) data repository that supports the NFSv3 protocol. The DRA configurations must meet the following requirements: 1) All configurations on the list must be of the same data repository type, either all S3 or all NFS. A cache can't link to different data repository types at the same time. 2) An NFS DRA must link to an NFS file system that supports the NFSv3 protocol. DRA automatic import and automatic export is not supported.
DataRepositoryAssociations []FileCacheDataRepositoryAssociation `pulumi:"dataRepositoryAssociations"`
// The type of cache that you're creating. The only supported value is `LUSTRE`.
FileCacheType string `pulumi:"fileCacheType"`
// The version for the type of cache that you're creating. The only supported value is `2.12`.
FileCacheTypeVersion string `pulumi:"fileCacheTypeVersion"`
// Specifies the ID of the AWS Key Management Service (AWS KMS) key to use for encrypting data on an Amazon File Cache. If a KmsKeyId isn't specified, the Amazon FSx-managed AWS KMS key for your account is used.
KmsKeyId *string `pulumi:"kmsKeyId"`
// See the `lustreConfiguration` block. Required when `fileCacheType` is `LUSTRE`.
LustreConfigurations []FileCacheLustreConfiguration `pulumi:"lustreConfigurations"`
// A list of IDs specifying the security groups to apply to all network interfaces created for Amazon File Cache access.
SecurityGroupIds []string `pulumi:"securityGroupIds"`
// The storage capacity of the cache in gibibytes (GiB). Valid values are `1200` GiB, `2400` GiB, and increments of `2400` GiB.
StorageCapacity int `pulumi:"storageCapacity"`
// A list of subnet IDs that the cache will be accessible from. You can specify only one subnet ID.
//
// The following arguments are optional:
SubnetIds []string `pulumi:"subnetIds"`
// A map of tags to assign to the file cache. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a FileCache resource.
type FileCacheArgs struct {
// A boolean flag indicating whether tags for the cache should be copied to data repository associations. This value defaults to false.
CopyTagsToDataRepositoryAssociations pulumi.BoolPtrInput
// See the `dataRepositoryAssociation` configuration block. Max of 8.
// A list of up to 8 configurations for data repository associations (DRAs) to be created during the cache creation. The DRAs link the cache to either an Amazon S3 data repository or a Network File System (NFS) data repository that supports the NFSv3 protocol. The DRA configurations must meet the following requirements: 1) All configurations on the list must be of the same data repository type, either all S3 or all NFS. A cache can't link to different data repository types at the same time. 2) An NFS DRA must link to an NFS file system that supports the NFSv3 protocol. DRA automatic import and automatic export is not supported.
DataRepositoryAssociations FileCacheDataRepositoryAssociationArrayInput
// The type of cache that you're creating. The only supported value is `LUSTRE`.
FileCacheType pulumi.StringInput
// The version for the type of cache that you're creating. The only supported value is `2.12`.
FileCacheTypeVersion pulumi.StringInput
// Specifies the ID of the AWS Key Management Service (AWS KMS) key to use for encrypting data on an Amazon File Cache. If a KmsKeyId isn't specified, the Amazon FSx-managed AWS KMS key for your account is used.
KmsKeyId pulumi.StringPtrInput
// See the `lustreConfiguration` block. Required when `fileCacheType` is `LUSTRE`.
LustreConfigurations FileCacheLustreConfigurationArrayInput
// A list of IDs specifying the security groups to apply to all network interfaces created for Amazon File Cache access.
SecurityGroupIds pulumi.StringArrayInput
// The storage capacity of the cache in gibibytes (GiB). Valid values are `1200` GiB, `2400` GiB, and increments of `2400` GiB.
StorageCapacity pulumi.IntInput
// A list of subnet IDs that the cache will be accessible from. You can specify only one subnet ID.
//
// The following arguments are optional:
SubnetIds pulumi.StringArrayInput
// A map of tags to assign to the file cache. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags pulumi.StringMapInput
}
func (FileCacheArgs) ElementType() reflect.Type {
return reflect.TypeOf((*fileCacheArgs)(nil)).Elem()
}
type FileCacheInput interface {
pulumi.Input
ToFileCacheOutput() FileCacheOutput
ToFileCacheOutputWithContext(ctx context.Context) FileCacheOutput
}
func (*FileCache) ElementType() reflect.Type {
return reflect.TypeOf((**FileCache)(nil)).Elem()
}
func (i *FileCache) ToFileCacheOutput() FileCacheOutput {
return i.ToFileCacheOutputWithContext(context.Background())
}
func (i *FileCache) ToFileCacheOutputWithContext(ctx context.Context) FileCacheOutput {
return pulumi.ToOutputWithContext(ctx, i).(FileCacheOutput)
}
// FileCacheArrayInput is an input type that accepts FileCacheArray and FileCacheArrayOutput values.
// You can construct a concrete instance of `FileCacheArrayInput` via:
//
// FileCacheArray{ FileCacheArgs{...} }
type FileCacheArrayInput interface {
pulumi.Input
ToFileCacheArrayOutput() FileCacheArrayOutput
ToFileCacheArrayOutputWithContext(context.Context) FileCacheArrayOutput
}
type FileCacheArray []FileCacheInput
func (FileCacheArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*FileCache)(nil)).Elem()
}
func (i FileCacheArray) ToFileCacheArrayOutput() FileCacheArrayOutput {
return i.ToFileCacheArrayOutputWithContext(context.Background())
}
func (i FileCacheArray) ToFileCacheArrayOutputWithContext(ctx context.Context) FileCacheArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(FileCacheArrayOutput)
}
// FileCacheMapInput is an input type that accepts FileCacheMap and FileCacheMapOutput values.
// You can construct a concrete instance of `FileCacheMapInput` via:
//
// FileCacheMap{ "key": FileCacheArgs{...} }
type FileCacheMapInput interface {
pulumi.Input
ToFileCacheMapOutput() FileCacheMapOutput
ToFileCacheMapOutputWithContext(context.Context) FileCacheMapOutput
}
type FileCacheMap map[string]FileCacheInput
func (FileCacheMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*FileCache)(nil)).Elem()
}
func (i FileCacheMap) ToFileCacheMapOutput() FileCacheMapOutput {
return i.ToFileCacheMapOutputWithContext(context.Background())
}
func (i FileCacheMap) ToFileCacheMapOutputWithContext(ctx context.Context) FileCacheMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(FileCacheMapOutput)
}
type FileCacheOutput struct{ *pulumi.OutputState }
func (FileCacheOutput) ElementType() reflect.Type {
return reflect.TypeOf((**FileCache)(nil)).Elem()
}
func (o FileCacheOutput) ToFileCacheOutput() FileCacheOutput {
return o
}
func (o FileCacheOutput) ToFileCacheOutputWithContext(ctx context.Context) FileCacheOutput {
return o
}
// The Amazon Resource Name (ARN) for the resource.
func (o FileCacheOutput) Arn() pulumi.StringOutput {
return o.ApplyT(func(v *FileCache) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
}
// A boolean flag indicating whether tags for the cache should be copied to data repository associations. This value defaults to false.
func (o FileCacheOutput) CopyTagsToDataRepositoryAssociations() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *FileCache) pulumi.BoolPtrOutput { return v.CopyTagsToDataRepositoryAssociations }).(pulumi.BoolPtrOutput)
}
// A list of IDs of data repository associations that are associated with this cache.
func (o FileCacheOutput) DataRepositoryAssociationIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *FileCache) pulumi.StringArrayOutput { return v.DataRepositoryAssociationIds }).(pulumi.StringArrayOutput)
}
// See the `dataRepositoryAssociation` configuration block. Max of 8.
// A list of up to 8 configurations for data repository associations (DRAs) to be created during the cache creation. The DRAs link the cache to either an Amazon S3 data repository or a Network File System (NFS) data repository that supports the NFSv3 protocol. The DRA configurations must meet the following requirements: 1) All configurations on the list must be of the same data repository type, either all S3 or all NFS. A cache can't link to different data repository types at the same time. 2) An NFS DRA must link to an NFS file system that supports the NFSv3 protocol. DRA automatic import and automatic export is not supported.
func (o FileCacheOutput) DataRepositoryAssociations() FileCacheDataRepositoryAssociationArrayOutput {
return o.ApplyT(func(v *FileCache) FileCacheDataRepositoryAssociationArrayOutput { return v.DataRepositoryAssociations }).(FileCacheDataRepositoryAssociationArrayOutput)
}
// The Domain Name System (DNS) name for the cache.
func (o FileCacheOutput) DnsName() pulumi.StringOutput {
return o.ApplyT(func(v *FileCache) pulumi.StringOutput { return v.DnsName }).(pulumi.StringOutput)
}
// The system-generated, unique ID of the cache.
func (o FileCacheOutput) FileCacheId() pulumi.StringOutput {
return o.ApplyT(func(v *FileCache) pulumi.StringOutput { return v.FileCacheId }).(pulumi.StringOutput)
}
// The type of cache that you're creating. The only supported value is `LUSTRE`.
func (o FileCacheOutput) FileCacheType() pulumi.StringOutput {
return o.ApplyT(func(v *FileCache) pulumi.StringOutput { return v.FileCacheType }).(pulumi.StringOutput)
}
// The version for the type of cache that you're creating. The only supported value is `2.12`.
func (o FileCacheOutput) FileCacheTypeVersion() pulumi.StringOutput {
return o.ApplyT(func(v *FileCache) pulumi.StringOutput { return v.FileCacheTypeVersion }).(pulumi.StringOutput)
}
// Specifies the ID of the AWS Key Management Service (AWS KMS) key to use for encrypting data on an Amazon File Cache. If a KmsKeyId isn't specified, the Amazon FSx-managed AWS KMS key for your account is used.
func (o FileCacheOutput) KmsKeyId() pulumi.StringOutput {
return o.ApplyT(func(v *FileCache) pulumi.StringOutput { return v.KmsKeyId }).(pulumi.StringOutput)
}
// See the `lustreConfiguration` block. Required when `fileCacheType` is `LUSTRE`.
func (o FileCacheOutput) LustreConfigurations() FileCacheLustreConfigurationArrayOutput {
return o.ApplyT(func(v *FileCache) FileCacheLustreConfigurationArrayOutput { return v.LustreConfigurations }).(FileCacheLustreConfigurationArrayOutput)
}
// A list of network interface IDs.
func (o FileCacheOutput) NetworkInterfaceIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *FileCache) pulumi.StringArrayOutput { return v.NetworkInterfaceIds }).(pulumi.StringArrayOutput)
}
func (o FileCacheOutput) OwnerId() pulumi.StringOutput {
return o.ApplyT(func(v *FileCache) pulumi.StringOutput { return v.OwnerId }).(pulumi.StringOutput)
}
// A list of IDs specifying the security groups to apply to all network interfaces created for Amazon File Cache access.
func (o FileCacheOutput) SecurityGroupIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *FileCache) pulumi.StringArrayOutput { return v.SecurityGroupIds }).(pulumi.StringArrayOutput)
}
// The storage capacity of the cache in gibibytes (GiB). Valid values are `1200` GiB, `2400` GiB, and increments of `2400` GiB.
func (o FileCacheOutput) StorageCapacity() pulumi.IntOutput {
return o.ApplyT(func(v *FileCache) pulumi.IntOutput { return v.StorageCapacity }).(pulumi.IntOutput)
}
// A list of subnet IDs that the cache will be accessible from. You can specify only one subnet ID.
//
// The following arguments are optional:
func (o FileCacheOutput) SubnetIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *FileCache) pulumi.StringArrayOutput { return v.SubnetIds }).(pulumi.StringArrayOutput)
}
// A map of tags to assign to the file cache. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
func (o FileCacheOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *FileCache) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// Deprecated: Please use `tags` instead.
func (o FileCacheOutput) TagsAll() pulumi.StringMapOutput {
return o.ApplyT(func(v *FileCache) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
}
// The ID of your virtual private cloud (VPC).
func (o FileCacheOutput) VpcId() pulumi.StringOutput {
return o.ApplyT(func(v *FileCache) pulumi.StringOutput { return v.VpcId }).(pulumi.StringOutput)
}
type FileCacheArrayOutput struct{ *pulumi.OutputState }
func (FileCacheArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*FileCache)(nil)).Elem()
}
func (o FileCacheArrayOutput) ToFileCacheArrayOutput() FileCacheArrayOutput {
return o
}
func (o FileCacheArrayOutput) ToFileCacheArrayOutputWithContext(ctx context.Context) FileCacheArrayOutput {
return o
}
func (o FileCacheArrayOutput) Index(i pulumi.IntInput) FileCacheOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *FileCache {
return vs[0].([]*FileCache)[vs[1].(int)]
}).(FileCacheOutput)
}
type FileCacheMapOutput struct{ *pulumi.OutputState }
func (FileCacheMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*FileCache)(nil)).Elem()
}
func (o FileCacheMapOutput) ToFileCacheMapOutput() FileCacheMapOutput {
return o
}
func (o FileCacheMapOutput) ToFileCacheMapOutputWithContext(ctx context.Context) FileCacheMapOutput {
return o
}
func (o FileCacheMapOutput) MapIndex(k pulumi.StringInput) FileCacheOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *FileCache {
return vs[0].(map[string]*FileCache)[vs[1].(string)]
}).(FileCacheOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*FileCacheInput)(nil)).Elem(), &FileCache{})
pulumi.RegisterInputType(reflect.TypeOf((*FileCacheArrayInput)(nil)).Elem(), FileCacheArray{})
pulumi.RegisterInputType(reflect.TypeOf((*FileCacheMapInput)(nil)).Elem(), FileCacheMap{})
pulumi.RegisterOutputType(FileCacheOutput{})
pulumi.RegisterOutputType(FileCacheArrayOutput{})
pulumi.RegisterOutputType(FileCacheMapOutput{})
}