Fugue.AWS.EC2.Volume

This is the preferred interface for making EBS Volumes with Fugue. The new function is the right place to start.

Module Members

external

(Function)

Create a reference to an externally managed Volume.

Example usage:

volume: EC2.Volume.external("vol-1234abcd", AWS.Us-east-1)

Type Signature

 fun (String, Region) -> Volume
Argument: volumeId

The ID of the target Volume. Must be of the form “vol-” followed by 8 characters from a-z and 0-9.

Type: String

Argument: region

The Region containing the target Volume.

Type: Region

Returns:

A reference to the specified Volume.

Type: Volume

new

(Function)

new EBS Volume (Constructor)

Call this constructor to create a new Fugue.Core.AWS.EC2.Volume value.

Type Signature

 fun { size: Optional<Int>,
       availabilityZone: AvailabilityZone,
       tags: Optional<List<Tag>>,
       volumeType: Optional<VolumeType>,
       iops: Optional<Int>,
       encrypted: Optional<Bool>,
       kmsKey: Optional<Key>,
       region: Optional<Region>,
       snapshot: Optional<String>,
       finalSnapshotPrefix: Optional<String>,
       resourceId: Optional<String> } -> Volume
Argument: size

The size of the volume in gibibytes (GiB). If nothing else is specified, this or snapshot must be specified.

Type: Optional<Int>

Argument: availabilityZone

The availability zone in which to place the volume.

Type: AvailabilityZone

Argument: tags

The AWS tags to apply to the volume. Mutable.

Type: Optional<List<Tag>>

Argument: volumeType

The type of volume, such as General Purpose or Provisioned IOPs.

Type: Optional<VolumeType>

Argument: iops

The IOPs to provision for the volume. If the volume is of the Provisioned IOPs type, this is required. Mutable.

Type: Optional<Int>

Argument: encrypted

Whether or not the volume should be encrypted.

Type: Optional<Bool>

Argument: kmsKey

The full KMS key used to create the encrypted volume. This parameter is only required if you want to use a non-default KMS key; if this parameter is not specified, the default KMS key for EBS is used. If a KMS key is specified, the encrypted must be set to True.

Type: Optional<Key>

Argument: region

The AWS region in which the VPC should be created. This is optional for backwards compatibility but should be set to ensure the volume in Ludwig corresponds to a volume in AWS.

Type: Optional<Region>

Argument: snapshot

A snapshot from which to create the volume. If nothing else is specified, this or size must be specified.

Type: Optional<String>

Argument: finalSnapshotPrefix

The prefix of the name of the snapshot taken before deleting the volume. If this field is set, a snapshot with the name <finalSnapshotPrefix>-<fid>.<ludwigId> is created with the latest contents of the volume. Mutable.

Type: Optional<String>

Argument: resourceId

Resource ID of the resource to import with Fugue Import. This field is only honored on fugue run. The resource ID is the AWS ID. Mutable. Example: vol-0123456789abcdef0

Type: Optional<String>

Returns:

A Fugue.Core.AWS.EC2.Volume value.

Type: Volume

region

(Function)

Retrieve the region from a Volume value.

Works for Volumes defined in the composition as well external values.

If this function is called on a Volume where the region field is omitted, an error is thrown.

Example usage:

volume1: EC2.Vpc.new {
  region: AWS.Us-west-2,
  cidrBlock: "10.0.0.0/16",
}
region1: EC2.Volume.region(volume1) # => AWS.Us-west-2

volume2: EC2.Volume.external("vol-01234567", AWS.Us-east-1)
region2: EC2.Volume.region(volume2) # => AWS.Us-east-1

Type Signature

 fun (Volume) -> Region
Argument: volume

The volume from which to get the region.

Type: Volume

Returns:

The region containing the volume.

Type: Region

Spec

(Type)

type Spec:
  size: Optional<Int>
  availabilityZone: AvailabilityZone
  tags: Optional<List<Tag>>
  volumeType: Optional<VolumeType>
  iops: Optional<Int>
  encrypted: Optional<Bool>
  snapshot: Optional<String>

EBS Volume Specification (Resource)

DEPRECATED

Spec is deprecated and will be removed. Use named arguments in the new constructor instead.

Record {

Field: size

The size of the volume in gibibytes (GiB). If nothing else is specified, this or snapshot must be specified.

Type: Optional<Int>

Field: availabilityZone

The availability zone in which to place the volume.

Type: AvailabilityZone

Field: tags

The AWS tags to apply to the volume.

Type: Optional<List<Tag>>

Field: volumeType

The type of volume, such as General Purpose or Provisioned IOPs.

Type: Optional<VolumeType>

Field: iops

The IOPs to provision for the volume. If the volume is of the Provisioned IOPs type, this is required.

Type: Optional<Int>

Field: encrypted

Whether or not the volume should be encrypted.

Type: Optional<Bool>

Field: snapshot

A snapshot from which to create the volume. If nothing else is specified, this or size must be specified.

Type: Optional<String>

}

default

(Value)

default:
  tags: None
  volumeType: None
  iops: None
  encrypted: None
  snapshot: None

EBS Volume Specification (Default Values)

DEPRECATED

default is deprecated and will be removed. Use the new constructor instead.