SnapshotService
extends VultrService
in package
Snapshot service handler, for all snapshots endpoints.
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- createSnapshot() : Snapshot
- createSnapshotFromURL() : Snapshot
- deleteSnapshot() : void
- getSnapshot() : Snapshot
- getSnapshots() : array<string|int, Snapshot>
- createObject() : ModelInterface
- deleteObject() : void
- getClientHandler() : VultrClientHandler
- getListObjects() : array<string|int, ModelInterface>
- getObject() : ModelInterface
- getVultrClient() : VultrClient
- list() : array<string|int, mixed>
- patchObject() : void
- getReadableClassType() : string
Properties
$vultr
protected
VultrClient
$vultr
$client
private
VultrClientHandler
$client
Methods
__construct()
public
__construct(VultrClient $vultr, VultrClientHandler $client) : mixed
Parameters
- $vultr : VultrClient
- $client : VultrClientHandler
createSnapshot()
public
createSnapshot( $instance_id[, $description = '' ]) : Snapshot
Parameters
- $instance_id :
-
- string - UUID of the instance that will have the snapshot taken of.
- $description : = ''
-
- string - What shall you name your snapshot?
Tags
Return values
SnapshotcreateSnapshotFromURL()
public
createSnapshotFromURL( $url[, $description = '' ]) : Snapshot
Parameters
- $url :
-
- string - Full URL of your raw snapshot. Ex https://www.vultr.com/your-amazing-disk-image.raw
- $description : = ''
-
- string - What shall you name your snapshot?
Tags
Return values
SnapshotdeleteSnapshot()
public
deleteSnapshot( $snapshot_id) : void
Parameters
Tags
getSnapshot()
public
getSnapshot( $snapshot_id) : Snapshot
Parameters
Tags
Return values
SnapshotgetSnapshots()
public
getSnapshots([ $description = null ][, &$options = null ]) : array<string|int, Snapshot>
Parameters
- $description : = null
-
- string|null - Filter via description of the snapshots on the account.
- $options : = null
-
- ListOptions|null - Interact via reference.
Tags
Return values
array<string|int, Snapshot>createObject()
protected
createObject( $uri, $model, $params) : ModelInterface
Parameters
- $uri :
-
- string - the url address to query after api.vultr.com/v2
- $model :
-
- ModelInterface - the object model that we are creating
- $params :
-
- array - The values that we will be sending. Refactor to use getUpdateParams/getUpdateArray?
Tags
Return values
ModelInterfacedeleteObject()
protected
deleteObject( $uri, $model) : void
Parameters
- $uri :
-
- string - the url address to query after api.vultr.com/v2
- $model :
-
- ModelInterface - the object model that we are acting on deleting. This doesn't need to be a fully initialized object.
Tags
getClientHandler()
protected
getClientHandler() : VultrClientHandler
Return values
VultrClientHandlergetListObjects()
protected
getListObjects( $uri, $model[, &$options = null ][, $params = null ]) : array<string|int, ModelInterface>
Parameters
- $uri :
-
- string - the url address to query after api.vultr.com/v2
- $model :
-
- ModelInterface - the object that will be mapped to the get response.
- $options : = null
-
- ListOptions - Pagination object
- $params : = null
-
- array - filter parameters.
Tags
Return values
array<string|int, ModelInterface>getObject()
protected
getObject( $uri, $model) : ModelInterface
Parameters
- $uri :
-
- string - the url address to query after api.vultr.com/v2
- $model :
-
- ModelInterface - the object that will be mapped to the get response.
Tags
Return values
ModelInterfacegetVultrClient()
protected
getVultrClient() : VultrClient
Return values
VultrClientlist()
protected
list(string $uri, ModelInterface $model, ListOptions &$options[, array<string|int, mixed>|null $params = null ]) : array<string|int, mixed>
Parameters
- $uri : string
- $model : ModelInterface
- $options : ListOptions
- $params : array<string|int, mixed>|null = null
Return values
array<string|int, mixed>patchObject()
protected
patchObject( $uri, $model[, array<string|int, mixed>|null $params = null ]) : void
Parameters
- $uri :
-
- string - the url address to query after api.vultr.com/v2
- $model :
-
- ModelInterface - the object model that we are updating. This needs to be a fully initialized object.
- $params : array<string|int, mixed>|null = null
Tags
getReadableClassType()
private
getReadableClassType(ModelInterface $model) : string
Parameters
- $model : ModelInterface