public function exists($params, $optParams = [])
    {
        if (is_string($params)) {
            $params = ['publicId' => $params];
        }

        return $this->sendRequest(['cloudId', 'publicId'], [
            'restAction' => 'exists',
            'uri' => '/c/<cloudId>/o/<publicId>',
            'params' => $params,
            'getParams' => $optParams,
        ], function ($response) {
            return $response->success;
        });
    }
public function exists($params, $optParams = [])
    {
        if (is_string($params)) {
            $params = ['publicId' => $params];
        }

        return $this->sendRequest(['cloudId', 'publicId'], [
            'restAction' => 'exists',
            'uri' => '/c/<cloudId>/o/<publicId>',
            'params' => $params,
            'getParams' => $optParams,
        ], function ($response) {
            return $response->success;
        });
    }
public function exists ( $ params , $ optParams = [ ] ) { if ( is_string ( $ params ) ) { $ params = [ 'publicId' => $ params ] ; } return $ this -> sendRequest ( [ 'cloudId' , 'publicId' ] , [ 'restAction' => 'exists' , 'uri' => '/c/<cloudId>/o/<publicId>' , 'params' => $ params , 'getParams' => $ optParams , ] , function ( $ response ) { return $ response -> success ; } ) ; }
Returns whether an image exists.

@param array $params Required API parameters

<li>cloudId - cloud ID
<li>publicId - image ID
@param array $optParams Optional API parameters

@return bool
Returns whether an image exists .