Package com.pulumi.aws.fsx
Class DataRepositoryAssociation
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.fsx.DataRepositoryAssociation
-
public class DataRepositoryAssociation extends com.pulumi.resources.CustomResourceManages a FSx for Lustre Data Repository Association. See [Linking your file system to an S3 bucket](https://docs.aws.amazon.com/fsx/latest/LustreGuide/create-dra-linked-data-repo.html) for more information. > **NOTE:** Data Repository Associations are only compatible with AWS FSx for Lustre File Systems and `PERSISTENT_2` deployment type. ## Example Usage
## Import Using `pulumi import`, import FSx Data Repository Associations using the `id`. For example: ```sh $ pulumi import aws:fsx/dataRepositoryAssociation:DataRepositoryAssociation example dra-0b1cfaeca11088b10 ```package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.s3.Bucket; import com.pulumi.aws.s3.BucketArgs; import com.pulumi.aws.s3.BucketAcl; import com.pulumi.aws.s3.BucketAclArgs; import com.pulumi.aws.fsx.LustreFileSystem; import com.pulumi.aws.fsx.LustreFileSystemArgs; import com.pulumi.aws.fsx.DataRepositoryAssociation; import com.pulumi.aws.fsx.DataRepositoryAssociationArgs; import com.pulumi.aws.fsx.inputs.DataRepositoryAssociationS3Args; import com.pulumi.aws.fsx.inputs.DataRepositoryAssociationS3AutoExportPolicyArgs; import com.pulumi.aws.fsx.inputs.DataRepositoryAssociationS3AutoImportPolicyArgs; 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 Bucket("example", BucketArgs.builder() .bucket("my-bucket") .build()); var exampleBucketAcl = new BucketAcl("exampleBucketAcl", BucketAclArgs.builder() .bucket(example.id()) .acl("private") .build()); var exampleLustreFileSystem = new LustreFileSystem("exampleLustreFileSystem", LustreFileSystemArgs.builder() .storageCapacity(1200) .subnetIds(exampleAwsSubnet.id()) .deploymentType("PERSISTENT_2") .perUnitStorageThroughput(125) .build()); var exampleDataRepositoryAssociation = new DataRepositoryAssociation("exampleDataRepositoryAssociation", DataRepositoryAssociationArgs.builder() .s3(DataRepositoryAssociationS3Args.builder() .autoExportPolicy(DataRepositoryAssociationS3AutoExportPolicyArgs.builder() .events( "NEW", "CHANGED", "DELETED") .build()) .autoImportPolicy(DataRepositoryAssociationS3AutoImportPolicyArgs.builder() .events( "NEW", "CHANGED", "DELETED") .build()) .build()) .fileSystemId(exampleLustreFileSystem.id()) .dataRepositoryPath(example.id().applyValue(_id -> String.format("s3://%s", _id))) .fileSystemPath("/my-bucket") .build()); } }
-
-
Constructor Summary
Constructors Constructor Description DataRepositoryAssociation(java.lang.String name)DataRepositoryAssociation(java.lang.String name, DataRepositoryAssociationArgs args)DataRepositoryAssociation(java.lang.String name, DataRepositoryAssociationArgs 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.lang.String>associationId()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>batchImportMetaDataOnCreate()com.pulumi.core.Output<java.lang.String>dataRepositoryPath()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>deleteDataInFilesystem()com.pulumi.core.Output<java.lang.String>fileSystemId()com.pulumi.core.Output<java.lang.String>fileSystemPath()static DataRepositoryAssociationget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, DataRepositoryAssociationState 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.Integer>importedFileChunkSize()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<DataRepositoryAssociationS3>s3()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()
-
-
-
Constructor Detail
-
DataRepositoryAssociation
public DataRepositoryAssociation(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
DataRepositoryAssociation
public DataRepositoryAssociation(java.lang.String name, DataRepositoryAssociationArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
DataRepositoryAssociation
public DataRepositoryAssociation(java.lang.String name, DataRepositoryAssociationArgs 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 file system.
-
associationId
public com.pulumi.core.Output<java.lang.String> associationId()
- Returns:
- Identifier of the data repository association.
-
batchImportMetaDataOnCreate
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> batchImportMetaDataOnCreate()
- Returns:
- Set to true to run an import data repository task to import metadata from the data repository to the file system after the data repository association is created. Defaults to `false`.
-
dataRepositoryPath
public com.pulumi.core.Output<java.lang.String> dataRepositoryPath()
- Returns:
- Path to the Amazon S3 data repository that will be linked to the file system. The path must be an S3 bucket s3://myBucket/myPrefix/. This path specifies where in the S3 data repository files will be imported from or exported to. The same S3 bucket cannot be linked more than once to the same file system.
-
deleteDataInFilesystem
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> deleteDataInFilesystem()
- Returns:
- Set to true to delete files from the file system upon deleting this data repository association. Defaults to `false`.
-
fileSystemId
public com.pulumi.core.Output<java.lang.String> fileSystemId()
- Returns:
- ID of the Amazon FSx file system to on which to create a data repository association.
-
fileSystemPath
public com.pulumi.core.Output<java.lang.String> fileSystemPath()
- Returns:
- Path on the file system that points to a high-level directory (such as `/ns1/`) or subdirectory (such as `/ns1/subdir/`) that will be mapped 1-1 with `dataRepositoryPath`. The leading forward slash in the name is required. Two data repository associations cannot have overlapping file system paths. For example, if a data repository is associated with file system path `/ns1/`, then you cannot link another data repository with file system path `/ns1/ns2`. This path specifies where in your file system files will be exported from or imported to. This file system directory can be linked to only one Amazon S3 bucket, and no other S3 bucket can be linked to the directory.
-
importedFileChunkSize
public com.pulumi.core.Output<java.lang.Integer> importedFileChunkSize()
- Returns:
- For files imported from a data repository, this value determines the stripe count and maximum amount of data per file (in MiB) stored on a single physical disk. The maximum number of disks that a single file can be striped across is limited by the total number of disks that make up the file system.
-
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.
-
s3
public com.pulumi.core.Output<DataRepositoryAssociationS3> s3()
- Returns:
- Configuration for an Amazon S3 data repository linked to an Amazon FSx Lustre file system with a data repository association. This configuration defines which file events (new, changed, or deleted files or directories) are automatically imported from the linked data repository to the file system or automatically exported from the file system to the data repository. See the `s3` Block below. Max of 1.
-
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 data repository association. 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()
- Returns:
- Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
-
get
public static DataRepositoryAssociation get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable DataRepositoryAssociationState 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.
-
-