ReplicationConfiguration Class
EFS Replication Configuration.
Example
ts
declare const vpc: ec2.Vpc;
// auto generate a regional replication destination file system
new efs.FileSystem(this, 'RegionalReplicationFileSystem', {
vpc,
replicationConfiguration: efs.ReplicationConfiguration.regionalFileSystem('us-west-2'),
});
// auto generate a one zone replication destination file system
new efs.FileSystem(this, 'OneZoneReplicationFileSystem', {
vpc,
replicationConfiguration: efs.ReplicationConfiguration.oneZoneFileSystem('us-east-1', 'us-east-1a'),
});
const destinationFileSystem = new efs.FileSystem(this, 'DestinationFileSystem', {
vpc,
// set as the read-only file system for use as a replication destination
replicationOverwriteProtection: efs.ReplicationOverwriteProtection.DISABLED,
});
// specify the replication destination file system
new efs.FileSystem(this, 'ReplicationFileSystem', {
vpc,
replicationConfiguration: efs.ReplicationConfiguration.existingFileSystem(destinationFileSystem),
});
python
# vpc: ec2.Vpc
# auto generate a regional replication destination file system
efs.FileSystem(self, "RegionalReplicationFileSystem",
vpc=vpc,
replication_configuration=efs.ReplicationConfiguration.regional_file_system("us-west-2")
)
# auto generate a one zone replication destination file system
efs.FileSystem(self, "OneZoneReplicationFileSystem",
vpc=vpc,
replication_configuration=efs.ReplicationConfiguration.one_zone_file_system("us-east-1", "us-east-1a")
)
destination_file_system = efs.FileSystem(self, "DestinationFileSystem",
vpc=vpc,
# set as the read-only file system for use as a replication destination
replication_overwrite_protection=efs.ReplicationOverwriteProtection.DISABLED
)
# specify the replication destination file system
efs.FileSystem(self, "ReplicationFileSystem",
vpc=vpc,
replication_configuration=efs.ReplicationConfiguration.existing_file_system(destination_file_system)
)
java
Vpc vpc;
// auto generate a regional replication destination file system
// auto generate a regional replication destination file system
FileSystem.Builder.create(this, "RegionalReplicationFileSystem")
.vpc(vpc)
.replicationConfiguration(ReplicationConfiguration.regionalFileSystem("us-west-2"))
.build();
// auto generate a one zone replication destination file system
// auto generate a one zone replication destination file system
FileSystem.Builder.create(this, "OneZoneReplicationFileSystem")
.vpc(vpc)
.replicationConfiguration(ReplicationConfiguration.oneZoneFileSystem("us-east-1", "us-east-1a"))
.build();
FileSystem destinationFileSystem = FileSystem.Builder.create(this, "DestinationFileSystem")
.vpc(vpc)
// set as the read-only file system for use as a replication destination
.replicationOverwriteProtection(ReplicationOverwriteProtection.DISABLED)
.build();
// specify the replication destination file system
// specify the replication destination file system
FileSystem.Builder.create(this, "ReplicationFileSystem")
.vpc(vpc)
.replicationConfiguration(ReplicationConfiguration.existingFileSystem(destinationFileSystem))
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
Vpc vpc;
// auto generate a regional replication destination file system
// auto generate a regional replication destination file system
new FileSystem(this, "RegionalReplicationFileSystem", new FileSystemProps {
Vpc = vpc,
ReplicationConfiguration = ReplicationConfiguration.RegionalFileSystem("us-west-2")
});
// auto generate a one zone replication destination file system
// auto generate a one zone replication destination file system
new FileSystem(this, "OneZoneReplicationFileSystem", new FileSystemProps {
Vpc = vpc,
ReplicationConfiguration = ReplicationConfiguration.OneZoneFileSystem("us-east-1", "us-east-1a")
});
var destinationFileSystem = new FileSystem(this, "DestinationFileSystem", new FileSystemProps {
Vpc = vpc,
// set as the read-only file system for use as a replication destination
ReplicationOverwriteProtection = ReplicationOverwriteProtection.DISABLED
});
// specify the replication destination file system
// specify the replication destination file system
new FileSystem(this, "ReplicationFileSystem", new FileSystemProps {
Vpc = vpc,
ReplicationConfiguration = ReplicationConfiguration.ExistingFileSystem(destinationFileSystem)
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var vpc Vpc
// auto generate a regional replication destination file system
// auto generate a regional replication destination file system
efs.NewFileSystem(this, jsii.String("RegionalReplicationFileSystem"), &FileSystemProps{
Vpc: Vpc,
ReplicationConfiguration: efs.ReplicationConfiguration_RegionalFileSystem(jsii.String("us-west-2")),
})
// auto generate a one zone replication destination file system
// auto generate a one zone replication destination file system
efs.NewFileSystem(this, jsii.String("OneZoneReplicationFileSystem"), &FileSystemProps{
Vpc: Vpc,
ReplicationConfiguration: efs.ReplicationConfiguration_OneZoneFileSystem(jsii.String("us-east-1"), jsii.String("us-east-1a")),
})
destinationFileSystem := efs.NewFileSystem(this, jsii.String("DestinationFileSystem"), &FileSystemProps{
Vpc: Vpc,
// set as the read-only file system for use as a replication destination
ReplicationOverwriteProtection: efs.ReplicationOverwriteProtection_DISABLED,
})
// specify the replication destination file system
// specify the replication destination file system
efs.NewFileSystem(this, jsii.String("ReplicationFileSystem"), &FileSystemProps{
Vpc: Vpc,
ReplicationConfiguration: efs.ReplicationConfiguration_ExistingFileSystem(destinationFileSystem),
})
Initializer
ts
new ReplicationConfiguration(options: ReplicationConfigurationProps)
python
ReplicationConfiguration(options: ReplicationConfigurationProps)
java
new ReplicationConfiguration(ReplicationConfigurationProps options)
csharp
new ReplicationConfiguration(ReplicationConfigurationProps options)
go
NewReplicationConfiguration(Options ReplicationConfigurationProps)
Properties
availabilityZonemay be undefinedstringavailability_zonemay be undefinedstravailabilityZonemay be undefinedStringAvailabilityZonemay be undefinedstringAvailabilityZonemay be undefined*string#The availability zone name of the destination file system.
One zone file system is used as the destination file system when this property is set.
destinationFileSystemmay be undefinedIFileSystemdestination_file_systemmay be undefinedIFileSystemdestinationFileSystemmay be undefinedIFileSystemDestinationFileSystemmay be undefinedIFileSystemDestinationFileSystemmay be undefinedIFileSystem#The existing destination file system for the replication.
kmsKeymay be undefinedIKeykms_keymay be undefinedIKeykmsKeymay be undefinedIKeyKmsKeymay be undefinedIKeyKmsKeymay be undefinedIKey#AWS KMS key used to protect the encrypted file system.
regionmay be undefinedstringregionmay be undefinedstrregionmay be undefinedStringRegionmay be undefinedstringRegionmay be undefined*string#The AWS Region in which the destination file system is located.
Methods
existingFileSystem(destinationFileSystem: IFileSystemRef): ReplicationConfiguration // chainable@staticmethod def existing_file_system(destination_file_system: IFileSystemRef) -> ReplicationConfigurationpublic static ReplicationConfiguration existingFileSystem(IFileSystemRef destinationFileSystem)public static ReplicationConfiguration ExistingFileSystem(IFileSystemRef destinationFileSystem)func ExistingFileSystem(DestinationFileSystem IFileSystemRef) ReplicationConfigurationstatic#Specify the existing destination file system for the replication.
1 parameter
Parameters
destinationFileSystemdestination_file_systemdestinationFileSystemdestinationFileSystemDestinationFileSystem— The existing destination file system for the replication.
oneZoneFileSystem(region: string, availabilityZone: string, kmsKey?: IKey): ReplicationConfiguration // chainable@staticmethod def one_zone_file_system(region: str, availability_zone: str, kms_key: typing.Optional[IKey] = None) -> ReplicationConfigurationpublic static ReplicationConfiguration oneZoneFileSystem(String region, String availabilityZone, IKey kmsKey)public static ReplicationConfiguration OneZoneFileSystem(string region, string availabilityZone, IKey? kmsKey = null)func OneZoneFileSystem(Region *string, AvailabilityZone *string, KmsKey IKey) ReplicationConfigurationstatic#Create a new one zone destination file system for the replication.
3 parameters
Parameters
regionregionregionregionRegion— The AWS Region in which the specified availability zone belongs to.availabilityZoneavailability_zoneavailabilityZoneavailabilityZoneAvailabilityZone— The availability zone name of the destination file system.kmsKeykms_keykmsKeykmsKeyKmsKey— AWS KMS key used to protect the encrypted file system.
regionalFileSystem(region?: string, kmsKey?: IKey): ReplicationConfiguration // chainable@staticmethod def regional_file_system(region: typing.Optional[str] = None, kms_key: typing.Optional[IKey] = None) -> ReplicationConfigurationpublic static ReplicationConfiguration regionalFileSystem(String region, IKey kmsKey)public static ReplicationConfiguration RegionalFileSystem(string? region = null, IKey? kmsKey = null)func RegionalFileSystem(Region *string, KmsKey IKey) ReplicationConfigurationstatic#Create a new regional destination file system for the replication.
2 parameters
Parameters
regionregionregionregionRegion— The AWS Region in which the destination file system is located.kmsKeykms_keykmsKeykmsKeyKmsKey— AWS KMS key used to protect the encrypted file system.