Class: AWSCDK::FSX::CfnVolume::OriginSnapshotProperty

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

Overview

The configuration object that specifies the snapshot to use as the origin of the data for the volume.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(copy_strategy:, snapshot_arn:) ⇒ OriginSnapshotProperty

Returns a new instance of OriginSnapshotProperty.

Parameters:

  • copy_strategy (String)

    Specifies the strategy used when copying data from the snapshot to the new volume.

  • snapshot_arn (String)

    Specifies the snapshot to use when creating an OpenZFS volume from a snapshot.



1131
1132
1133
1134
1135
1136
# File 'fsx/cfn_volume.rb', line 1131

def initialize(copy_strategy:, snapshot_arn:)
  @copy_strategy = copy_strategy
  Jsii::Type.check_type(@copy_strategy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "copyStrategy")
  @snapshot_arn = snapshot_arn
  Jsii::Type.check_type(@snapshot_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "snapshotArn")
end

Instance Attribute Details

#copy_strategyString (readonly)

Specifies the strategy used when copying data from the snapshot to the new volume.

  • CLONE - The new volume references the data in the origin snapshot. Cloning a snapshot is faster than copying data from the snapshot to a new volume and doesn't consume disk throughput. However, the origin snapshot can't be deleted if there is a volume using its copied data.
  • FULL_COPY - Copies all data from the snapshot to the new volume.

Specify this option to create the volume from a snapshot on another FSx for OpenZFS file system.

The INCREMENTAL_COPY option is only for updating an existing volume by using a snapshot from another FSx for OpenZFS file system. For more information, see CopySnapshotAndUpdateVolume .



1149
1150
1151
# File 'fsx/cfn_volume.rb', line 1149

def copy_strategy
  @copy_strategy
end

#snapshot_arnString (readonly)

Specifies the snapshot to use when creating an OpenZFS volume from a snapshot.



1154
1155
1156
# File 'fsx/cfn_volume.rb', line 1154

def snapshot_arn
  @snapshot_arn
end

Class Method Details

.jsii_propertiesObject



1156
1157
1158
1159
1160
1161
# File 'fsx/cfn_volume.rb', line 1156

def self.jsii_properties
  {
    :copy_strategy => "copyStrategy",
    :snapshot_arn => "snapshotArn",
  }
end

Instance Method Details

#to_jsiiObject



1163
1164
1165
1166
1167
1168
1169
1170
# File 'fsx/cfn_volume.rb', line 1163

def to_jsii
  result = {}
  result.merge!({
    "copyStrategy" => @copy_strategy,
    "snapshotArn" => @snapshot_arn,
  })
  result.compact
end