(req CreateInstanceRequest)
| 251 | } |
| 252 | |
| 253 | func (c *Client) CreateInstance(req CreateInstanceRequest) (*CreateInstanceResponse, error) { |
| 254 | var resp CreateInstanceResponse |
| 255 | if err := c.doRequest(context.Background(), "POST", "/v1/instances/create", req, &resp); err != nil { |
| 256 | return nil, err |
| 257 | } |
| 258 | return &resp, nil |
| 259 | } |
| 260 | |
| 261 | func (c *Client) DeleteInstance(instanceID string) (*DeleteInstanceResponse, error) { |
| 262 | if err := c.doRequest(context.Background(), "POST", fmt.Sprintf("/v1/instances/%s/delete", instanceID), nil, nil); err != nil { |
no test coverage detected