Scalr\Service\Aws\Ec2\DataType\EbsBlockDeviceData::__construct PHP Method

__construct() public method

Constructor
public __construct ( integer $volumeSize = null, string $snapshotId = null, string $volumeType = null, integer $iops = null, boolean $deleteOnTermination = null, boolean $encrypted = null )
$volumeSize integer optional The size of the volume, in GiB Valid values: If the volume type is io1, the minimum size of the volume is 10 GiB. Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size. Condition: If you're specifying a block device mapping, the volume size is required unless you're creating the volume from a snapshot.
$snapshotId string optional The ID of the snapshot.
$volumeType string optional The volume type. Valid values: standard | io1 | gp2 | st1 | sc1
$iops integer optional The number of I/O operations per second (IOPS) that the volume supports. Valid values: Range is 100 to 2000. Condition: Required when the volume type is io1; not used with standard volumes.
$deleteOnTermination boolean optional Whether the Amazon EBS volume is deleted on instance termination
$encrypted boolean Indicates whether or not the Amazon EBS volume is encrypted.
    public function __construct($volumeSize = null, $snapshotId = null, $volumeType = null, $iops = null, $deleteOnTermination = null, $encrypted = null)
    {
        parent::__construct();
        $this->volumeSize = $volumeSize;
        $this->snapshotId = $snapshotId;
        $this->volumeType = $volumeType;
        $this->deleteOnTermination = $deleteOnTermination !== null ? (bool) $deleteOnTermination : null;
        if ($this->volumeType === 'io1') {
            $this->iops = $iops;
        }
        $this->encrypted = $encrypted;
    }
EbsBlockDeviceData