Detach a previously attached volume from a running instance.
Access
public
Parameters
Parameter |
Type |
Required |
Description |
---|---|---|---|
|
Required |
The ID of the volume to detach. |
|
|
Optional |
An associative array of parameters that can have the following keys:
|
Returns
Type |
Description |
---|---|
A |
Examples
Detach an EBS volume from a running instance.
// Instantiate the class $ec2 = new AmazonEC2(); // Detach the volume $response = $ec2->detach_volume($volume_id, array( 'InstanceId' => 'i-1f549375', 'Device' => '/dev/sdg' )); // Success? var_dump($response->isOK());Result:
bool(true)
Related Methods
Source
Method defined in services/ec2.class.php | Toggle source view (7 lines) | View on GitHub