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

registerImage() public method

Registers a new AMI with Amazon EC2. When you're creating an AMI, this is the final step you must complete before you can launch an instance from the AMI
public registerImage ( Scalr\Service\Aws\Ec2\DataType\RegisterImageData $request ) : string
$request Scalr\Service\Aws\Ec2\DataType\RegisterImageData Register Image request
return string Returns the ID of the newly registered AMI
    public function registerImage(RegisterImageData $request)
    {
        $result = null;
        $options = $request->getQueryArrayBare();
        $response = $this->client->call(ucfirst(__FUNCTION__), $options);
        if ($response->getError() === false) {
            $sxml = simplexml_load_string($response->getRawContent());
            $result = (string) $sxml->imageId;
        }
        return $result;
    }
Ec2Api