class Keypair extends OperatorResource implements Listable, Retrievable, Deletable, Creatable

Represents a Compute v2 Keypair

Traits

Properties

$fingerprint string
$name string
$publicKey string
$privateKey string
$deleted boolean
$userId string
$id string
$createdAt DateTimeImmutable

Methods

populateFromArray (array $array) : mixed|void

No description

retrieve () : void

Retrieve details of the current resource from the remote API.

create (array $userOptions) : Creatable

Create a new resource according to the configuration set in the options.

delete () : void

Permanently delete this resource.

Details

populateFromArray(array $array)

Parameters

$array array

Return value

mixed|void

Example code

$response = $keypair->populateFromArray($array);

retrieve()

Retrieve details of the current resource from the remote API.

Return value

void

Example code

$keypair->retrieve();

create(array $userOptions)

Create a new resource according to the configuration set in the options.

Parameters

$userOptions array

Return value

Creatable

Example code

$creatable = $keypair->create($userOptions);

delete()

Permanently delete this resource.

Return value

void

Example code

$keypair->delete();