Class: Infrawrench::SshKeysNamespace
- Inherits:
-
Object
- Object
- Infrawrench::SshKeysNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.ssh_keys
Instance Method Summary collapse
-
#create(body:, org_id: nil, request_options: nil) ⇒ Hash
Generate a new Ed25519 keypair (private key returned once).
-
#delete(id:, org_id: nil, request_options: nil) ⇒ Hash
Delete an SSH key (owner only).
-
#import(body:, org_id: nil, request_options: nil) ⇒ Hash
Import an existing public key.
-
#initialize(transport) ⇒ SshKeysNamespace
constructor
private
A new instance of SshKeysNamespace.
-
#list(org_id: nil, request_options: nil) ⇒ Array<Hash>
List org SSH keys.
Constructor Details
#initialize(transport) ⇒ SshKeysNamespace
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of SshKeysNamespace.
3869 3870 3871 |
# File 'lib/infrawrench/client.rb', line 3869 def initialize(transport) @transport = transport end |
Instance Method Details
#create(body:, org_id: nil, request_options: nil) ⇒ Hash
Generate a new Ed25519 keypair (private key returned once)
Requires permission: ssh-keys:write.
POST /api/org/orgId/ssh-keys
Raises on 400: Bad request
3887 3888 3889 3890 3891 3892 3893 3894 3895 |
# File 'lib/infrawrench/client.rb', line 3887 def create(body:, org_id: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/ssh-keys", path_params: { "orgId" => org_id }, body: body, request_options: ) end |
#delete(id:, org_id: nil, request_options: nil) ⇒ Hash
Delete an SSH key (owner only)
Requires permission: ssh-keys:write.
DELETE /api/org/orgId/ssh-keys/id
3909 3910 3911 3912 3913 3914 3915 3916 |
# File 'lib/infrawrench/client.rb', line 3909 def delete(id:, org_id: nil, request_options: nil) @transport.request( http_method: "DELETE", path: "/api/org/{orgId}/ssh-keys/{id}", path_params: { "orgId" => org_id, "id" => id }, request_options: ) end |
#import(body:, org_id: nil, request_options: nil) ⇒ Hash
Import an existing public key
Requires permission: ssh-keys:write.
POST /api/org/orgId/ssh-keys/import
Raises on 400: Bad request
3932 3933 3934 3935 3936 3937 3938 3939 3940 |
# File 'lib/infrawrench/client.rb', line 3932 def import(body:, org_id: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/ssh-keys/import", path_params: { "orgId" => org_id }, body: body, request_options: ) end |
#list(org_id: nil, request_options: nil) ⇒ Array<Hash>
List org SSH keys
Requires permission: ssh-keys:read.
GET /api/org/orgId/ssh-keys
3954 3955 3956 3957 3958 3959 3960 3961 |
# File 'lib/infrawrench/client.rb', line 3954 def list(org_id: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/ssh-keys", path_params: { "orgId" => org_id }, request_options: ) end |