This site hosts documentation generated from the Fly.io Machines API OpenAPI specification. Visit our complete Machines API docs for how to get started, more information about each endpoint, parameter descriptions, and examples.
This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.
- API version: 1.0
- Package version: 1.0.0
- Generator version: 7.14.0-SNAPSHOT
- Build package: org.openapitools.codegen.languages.GoClientCodegen
Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/net/context
Put the package under your project folder and add the following in import:
import machines "github.com/OutboundSpade/FlyMachines"
To use a proxy, set the environment variable HTTP_PROXY
:
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")
Default configuration comes with Servers
field that contains server objects as defined in the OpenAPI specification.
For using other server than the one defined on index 0 set context value machines.ContextServerIndex
of type int
.
ctx := context.WithValue(context.Background(), machines.ContextServerIndex, 1)
Templated server URL is formatted using default variables from configuration or from context value machines.ContextServerVariables
of type map[string]string
.
ctx := context.WithValue(context.Background(), machines.ContextServerVariables, map[string]string{
"basePath": "v2",
})
Note, enum values are always validated and all unused variables are silently ignored.
Each operation can use different server URL defined using OperationServers
map in the Configuration
.
An operation is uniquely identified by "{classname}Service.{nickname}"
string.
Similar rules for overriding default operation server index and variables applies by using machines.ContextOperationServerIndices
and machines.ContextOperationServerVariables
context maps.
ctx := context.WithValue(context.Background(), machines.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), machines.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
})
All URIs are relative to https://api.machines.dev/v1
Class | Method | HTTP request | Description |
---|---|---|---|
AppsAPI | AppsCreate | Post /apps | Create App |
AppsAPI | AppsDelete | Delete /apps/{app_name} | Destroy App |
AppsAPI | AppsList | Get /apps | List Apps |
AppsAPI | AppsShow | Get /apps/{app_name} | Get App |
MachinesAPI | MachinesCordon | Post /apps/{app_name}/machines/{machine_id}/cordon | Cordon Machine |
MachinesAPI | MachinesCreate | Post /apps/{app_name}/machines | Create Machine |
MachinesAPI | MachinesCreateLease | Post /apps/{app_name}/machines/{machine_id}/lease | Create Lease |
MachinesAPI | MachinesDelete | Delete /apps/{app_name}/machines/{machine_id} | Destroy Machine |
MachinesAPI | MachinesDeleteMetadata | Delete /apps/{app_name}/machines/{machine_id}/metadata/{key} | Delete Metadata |
MachinesAPI | MachinesExec | Post /apps/{app_name}/machines/{machine_id}/exec | Execute Command |
MachinesAPI | MachinesList | Get /apps/{app_name}/machines | List Machines |
MachinesAPI | MachinesListEvents | Get /apps/{app_name}/machines/{machine_id}/events | List Events |
MachinesAPI | MachinesListProcesses | Get /apps/{app_name}/machines/{machine_id}/ps | List Processes |
MachinesAPI | MachinesListVersions | Get /apps/{app_name}/machines/{machine_id}/versions | List Versions |
MachinesAPI | MachinesReleaseLease | Delete /apps/{app_name}/machines/{machine_id}/lease | Release Lease |
MachinesAPI | MachinesRestart | Post /apps/{app_name}/machines/{machine_id}/restart | Restart Machine |
MachinesAPI | MachinesShow | Get /apps/{app_name}/machines/{machine_id} | Get Machine |
MachinesAPI | MachinesShowLease | Get /apps/{app_name}/machines/{machine_id}/lease | Get Lease |
MachinesAPI | MachinesShowMetadata | Get /apps/{app_name}/machines/{machine_id}/metadata | Get Metadata |
MachinesAPI | MachinesSignal | Post /apps/{app_name}/machines/{machine_id}/signal | Signal Machine |
MachinesAPI | MachinesStart | Post /apps/{app_name}/machines/{machine_id}/start | Start Machine |
MachinesAPI | MachinesStop | Post /apps/{app_name}/machines/{machine_id}/stop | Stop Machine |
MachinesAPI | MachinesSuspend | Post /apps/{app_name}/machines/{machine_id}/suspend | Suspend Machine |
MachinesAPI | MachinesUncordon | Post /apps/{app_name}/machines/{machine_id}/uncordon | Uncordon Machine |
MachinesAPI | MachinesUpdate | Post /apps/{app_name}/machines/{machine_id} | Update Machine |
MachinesAPI | MachinesUpdateMetadata | Post /apps/{app_name}/machines/{machine_id}/metadata/{key} | Update Metadata |
MachinesAPI | MachinesWait | Get /apps/{app_name}/machines/{machine_id}/wait | Wait for State |
PlatformAPI | PlatformPlacementsPost | Post /platform/placements | Get Placements |
PlatformAPI | PlatformRegionsGet | Get /platform/regions | Get Regions |
SecretsAPI | SecretCreate | Post /apps/{app_name}/secrets/{secret_name} | Create or update Secret |
SecretsAPI | SecretDelete | Delete /apps/{app_name}/secrets/{secret_name} | Delete an app secret |
SecretsAPI | SecretGet | Get /apps/{app_name}/secrets/{secret_name} | Get an app secret |
SecretsAPI | SecretkeyDecrypt | Post /apps/{app_name}/secretkeys/{secret_name}/decrypt | Decrypt with a secret key |
SecretsAPI | SecretkeyDelete | Delete /apps/{app_name}/secretkeys/{secret_name} | Delete an app's secret key |
SecretsAPI | SecretkeyEncrypt | Post /apps/{app_name}/secretkeys/{secret_name}/encrypt | Encrypt with a secret key |
SecretsAPI | SecretkeyGenerate | Post /apps/{app_name}/secretkeys/{secret_name}/generate | Generate a random secret key |
SecretsAPI | SecretkeyGet | Get /apps/{app_name}/secretkeys/{secret_name} | Get an app's secret key |
SecretsAPI | SecretkeySet | Post /apps/{app_name}/secretkeys/{secret_name} | Create or update a secret key |
SecretsAPI | SecretkeySign | Post /apps/{app_name}/secretkeys/{secret_name}/sign | Sign with a secret key |
SecretsAPI | SecretkeyVerify | Post /apps/{app_name}/secretkeys/{secret_name}/verify | Verify with a secret key |
SecretsAPI | SecretkeysList | Get /apps/{app_name}/secretkeys | List secret keys belonging to an app |
SecretsAPI | SecretsList | Get /apps/{app_name}/secrets | List app secrets belonging to an app |
TokensAPI | TokensRequestKms | Post /tokens/kms | Request a Petsem token for accessing KMS |
TokensAPI | TokensRequestOIDC | Post /tokens/oidc | Request an OIDC token |
VolumesAPI | CreateVolumeSnapshot | Post /apps/{app_name}/volumes/{volume_id}/snapshots | Create Snapshot |
VolumesAPI | VolumeDelete | Delete /apps/{app_name}/volumes/{volume_id} | Destroy Volume |
VolumesAPI | VolumesCreate | Post /apps/{app_name}/volumes | Create Volume |
VolumesAPI | VolumesExtend | Put /apps/{app_name}/volumes/{volume_id}/extend | Extend Volume |
VolumesAPI | VolumesGetById | Get /apps/{app_name}/volumes/{volume_id} | Get Volume |
VolumesAPI | VolumesList | Get /apps/{app_name}/volumes | List Volumes |
VolumesAPI | VolumesListSnapshots | Get /apps/{app_name}/volumes/{volume_id}/snapshots | List Snapshots |
VolumesAPI | VolumesUpdate | Put /apps/{app_name}/volumes/{volume_id} | Update Volume |
- App
- AppSecret
- AppSecrets
- CheckStatus
- CreateAppRequest
- CreateLeaseRequest
- CreateMachineRequest
- CreateOIDCTokenRequest
- CreateVolumeRequest
- DecryptSecretkeyRequest
- DecryptSecretkeyResponse
- EncryptSecretkeyRequest
- EncryptSecretkeyResponse
- ErrorResponse
- ExtendVolumeRequest
- ExtendVolumeResponse
- FlyContainerConfig
- FlyContainerDependency
- FlyContainerDependencyCondition
- FlyContainerHealthcheck
- FlyContainerHealthcheckKind
- FlyContainerHealthcheckScheme
- FlyDNSConfig
- FlyDnsForwardRule
- FlyDnsOption
- FlyDuration
- FlyEnvFrom
- FlyExecHealthcheck
- FlyFile
- FlyHTTPHealthcheck
- FlyHTTPOptions
- FlyHTTPResponseOptions
- FlyMachineCheck
- FlyMachineConfig
- FlyMachineGuest
- FlyMachineHTTPHeader
- FlyMachineInit
- FlyMachineMetrics
- FlyMachinePort
- FlyMachineProcess
- FlyMachineRestart
- FlyMachineSecret
- FlyMachineService
- FlyMachineServiceCheck
- FlyMachineServiceConcurrency
- FlyProxyProtoOptions
- FlyStatic
- FlyStopConfig
- FlyTCPHealthcheck
- FlyTLSOptions
- FlyUnhealthyPolicy
- Flydv1ExecResponse
- ImageRef
- Lease
- ListApp
- ListAppsResponse
- ListenSocket
- Machine
- MachineEvent
- MachineExecRequest
- MachineVersion
- MainGetPlacementsRequest
- MainGetPlacementsResponse
- MainRegionResponse
- MainStatusCode
- Organization
- PlacementRegionPlacement
- ProcessStat
- ReadsGetCapacityPerRegionRow
- SecretKey
- SecretKeys
- SetAppSecretRequest
- SetAppSecretResponse
- SetSecretkeyRequest
- SetSecretkeyResponse
- SignSecretkeyRequest
- SignSecretkeyResponse
- SignalRequest
- StopRequest
- UpdateMachineRequest
- UpdateVolumeRequest
- VerifySecretkeyRequest
- Volume
- VolumeSnapshot
Endpoints do not require authorization.
Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:
PtrBool
PtrInt
PtrInt32
PtrInt64
PtrFloat
PtrFloat32
PtrFloat64
PtrString
PtrTime