Class: AWSCDK::FSX::LustreFileSystemProps

Inherits:
FileSystemProps
  • Object
show all
Defined in:
fsx/lustre_file_system_props.rb

Overview

Properties specific to the Lustre version of the FSx file system.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(storage_capacity_gib:, vpc:, backup_id: nil, kms_key: nil, removal_policy: nil, security_group: nil, storage_type: nil, lustre_configuration:, vpc_subnet:, file_system_type_version: nil) ⇒ LustreFileSystemProps

Returns a new instance of LustreFileSystemProps.

Parameters:

  • storage_capacity_gib (Numeric)

    The storage capacity of the file system being created.

  • vpc (AWSCDK::EC2::IVPC)

    The VPC to launch the file system in.

  • backup_id (String, nil) (defaults to: nil)

    The ID of the backup.

  • kms_key (AWSCDK::Interfaces::AWSKMS::IKeyRef, nil) (defaults to: nil)

    The KMS key used for encryption to protect your data at rest.

  • removal_policy (AWSCDK::RemovalPolicy, nil) (defaults to: nil)

    Policy to apply when the file system is removed from the stack.

  • security_group (AWSCDK::EC2::ISecurityGroup, nil) (defaults to: nil)

    Security Group to assign to this file system.

  • storage_type (AWSCDK::FSX::StorageType, nil) (defaults to: nil)

    The storage type for the file system that you're creating.

  • lustre_configuration (AWSCDK::FSX::LustreConfiguration)

    Additional configuration for FSx specific to Lustre.

  • vpc_subnet (AWSCDK::EC2::ISubnet)

    The subnet that the file system will be accessible from.

  • file_system_type_version (AWSCDK::FSX::FileSystemTypeVersion, nil) (defaults to: nil)

    The Lustre version for the file system.



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'fsx/lustre_file_system_props.rb', line 17

