// Code generated by chant fly generate. DO NOT EDIT. // --- Fly Resource classes --- export declare class App { constructor(props: { enable_subdomains?: boolean; name?: string; network?: string; org_slug?: string; }); readonly id: string; readonly internal_numeric_id: number; readonly machine_count: number; readonly network_cidr: string; readonly organization: Record; readonly status: string; readonly volume_count: number; } export declare class Certificate { constructor(props: { hostname?: string; }); readonly acme_requested: boolean; readonly certificates: Record[]; readonly configured: boolean; readonly dns_provider: string; readonly dns_requirements: Record; readonly rate_limited_until: string; readonly status: string; readonly validation: Record; readonly validation_errors: Record[]; } export declare class IPAddress { constructor(props: { network?: string; org_slug?: string; region?: string; service_name?: string; type?: string; }); readonly created_at: string; readonly ip: string; readonly shared: boolean; } export declare class Machine { constructor(props: { /** An object defining the Machine configuration */ config?: MachineConfig; lease_ttl?: number; min_secrets_version?: number; /** Unique name for this Machine. If omitted, one is generated for you */ name?: string; /** The target region. Omitting this param launches in the same region as your WireGuard peer connection (somewhere near you). */ region?: string; skip_launch?: boolean; skip_secrets?: boolean; skip_service_registration?: boolean; }); readonly checks: Record[]; readonly cordoned: boolean; readonly created_at: string; readonly events: Record[]; readonly host_status: "ok" | "unknown" | "unreachable"; readonly id: string; readonly image_ref: Record; readonly incomplete_config: MachineConfig; readonly instance_id: string; readonly lease: Record; readonly nonce: string; readonly private_ip: string; readonly state: string; readonly updated_at: string; } export declare class Secret { constructor(props: { value?: string; }); readonly created_at: string; readonly digest: string; readonly name: string; readonly updated_at: string; } export declare class Volume { constructor(props: { /** enable scheduled automatic snapshots. Defaults to `true` */ auto_backup_enabled?: boolean; compute?: MachineGuest; compute_image?: string; encrypted?: boolean; fstype?: string; name?: string; region?: string; require_unique_zone?: boolean; size_gb?: number; /** restore from snapshot */ snapshot_id?: string; snapshot_retention?: number; /** fork from remote volume */ source_volume_id?: string; unique_zone_app_wide?: boolean; }); readonly attached_alloc_id: string; readonly attached_machine_id: string; readonly block_size: number; readonly blocks: number; readonly blocks_avail: number; readonly blocks_free: number; readonly bytes_total: number; readonly bytes_used: number; readonly created_at: string; readonly host_status: "ok" | "unknown" | "unreachable"; readonly id: string; readonly state: string; readonly type: "cache" | "local"; readonly zone: string; } // --- Property type classes --- export declare class ContainerConfig { constructor(props: { /** CmdOverride is used to override the default command of the image. */ cmd?: string[]; /** DependsOn can be used to define dependencies between containers. The container will only be started after all of its dependent conditions have been satisfied. */ depends_on?: ContainerDependency[]; /** EntrypointOverride is used to override the default entrypoint of the image. */ entrypoint?: string[]; /** ExtraEnv is used to add additional environment variables to the container. */ env?: Record; /** EnvFrom can be provided to set environment variables from machine fields. */ env_from?: EnvFrom[]; /** Image Config overrides - these fields are used to override the image configuration. If not provided, the image configuration will be used. ExecOverride is used to override the default command of the image. */ exec?: string[]; /** Files are files that will be written to the container file system. */ files?: File[]; /** Healthchecks determine the health of your containers. Healthchecks can use HTTP, TCP or an Exec command. */ healthchecks?: ContainerHealthcheck[]; /** Image is the docker image to run. */ image?: string; /** Name is used to identify the container in the machine. */ name?: string; /** Restart is used to define the restart policy for the container. NOTE: spot-price is not supported for containers. */ restart?: MachineRestart; /** Secrets can be provided at the process level to explicitly indicate which secrets should be used for the process. If not provided, the secrets provided at the machine level will be used. */ secrets?: MachineSecret[]; /** Stop is used to define the signal and timeout for stopping the container. */ stop?: StopConfig; /** UserOverride is used to override the default user of the image. */ user?: string; }); } export declare class ContainerDependency { constructor(props: { condition?: "exited_successfully" | "healthy" | "started"; name?: string; }); } export declare class ContainerHealthcheck { constructor(props: { exec?: ExecHealthcheck; /** The number of times the check must fail before considering the container unhealthy. */ failure_threshold?: number; /** The time in seconds to wait after a container starts before checking its health. */ grace_period?: number; http?: HTTPHealthcheck; /** The time in seconds between executing the defined check. */ interval?: number; /** Kind of healthcheck (readiness, liveness) */ kind?: "liveness" | "readiness"; /** The name of the check. Must be unique within the container. */ name?: string; /** The number of times the check must succeeed before considering the container healthy. */ success_threshold?: number; tcp?: TCPHealthcheck; /** The time in seconds to wait for the check to complete. */ timeout?: number; /** Unhealthy policy that determines what action to take if a container is deemed unhealthy */ unhealthy?: "stop"; }); } export declare class DNSConfig { constructor(props: { dns_forward_rules?: DnsForwardRule[]; hostname?: string; hostname_fqdn?: string; nameservers?: string[]; options?: DnsOption[]; searches?: string[]; skip_registration?: boolean; }); } export declare class DnsForwardRule { constructor(props: { addr?: string; basename?: string; }); } export declare class DnsOption { constructor(props: { name?: string; value?: string; }); } export declare class EnvFrom { constructor(props: { /** EnvVar is required and is the name of the environment variable that will be set from the secret. It must be a valid environment variable name. */ env_var?: string; /** FieldRef selects a field of the Machine: supports id, version, app_name, private_ip, region, image. */ field_ref?: "app_name" | "id" | "image" | "private_ip" | "region" | "version"; }); } export declare class ExecHealthcheck { constructor(props: { /** The command to run to check the health of the container (e.g. ["cat", "/tmp/healthy"]) */ command?: string[]; }); } export declare class File { constructor(props: { /** GuestPath is the path on the machine where the file will be written and must be an absolute path. For example: /full/path/to/file.json */ guest_path?: string; /** The name of an image to use the OCI image config as the file contents. */ image_config?: string; /** Mode bits used to set permissions on this file as accepted by chmod(2). */ mode?: number; /** The base64 encoded string of the file contents. */ raw_value?: string; /** The name of the secret that contains the base64 encoded file contents. */ secret_name?: string; }); } export declare class HTTPHealthcheck { constructor(props: { /** Additional headers to send with the request */ headers?: MachineHTTPHeader[]; /** The HTTP method to use to when making the request */ method?: string; /** The path to send the request to */ path?: string; /** The port to connect to, often the same as internal_port */ port?: number; /** Whether to use http or https */ scheme?: "http" | "https"; /** If the protocol is https, the hostname to use for TLS certificate validation */ tls_server_name?: string; /** If the protocol is https, whether or not to verify the TLS certificate */ tls_skip_verify?: boolean; }); } export declare class HTTPOptions { constructor(props: { compress?: boolean; h2_backend?: boolean; headers_read_timeout?: number; idle_timeout?: number; replay_cache?: ReplayCache[]; response?: HTTPResponseOptions; }); } export declare class HTTPResponseOptions { constructor(props: { headers?: Record>; pristine?: boolean; }); } export declare class MachineCacheDrive { constructor(props: { size_mb?: number; }); } export declare class MachineCheck { constructor(props: { /** The time to wait after a VM starts before checking its health */ grace_period?: string; headers?: MachineHTTPHeader[]; /** The time between connectivity checks */ interval?: string; /** Kind of the check (informational, readiness) */ kind?: "informational" | "readiness"; /** For http checks, the HTTP method to use to when making the request */ method?: string; /** For http checks, the path to send the request to */ path?: string; /** The port to connect to, often the same as internal_port */ port?: number; /** For http checks, whether to use http or https */ protocol?: string; /** The maximum time a connection can take before being reported as failing its health check */ timeout?: string; /** If the protocol is https, the hostname to use for TLS certificate validation */ tls_server_name?: string; /** For http checks with https protocol, whether or not to verify the TLS certificate */ tls_skip_verify?: boolean; /** tcp or http */ type?: string; }); } export declare class MachineConfig { constructor(props: { /** Optional boolean telling the Machine to destroy itself once it’s complete (default false) */ auto_destroy?: boolean; cache_drive?: MachineCacheDrive; /** An optional object that defines one or more named top-level checks. The key for each check is the check name. */ checks?: Record; /** Containers are a list of containers that will run in the machine. Currently restricted to only specific organizations. */ containers?: ContainerConfig[]; /** Deprecated: use Service.Autostart instead */ disable_machine_autostart?: boolean; dns?: DNSConfig; /** An object filled with key/value pairs to be set as environment variables */ env?: Record; files?: File[]; guest?: MachineGuest; /** The docker image to run */ image?: string; init?: MachineInit; metadata?: Record; metrics?: MachineMetrics; mounts?: MachineMount[]; processes?: MachineProcess[]; restart?: MachineRestart; rootfs?: MachineRootfs; schedule?: string; services?: MachineService[]; /** Deprecated: use Guest instead */ size?: string; spot?: MachineSpot; /** Standbys enable a machine to be a standby for another. In the event of a hardware failure, the standby machine will be started. */ standbys?: string[]; statics?: Static[]; stop_config?: StopConfig; }); } export declare class MachineGuest { constructor(props: { cpu_kind?: string; cpus?: number; gpu_kind?: string; gpus?: number; host_dedication_id?: string; kernel_args?: string[]; max_memory_mb?: number; memory_mb?: number; /** Deprecated: use MachineConfig.Rootfs instead */ persist_rootfs?: "always" | "never" | "restart"; }); } export declare class MachineHTTPHeader { constructor(props: { /** The header name */ name?: string; /** The header value */ values?: string[]; }); } export declare class MachineInit { constructor(props: { cmd?: string[]; entrypoint?: string[]; exec?: string[]; kernel_args?: string[]; swap_size_mb?: number; tty?: boolean; }); } export declare class MachineMetrics { constructor(props: { https?: boolean; path?: string; port?: number; }); } export declare class MachineMount { constructor(props: { add_size_gb?: number; encrypted?: boolean; extend_threshold_percent?: number; name?: string; path?: string; size_gb?: number; size_gb_limit?: number; volume?: string; }); } export declare class MachinePort { constructor(props: { end_port?: number; force_https?: boolean; handlers?: string[]; http_options?: HTTPOptions; port?: number; proxy_proto_options?: ProxyProtoOptions; start_port?: number; tls_options?: TLSOptions; }); } export declare class MachineProcess { constructor(props: { cmd?: string[]; entrypoint?: string[]; env?: Record; /** EnvFrom can be provided to set environment variables from machine fields. */ env_from?: EnvFrom[]; exec?: string[]; /** IgnoreAppSecrets can be set to true to ignore the secrets for the App the Machine belongs to and only use the secrets provided at the process level. The default/legacy behavior is to use the secrets provided at the App level. */ ignore_app_secrets?: boolean; /** Secrets can be provided at the process level to explicitly indicate which secrets should be used for the process. If not provided, the secrets provided at the machine level will be used. */ secrets?: MachineSecret[]; user?: string; }); } export declare class MachineRestart { constructor(props: { /** GPU bid price for spot Machines. */ gpu_bid_price?: number; /** When policy is on-failure, the maximum number of times to attempt to restart the Machine before letting it stop. */ max_retries?: number; /** * no - Never try to restart a Machine automatically when its main process exits, whether that’s on purpose or on a crash. * always - Always restart a Machine automatically and never let it enter a stopped state, even when the main process exits cleanly. * on-failure - Try up to MaxRetries times to automatically restart the Machine if it exits with a non-zero exit code. Default when no explicit policy is set, and for Machines with schedules. * spot-price - Starts the Machine only when there is capacity and the spot price is less than or equal to the bid price. */ policy?: "always" | "no" | "on-failure" | "spot-price"; }); } export declare class MachineRootfs { constructor(props: { persist?: "always" | "never" | "restart"; size_gb?: number; }); } export declare class MachineSecret { constructor(props: { /** EnvVar is required and is the name of the environment variable that will be set from the secret. It must be a valid environment variable name. */ env_var?: string; /** Name is optional and when provided is used to reference a secret name where the EnvVar is different from what was set as the secret name. */ name?: string; }); } export declare class MachineService { constructor(props: { autostart?: boolean; /** Accepts a string (new format) or a boolean (old format). For backward compatibility with older clients, the API continues to use booleans for "off" and "stop" in responses. * "off" or false - Do not autostop the Machine. * "stop" or true - Automatically stop the Machine. * "suspend" - Automatically suspend the Machine, falling back to a full stop if this is not possible. */ autostop?: "off" | "stop" | "suspend"; /** An optional list of service checks */ checks?: MachineServiceCheck[]; concurrency?: MachineServiceConcurrency; force_instance_description?: string; force_instance_key?: string; internal_port?: number; min_machines_running?: number; ports?: MachinePort[]; protocol?: string; }); } export declare class MachineServiceCheck { constructor(props: { /** The time to wait after a VM starts before checking its health */ grace_period?: string; headers?: MachineHTTPHeader[]; /** The time between connectivity checks */ interval?: string; /** For http checks, the HTTP method to use to when making the request */ method?: string; /** For http checks, the path to send the request to */ path?: string; /** The port to connect to, often the same as internal_port */ port?: number; /** For http checks, whether to use http or https */ protocol?: string; /** The maximum time a connection can take before being reported as failing its health check */ timeout?: string; /** If the protocol is https, the hostname to use for TLS certificate validation */ tls_server_name?: string; /** For http checks with https protocol, whether or not to verify the TLS certificate */ tls_skip_verify?: boolean; /** tcp or http */ type?: string; }); } export declare class MachineServiceConcurrency { constructor(props: { hard_limit?: number; soft_limit?: number; type?: string; }); } export declare class MachineSpot { constructor(props: { /** MaxPriceFraction is the maximum fraction of the full Machine price you will pay for this Machine. Range: (0, 1.0] */ max_price_fraction?: number; }); } export declare class ProxyProtoOptions { constructor(props: { version?: string; }); } export declare class ReplayCache { constructor(props: { allow_bypass?: boolean; /** Name of the cookie or header to key the cache on */ name?: string; path_prefix?: string; ttl_seconds?: number; /** Currently either "cookie" or "header" */ type?: "cookie" | "header"; }); } export declare class Static { constructor(props: { guest_path: string; url_prefix: string; index_document?: string; tigris_bucket?: string; }); } export declare class StopConfig { constructor(props: { signal?: "SIGHUP" | "SIGINT" | "SIGKILL" | "SIGQUIT" | "SIGTERM" | "SIGUSR1" | "SIGUSR2"; timeout?: string; }); } export declare class TCPHealthcheck { constructor(props: { /** The port to connect to, often the same as internal_port */ port?: number; }); } export declare class TLSOptions { constructor(props: { alpn?: string[]; default_self_signed?: boolean; versions?: string[]; }); }