Total Complexity | 4 |
Total Lines | 55 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | class SshKeys extends CloudApiBase |
||
15 | { |
||
16 | /** |
||
17 | * Returns a list of SSL keys. |
||
18 | * |
||
19 | * @return SshKeysResponse<SshKeyResponse> |
||
20 | */ |
||
21 | public function getAll(): SshKeysResponse |
||
27 | ) |
||
28 | ); |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * Returns a specific key by key ID. |
||
33 | */ |
||
34 | public function get(string $keyId): SshKeyResponse |
||
35 | { |
||
36 | return new SshKeyResponse( |
||
37 | $this->client->request( |
||
38 | 'get', |
||
39 | "/account/ssh-keys/$keyId" |
||
40 | ) |
||
41 | ); |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * Create an SSH key. |
||
46 | */ |
||
47 | public function create(string $label, string $public_key): OperationResponse |
||
59 | ); |
||
60 | } |
||
61 | |||
62 | /** |
||
63 | * Delete a specific key by ID. |
||
64 | */ |
||
65 | public function delete(string $keyId): OperationResponse |
||
69 | ); |
||
70 | } |
||
72 |