All URIs are relative to https://api.machines.dev/v1
| Method | HTTP request | Description |
|---|---|---|
| MachinesCordon | Post /apps/{app_name}/machines/{machine_id}/cordon | Cordon Machine |
| MachinesCreate | Post /apps/{app_name}/machines | Create Machine |
| MachinesCreateLease | Post /apps/{app_name}/machines/{machine_id}/lease | Create Lease |
| MachinesDelete | Delete /apps/{app_name}/machines/{machine_id} | Destroy Machine |
| MachinesDeleteMetadata | Delete /apps/{app_name}/machines/{machine_id}/metadata/{key} | Delete Metadata |
| MachinesExec | Post /apps/{app_name}/machines/{machine_id}/exec | Execute Command |
| MachinesList | Get /apps/{app_name}/machines | List Machines |
| MachinesListEvents | Get /apps/{app_name}/machines/{machine_id}/events | List Events |
| MachinesListProcesses | Get /apps/{app_name}/machines/{machine_id}/ps | List Processes |
| MachinesListVersions | Get /apps/{app_name}/machines/{machine_id}/versions | List Versions |
| MachinesReleaseLease | Delete /apps/{app_name}/machines/{machine_id}/lease | Release Lease |
| MachinesRestart | Post /apps/{app_name}/machines/{machine_id}/restart | Restart Machine |
| MachinesShow | Get /apps/{app_name}/machines/{machine_id} | Get Machine |
| MachinesShowLease | Get /apps/{app_name}/machines/{machine_id}/lease | Get Lease |
| MachinesShowMetadata | Get /apps/{app_name}/machines/{machine_id}/metadata | Get Metadata |
| MachinesSignal | Post /apps/{app_name}/machines/{machine_id}/signal | Signal Machine |
| MachinesStart | Post /apps/{app_name}/machines/{machine_id}/start | Start Machine |
| MachinesStop | Post /apps/{app_name}/machines/{machine_id}/stop | Stop Machine |
| MachinesSuspend | Post /apps/{app_name}/machines/{machine_id}/suspend | Suspend Machine |
| MachinesUncordon | Post /apps/{app_name}/machines/{machine_id}/uncordon | Uncordon Machine |
| MachinesUpdate | Post /apps/{app_name}/machines/{machine_id} | Update Machine |
| MachinesUpdateMetadata | Post /apps/{app_name}/machines/{machine_id}/metadata/{key} | Update Metadata |
| MachinesWait | Get /apps/{app_name}/machines/{machine_id}/wait | Wait for State |
MachinesCordon(ctx, appName, machineId).Execute()
Cordon Machine
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/OutboundSpade/FlyMachines"
)
func main() {
appName := "appName_example" // string | Fly App Name
machineId := "machineId_example" // string | Machine ID
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.MachinesAPI.MachinesCordon(context.Background(), appName, machineId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MachinesAPI.MachinesCordon``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| appName | string | Fly App Name | |
| machineId | string | Machine ID |
Other parameters are passed through a pointer to a apiMachinesCordonRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
(empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Machine MachinesCreate(ctx, appName).Request(request).Execute()
Create Machine
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/OutboundSpade/FlyMachines"
)
func main() {
appName := "appName_example" // string | Fly App Name
request := *openapiclient.NewCreateMachineRequest() // CreateMachineRequest | Create machine request
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MachinesAPI.MachinesCreate(context.Background(), appName).Request(request).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MachinesAPI.MachinesCreate``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `MachinesCreate`: Machine
fmt.Fprintf(os.Stdout, "Response from `MachinesAPI.MachinesCreate`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| appName | string | Fly App Name |
Other parameters are passed through a pointer to a apiMachinesCreateRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
request | CreateMachineRequest | Create machine request |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Lease MachinesCreateLease(ctx, appName, machineId).Request(request).FlyMachineLeaseNonce(flyMachineLeaseNonce).Execute()
Create Lease
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/OutboundSpade/FlyMachines"
)
func main() {
appName := "appName_example" // string | Fly App Name
machineId := "machineId_example" // string | Machine ID
request := *openapiclient.NewCreateLeaseRequest() // CreateLeaseRequest | Request body
flyMachineLeaseNonce := "flyMachineLeaseNonce_example" // string | Existing lease nonce to refresh by ttl, empty or non-existent to create a new lease (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MachinesAPI.MachinesCreateLease(context.Background(), appName, machineId).Request(request).FlyMachineLeaseNonce(flyMachineLeaseNonce).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MachinesAPI.MachinesCreateLease``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `MachinesCreateLease`: Lease
fmt.Fprintf(os.Stdout, "Response from `MachinesAPI.MachinesCreateLease`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| appName | string | Fly App Name | |
| machineId | string | Machine ID |
Other parameters are passed through a pointer to a apiMachinesCreateLeaseRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
request | CreateLeaseRequest | Request body | flyMachineLeaseNonce | string | Existing lease nonce to refresh by ttl, empty or non-existent to create a new lease |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MachinesDelete(ctx, appName, machineId).Force(force).Execute()
Destroy Machine
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/OutboundSpade/FlyMachines"
)
func main() {
appName := "appName_example" // string | Fly App Name
machineId := "machineId_example" // string | Machine ID
force := true // bool | Force kill the machine if it's running (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.MachinesAPI.MachinesDelete(context.Background(), appName, machineId).Force(force).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MachinesAPI.MachinesDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| appName | string | Fly App Name | |
| machineId | string | Machine ID |
Other parameters are passed through a pointer to a apiMachinesDeleteRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
force | bool | Force kill the machine if it's running |
(empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MachinesDeleteMetadata(ctx, appName, machineId, key).Execute()
Delete Metadata
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/OutboundSpade/FlyMachines"
)
func main() {
appName := "appName_example" // string | Fly App Name
machineId := "machineId_example" // string | Machine ID
key := "key_example" // string | Metadata Key
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.MachinesAPI.MachinesDeleteMetadata(context.Background(), appName, machineId, key).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MachinesAPI.MachinesDeleteMetadata``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| appName | string | Fly App Name | |
| machineId | string | Machine ID | |
| key | string | Metadata Key |
Other parameters are passed through a pointer to a apiMachinesDeleteMetadataRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
(empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Flydv1ExecResponse MachinesExec(ctx, appName, machineId).Request(request).Execute()
Execute Command
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/OutboundSpade/FlyMachines"
)
func main() {
appName := "appName_example" // string | Fly App Name
machineId := "machineId_example" // string | Machine ID
request := *openapiclient.NewMachineExecRequest() // MachineExecRequest | Request body
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MachinesAPI.MachinesExec(context.Background(), appName, machineId).Request(request).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MachinesAPI.MachinesExec``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `MachinesExec`: Flydv1ExecResponse
fmt.Fprintf(os.Stdout, "Response from `MachinesAPI.MachinesExec`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| appName | string | Fly App Name | |
| machineId | string | Machine ID |
Other parameters are passed through a pointer to a apiMachinesExecRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
request | MachineExecRequest | Request body |
No authorization required
- Content-Type: application/json
- Accept: application/octet-stream, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]Machine MachinesList(ctx, appName).IncludeDeleted(includeDeleted).Region(region).State(state).Summary(summary).Execute()
List Machines
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/OutboundSpade/FlyMachines"
)
func main() {
appName := "appName_example" // string | Fly App Name
includeDeleted := true // bool | Include deleted machines (optional)
region := "region_example" // string | Region filter (optional)
state := "state_example" // string | comma separated list of states to filter (created, started, stopped, suspended) (optional)
summary := true // bool | Only return summary info about machines (omit config, checks, events, host_status, nonce, etc.) (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MachinesAPI.MachinesList(context.Background(), appName).IncludeDeleted(includeDeleted).Region(region).State(state).Summary(summary).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MachinesAPI.MachinesList``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `MachinesList`: []Machine
fmt.Fprintf(os.Stdout, "Response from `MachinesAPI.MachinesList`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| appName | string | Fly App Name |
Other parameters are passed through a pointer to a apiMachinesListRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
includeDeleted | bool | Include deleted machines | region | string | Region filter | state | string | comma separated list of states to filter (created, started, stopped, suspended) | summary | bool | Only return summary info about machines (omit config, checks, events, host_status, nonce, etc.) |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]MachineEvent MachinesListEvents(ctx, appName, machineId).Execute()
List Events
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/OutboundSpade/FlyMachines"
)
func main() {
appName := "appName_example" // string | Fly App Name
machineId := "machineId_example" // string | Machine ID
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MachinesAPI.MachinesListEvents(context.Background(), appName, machineId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MachinesAPI.MachinesListEvents``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `MachinesListEvents`: []MachineEvent
fmt.Fprintf(os.Stdout, "Response from `MachinesAPI.MachinesListEvents`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| appName | string | Fly App Name | |
| machineId | string | Machine ID |
Other parameters are passed through a pointer to a apiMachinesListEventsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]ProcessStat MachinesListProcesses(ctx, appName, machineId).SortBy(sortBy).Order(order).Execute()
List Processes
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/OutboundSpade/FlyMachines"
)
func main() {
appName := "appName_example" // string | Fly App Name
machineId := "machineId_example" // string | Machine ID
sortBy := "sortBy_example" // string | Sort by (optional)
order := "order_example" // string | Order (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MachinesAPI.MachinesListProcesses(context.Background(), appName, machineId).SortBy(sortBy).Order(order).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MachinesAPI.MachinesListProcesses``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `MachinesListProcesses`: []ProcessStat
fmt.Fprintf(os.Stdout, "Response from `MachinesAPI.MachinesListProcesses`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| appName | string | Fly App Name | |
| machineId | string | Machine ID |
Other parameters are passed through a pointer to a apiMachinesListProcessesRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
sortBy | string | Sort by | order | string | Order |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]MachineVersion MachinesListVersions(ctx, appName, machineId).Execute()
List Versions
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/OutboundSpade/FlyMachines"
)
func main() {
appName := "appName_example" // string | Fly App Name
machineId := "machineId_example" // string | Machine ID
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MachinesAPI.MachinesListVersions(context.Background(), appName, machineId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MachinesAPI.MachinesListVersions``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `MachinesListVersions`: []MachineVersion
fmt.Fprintf(os.Stdout, "Response from `MachinesAPI.MachinesListVersions`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| appName | string | Fly App Name | |
| machineId | string | Machine ID |
Other parameters are passed through a pointer to a apiMachinesListVersionsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MachinesReleaseLease(ctx, appName, machineId).FlyMachineLeaseNonce(flyMachineLeaseNonce).Execute()
Release Lease
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/OutboundSpade/FlyMachines"
)
func main() {
appName := "appName_example" // string | Fly App Name
machineId := "machineId_example" // string | Machine ID
flyMachineLeaseNonce := "flyMachineLeaseNonce_example" // string | Existing lease nonce
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.MachinesAPI.MachinesReleaseLease(context.Background(), appName, machineId).FlyMachineLeaseNonce(flyMachineLeaseNonce).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MachinesAPI.MachinesReleaseLease``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| appName | string | Fly App Name | |
| machineId | string | Machine ID |
Other parameters are passed through a pointer to a apiMachinesReleaseLeaseRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
flyMachineLeaseNonce | string | Existing lease nonce |
(empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MachinesRestart(ctx, appName, machineId).Timeout(timeout).Signal(signal).Execute()
Restart Machine
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/OutboundSpade/FlyMachines"
)
func main() {
appName := "appName_example" // string | Fly App Name
machineId := "machineId_example" // string | Machine ID
timeout := "timeout_example" // string | Restart timeout as a Go duration string or number of seconds (optional)
signal := "signal_example" // string | Unix signal name (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.MachinesAPI.MachinesRestart(context.Background(), appName, machineId).Timeout(timeout).Signal(signal).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MachinesAPI.MachinesRestart``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| appName | string | Fly App Name | |
| machineId | string | Machine ID |
Other parameters are passed through a pointer to a apiMachinesRestartRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
timeout | string | Restart timeout as a Go duration string or number of seconds | signal | string | Unix signal name |
(empty response body)
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Machine MachinesShow(ctx, appName, machineId).Execute()
Get Machine
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/OutboundSpade/FlyMachines"
)
func main() {
appName := "appName_example" // string | Fly App Name
machineId := "machineId_example" // string | Machine ID
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MachinesAPI.MachinesShow(context.Background(), appName, machineId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MachinesAPI.MachinesShow``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `MachinesShow`: Machine
fmt.Fprintf(os.Stdout, "Response from `MachinesAPI.MachinesShow`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| appName | string | Fly App Name | |
| machineId | string | Machine ID |
Other parameters are passed through a pointer to a apiMachinesShowRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Lease MachinesShowLease(ctx, appName, machineId).Execute()
Get Lease
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/OutboundSpade/FlyMachines"
)
func main() {
appName := "appName_example" // string | Fly App Name
machineId := "machineId_example" // string | Machine ID
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MachinesAPI.MachinesShowLease(context.Background(), appName, machineId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MachinesAPI.MachinesShowLease``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `MachinesShowLease`: Lease
fmt.Fprintf(os.Stdout, "Response from `MachinesAPI.MachinesShowLease`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| appName | string | Fly App Name | |
| machineId | string | Machine ID |
Other parameters are passed through a pointer to a apiMachinesShowLeaseRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
map[string]string MachinesShowMetadata(ctx, appName, machineId).Execute()
Get Metadata
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/OutboundSpade/FlyMachines"
)
func main() {
appName := "appName_example" // string | Fly App Name
machineId := "machineId_example" // string | Machine ID
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MachinesAPI.MachinesShowMetadata(context.Background(), appName, machineId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MachinesAPI.MachinesShowMetadata``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `MachinesShowMetadata`: map[string]string
fmt.Fprintf(os.Stdout, "Response from `MachinesAPI.MachinesShowMetadata`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| appName | string | Fly App Name | |
| machineId | string | Machine ID |
Other parameters are passed through a pointer to a apiMachinesShowMetadataRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
map[string]string
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MachinesSignal(ctx, appName, machineId).Request(request).Execute()
Signal Machine
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/OutboundSpade/FlyMachines"
)
func main() {
appName := "appName_example" // string | Fly App Name
machineId := "machineId_example" // string | Machine ID
request := *openapiclient.NewSignalRequest() // SignalRequest | Request body
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.MachinesAPI.MachinesSignal(context.Background(), appName, machineId).Request(request).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MachinesAPI.MachinesSignal``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| appName | string | Fly App Name | |
| machineId | string | Machine ID |
Other parameters are passed through a pointer to a apiMachinesSignalRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
request | SignalRequest | Request body |
(empty response body)
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MachinesStart(ctx, appName, machineId).Execute()
Start Machine
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/OutboundSpade/FlyMachines"
)
func main() {
appName := "appName_example" // string | Fly App Name
machineId := "machineId_example" // string | Machine ID
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.MachinesAPI.MachinesStart(context.Background(), appName, machineId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MachinesAPI.MachinesStart``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| appName | string | Fly App Name | |
| machineId | string | Machine ID |
Other parameters are passed through a pointer to a apiMachinesStartRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
(empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MachinesStop(ctx, appName, machineId).Request(request).Execute()
Stop Machine
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/OutboundSpade/FlyMachines"
)
func main() {
appName := "appName_example" // string | Fly App Name
machineId := "machineId_example" // string | Machine ID
request := *openapiclient.NewStopRequest() // StopRequest | Optional request body (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.MachinesAPI.MachinesStop(context.Background(), appName, machineId).Request(request).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MachinesAPI.MachinesStop``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| appName | string | Fly App Name | |
| machineId | string | Machine ID |
Other parameters are passed through a pointer to a apiMachinesStopRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
request | StopRequest | Optional request body |
(empty response body)
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MachinesSuspend(ctx, appName, machineId).Execute()
Suspend Machine
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/OutboundSpade/FlyMachines"
)
func main() {
appName := "appName_example" // string | Fly App Name
machineId := "machineId_example" // string | Machine ID
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.MachinesAPI.MachinesSuspend(context.Background(), appName, machineId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MachinesAPI.MachinesSuspend``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| appName | string | Fly App Name | |
| machineId | string | Machine ID |
Other parameters are passed through a pointer to a apiMachinesSuspendRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
(empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MachinesUncordon(ctx, appName, machineId).Execute()
Uncordon Machine
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/OutboundSpade/FlyMachines"
)
func main() {
appName := "appName_example" // string | Fly App Name
machineId := "machineId_example" // string | Machine ID
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.MachinesAPI.MachinesUncordon(context.Background(), appName, machineId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MachinesAPI.MachinesUncordon``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| appName | string | Fly App Name | |
| machineId | string | Machine ID |
Other parameters are passed through a pointer to a apiMachinesUncordonRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
(empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Machine MachinesUpdate(ctx, appName, machineId).Request(request).Execute()
Update Machine
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/OutboundSpade/FlyMachines"
)
func main() {
appName := "appName_example" // string | Fly App Name
machineId := "machineId_example" // string | Machine ID
request := *openapiclient.NewUpdateMachineRequest() // UpdateMachineRequest | Request body
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MachinesAPI.MachinesUpdate(context.Background(), appName, machineId).Request(request).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MachinesAPI.MachinesUpdate``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `MachinesUpdate`: Machine
fmt.Fprintf(os.Stdout, "Response from `MachinesAPI.MachinesUpdate`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| appName | string | Fly App Name | |
| machineId | string | Machine ID |
Other parameters are passed through a pointer to a apiMachinesUpdateRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
request | UpdateMachineRequest | Request body |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MachinesUpdateMetadata(ctx, appName, machineId, key).Execute()
Update Metadata
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/OutboundSpade/FlyMachines"
)
func main() {
appName := "appName_example" // string | Fly App Name
machineId := "machineId_example" // string | Machine ID
key := "key_example" // string | Metadata Key
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.MachinesAPI.MachinesUpdateMetadata(context.Background(), appName, machineId, key).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MachinesAPI.MachinesUpdateMetadata``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| appName | string | Fly App Name | |
| machineId | string | Machine ID | |
| key | string | Metadata Key |
Other parameters are passed through a pointer to a apiMachinesUpdateMetadataRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
(empty response body)
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MachinesWait(ctx, appName, machineId).InstanceId(instanceId).Timeout(timeout).State(state).Execute()
Wait for State
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/OutboundSpade/FlyMachines"
)
func main() {
appName := "appName_example" // string | Fly App Name
machineId := "machineId_example" // string | Machine ID
instanceId := "instanceId_example" // string | 26-character Machine version ID (optional)
timeout := int64(56) // int64 | wait timeout. default 60s (optional)
state := "state_example" // string | desired state (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.MachinesAPI.MachinesWait(context.Background(), appName, machineId).InstanceId(instanceId).Timeout(timeout).State(state).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MachinesAPI.MachinesWait``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| appName | string | Fly App Name | |
| machineId | string | Machine ID |
Other parameters are passed through a pointer to a apiMachinesWaitRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
instanceId | string | 26-character Machine version ID | timeout | int64 | wait timeout. default 60s | state | string | desired state |
(empty response body)
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]