github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/fsx/fileCache.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 fsx
     5  
     6  import (
     7  	"context"
     8  	"reflect"
     9  
    10  	"errors"
    11  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    12  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    13  )
    14  
    15  // Resource for managing an Amazon File Cache cache.
    16  // See the [Create File Cache](https://docs.aws.amazon.com/fsx/latest/APIReference/API_CreateFileCache.html) for more information.
    17  //
    18  // ## Example Usage
    19  //
    20  // <!--Start PulumiCodeChooser -->
    21  // ```go
    22  // package main
    23  //
    24  // import (
    25  //
    26  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/fsx"
    27  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    28  //
    29  // )
    30  //
    31  //	func main() {
    32  //		pulumi.Run(func(ctx *pulumi.Context) error {
    33  //			_, err := fsx.NewFileCache(ctx, "example", &fsx.FileCacheArgs{
    34  //				DataRepositoryAssociations: fsx.FileCacheDataRepositoryAssociationArray{
    35  //					&fsx.FileCacheDataRepositoryAssociationArgs{
    36  //						DataRepositoryPath: pulumi.String("nfs://filer.domain.com"),
    37  //						DataRepositorySubdirectories: pulumi.StringArray{
    38  //							pulumi.String("test"),
    39  //							pulumi.String("test2"),
    40  //						},
    41  //						FileCachePath: pulumi.String("/ns1"),
    42  //						Nfs: fsx.FileCacheDataRepositoryAssociationNfArray{
    43  //							&fsx.FileCacheDataRepositoryAssociationNfArgs{
    44  //								DnsIps: pulumi.StringArray{
    45  //									pulumi.String("192.168.0.1"),
    46  //									pulumi.String("192.168.0.2"),
    47  //								},
    48  //								Version: pulumi.String("NFS3"),
    49  //							},
    50  //						},
    51  //					},
    52  //				},
    53  //				FileCacheType:        pulumi.String("LUSTRE"),
    54  //				FileCacheTypeVersion: pulumi.String("2.12"),
    55  //				LustreConfigurations: fsx.FileCacheLustreConfigurationArray{
    56  //					&fsx.FileCacheLustreConfigurationArgs{
    57  //						DeploymentType: pulumi.String("CACHE_1"),
    58  //						MetadataConfigurations: fsx.FileCacheLustreConfigurationMetadataConfigurationArray{
    59  //							&fsx.FileCacheLustreConfigurationMetadataConfigurationArgs{
    60  //								StorageCapacity: pulumi.Int(2400),
    61  //							},
    62  //						},
    63  //						PerUnitStorageThroughput:   pulumi.Int(1000),
    64  //						WeeklyMaintenanceStartTime: pulumi.String("2:05:00"),
    65  //					},
    66  //				},
    67  //				SubnetIds: pulumi.StringArray{
    68  //					test1.Id,
    69  //				},
    70  //				StorageCapacity: pulumi.Int(1200),
    71  //			})
    72  //			if err != nil {
    73  //				return err
    74  //			}
    75  //			return nil
    76  //		})
    77  //	}
    78  //
    79  // ```
    80  // <!--End PulumiCodeChooser -->
    81  //
    82  // ## Import
    83  //
    84  // Using `pulumi import`, import Amazon File Cache cache using the resource `id`. For example:
    85  //
    86  // ```sh
    87  // $ pulumi import aws:fsx/fileCache:FileCache example fc-8012925589
    88  // ```
    89  type FileCache struct {
    90  	pulumi.CustomResourceState
    91  
    92  	// The Amazon Resource Name (ARN) for the resource.
    93  	Arn pulumi.StringOutput `pulumi:"arn"`
    94  	// A boolean flag indicating whether tags for the cache should be copied to data repository associations. This value defaults to false.
    95  	CopyTagsToDataRepositoryAssociations pulumi.BoolPtrOutput `pulumi:"copyTagsToDataRepositoryAssociations"`
    96  	// A list of IDs of data repository associations that are associated with this cache.
    97  	DataRepositoryAssociationIds pulumi.StringArrayOutput `pulumi:"dataRepositoryAssociationIds"`
    98  	// See the `dataRepositoryAssociation` configuration block. Max of 8.
    99  	// 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.
   100  	DataRepositoryAssociations FileCacheDataRepositoryAssociationArrayOutput `pulumi:"dataRepositoryAssociations"`
   101  	// The Domain Name System (DNS) name for the cache.
   102  	DnsName pulumi.StringOutput `pulumi:"dnsName"`
   103  	// The system-generated, unique ID of the cache.
   104  	FileCacheId pulumi.StringOutput `pulumi:"fileCacheId"`
   105  	// The type of cache that you're creating. The only supported value is `LUSTRE`.
   106  	FileCacheType pulumi.StringOutput `pulumi:"fileCacheType"`
   107  	// The version for the type of cache that you're creating. The only supported value is `2.12`.
   108  	FileCacheTypeVersion pulumi.StringOutput `pulumi:"fileCacheTypeVersion"`
   109  	// 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.
   110  	KmsKeyId pulumi.StringOutput `pulumi:"kmsKeyId"`
   111  	// See the `lustreConfiguration` block. Required when `fileCacheType` is `LUSTRE`.
   112  	LustreConfigurations FileCacheLustreConfigurationArrayOutput `pulumi:"lustreConfigurations"`
   113  	// A list of network interface IDs.
   114  	NetworkInterfaceIds pulumi.StringArrayOutput `pulumi:"networkInterfaceIds"`
   115  	OwnerId             pulumi.StringOutput      `pulumi:"ownerId"`
   116  	// A list of IDs specifying the security groups to apply to all network interfaces created for Amazon File Cache access.
   117  	SecurityGroupIds pulumi.StringArrayOutput `pulumi:"securityGroupIds"`
   118  	// The storage capacity of the cache in gibibytes (GiB). Valid values are `1200` GiB, `2400` GiB, and increments of `2400` GiB.
   119  	StorageCapacity pulumi.IntOutput `pulumi:"storageCapacity"`
   120  	// A list of subnet IDs that the cache will be accessible from. You can specify only one subnet ID.
   121  	//
   122  	// The following arguments are optional:
   123  	SubnetIds pulumi.StringArrayOutput `pulumi:"subnetIds"`
   124  	// 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.
   125  	Tags pulumi.StringMapOutput `pulumi:"tags"`
   126  	// Deprecated: Please use `tags` instead.
   127  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
   128  	// The ID of your virtual private cloud (VPC).
   129  	VpcId pulumi.StringOutput `pulumi:"vpcId"`
   130  }
   131  
   132  // NewFileCache registers a new resource with the given unique name, arguments, and options.
   133  func NewFileCache(ctx *pulumi.Context,
   134  	name string, args *FileCacheArgs, opts ...pulumi.ResourceOption) (*FileCache, error) {
   135  	if args == nil {
   136  		return nil, errors.New("missing one or more required arguments")
   137  	}
   138  
   139  	if args.FileCacheType == nil {
   140  		return nil, errors.New("invalid value for required argument 'FileCacheType'")
   141  	}
   142  	if args.FileCacheTypeVersion == nil {
   143  		return nil, errors.New("invalid value for required argument 'FileCacheTypeVersion'")
   144  	}
   145  	if args.StorageCapacity == nil {
   146  		return nil, errors.New("invalid value for required argument 'StorageCapacity'")
   147  	}
   148  	if args.SubnetIds == nil {
   149  		return nil, errors.New("invalid value for required argument 'SubnetIds'")
   150  	}
   151  	opts = internal.PkgResourceDefaultOpts(opts)
   152  	var resource FileCache
   153  	err := ctx.RegisterResource("aws:fsx/fileCache:FileCache", name, args, &resource, opts...)
   154  	if err != nil {
   155  		return nil, err
   156  	}
   157  	return &resource, nil
   158  }
   159  
   160  // GetFileCache gets an existing FileCache resource's state with the given name, ID, and optional
   161  // state properties that are used to uniquely qualify the lookup (nil if not required).
   162  func GetFileCache(ctx *pulumi.Context,
   163  	name string, id pulumi.IDInput, state *FileCacheState, opts ...pulumi.ResourceOption) (*FileCache, error) {
   164  	var resource FileCache
   165  	err := ctx.ReadResource("aws:fsx/fileCache:FileCache", name, id, state, &resource, opts...)
   166  	if err != nil {
   167  		return nil, err
   168  	}
   169  	return &resource, nil
   170  }
   171  
   172  // Input properties used for looking up and filtering FileCache resources.
   173  type fileCacheState struct {
   174  	// The Amazon Resource Name (ARN) for the resource.
   175  	Arn *string `pulumi:"arn"`
   176  	// A boolean flag indicating whether tags for the cache should be copied to data repository associations. This value defaults to false.
   177  	CopyTagsToDataRepositoryAssociations *bool `pulumi:"copyTagsToDataRepositoryAssociations"`
   178  	// A list of IDs of data repository associations that are associated with this cache.
   179  	DataRepositoryAssociationIds []string `pulumi:"dataRepositoryAssociationIds"`
   180  	// See the `dataRepositoryAssociation` configuration block. Max of 8.
   181  	// 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.
   182  	DataRepositoryAssociations []FileCacheDataRepositoryAssociation `pulumi:"dataRepositoryAssociations"`
   183  	// The Domain Name System (DNS) name for the cache.
   184  	DnsName *string `pulumi:"dnsName"`
   185  	// The system-generated, unique ID of the cache.
   186  	FileCacheId *string `pulumi:"fileCacheId"`
   187  	// The type of cache that you're creating. The only supported value is `LUSTRE`.
   188  	FileCacheType *string `pulumi:"fileCacheType"`
   189  	// The version for the type of cache that you're creating. The only supported value is `2.12`.
   190  	FileCacheTypeVersion *string `pulumi:"fileCacheTypeVersion"`
   191  	// 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.
   192  	KmsKeyId *string `pulumi:"kmsKeyId"`
   193  	// See the `lustreConfiguration` block. Required when `fileCacheType` is `LUSTRE`.
   194  	LustreConfigurations []FileCacheLustreConfiguration `pulumi:"lustreConfigurations"`
   195  	// A list of network interface IDs.
   196  	NetworkInterfaceIds []string `pulumi:"networkInterfaceIds"`
   197  	OwnerId             *string  `pulumi:"ownerId"`
   198  	// A list of IDs specifying the security groups to apply to all network interfaces created for Amazon File Cache access.
   199  	SecurityGroupIds []string `pulumi:"securityGroupIds"`
   200  	// The storage capacity of the cache in gibibytes (GiB). Valid values are `1200` GiB, `2400` GiB, and increments of `2400` GiB.
   201  	StorageCapacity *int `pulumi:"storageCapacity"`
   202  	// A list of subnet IDs that the cache will be accessible from. You can specify only one subnet ID.
   203  	//
   204  	// The following arguments are optional:
   205  	SubnetIds []string `pulumi:"subnetIds"`
   206  	// 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.
   207  	Tags map[string]string `pulumi:"tags"`
   208  	// Deprecated: Please use `tags` instead.
   209  	TagsAll map[string]string `pulumi:"tagsAll"`
   210  	// The ID of your virtual private cloud (VPC).
   211  	VpcId *string `pulumi:"vpcId"`
   212  }
   213  
   214  type FileCacheState struct {
   215  	// The Amazon Resource Name (ARN) for the resource.
   216  	Arn pulumi.StringPtrInput
   217  	// A boolean flag indicating whether tags for the cache should be copied to data repository associations. This value defaults to false.
   218  	CopyTagsToDataRepositoryAssociations pulumi.BoolPtrInput
   219  	// A list of IDs of data repository associations that are associated with this cache.
   220  	DataRepositoryAssociationIds pulumi.StringArrayInput
   221  	// See the `dataRepositoryAssociation` configuration block. Max of 8.
   222  	// 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.
   223  	DataRepositoryAssociations FileCacheDataRepositoryAssociationArrayInput
   224  	// The Domain Name System (DNS) name for the cache.
   225  	DnsName pulumi.StringPtrInput
   226  	// The system-generated, unique ID of the cache.
   227  	FileCacheId pulumi.StringPtrInput
   228  	// The type of cache that you're creating. The only supported value is `LUSTRE`.
   229  	FileCacheType pulumi.StringPtrInput
   230  	// The version for the type of cache that you're creating. The only supported value is `2.12`.
   231  	FileCacheTypeVersion pulumi.StringPtrInput
   232  	// 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.
   233  	KmsKeyId pulumi.StringPtrInput
   234  	// See the `lustreConfiguration` block. Required when `fileCacheType` is `LUSTRE`.
   235  	LustreConfigurations FileCacheLustreConfigurationArrayInput
   236  	// A list of network interface IDs.
   237  	NetworkInterfaceIds pulumi.StringArrayInput
   238  	OwnerId             pulumi.StringPtrInput
   239  	// A list of IDs specifying the security groups to apply to all network interfaces created for Amazon File Cache access.
   240  	SecurityGroupIds pulumi.StringArrayInput
   241  	// The storage capacity of the cache in gibibytes (GiB). Valid values are `1200` GiB, `2400` GiB, and increments of `2400` GiB.
   242  	StorageCapacity pulumi.IntPtrInput
   243  	// A list of subnet IDs that the cache will be accessible from. You can specify only one subnet ID.
   244  	//
   245  	// The following arguments are optional:
   246  	SubnetIds pulumi.StringArrayInput
   247  	// 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.
   248  	Tags pulumi.StringMapInput
   249  	// Deprecated: Please use `tags` instead.
   250  	TagsAll pulumi.StringMapInput
   251  	// The ID of your virtual private cloud (VPC).
   252  	VpcId pulumi.StringPtrInput
   253  }
   254  
   255  func (FileCacheState) ElementType() reflect.Type {
   256  	return reflect.TypeOf((*fileCacheState)(nil)).Elem()
   257  }
   258  
   259  type fileCacheArgs struct {
   260  	// A boolean flag indicating whether tags for the cache should be copied to data repository associations. This value defaults to false.
   261  	CopyTagsToDataRepositoryAssociations *bool `pulumi:"copyTagsToDataRepositoryAssociations"`
   262  	// See the `dataRepositoryAssociation` configuration block. Max of 8.
   263  	// 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.
   264  	DataRepositoryAssociations []FileCacheDataRepositoryAssociation `pulumi:"dataRepositoryAssociations"`
   265  	// The type of cache that you're creating. The only supported value is `LUSTRE`.
   266  	FileCacheType string `pulumi:"fileCacheType"`
   267  	// The version for the type of cache that you're creating. The only supported value is `2.12`.
   268  	FileCacheTypeVersion string `pulumi:"fileCacheTypeVersion"`
   269  	// 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.
   270  	KmsKeyId *string `pulumi:"kmsKeyId"`
   271  	// See the `lustreConfiguration` block. Required when `fileCacheType` is `LUSTRE`.
   272  	LustreConfigurations []FileCacheLustreConfiguration `pulumi:"lustreConfigurations"`
   273  	// A list of IDs specifying the security groups to apply to all network interfaces created for Amazon File Cache access.
   274  	SecurityGroupIds []string `pulumi:"securityGroupIds"`
   275  	// The storage capacity of the cache in gibibytes (GiB). Valid values are `1200` GiB, `2400` GiB, and increments of `2400` GiB.
   276  	StorageCapacity int `pulumi:"storageCapacity"`
   277  	// A list of subnet IDs that the cache will be accessible from. You can specify only one subnet ID.
   278  	//
   279  	// The following arguments are optional:
   280  	SubnetIds []string `pulumi:"subnetIds"`
   281  	// 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.
   282  	Tags map[string]string `pulumi:"tags"`
   283  }
   284  
   285  // The set of arguments for constructing a FileCache resource.
   286  type FileCacheArgs struct {
   287  	// A boolean flag indicating whether tags for the cache should be copied to data repository associations. This value defaults to false.
   288  	CopyTagsToDataRepositoryAssociations pulumi.BoolPtrInput
   289  	// See the `dataRepositoryAssociation` configuration block. Max of 8.
   290  	// 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.
   291  	DataRepositoryAssociations FileCacheDataRepositoryAssociationArrayInput
   292  	// The type of cache that you're creating. The only supported value is `LUSTRE`.
   293  	FileCacheType pulumi.StringInput
   294  	// The version for the type of cache that you're creating. The only supported value is `2.12`.
   295  	FileCacheTypeVersion pulumi.StringInput
   296  	// 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.
   297  	KmsKeyId pulumi.StringPtrInput
   298  	// See the `lustreConfiguration` block. Required when `fileCacheType` is `LUSTRE`.
   299  	LustreConfigurations FileCacheLustreConfigurationArrayInput
   300  	// A list of IDs specifying the security groups to apply to all network interfaces created for Amazon File Cache access.
   301  	SecurityGroupIds pulumi.StringArrayInput
   302  	// The storage capacity of the cache in gibibytes (GiB). Valid values are `1200` GiB, `2400` GiB, and increments of `2400` GiB.
   303  	StorageCapacity pulumi.IntInput
   304  	// A list of subnet IDs that the cache will be accessible from. You can specify only one subnet ID.
   305  	//
   306  	// The following arguments are optional:
   307  	SubnetIds pulumi.StringArrayInput
   308  	// 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.
   309  	Tags pulumi.StringMapInput
   310  }
   311  
   312  func (FileCacheArgs) ElementType() reflect.Type {
   313  	return reflect.TypeOf((*fileCacheArgs)(nil)).Elem()
   314  }
   315  
   316  type FileCacheInput interface {
   317  	pulumi.Input
   318  
   319  	ToFileCacheOutput() FileCacheOutput
   320  	ToFileCacheOutputWithContext(ctx context.Context) FileCacheOutput
   321  }
   322  
   323  func (*FileCache) ElementType() reflect.Type {
   324  	return reflect.TypeOf((**FileCache)(nil)).Elem()
   325  }
   326  
   327  func (i *FileCache) ToFileCacheOutput() FileCacheOutput {
   328  	return i.ToFileCacheOutputWithContext(context.Background())
   329  }
   330  
   331  func (i *FileCache) ToFileCacheOutputWithContext(ctx context.Context) FileCacheOutput {
   332  	return pulumi.ToOutputWithContext(ctx, i).(FileCacheOutput)
   333  }
   334  
   335  // FileCacheArrayInput is an input type that accepts FileCacheArray and FileCacheArrayOutput values.
   336  // You can construct a concrete instance of `FileCacheArrayInput` via:
   337  //
   338  //	FileCacheArray{ FileCacheArgs{...} }
   339  type FileCacheArrayInput interface {
   340  	pulumi.Input
   341  
   342  	ToFileCacheArrayOutput() FileCacheArrayOutput
   343  	ToFileCacheArrayOutputWithContext(context.Context) FileCacheArrayOutput
   344  }
   345  
   346  type FileCacheArray []FileCacheInput
   347  
   348  func (FileCacheArray) ElementType() reflect.Type {
   349  	return reflect.TypeOf((*[]*FileCache)(nil)).Elem()
   350  }
   351  
   352  func (i FileCacheArray) ToFileCacheArrayOutput() FileCacheArrayOutput {
   353  	return i.ToFileCacheArrayOutputWithContext(context.Background())
   354  }
   355  
   356  func (i FileCacheArray) ToFileCacheArrayOutputWithContext(ctx context.Context) FileCacheArrayOutput {
   357  	return pulumi.ToOutputWithContext(ctx, i).(FileCacheArrayOutput)
   358  }
   359  
   360  // FileCacheMapInput is an input type that accepts FileCacheMap and FileCacheMapOutput values.
   361  // You can construct a concrete instance of `FileCacheMapInput` via:
   362  //
   363  //	FileCacheMap{ "key": FileCacheArgs{...} }
   364  type FileCacheMapInput interface {
   365  	pulumi.Input
   366  
   367  	ToFileCacheMapOutput() FileCacheMapOutput
   368  	ToFileCacheMapOutputWithContext(context.Context) FileCacheMapOutput
   369  }
   370  
   371  type FileCacheMap map[string]FileCacheInput
   372  
   373  func (FileCacheMap) ElementType() reflect.Type {
   374  	return reflect.TypeOf((*map[string]*FileCache)(nil)).Elem()
   375  }
   376  
   377  func (i FileCacheMap) ToFileCacheMapOutput() FileCacheMapOutput {
   378  	return i.ToFileCacheMapOutputWithContext(context.Background())
   379  }
   380  
   381  func (i FileCacheMap) ToFileCacheMapOutputWithContext(ctx context.Context) FileCacheMapOutput {
   382  	return pulumi.ToOutputWithContext(ctx, i).(FileCacheMapOutput)
   383  }
   384  
   385  type FileCacheOutput struct{ *pulumi.OutputState }
   386  
   387  func (FileCacheOutput) ElementType() reflect.Type {
   388  	return reflect.TypeOf((**FileCache)(nil)).Elem()
   389  }
   390  
   391  func (o FileCacheOutput) ToFileCacheOutput() FileCacheOutput {
   392  	return o
   393  }
   394  
   395  func (o FileCacheOutput) ToFileCacheOutputWithContext(ctx context.Context) FileCacheOutput {
   396  	return o
   397  }
   398  
   399  // The Amazon Resource Name (ARN) for the resource.
   400  func (o FileCacheOutput) Arn() pulumi.StringOutput {
   401  	return o.ApplyT(func(v *FileCache) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   402  }
   403  
   404  // A boolean flag indicating whether tags for the cache should be copied to data repository associations. This value defaults to false.
   405  func (o FileCacheOutput) CopyTagsToDataRepositoryAssociations() pulumi.BoolPtrOutput {
   406  	return o.ApplyT(func(v *FileCache) pulumi.BoolPtrOutput { return v.CopyTagsToDataRepositoryAssociations }).(pulumi.BoolPtrOutput)
   407  }
   408  
   409  // A list of IDs of data repository associations that are associated with this cache.
   410  func (o FileCacheOutput) DataRepositoryAssociationIds() pulumi.StringArrayOutput {
   411  	return o.ApplyT(func(v *FileCache) pulumi.StringArrayOutput { return v.DataRepositoryAssociationIds }).(pulumi.StringArrayOutput)
   412  }
   413  
   414  // See the `dataRepositoryAssociation` configuration block. Max of 8.
   415  // 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.
   416  func (o FileCacheOutput) DataRepositoryAssociations() FileCacheDataRepositoryAssociationArrayOutput {
   417  	return o.ApplyT(func(v *FileCache) FileCacheDataRepositoryAssociationArrayOutput { return v.DataRepositoryAssociations }).(FileCacheDataRepositoryAssociationArrayOutput)
   418  }
   419  
   420  // The Domain Name System (DNS) name for the cache.
   421  func (o FileCacheOutput) DnsName() pulumi.StringOutput {
   422  	return o.ApplyT(func(v *FileCache) pulumi.StringOutput { return v.DnsName }).(pulumi.StringOutput)
   423  }
   424  
   425  // The system-generated, unique ID of the cache.
   426  func (o FileCacheOutput) FileCacheId() pulumi.StringOutput {
   427  	return o.ApplyT(func(v *FileCache) pulumi.StringOutput { return v.FileCacheId }).(pulumi.StringOutput)
   428  }
   429  
   430  // The type of cache that you're creating. The only supported value is `LUSTRE`.
   431  func (o FileCacheOutput) FileCacheType() pulumi.StringOutput {
   432  	return o.ApplyT(func(v *FileCache) pulumi.StringOutput { return v.FileCacheType }).(pulumi.StringOutput)
   433  }
   434  
   435  // The version for the type of cache that you're creating. The only supported value is `2.12`.
   436  func (o FileCacheOutput) FileCacheTypeVersion() pulumi.StringOutput {
   437  	return o.ApplyT(func(v *FileCache) pulumi.StringOutput { return v.FileCacheTypeVersion }).(pulumi.StringOutput)
   438  }
   439  
   440  // 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.
   441  func (o FileCacheOutput) KmsKeyId() pulumi.StringOutput {
   442  	return o.ApplyT(func(v *FileCache) pulumi.StringOutput { return v.KmsKeyId }).(pulumi.StringOutput)
   443  }
   444  
   445  // See the `lustreConfiguration` block. Required when `fileCacheType` is `LUSTRE`.
   446  func (o FileCacheOutput) LustreConfigurations() FileCacheLustreConfigurationArrayOutput {
   447  	return o.ApplyT(func(v *FileCache) FileCacheLustreConfigurationArrayOutput { return v.LustreConfigurations }).(FileCacheLustreConfigurationArrayOutput)
   448  }
   449  
   450  // A list of network interface IDs.
   451  func (o FileCacheOutput) NetworkInterfaceIds() pulumi.StringArrayOutput {
   452  	return o.ApplyT(func(v *FileCache) pulumi.StringArrayOutput { return v.NetworkInterfaceIds }).(pulumi.StringArrayOutput)
   453  }
   454  
   455  func (o FileCacheOutput) OwnerId() pulumi.StringOutput {
   456  	return o.ApplyT(func(v *FileCache) pulumi.StringOutput { return v.OwnerId }).(pulumi.StringOutput)
   457  }
   458  
   459  // A list of IDs specifying the security groups to apply to all network interfaces created for Amazon File Cache access.
   460  func (o FileCacheOutput) SecurityGroupIds() pulumi.StringArrayOutput {
   461  	return o.ApplyT(func(v *FileCache) pulumi.StringArrayOutput { return v.SecurityGroupIds }).(pulumi.StringArrayOutput)
   462  }
   463  
   464  // The storage capacity of the cache in gibibytes (GiB). Valid values are `1200` GiB, `2400` GiB, and increments of `2400` GiB.
   465  func (o FileCacheOutput) StorageCapacity() pulumi.IntOutput {
   466  	return o.ApplyT(func(v *FileCache) pulumi.IntOutput { return v.StorageCapacity }).(pulumi.IntOutput)
   467  }
   468  
   469  // A list of subnet IDs that the cache will be accessible from. You can specify only one subnet ID.
   470  //
   471  // The following arguments are optional:
   472  func (o FileCacheOutput) SubnetIds() pulumi.StringArrayOutput {
   473  	return o.ApplyT(func(v *FileCache) pulumi.StringArrayOutput { return v.SubnetIds }).(pulumi.StringArrayOutput)
   474  }
   475  
   476  // 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.
   477  func (o FileCacheOutput) Tags() pulumi.StringMapOutput {
   478  	return o.ApplyT(func(v *FileCache) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   479  }
   480  
   481  // Deprecated: Please use `tags` instead.
   482  func (o FileCacheOutput) TagsAll() pulumi.StringMapOutput {
   483  	return o.ApplyT(func(v *FileCache) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   484  }
   485  
   486  // The ID of your virtual private cloud (VPC).
   487  func (o FileCacheOutput) VpcId() pulumi.StringOutput {
   488  	return o.ApplyT(func(v *FileCache) pulumi.StringOutput { return v.VpcId }).(pulumi.StringOutput)
   489  }
   490  
   491  type FileCacheArrayOutput struct{ *pulumi.OutputState }
   492  
   493  func (FileCacheArrayOutput) ElementType() reflect.Type {
   494  	return reflect.TypeOf((*[]*FileCache)(nil)).Elem()
   495  }
   496  
   497  func (o FileCacheArrayOutput) ToFileCacheArrayOutput() FileCacheArrayOutput {
   498  	return o
   499  }
   500  
   501  func (o FileCacheArrayOutput) ToFileCacheArrayOutputWithContext(ctx context.Context) FileCacheArrayOutput {
   502  	return o
   503  }
   504  
   505  func (o FileCacheArrayOutput) Index(i pulumi.IntInput) FileCacheOutput {
   506  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *FileCache {
   507  		return vs[0].([]*FileCache)[vs[1].(int)]
   508  	}).(FileCacheOutput)
   509  }
   510  
   511  type FileCacheMapOutput struct{ *pulumi.OutputState }
   512  
   513  func (FileCacheMapOutput) ElementType() reflect.Type {
   514  	return reflect.TypeOf((*map[string]*FileCache)(nil)).Elem()
   515  }
   516  
   517  func (o FileCacheMapOutput) ToFileCacheMapOutput() FileCacheMapOutput {
   518  	return o
   519  }
   520  
   521  func (o FileCacheMapOutput) ToFileCacheMapOutputWithContext(ctx context.Context) FileCacheMapOutput {
   522  	return o
   523  }
   524  
   525  func (o FileCacheMapOutput) MapIndex(k pulumi.StringInput) FileCacheOutput {
   526  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *FileCache {
   527  		return vs[0].(map[string]*FileCache)[vs[1].(string)]
   528  	}).(FileCacheOutput)
   529  }
   530  
   531  func init() {
   532  	pulumi.RegisterInputType(reflect.TypeOf((*FileCacheInput)(nil)).Elem(), &FileCache{})
   533  	pulumi.RegisterInputType(reflect.TypeOf((*FileCacheArrayInput)(nil)).Elem(), FileCacheArray{})
   534  	pulumi.RegisterInputType(reflect.TypeOf((*FileCacheMapInput)(nil)).Elem(), FileCacheMap{})
   535  	pulumi.RegisterOutputType(FileCacheOutput{})
   536  	pulumi.RegisterOutputType(FileCacheArrayOutput{})
   537  	pulumi.RegisterOutputType(FileCacheMapOutput{})
   538  }