PHP Class Scalr\Service\Aws\Ec2\DataType\VolumeData

Since: 21.01.2013
Author: Vitaliy Demidov ([email protected])
Inheritance: extends Scalr\Service\Aws\Ec2\AbstractEc2DataType
Mostra file Open project: scalr/scalr Class Usage Examples

Public Properties

Property Type Description
$availabilityZone string The Availability Zone in which the volume was created.
$createTime DateTime The time stamp when volume creation was initiated.
$encrypted boolean Specifies whether the volume should be encrypted.
$iops integer Valid values: Range is 100 to 2000. Condition: Required when the volume type is io1; not used with standard volumes.
$kmsKeyId string The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used to protect the volume encryption key for the volume.
$size string The size of the volume, in GiBs.
$snapshotId string The snapshot from which the volume was created (optional).
$status string Valid values: creating | available | in-use | deleting | deleted | error
$volumeId string The ID of the volume.
$volumeType string The volume type standard | io1 | gp2 | sc1 | st1

Protected Properties

Property Type Description
$_properties array List of the public properties which is managed by magic getter and setters internally.

Public Methods

Method Description
attach ( string $instanceId, string $device ) : AttachmentSetResponseData AttachVolume action
createSnapshot ( string $description = null ) : SnapshotData CreateSnapshot action
createTags ( Scalr\Service\Aws\Ec2\DataType\ResourceTagSetList | Scalr\Service\Aws\Ec2\DataType\ResourceTagSetData | array $tagList ) : boolean CreateTags action
delete ( ) : boolean DeleteVolume action
deleteTags ( Scalr\Service\Aws\Ec2\DataType\ResourceTagSetList | Scalr\Service\Aws\Ec2\DataType\ResourceTagSetData | array $tagList ) : boolean DeleteTags action
detach ( string $instanceId = null, string $device = null, boolean $force = null ) : AttachmentSetResponseData DetachVolume action
refresh ( ) : VolumeData DescribeVolumes action

Protected Methods

Method Description
throwExceptionIfNotInitialized ( )

Method Details

attach() public method

Attaches an Amazon EBS volume to a running instance and exposes it to the instance with the specified device name. For a list of supported device names, see Attaching the Volume to an Instance. Any device names that aren't reserved for instance store volumes can be used for Amazon EBS volumes. Note! If a volume has an AWS Marketplace product code: -The volume can only be attached to the root device of a stopped instance. -You must be subscribed to the AWS Marketplace code that is on the volume. -The configuration (instance type, operating system) of the instance must support that specific AWS Marketplace code. For example, you cannot take a volume from a Windows instance and attach it to a Linux instance. -AWS Marketplace product codes are copied from the volume to the instance.
public attach ( string $instanceId, string $device ) : AttachmentSetResponseData
$instanceId string The ID of the Instance. The instance must be running.
$device string The device name as exposed to the instance
return AttachmentSetResponseData Returns AttachmentSetResponseData on success

createSnapshot() public method

Creates a snapshot of an Amazon EBS volume and stores it in Amazon S3.You can use snapshots for backups, to make copies of instance store volumes, and to save data before shutting down an instance.
public createSnapshot ( string $description = null ) : SnapshotData
$description string optional A description of the Amazon EBS snapshot. (Up to 255 characters)
return SnapshotData Returns the SnapshotData on success

createTags() public method

Adds or overwrites one or more tags for the specified EC2 resource or resources. Each resource can have a maximum of 10 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.
public createTags ( Scalr\Service\Aws\Ec2\DataType\ResourceTagSetList | Scalr\Service\Aws\Ec2\DataType\ResourceTagSetData | array $tagList ) : boolean
$tagList Scalr\Service\Aws\Ec2\DataType\ResourceTagSetList | Scalr\Service\Aws\Ec2\DataType\ResourceTagSetData | array The key/value pair list of the Tags.
return boolean Returns true on success or throws an exception otherwise

delete() public method

Deletes an Amazon EBS volume. The volume must be in the available state (not attached to an instance)
public delete ( ) : boolean
return boolean Returns true on success or throws an exception otherwise

deleteTags() public method

Deletes a specific set of tags from a specific set of resources. This call is designed to follow a DescribeTags call. You first determine what tags a resource has, and then you call DeleteTags with the resource ID and the specific tags you want to delete.
public deleteTags ( Scalr\Service\Aws\Ec2\DataType\ResourceTagSetList | Scalr\Service\Aws\Ec2\DataType\ResourceTagSetData | array $tagList ) : boolean
$tagList Scalr\Service\Aws\Ec2\DataType\ResourceTagSetList | Scalr\Service\Aws\Ec2\DataType\ResourceTagSetData | array The key/value pair list of the Tags.
return boolean Returns true on success or throws an exception otherwise

detach() public method

Detaches an Amazon EBS volume from an instance. Make sure to unmount any file systems on the device within your operating system before detaching the volume. Failure to do so will result in volume being stuck in "busy" state while detaching. Note! If an Amazon EBS volume is the root device of an instance, it cannot be detached while the instance is in the "running" state. To detach the root volume, stop the instance first. If the root volume is detached from an instance with an AWS Marketplace product code, then the AWS Marketplace product codes from that volume are no longer associated with the instance.
public detach ( string $instanceId = null, string $device = null, boolean $force = null ) : AttachmentSetResponseData
$instanceId string optional The ID of the Instance.
$device string optional The device name.
$force boolean optional Forces detachment if the previous detachment attempt did not occur cleanly (logging into an instance, unmounting the volume, and detaching normally). This option can lead to data loss or a corrupted file system. Use this option only as a last resort to detach a volume from a failed instance. The instance won't have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures.
return AttachmentSetResponseData Returns AttachmentSetResponseData on success

refresh() public method

Refreshes current object using Amazon request NOTE! It refreshes object itself only when EntityManager is enabled. Decision is to use $object = object->refresh() instead;
public refresh ( ) : VolumeData
return VolumeData

throwExceptionIfNotInitialized() protected method

Property Details

$_properties protected_oe property

List of the public properties which is managed by magic getter and setters internally.
protected array $_properties
return array

$availabilityZone public_oe property

The Availability Zone in which the volume was created.
public string $availabilityZone
return string

$createTime public_oe property

The time stamp when volume creation was initiated.
public DateTime $createTime
return DateTime

$encrypted public_oe property

Specifies whether the volume should be encrypted.
public bool $encrypted
return boolean

$iops public_oe property

Valid values: Range is 100 to 2000. Condition: Required when the volume type is io1; not used with standard volumes.
public int $iops
return integer

$kmsKeyId public_oe property

The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used to protect the volume encryption key for the volume.
public string $kmsKeyId
return string

$size public_oe property

The size of the volume, in GiBs.
public string $size
return string

$snapshotId public_oe property

The snapshot from which the volume was created (optional).
public string $snapshotId
return string

$status public_oe property

Valid values: creating | available | in-use | deleting | deleted | error
public string $status
return string

$volumeId public_oe property

The ID of the volume.
public string $volumeId
return string

$volumeType public_oe property

The volume type standard | io1 | gp2 | sc1 | st1
public string $volumeType
return string