Scalr\Service\Aws\Ec2\V20150415\Ec2Api::createVolume PHP Method

createVolume() public method

Creates an Amazon EBS volume that can be attached to any Amazon EC2 instance in the same Availability Zone. Any AWS Marketplace product codes from the snapshot are propagated to the volume
public createVolume ( CreateVolumeRequestData $request ) : VolumeData
$request Scalr\Service\Aws\Ec2\DataType\CreateVolumeRequestData Request that specifies parameters of the volume.
return Scalr\Service\Aws\Ec2\DataType\VolumeData Returns the VolumeData on success
    public function createVolume(CreateVolumeRequestData $request)
    {
        $result = null;
        $options = $request->getQueryArrayBare();
        $response = $this->client->call(ucfirst(__FUNCTION__), $options);
        if ($response->getError() === false) {
            //Success
            $sxml = simplexml_load_string($response->getRawContent());
            $result = $this->_loadVolumeData($sxml);
        }
        return $result;
    }
Ec2Api