def initialize(storage_capacity_gib:, vpc:, backup_id: nil, kms_key: nil, removal_policy: nil, security_group: nil, storage_type: nil, lustre_configuration:, vpc_subnet:, file_system_type_version: nil)
  @storage_capacity_gib = storage_capacity_gib
  Jsii::Type.check_type(@storage_capacity_gib, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "storageCapacityGiB")
  @vpc = vpc
  Jsii::Type.check_type(@vpc, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklWcGMifQ==")), "vpc")
  @backup_id = backup_id
  Jsii::Type.check_type(@backup_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "backupId") unless @backup_id.nil?
  @kms_key = kms_key
  Jsii::Type.check_type(@kms_key, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19rbXMuSUtleVJlZiJ9")), "kmsKey") unless @kms_key.nil?
  @removal_policy = removal_policy
  Jsii::Type.check_type(@removal_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "removalPolicy") unless @removal_policy.nil?
  @security_group = security_group
  Jsii::Type.check_type(@security_group, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklTZWN1cml0eUdyb3VwIn0=")), "securityGroup") unless @security_group.nil?
  @storage_type = storage_type
  Jsii::Type.check_type(@storage_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZnN4LlN0b3JhZ2VUeXBlIn0=")), "storageType") unless @storage_type.nil?
  @lustre_configuration = lustre_configuration.is_a?(Hash) ? ::AWSCDK::FSX::LustreConfiguration.new(**lustre_configuration.transform_keys(&:to_sym)) : lustre_configuration
  Jsii::Type.check_type(@lustre_configuration, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZnN4Lkx1c3RyZUNvbmZpZ3VyYXRpb24ifQ==")), "lustreConfiguration")
  @vpc_subnet = vpc_subnet
  Jsii::Type.check_type(@vpc_subnet, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklTdWJuZXQifQ==")), "vpcSubnet")
  @file_system_type_version = file_system_type_version
  Jsii::Type.check_type(@file_system_type_version, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZnN4LkZpbGVTeXN0ZW1UeXBlVmVyc2lvbiJ9")), "fileSystemTypeVersion") unless @file_system_type_version.nil?
end

Instance Attribute Details

#backup_idString? (readonly)

Note:

Default: - no backup will be used.

The ID of the backup.

Specifies the backup to use if you're creating a file system from an existing backup.

Returns:

  • (String, nil)


59
60
61
# File 'fsx/lustre_file_system_props.rb', line 59

def backup_id
  @backup_id
end

#file_system_type_versionAWSCDK::FSX::FileSystemTypeVersion? (readonly)

Note:

Default: - V_2_10, except for PERSISTENT_2 deployment type, where it is V_2_12 without metadata configuration mode and V_2_15 with metadata configuration mode.

The Lustre version for the file system.



94
95
96
# File 'fsx/lustre_file_system_props.rb', line 94

def file_system_type_version
  @file_system_type_version
end

#kms_keyAWSCDK::Interfaces::AWSKMS::IKeyRef? (readonly)

Note:

Default: - the aws/fsx default KMS key for the AWS account being deployed into.

The KMS key used for encryption to protect your data at rest.



64
65
66
# File 'fsx/lustre_file_system_props.rb', line 64

def kms_key
  @kms_key
end

#lustre_configurationAWSCDK::FSX::LustreConfiguration (readonly)

Additional configuration for FSx specific to Lustre.



84
85
86
# File 'fsx/lustre_file_system_props.rb', line 84

def lustre_configuration
  @lustre_configuration
end

#removal_policyAWSCDK::RemovalPolicy? (readonly)

Note:

Default: RemovalPolicy.RETAIN

Policy to apply when the file system is removed from the stack.

Returns:



69
70
71
# File 'fsx/lustre_file_system_props.rb', line 69

def removal_policy
  @removal_policy
end

#security_groupAWSCDK::EC2::ISecurityGroup? (readonly)

Note:

Default: - creates new security group which allows all outbound traffic.

Security Group to assign to this file system.

Returns:



74
75
76
# File 'fsx/lustre_file_system_props.rb', line 74

def security_group
  @security_group
end

#storage_capacity_gibNumeric (readonly)

The storage capacity of the file system being created.

For Windows file systems, valid values are 32 GiB to 65,536 GiB. For SCRATCH_1 deployment types, valid values are 1,200, 2,400, 3,600, then continuing in increments of 3,600 GiB. For SCRATCH_2, PERSISTENT_2 and PERSISTENT_1 deployment types using SSD storage type, the valid values are 1200 GiB, 2400 GiB, and increments of 2400 GiB. For PERSISTENT_1 HDD file systems, valid values are increments of 6000 GiB for 12 MB/s/TiB file systems and increments of 1800 GiB for 40 MB/s/TiB file systems.

Returns:

  • (Numeric)


48
49
50
# File 'fsx/lustre_file_system_props.rb', line 48

def storage_capacity_gib
  @storage_capacity_gib
end

#storage_typeAWSCDK::FSX::StorageType? (readonly)

Note:

Default: StorageType.SSD

The storage type for the file system that you're creating.



80
81
82
# File 'fsx/lustre_file_system_props.rb', line 80

def storage_type
  @storage_type
end

#vpcAWSCDK::EC2::IVPC (readonly)

The VPC to launch the file system in.

Returns:



52
53
54
# File 'fsx/lustre_file_system_props.rb', line 52

def vpc
  @vpc
end

#vpc_subnetAWSCDK::EC2::ISubnet (readonly)

The subnet that the file system will be accessible from.



88
89
90
# File 'fsx/lustre_file_system_props.rb', line 88

def vpc_subnet
  @vpc_subnet
end

Class Method Details

.jsii_propertiesObject



96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'fsx/lustre_file_system_props.rb', line 96

def self.jsii_properties
  {
    :storage_capacity_gib => "storageCapacityGiB",
    :vpc => "vpc",
    :backup_id => "backupId",
    :kms_key => "kmsKey",
    :removal_policy => "removalPolicy",
    :security_group => "securityGroup",
    :storage_type => "storageType",
    :lustre_configuration => "lustreConfiguration",
    :vpc_subnet => "vpcSubnet",
    :file_system_type_version => "fileSystemTypeVersion",
  }
end

Instance Method Details

#to_jsiiObject



111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# File 'fsx/lustre_file_system_props.rb', line 111

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "storageCapacityGiB" => @storage_capacity_gib,
    "vpc" => @vpc,
    "backupId" => @backup_id,
    "kmsKey" => @kms_key,
    "removalPolicy" => @removal_policy,
    "securityGroup" => @security_group,
    "storageType" => @storage_type,
    "lustreConfiguration" => @lustre_configuration,
    "vpcSubnet" => @vpc_subnet,
    "fileSystemTypeVersion" => @file_system_type_version,
  })
  result.compact
end