Package com.pulumi.aws.fsx
Class FileCache
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.fsx.FileCache
-
public class FileCache extends com.pulumi.resources.CustomResourceResource 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
## 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 ```package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.fsx.FileCache; import com.pulumi.aws.fsx.FileCacheArgs; import com.pulumi.aws.fsx.inputs.FileCacheDataRepositoryAssociationArgs; import com.pulumi.aws.fsx.inputs.FileCacheDataRepositoryAssociationNfArgs; import com.pulumi.aws.fsx.inputs.FileCacheLustreConfigurationArgs; import com.pulumi.aws.fsx.inputs.FileCacheLustreConfigurationMetadataConfigurationArgs; import java.util.ArrayList; import java.util.Arrays; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { var example = new FileCache("example", FileCacheArgs.builder() .dataRepositoryAssociations(FileCacheDataRepositoryAssociationArgs.builder() .nfs(FileCacheDataRepositoryAssociationNfArgs.builder() .dnsIps( "192.168.0.1", "192.168.0.2") .version("NFS3") .build()) .dataRepositoryPath("nfs://filer.domain.com") .dataRepositorySubdirectories( "test", "test2") .fileCachePath("/ns1") .build()) .lustreConfigurations(FileCacheLustreConfigurationArgs.builder() .metadataConfigurations(FileCacheLustreConfigurationMetadataConfigurationArgs.builder() .storageCapacity(2400) .build()) .deploymentType("CACHE_1") .perUnitStorageThroughput(1000) .weeklyMaintenanceStartTime("2:05:00") .build()) .fileCacheType("LUSTRE") .fileCacheTypeVersion("2.12") .subnetIds(test1.id()) .storageCapacity(1200) .build()); } }
-
-
Constructor Summary
Constructors Constructor Description FileCache(java.lang.String name)FileCache(java.lang.String name, FileCacheArgs args)FileCache(java.lang.String name, FileCacheArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>arn()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>copyTagsToDataRepositoryAssociations()com.pulumi.core.Output<java.util.List<java.lang.String>>dataRepositoryAssociationIds()com.pulumi.core.Output<java.util.Optional<java.util.List<FileCacheDataRepositoryAssociation>>>dataRepositoryAssociations()com.pulumi.core.Output<java.lang.String>dnsName()com.pulumi.core.Output<java.lang.String>fileCacheId()com.pulumi.core.Output<java.lang.String>fileCacheType()com.pulumi.core.Output<java.lang.String>fileCacheTypeVersion()static FileCacheget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, FileCacheState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>kmsKeyId()com.pulumi.core.Output<java.util.Optional<java.util.List<FileCacheLustreConfiguration>>>lustreConfigurations()com.pulumi.core.Output<java.util.List<java.lang.String>>networkInterfaceIds()com.pulumi.core.Output<java.lang.String>ownerId()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>>securityGroupIds()com.pulumi.core.Output<java.lang.Integer>storageCapacity()com.pulumi.core.Output<java.util.List<java.lang.String>>subnetIds()com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>>tags()com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>>tagsAll()com.pulumi.core.Output<java.lang.String>vpcId()
-
-
-
Constructor Detail
-
FileCache
public FileCache(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
FileCache
public FileCache(java.lang.String name, FileCacheArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
FileCache
public FileCache(java.lang.String name, FileCacheArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
arn
public com.pulumi.core.Output<java.lang.String> arn()
- Returns:
- ARN of the cache.
-
copyTagsToDataRepositoryAssociations
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> copyTagsToDataRepositoryAssociations()
- Returns:
- Whether to copy tags for the cache to data repository associations. Defaults to `false`.
-
dataRepositoryAssociationIds
public com.pulumi.core.Output<java.util.List<java.lang.String>> dataRepositoryAssociationIds()
- Returns:
- IDs of data repository associations that are associated with the cache.
-
dataRepositoryAssociations
public com.pulumi.core.Output<java.util.Optional<java.util.List<FileCacheDataRepositoryAssociation>>> dataRepositoryAssociations()
- Returns:
- Configurations for up to 8 data repository associations (DRAs) to create during cache creation. All configurations must be of the same data repository type, either all S3 or all NFS. Maximum of 8. See `dataRepositoryAssociation` Block below.
-
dnsName
public com.pulumi.core.Output<java.lang.String> dnsName()
- Returns:
- DNS name for the cache.
-
fileCacheId
public com.pulumi.core.Output<java.lang.String> fileCacheId()
- Returns:
- System-generated, unique ID of the cache.
-
fileCacheType
public com.pulumi.core.Output<java.lang.String> fileCacheType()
- Returns:
- Type of cache to create. The only supported value is `LUSTRE`.
-
fileCacheTypeVersion
public com.pulumi.core.Output<java.lang.String> fileCacheTypeVersion()
- Returns:
- Version for the type of cache to create. The only supported value is `2.12`.
-
kmsKeyId
public com.pulumi.core.Output<java.lang.String> kmsKeyId()
- Returns:
- ID of the KMS key to use for encrypting data on the cache. Defaults to the Amazon FSx-managed KMS key for your account.
-
lustreConfigurations
public com.pulumi.core.Output<java.util.Optional<java.util.List<FileCacheLustreConfiguration>>> lustreConfigurations()
- Returns:
- Configuration for the Lustre cache. Required when `fileCacheType` is `LUSTRE`. See `lustreConfiguration` Block below.
-
networkInterfaceIds
public com.pulumi.core.Output<java.util.List<java.lang.String>> networkInterfaceIds()
- Returns:
- IDs of the network interfaces.
-
ownerId
public com.pulumi.core.Output<java.lang.String> ownerId()
- Returns:
- AWS account that created the cache.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
securityGroupIds
public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> securityGroupIds()
- Returns:
- IDs of the security groups to apply to all network interfaces created for cache access.
-
storageCapacity
public com.pulumi.core.Output<java.lang.Integer> storageCapacity()
- Returns:
- Storage capacity of the cache in gibibytes (GiB). Valid values are `1200` GiB, `2400` GiB, and increments of `2400` GiB.
-
subnetIds
public com.pulumi.core.Output<java.util.List<java.lang.String>> subnetIds()
- Returns:
- Subnet IDs that the cache is accessible from. You can specify only one subnet ID.
-
tags
public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>> tags()
- Returns:
- 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.
-
tagsAll
public com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>> tagsAll()
-
vpcId
public com.pulumi.core.Output<java.lang.String> vpcId()
- Returns:
- ID of your VPC.
-
get
public static FileCache get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable FileCacheState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-