Class: AWSCDK::FSX::FileSystemProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
fsx/file_system_props.rb

Overview

Properties for the FSx file system.

Direct Known Subclasses

LustreFileSystemProps

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) ⇒ FileSystemProps

Returns a new instance of FileSystemProps.

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.



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'fsx/file_system_props.rb', line 16

def initialize(storage_capacity_gib:, vpc:, backup_id: nil, kms_key: nil, removal_policy: nil, security_group: nil, storage_type: 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?
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)


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

def backup_id
  @backup_id
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.



57
58
59
# File 'fsx/file_system_props.rb', line 57

def kms_key
  @kms_key
end

#removal_policyAWSCDK::RemovalPolicy? (readonly)

Note:

Default: RemovalPolicy.RETAIN

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

Returns:



62
63
64
# File 'fsx/file_system_props.rb', line 62

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:



67
68
69
# File 'fsx/file_system_props.rb', line 67

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)


41
42
43
# File 'fsx/file_system_props.rb', line 41

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.



73
74
75
# File 'fsx/file_system_props.rb', line 73

def storage_type
  @storage_type
end

#vpcAWSCDK::EC2::IVPC (readonly)

The VPC to launch the file system in.

Returns:



45
46
47
# File 'fsx/file_system_props.rb', line 45

def vpc
  @vpc
end

Class Method Details

.jsii_propertiesObject



75
76
77
78
79
80
81
82
83
84
85
# File 'fsx/file_system_props.rb', line 75

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",
  }
end

Instance Method Details

#to_jsiiObject



87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'fsx/file_system_props.rb', line 87

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