(ctx context.Context, instanceID string)
| 227 | } |
| 228 | |
| 229 | func (c *Client) AddSSHKeyCtx(ctx context.Context, instanceID string) (*AddSSHKeyResponse, error) { |
| 230 | var resp AddSSHKeyResponse |
| 231 | if err := c.doRequest(ctx, "POST", fmt.Sprintf("/v1/instances/%s/add_key", instanceID), nil, &resp); err != nil { |
| 232 | return nil, err |
| 233 | } |
| 234 | return &resp, nil |
| 235 | } |
| 236 | |
| 237 | func (c *Client) AddSSHKey(instanceID string) (*AddSSHKeyResponse, error) { |
| 238 | return c.AddSSHKeyCtx(context.Background(), instanceID) |