From 4635ff94f257534dc82d45fbb6132089b14ef8de Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2024 18:17:37 +0000 Subject: [PATCH] Autogenerate config update --- oxide-api/src/Api.ts | 2294 +++++++++++++++++++++--------------------- 1 file changed, 1147 insertions(+), 1147 deletions(-) diff --git a/oxide-api/src/Api.ts b/oxide-api/src/Api.ts index 19b085e..200d583 100644 --- a/oxide-api/src/Api.ts +++ b/oxide-api/src/Api.ts @@ -18,31 +18,6 @@ export type { ErrorResult, } from "./http-client"; -/** - * An IPv4 subnet - * - * An IPv4 subnet, including prefix and prefix length - */ -export type Ipv4Net = string; - -/** - * An IPv6 subnet - * - * An IPv6 subnet, including prefix and subnet mask - */ -export type Ipv6Net = string; - -export type IpNet = Ipv4Net | Ipv6Net; - -/** - * A name unique within the parent collection - * - * Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'. Names cannot be a UUID, but they may contain a UUID. They can be at most 63 characters long. - */ -export type Name = string; - -export type NameOrId = string | Name; - /** * An address tied to an address lot. */ @@ -63,16 +38,6 @@ export type AddressConfig = { addresses: Address[]; }; -/** - * The kind associated with an address lot. - */ -export type AddressLotKind = - /** Infrastructure address lots are used for network infrastructure like addresses assigned to rack switches. */ - | "infra" - - /** Pool address lots are used by IP pools. */ - | "pool"; - /** * Represents an address lot object, containing the id of the lot that can be used in other API calls. */ @@ -145,6 +110,16 @@ export type AddressLotCreateResponse = { lot: AddressLot; }; +/** + * The kind associated with an address lot. + */ +export type AddressLotKind = + /** Infrastructure address lots are used for network infrastructure like addresses assigned to rack switches. */ + | "infra" + + /** Pool address lots are used by IP pools. */ + | "pool"; + /** * A single page of results */ @@ -155,28 +130,6 @@ export type AddressLotResultsPage = { nextPage?: string; }; -export type BgpMessageHistory = Record; - -/** - * Identifies switch physical location - */ -export type SwitchLocation = - /** Switch in upper slot */ - | "switch0" - - /** Switch in lower slot */ - | "switch1"; - -/** - * BGP message history for a particular switch. - */ -export type SwitchBgpHistory = { - /** Message history indexed by peer address. */ - history: Record; - /** Switch this message history is associated with. */ - switch: SwitchLocation; -}; - /** * BGP message history for rack switches. */ @@ -185,17 +138,6 @@ export type AggregateBgpMessageHistory = { switchHistories: SwitchBgpHistory[]; }; -/** - * Description of source IPs allowed to reach rack services. - */ -export type AllowedSourceIps = - /** Allow traffic from any external IP address. */ - | { allow: "any" } - /** Restrict access to a specific set of source IP addresses or subnets. - -All others are prevented from reaching rack services. */ - | { allow: "list"; ips: IpNet[] }; - /** * Allowlist of IPs or subnets that can make requests to user-facing services. */ @@ -216,6 +158,17 @@ export type AllowListUpdate = { allowedIps: AllowedSourceIps; }; +/** + * Description of source IPs allowed to reach rack services. + */ +export type AllowedSourceIps = + /** Allow traffic from any external IP address. */ + | { allow: "any" } + /** Restrict access to a specific set of source IP addresses or subnets. + +All others are prevented from reaching rack services. */ + | { allow: "list"; ips: IpNet[] }; + /** * Authorization scope for a timeseries. * @@ -311,16 +264,6 @@ export type BgpAnnounceSet = { timeModified: Date; }; -/** - * A BGP announcement tied to a particular address lot block. - */ -export type BgpAnnouncementCreate = { - /** Address lot this announcement is drawn from. */ - addressLotBlock: NameOrId; - /** The network being announced. */ - network: IpNet; -}; - /** * Parameters for creating a named set of BGP announcements. */ @@ -343,6 +286,16 @@ export type BgpAnnouncement = { network: IpNet; }; +/** + * A BGP announcement tied to a particular address lot block. + */ +export type BgpAnnouncementCreate = { + /** Address lot this announcement is drawn from. */ + addressLotBlock: NameOrId; + /** The network being announced. */ + network: IpNet; +}; + /** * A base BGP configuration. */ @@ -408,12 +361,7 @@ export type BgpImportedRouteIpv4 = { switch: SwitchLocation; }; -/** - * Define policy relating to the import and export of prefixes from a BGP peer. - */ -export type ImportExportPolicy = - /** Do not perform any filtering. */ - { type: "no_filtering" } | { type: "allow"; value: IpNet[] }; +export type BgpMessageHistory = Record; /** * A BGP peer configuration for an interface. Includes the set of announcements that will be advertised to the peer identified by `addr`. The `bgp_config` parameter is a reference to global BGP parameters. The `interface_name` indicates what interface the peer should be contacted on. @@ -742,11 +690,6 @@ export type BlockSize = 512 | 2048 | 4096; */ export type ByteCount = number; -/** - * The service intended to use this certificate. - */ -export type ServiceUsingCertificate = "external_api"; - /** * View of a Certificate */ @@ -825,462 +768,91 @@ export type CurrentUser = { }; /** - * Structure for estimating the p-quantile of a population. - * - * This is based on the P² algorithm for estimating quantiles using constant space. - * - * The algorithm consists of maintaining five markers: the minimum, the p/2-, p-, and (1 + p)/2 quantiles, and the maximum. + * A `Datum` is a single sampled data point from a metric. */ -export type Quantile = { - /** The desired marker positions. */ - desiredMarkerPositions: number[]; - /** The heights of the markers. */ - markerHeights: number[]; - /** The positions of the markers. - -We track sample size in the 5th position, as useful observations won't start until we've filled the heights at the 6th sample anyway This does deviate from the paper, but it's a more useful representation that works according to the paper's algorithm. */ - markerPositions: number[]; - /** The p value for the quantile. */ - p: number; -}; +export type Datum = + | { datum: boolean; type: "bool" } + | { datum: number; type: "i8" } + | { datum: number; type: "u8" } + | { datum: number; type: "i16" } + | { datum: number; type: "u16" } + | { datum: number; type: "i32" } + | { datum: number; type: "u32" } + | { datum: number; type: "i64" } + | { datum: number; type: "u64" } + | { datum: number; type: "f32" } + | { datum: number; type: "f64" } + | { datum: string; type: "string" } + | { datum: number[]; type: "bytes" } + | { datum: Cumulativeint64; type: "cumulative_i64" } + | { datum: Cumulativeuint64; type: "cumulative_u64" } + | { datum: Cumulativefloat; type: "cumulative_f32" } + | { datum: Cumulativedouble; type: "cumulative_f64" } + | { datum: Histogramint8; type: "histogram_i8" } + | { datum: Histogramuint8; type: "histogram_u8" } + | { datum: Histogramint16; type: "histogram_i16" } + | { datum: Histogramuint16; type: "histogram_u16" } + | { datum: Histogramint32; type: "histogram_i32" } + | { datum: Histogramuint32; type: "histogram_u32" } + | { datum: Histogramint64; type: "histogram_i64" } + | { datum: Histogramuint64; type: "histogram_u64" } + | { datum: Histogramfloat; type: "histogram_f32" } + | { datum: Histogramdouble; type: "histogram_f64" } + | { datum: MissingDatum; type: "missing" }; /** - * Histogram metric - * - * A histogram maintains the count of any number of samples, over a set of bins. Bins are specified on construction via their _left_ edges, inclusive. There can't be any "gaps" in the bins, and an additional bin may be added to the left, right, or both so that the bins extend to the entire range of the support. - * - * Note that any gaps, unsorted bins, or non-finite values will result in an error. + * The type of an individual datum of a metric. */ -export type Histogramint8 = { - /** The bins of the histogram. */ - bins: Binint8[]; - /** The maximum value of all samples in the histogram. */ - max: number; - /** The minimum value of all samples in the histogram. */ - min: number; - /** The total number of samples in the histogram. */ - nSamples: number; - /** p50 Quantile */ - p50: Quantile; - /** p95 Quantile */ - p90: Quantile; - /** p99 Quantile */ - p99: Quantile; - /** M2 for Welford's algorithm for variance calculation. +export type DatumType = + | "bool" + | "i8" + | "u8" + | "i16" + | "u16" + | "i32" + | "u32" + | "i64" + | "u64" + | "f32" + | "f64" + | "string" + | "bytes" + | "cumulative_i64" + | "cumulative_u64" + | "cumulative_f32" + | "cumulative_f64" + | "histogram_i8" + | "histogram_u8" + | "histogram_i16" + | "histogram_u16" + | "histogram_i32" + | "histogram_u32" + | "histogram_i64" + | "histogram_u64" + | "histogram_f32" + | "histogram_f64"; -Read about [Welford's algorithm](https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford's_online_algorithm) for more information on the algorithm. */ - squaredMean: number; - /** The start time of the histogram. */ - startTime: Date; - /** The sum of all samples in the histogram. */ - sumOfSamples: number; +export type DerEncodedKeyPair = { + /** request signing private key (base64 encoded der file) */ + privateKey: string; + /** request signing public certificate (base64 encoded der file) */ + publicCert: string; +}; + +export type DeviceAccessTokenRequest = { + clientId: string; + deviceCode: string; + grantType: string; }; +export type DeviceAuthRequest = { clientId: string }; + +export type DeviceAuthVerify = { userCode: string }; + +export type Digest = { type: "sha256"; value: string }; + /** - * Histogram metric - * - * A histogram maintains the count of any number of samples, over a set of bins. Bins are specified on construction via their _left_ edges, inclusive. There can't be any "gaps" in the bins, and an additional bin may be added to the left, right, or both so that the bins extend to the entire range of the support. - * - * Note that any gaps, unsorted bins, or non-finite values will result in an error. - */ -export type Histogramuint8 = { - /** The bins of the histogram. */ - bins: Binuint8[]; - /** The maximum value of all samples in the histogram. */ - max: number; - /** The minimum value of all samples in the histogram. */ - min: number; - /** The total number of samples in the histogram. */ - nSamples: number; - /** p50 Quantile */ - p50: Quantile; - /** p95 Quantile */ - p90: Quantile; - /** p99 Quantile */ - p99: Quantile; - /** M2 for Welford's algorithm for variance calculation. - -Read about [Welford's algorithm](https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford's_online_algorithm) for more information on the algorithm. */ - squaredMean: number; - /** The start time of the histogram. */ - startTime: Date; - /** The sum of all samples in the histogram. */ - sumOfSamples: number; -}; - -/** - * Histogram metric - * - * A histogram maintains the count of any number of samples, over a set of bins. Bins are specified on construction via their _left_ edges, inclusive. There can't be any "gaps" in the bins, and an additional bin may be added to the left, right, or both so that the bins extend to the entire range of the support. - * - * Note that any gaps, unsorted bins, or non-finite values will result in an error. - */ -export type Histogramint16 = { - /** The bins of the histogram. */ - bins: Binint16[]; - /** The maximum value of all samples in the histogram. */ - max: number; - /** The minimum value of all samples in the histogram. */ - min: number; - /** The total number of samples in the histogram. */ - nSamples: number; - /** p50 Quantile */ - p50: Quantile; - /** p95 Quantile */ - p90: Quantile; - /** p99 Quantile */ - p99: Quantile; - /** M2 for Welford's algorithm for variance calculation. - -Read about [Welford's algorithm](https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford's_online_algorithm) for more information on the algorithm. */ - squaredMean: number; - /** The start time of the histogram. */ - startTime: Date; - /** The sum of all samples in the histogram. */ - sumOfSamples: number; -}; - -/** - * Histogram metric - * - * A histogram maintains the count of any number of samples, over a set of bins. Bins are specified on construction via their _left_ edges, inclusive. There can't be any "gaps" in the bins, and an additional bin may be added to the left, right, or both so that the bins extend to the entire range of the support. - * - * Note that any gaps, unsorted bins, or non-finite values will result in an error. - */ -export type Histogramuint16 = { - /** The bins of the histogram. */ - bins: Binuint16[]; - /** The maximum value of all samples in the histogram. */ - max: number; - /** The minimum value of all samples in the histogram. */ - min: number; - /** The total number of samples in the histogram. */ - nSamples: number; - /** p50 Quantile */ - p50: Quantile; - /** p95 Quantile */ - p90: Quantile; - /** p99 Quantile */ - p99: Quantile; - /** M2 for Welford's algorithm for variance calculation. - -Read about [Welford's algorithm](https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford's_online_algorithm) for more information on the algorithm. */ - squaredMean: number; - /** The start time of the histogram. */ - startTime: Date; - /** The sum of all samples in the histogram. */ - sumOfSamples: number; -}; - -/** - * Histogram metric - * - * A histogram maintains the count of any number of samples, over a set of bins. Bins are specified on construction via their _left_ edges, inclusive. There can't be any "gaps" in the bins, and an additional bin may be added to the left, right, or both so that the bins extend to the entire range of the support. - * - * Note that any gaps, unsorted bins, or non-finite values will result in an error. - */ -export type Histogramint32 = { - /** The bins of the histogram. */ - bins: Binint32[]; - /** The maximum value of all samples in the histogram. */ - max: number; - /** The minimum value of all samples in the histogram. */ - min: number; - /** The total number of samples in the histogram. */ - nSamples: number; - /** p50 Quantile */ - p50: Quantile; - /** p95 Quantile */ - p90: Quantile; - /** p99 Quantile */ - p99: Quantile; - /** M2 for Welford's algorithm for variance calculation. - -Read about [Welford's algorithm](https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford's_online_algorithm) for more information on the algorithm. */ - squaredMean: number; - /** The start time of the histogram. */ - startTime: Date; - /** The sum of all samples in the histogram. */ - sumOfSamples: number; -}; - -/** - * Histogram metric - * - * A histogram maintains the count of any number of samples, over a set of bins. Bins are specified on construction via their _left_ edges, inclusive. There can't be any "gaps" in the bins, and an additional bin may be added to the left, right, or both so that the bins extend to the entire range of the support. - * - * Note that any gaps, unsorted bins, or non-finite values will result in an error. - */ -export type Histogramuint32 = { - /** The bins of the histogram. */ - bins: Binuint32[]; - /** The maximum value of all samples in the histogram. */ - max: number; - /** The minimum value of all samples in the histogram. */ - min: number; - /** The total number of samples in the histogram. */ - nSamples: number; - /** p50 Quantile */ - p50: Quantile; - /** p95 Quantile */ - p90: Quantile; - /** p99 Quantile */ - p99: Quantile; - /** M2 for Welford's algorithm for variance calculation. - -Read about [Welford's algorithm](https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford's_online_algorithm) for more information on the algorithm. */ - squaredMean: number; - /** The start time of the histogram. */ - startTime: Date; - /** The sum of all samples in the histogram. */ - sumOfSamples: number; -}; - -/** - * Histogram metric - * - * A histogram maintains the count of any number of samples, over a set of bins. Bins are specified on construction via their _left_ edges, inclusive. There can't be any "gaps" in the bins, and an additional bin may be added to the left, right, or both so that the bins extend to the entire range of the support. - * - * Note that any gaps, unsorted bins, or non-finite values will result in an error. - */ -export type Histogramint64 = { - /** The bins of the histogram. */ - bins: Binint64[]; - /** The maximum value of all samples in the histogram. */ - max: number; - /** The minimum value of all samples in the histogram. */ - min: number; - /** The total number of samples in the histogram. */ - nSamples: number; - /** p50 Quantile */ - p50: Quantile; - /** p95 Quantile */ - p90: Quantile; - /** p99 Quantile */ - p99: Quantile; - /** M2 for Welford's algorithm for variance calculation. - -Read about [Welford's algorithm](https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford's_online_algorithm) for more information on the algorithm. */ - squaredMean: number; - /** The start time of the histogram. */ - startTime: Date; - /** The sum of all samples in the histogram. */ - sumOfSamples: number; -}; - -/** - * Histogram metric - * - * A histogram maintains the count of any number of samples, over a set of bins. Bins are specified on construction via their _left_ edges, inclusive. There can't be any "gaps" in the bins, and an additional bin may be added to the left, right, or both so that the bins extend to the entire range of the support. - * - * Note that any gaps, unsorted bins, or non-finite values will result in an error. - */ -export type Histogramuint64 = { - /** The bins of the histogram. */ - bins: Binuint64[]; - /** The maximum value of all samples in the histogram. */ - max: number; - /** The minimum value of all samples in the histogram. */ - min: number; - /** The total number of samples in the histogram. */ - nSamples: number; - /** p50 Quantile */ - p50: Quantile; - /** p95 Quantile */ - p90: Quantile; - /** p99 Quantile */ - p99: Quantile; - /** M2 for Welford's algorithm for variance calculation. - -Read about [Welford's algorithm](https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford's_online_algorithm) for more information on the algorithm. */ - squaredMean: number; - /** The start time of the histogram. */ - startTime: Date; - /** The sum of all samples in the histogram. */ - sumOfSamples: number; -}; - -/** - * Histogram metric - * - * A histogram maintains the count of any number of samples, over a set of bins. Bins are specified on construction via their _left_ edges, inclusive. There can't be any "gaps" in the bins, and an additional bin may be added to the left, right, or both so that the bins extend to the entire range of the support. - * - * Note that any gaps, unsorted bins, or non-finite values will result in an error. - */ -export type Histogramfloat = { - /** The bins of the histogram. */ - bins: Binfloat[]; - /** The maximum value of all samples in the histogram. */ - max: number; - /** The minimum value of all samples in the histogram. */ - min: number; - /** The total number of samples in the histogram. */ - nSamples: number; - /** p50 Quantile */ - p50: Quantile; - /** p95 Quantile */ - p90: Quantile; - /** p99 Quantile */ - p99: Quantile; - /** M2 for Welford's algorithm for variance calculation. - -Read about [Welford's algorithm](https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford's_online_algorithm) for more information on the algorithm. */ - squaredMean: number; - /** The start time of the histogram. */ - startTime: Date; - /** The sum of all samples in the histogram. */ - sumOfSamples: number; -}; - -/** - * Histogram metric - * - * A histogram maintains the count of any number of samples, over a set of bins. Bins are specified on construction via their _left_ edges, inclusive. There can't be any "gaps" in the bins, and an additional bin may be added to the left, right, or both so that the bins extend to the entire range of the support. - * - * Note that any gaps, unsorted bins, or non-finite values will result in an error. - */ -export type Histogramdouble = { - /** The bins of the histogram. */ - bins: Bindouble[]; - /** The maximum value of all samples in the histogram. */ - max: number; - /** The minimum value of all samples in the histogram. */ - min: number; - /** The total number of samples in the histogram. */ - nSamples: number; - /** p50 Quantile */ - p50: Quantile; - /** p95 Quantile */ - p90: Quantile; - /** p99 Quantile */ - p99: Quantile; - /** M2 for Welford's algorithm for variance calculation. - -Read about [Welford's algorithm](https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford's_online_algorithm) for more information on the algorithm. */ - squaredMean: number; - /** The start time of the histogram. */ - startTime: Date; - /** The sum of all samples in the histogram. */ - sumOfSamples: number; -}; - -/** - * The type of an individual datum of a metric. - */ -export type DatumType = - | "bool" - | "i8" - | "u8" - | "i16" - | "u16" - | "i32" - | "u32" - | "i64" - | "u64" - | "f32" - | "f64" - | "string" - | "bytes" - | "cumulative_i64" - | "cumulative_u64" - | "cumulative_f32" - | "cumulative_f64" - | "histogram_i8" - | "histogram_u8" - | "histogram_i16" - | "histogram_u16" - | "histogram_i32" - | "histogram_u32" - | "histogram_i64" - | "histogram_u64" - | "histogram_f32" - | "histogram_f64"; - -export type MissingDatum = { datumType: DatumType; startTime?: Date }; - -/** - * A `Datum` is a single sampled data point from a metric. - */ -export type Datum = - | { datum: boolean; type: "bool" } - | { datum: number; type: "i8" } - | { datum: number; type: "u8" } - | { datum: number; type: "i16" } - | { datum: number; type: "u16" } - | { datum: number; type: "i32" } - | { datum: number; type: "u32" } - | { datum: number; type: "i64" } - | { datum: number; type: "u64" } - | { datum: number; type: "f32" } - | { datum: number; type: "f64" } - | { datum: string; type: "string" } - | { datum: number[]; type: "bytes" } - | { datum: Cumulativeint64; type: "cumulative_i64" } - | { datum: Cumulativeuint64; type: "cumulative_u64" } - | { datum: Cumulativefloat; type: "cumulative_f32" } - | { datum: Cumulativedouble; type: "cumulative_f64" } - | { datum: Histogramint8; type: "histogram_i8" } - | { datum: Histogramuint8; type: "histogram_u8" } - | { datum: Histogramint16; type: "histogram_i16" } - | { datum: Histogramuint16; type: "histogram_u16" } - | { datum: Histogramint32; type: "histogram_i32" } - | { datum: Histogramuint32; type: "histogram_u32" } - | { datum: Histogramint64; type: "histogram_i64" } - | { datum: Histogramuint64; type: "histogram_u64" } - | { datum: Histogramfloat; type: "histogram_f32" } - | { datum: Histogramdouble; type: "histogram_f64" } - | { datum: MissingDatum; type: "missing" }; - -export type DerEncodedKeyPair = { - /** request signing private key (base64 encoded der file) */ - privateKey: string; - /** request signing public certificate (base64 encoded der file) */ - publicCert: string; -}; - -export type DeviceAccessTokenRequest = { - clientId: string; - deviceCode: string; - grantType: string; -}; - -export type DeviceAuthRequest = { clientId: string }; - -export type DeviceAuthVerify = { userCode: string }; - -export type Digest = { type: "sha256"; value: string }; - -/** - * State of a Disk - */ -export type DiskState = - /** Disk is being initialized */ - | { state: "creating" } - /** Disk is ready but detached from any Instance */ - | { state: "detached" } - /** Disk is ready to receive blocks from an external source */ - | { state: "import_ready" } - /** Disk is importing blocks from a URL */ - | { state: "importing_from_url" } - /** Disk is importing blocks from bulk writes */ - | { state: "importing_from_bulk_writes" } - /** Disk is being finalized to state Detached */ - | { state: "finalizing" } - /** Disk is undergoing maintenance */ - | { state: "maintenance" } - /** Disk is being attached to the given Instance */ - | { instance: string; state: "attaching" } - /** Disk is attached to the given Instance */ - | { instance: string; state: "attached" } - /** Disk is being detached from the given Instance */ - | { instance: string; state: "detaching" } - /** Disk has been destroyed */ - | { state: "destroyed" } - /** Disk is unavailable */ - | { state: "faulted" }; - -/** - * View of a Disk + * View of a Disk */ export type Disk = { blockSize: ByteCount; @@ -1304,23 +876,6 @@ export type Disk = { timeModified: Date; }; -/** - * Different sources for a disk - */ -export type DiskSource = - /** Create a blank disk */ - | { - /** size of blocks for this Disk. valid values are: 512, 2048, or 4096 */ - blockSize: BlockSize; - type: "blank"; - } - /** Create a disk from a disk snapshot */ - | { snapshotId: string; type: "snapshot" } - /** Create a disk from an image */ - | { imageId: string; type: "image" } - /** Create a blank disk that will accept bulk writes or pull blocks from an external source. */ - | { blockSize: BlockSize; type: "importing_blocks" }; - /** * Create-time parameters for a `Disk` */ @@ -1348,6 +903,52 @@ export type DiskResultsPage = { nextPage?: string; }; +/** + * Different sources for a disk + */ +export type DiskSource = + /** Create a blank disk */ + | { + /** size of blocks for this Disk. valid values are: 512, 2048, or 4096 */ + blockSize: BlockSize; + type: "blank"; + } + /** Create a disk from a disk snapshot */ + | { snapshotId: string; type: "snapshot" } + /** Create a disk from an image */ + | { imageId: string; type: "image" } + /** Create a blank disk that will accept bulk writes or pull blocks from an external source. */ + | { blockSize: BlockSize; type: "importing_blocks" }; + +/** + * State of a Disk + */ +export type DiskState = + /** Disk is being initialized */ + | { state: "creating" } + /** Disk is ready but detached from any Instance */ + | { state: "detached" } + /** Disk is ready to receive blocks from an external source */ + | { state: "import_ready" } + /** Disk is importing blocks from a URL */ + | { state: "importing_from_url" } + /** Disk is importing blocks from bulk writes */ + | { state: "importing_from_bulk_writes" } + /** Disk is being finalized to state Detached */ + | { state: "finalizing" } + /** Disk is undergoing maintenance */ + | { state: "maintenance" } + /** Disk is being attached to the given Instance */ + | { instance: string; state: "attaching" } + /** Disk is attached to the given Instance */ + | { instance: string; state: "attached" } + /** Disk is being detached from the given Instance */ + | { instance: string; state: "detaching" } + /** Disk has been destroyed */ + | { state: "destroyed" } + /** Disk is unavailable */ + | { state: "faulted" }; + /** * A distribution is a sequence of bins and counts in those bins, and some statistical information tracked to compute the mean, standard deviation, and quantile estimates. * @@ -1436,6 +1037,21 @@ export type ExternalIpResultsPage = { nextPage?: string; }; +/** + * The name and type information for a field of a timeseries schema. + */ +export type FieldSchema = { + description: string; + fieldType: FieldType; + name: string; + source: FieldSource; +}; + +/** + * The source from which a field is derived, the target or metric. + */ +export type FieldSource = "target" | "metric"; + /** * The `FieldType` identifies the data type of a target or metric field. */ @@ -1453,21 +1069,6 @@ export type FieldType = | "uuid" | "bool"; -/** - * The source from which a field is derived, the target or metric. - */ -export type FieldSource = "target" | "metric"; - -/** - * The name and type information for a field of a timeseries schema. - */ -export type FieldSchema = { - description: string; - fieldType: FieldType; - name: string; - source: FieldSource; -}; - /** * The `FieldValue` contains the value of a target or metric field. */ @@ -1496,29 +1097,24 @@ export type FinalizeDisk = { export type FleetRole = "admin" | "collaborator" | "viewer"; /** - * Describes what kind of identity is described by an id - */ -export type IdentityType = "silo_user" | "silo_group"; - -/** - * Describes the assignment of a particular role on a particular resource to a particular identity (user, group, etc.) + * Policy for a particular resource * - * The resource is not part of this structure. Rather, `RoleAssignment`s are put into a `Policy` and that Policy is applied to a particular resource. + * Note that the Policy only describes access granted explicitly for this resource. The policies of parent resources can also cause a user to have access to this resource. */ -export type FleetRoleRoleAssignment = { - identityId: string; - identityType: IdentityType; - roleName: FleetRole; +export type FleetRolePolicy = { + /** Roles directly assigned on this resource */ + roleAssignments: FleetRoleRoleAssignment[]; }; /** - * Policy for a particular resource + * Describes the assignment of a particular role on a particular resource to a particular identity (user, group, etc.) * - * Note that the Policy only describes access granted explicitly for this resource. The policies of parent resources can also cause a user to have access to this resource. + * The resource is not part of this structure. Rather, `RoleAssignment`s are put into a `Policy` and that Policy is applied to a particular resource. */ -export type FleetRolePolicy = { - /** Roles directly assigned on this resource */ - roleAssignments: FleetRoleRoleAssignment[]; +export type FleetRoleRoleAssignment = { + identityId: string; + identityType: IdentityType; + roleName: FleetRole; }; /** @@ -1545,11 +1141,6 @@ export type FloatingIp = { timeModified: Date; }; -/** - * The type of resource that a floating IP is attached to - */ -export type FloatingIpParentKind = "instance"; - /** * Parameters for attaching a floating IP address to another resource */ @@ -1561,51 +1152,376 @@ export type FloatingIpAttach = { }; /** - * Parameters for creating a new floating IP address for instances. + * Parameters for creating a new floating IP address for instances. + */ +export type FloatingIpCreate = { + description: string; + /** An IP address to reserve for use as a floating IP. This field is optional: when not set, an address will be automatically chosen from `pool`. If set, then the IP must be available in the resolved `pool`. */ + ip?: string; + name: Name; + /** The parent IP pool that a floating IP is pulled from. If unset, the default pool is selected. */ + pool?: NameOrId; +}; + +/** + * The type of resource that a floating IP is attached to + */ +export type FloatingIpParentKind = "instance"; + +/** + * A single page of results + */ +export type FloatingIpResultsPage = { + /** list of items on this page of results */ + items: FloatingIp[]; + /** token used to fetch the next page of results (if any) */ + nextPage?: string; +}; + +/** + * Updateable identity-related parameters + */ +export type FloatingIpUpdate = { description?: string; name?: Name }; + +/** + * View of a Group + */ +export type Group = { + /** Human-readable name that can identify the group */ + displayName: string; + id: string; + /** Uuid of the silo to which this group belongs */ + siloId: string; +}; + +/** + * A single page of results + */ +export type GroupResultsPage = { + /** list of items on this page of results */ + items: Group[]; + /** token used to fetch the next page of results (if any) */ + nextPage?: string; +}; + +/** + * Histogram metric + * + * A histogram maintains the count of any number of samples, over a set of bins. Bins are specified on construction via their _left_ edges, inclusive. There can't be any "gaps" in the bins, and an additional bin may be added to the left, right, or both so that the bins extend to the entire range of the support. + * + * Note that any gaps, unsorted bins, or non-finite values will result in an error. + */ +export type Histogramdouble = { + /** The bins of the histogram. */ + bins: Bindouble[]; + /** The maximum value of all samples in the histogram. */ + max: number; + /** The minimum value of all samples in the histogram. */ + min: number; + /** The total number of samples in the histogram. */ + nSamples: number; + /** p50 Quantile */ + p50: Quantile; + /** p95 Quantile */ + p90: Quantile; + /** p99 Quantile */ + p99: Quantile; + /** M2 for Welford's algorithm for variance calculation. + +Read about [Welford's algorithm](https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford's_online_algorithm) for more information on the algorithm. */ + squaredMean: number; + /** The start time of the histogram. */ + startTime: Date; + /** The sum of all samples in the histogram. */ + sumOfSamples: number; +}; + +/** + * Histogram metric + * + * A histogram maintains the count of any number of samples, over a set of bins. Bins are specified on construction via their _left_ edges, inclusive. There can't be any "gaps" in the bins, and an additional bin may be added to the left, right, or both so that the bins extend to the entire range of the support. + * + * Note that any gaps, unsorted bins, or non-finite values will result in an error. + */ +export type Histogramfloat = { + /** The bins of the histogram. */ + bins: Binfloat[]; + /** The maximum value of all samples in the histogram. */ + max: number; + /** The minimum value of all samples in the histogram. */ + min: number; + /** The total number of samples in the histogram. */ + nSamples: number; + /** p50 Quantile */ + p50: Quantile; + /** p95 Quantile */ + p90: Quantile; + /** p99 Quantile */ + p99: Quantile; + /** M2 for Welford's algorithm for variance calculation. + +Read about [Welford's algorithm](https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford's_online_algorithm) for more information on the algorithm. */ + squaredMean: number; + /** The start time of the histogram. */ + startTime: Date; + /** The sum of all samples in the histogram. */ + sumOfSamples: number; +}; + +/** + * Histogram metric + * + * A histogram maintains the count of any number of samples, over a set of bins. Bins are specified on construction via their _left_ edges, inclusive. There can't be any "gaps" in the bins, and an additional bin may be added to the left, right, or both so that the bins extend to the entire range of the support. + * + * Note that any gaps, unsorted bins, or non-finite values will result in an error. + */ +export type Histogramint16 = { + /** The bins of the histogram. */ + bins: Binint16[]; + /** The maximum value of all samples in the histogram. */ + max: number; + /** The minimum value of all samples in the histogram. */ + min: number; + /** The total number of samples in the histogram. */ + nSamples: number; + /** p50 Quantile */ + p50: Quantile; + /** p95 Quantile */ + p90: Quantile; + /** p99 Quantile */ + p99: Quantile; + /** M2 for Welford's algorithm for variance calculation. + +Read about [Welford's algorithm](https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford's_online_algorithm) for more information on the algorithm. */ + squaredMean: number; + /** The start time of the histogram. */ + startTime: Date; + /** The sum of all samples in the histogram. */ + sumOfSamples: number; +}; + +/** + * Histogram metric + * + * A histogram maintains the count of any number of samples, over a set of bins. Bins are specified on construction via their _left_ edges, inclusive. There can't be any "gaps" in the bins, and an additional bin may be added to the left, right, or both so that the bins extend to the entire range of the support. + * + * Note that any gaps, unsorted bins, or non-finite values will result in an error. + */ +export type Histogramint32 = { + /** The bins of the histogram. */ + bins: Binint32[]; + /** The maximum value of all samples in the histogram. */ + max: number; + /** The minimum value of all samples in the histogram. */ + min: number; + /** The total number of samples in the histogram. */ + nSamples: number; + /** p50 Quantile */ + p50: Quantile; + /** p95 Quantile */ + p90: Quantile; + /** p99 Quantile */ + p99: Quantile; + /** M2 for Welford's algorithm for variance calculation. + +Read about [Welford's algorithm](https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford's_online_algorithm) for more information on the algorithm. */ + squaredMean: number; + /** The start time of the histogram. */ + startTime: Date; + /** The sum of all samples in the histogram. */ + sumOfSamples: number; +}; + +/** + * Histogram metric + * + * A histogram maintains the count of any number of samples, over a set of bins. Bins are specified on construction via their _left_ edges, inclusive. There can't be any "gaps" in the bins, and an additional bin may be added to the left, right, or both so that the bins extend to the entire range of the support. + * + * Note that any gaps, unsorted bins, or non-finite values will result in an error. + */ +export type Histogramint64 = { + /** The bins of the histogram. */ + bins: Binint64[]; + /** The maximum value of all samples in the histogram. */ + max: number; + /** The minimum value of all samples in the histogram. */ + min: number; + /** The total number of samples in the histogram. */ + nSamples: number; + /** p50 Quantile */ + p50: Quantile; + /** p95 Quantile */ + p90: Quantile; + /** p99 Quantile */ + p99: Quantile; + /** M2 for Welford's algorithm for variance calculation. + +Read about [Welford's algorithm](https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford's_online_algorithm) for more information on the algorithm. */ + squaredMean: number; + /** The start time of the histogram. */ + startTime: Date; + /** The sum of all samples in the histogram. */ + sumOfSamples: number; +}; + +/** + * Histogram metric + * + * A histogram maintains the count of any number of samples, over a set of bins. Bins are specified on construction via their _left_ edges, inclusive. There can't be any "gaps" in the bins, and an additional bin may be added to the left, right, or both so that the bins extend to the entire range of the support. + * + * Note that any gaps, unsorted bins, or non-finite values will result in an error. + */ +export type Histogramint8 = { + /** The bins of the histogram. */ + bins: Binint8[]; + /** The maximum value of all samples in the histogram. */ + max: number; + /** The minimum value of all samples in the histogram. */ + min: number; + /** The total number of samples in the histogram. */ + nSamples: number; + /** p50 Quantile */ + p50: Quantile; + /** p95 Quantile */ + p90: Quantile; + /** p99 Quantile */ + p99: Quantile; + /** M2 for Welford's algorithm for variance calculation. + +Read about [Welford's algorithm](https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford's_online_algorithm) for more information on the algorithm. */ + squaredMean: number; + /** The start time of the histogram. */ + startTime: Date; + /** The sum of all samples in the histogram. */ + sumOfSamples: number; +}; + +/** + * Histogram metric + * + * A histogram maintains the count of any number of samples, over a set of bins. Bins are specified on construction via their _left_ edges, inclusive. There can't be any "gaps" in the bins, and an additional bin may be added to the left, right, or both so that the bins extend to the entire range of the support. + * + * Note that any gaps, unsorted bins, or non-finite values will result in an error. */ -export type FloatingIpCreate = { - description: string; - /** An IP address to reserve for use as a floating IP. This field is optional: when not set, an address will be automatically chosen from `pool`. If set, then the IP must be available in the resolved `pool`. */ - ip?: string; - name: Name; - /** The parent IP pool that a floating IP is pulled from. If unset, the default pool is selected. */ - pool?: NameOrId; +export type Histogramuint16 = { + /** The bins of the histogram. */ + bins: Binuint16[]; + /** The maximum value of all samples in the histogram. */ + max: number; + /** The minimum value of all samples in the histogram. */ + min: number; + /** The total number of samples in the histogram. */ + nSamples: number; + /** p50 Quantile */ + p50: Quantile; + /** p95 Quantile */ + p90: Quantile; + /** p99 Quantile */ + p99: Quantile; + /** M2 for Welford's algorithm for variance calculation. + +Read about [Welford's algorithm](https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford's_online_algorithm) for more information on the algorithm. */ + squaredMean: number; + /** The start time of the histogram. */ + startTime: Date; + /** The sum of all samples in the histogram. */ + sumOfSamples: number; }; /** - * A single page of results + * Histogram metric + * + * A histogram maintains the count of any number of samples, over a set of bins. Bins are specified on construction via their _left_ edges, inclusive. There can't be any "gaps" in the bins, and an additional bin may be added to the left, right, or both so that the bins extend to the entire range of the support. + * + * Note that any gaps, unsorted bins, or non-finite values will result in an error. */ -export type FloatingIpResultsPage = { - /** list of items on this page of results */ - items: FloatingIp[]; - /** token used to fetch the next page of results (if any) */ - nextPage?: string; +export type Histogramuint32 = { + /** The bins of the histogram. */ + bins: Binuint32[]; + /** The maximum value of all samples in the histogram. */ + max: number; + /** The minimum value of all samples in the histogram. */ + min: number; + /** The total number of samples in the histogram. */ + nSamples: number; + /** p50 Quantile */ + p50: Quantile; + /** p95 Quantile */ + p90: Quantile; + /** p99 Quantile */ + p99: Quantile; + /** M2 for Welford's algorithm for variance calculation. + +Read about [Welford's algorithm](https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford's_online_algorithm) for more information on the algorithm. */ + squaredMean: number; + /** The start time of the histogram. */ + startTime: Date; + /** The sum of all samples in the histogram. */ + sumOfSamples: number; }; /** - * Updateable identity-related parameters + * Histogram metric + * + * A histogram maintains the count of any number of samples, over a set of bins. Bins are specified on construction via their _left_ edges, inclusive. There can't be any "gaps" in the bins, and an additional bin may be added to the left, right, or both so that the bins extend to the entire range of the support. + * + * Note that any gaps, unsorted bins, or non-finite values will result in an error. */ -export type FloatingIpUpdate = { description?: string; name?: Name }; +export type Histogramuint64 = { + /** The bins of the histogram. */ + bins: Binuint64[]; + /** The maximum value of all samples in the histogram. */ + max: number; + /** The minimum value of all samples in the histogram. */ + min: number; + /** The total number of samples in the histogram. */ + nSamples: number; + /** p50 Quantile */ + p50: Quantile; + /** p95 Quantile */ + p90: Quantile; + /** p99 Quantile */ + p99: Quantile; + /** M2 for Welford's algorithm for variance calculation. -/** - * View of a Group - */ -export type Group = { - /** Human-readable name that can identify the group */ - displayName: string; - id: string; - /** Uuid of the silo to which this group belongs */ - siloId: string; +Read about [Welford's algorithm](https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford's_online_algorithm) for more information on the algorithm. */ + squaredMean: number; + /** The start time of the histogram. */ + startTime: Date; + /** The sum of all samples in the histogram. */ + sumOfSamples: number; }; /** - * A single page of results + * Histogram metric + * + * A histogram maintains the count of any number of samples, over a set of bins. Bins are specified on construction via their _left_ edges, inclusive. There can't be any "gaps" in the bins, and an additional bin may be added to the left, right, or both so that the bins extend to the entire range of the support. + * + * Note that any gaps, unsorted bins, or non-finite values will result in an error. */ -export type GroupResultsPage = { - /** list of items on this page of results */ - items: Group[]; - /** token used to fetch the next page of results (if any) */ - nextPage?: string; +export type Histogramuint8 = { + /** The bins of the histogram. */ + bins: Binuint8[]; + /** The maximum value of all samples in the histogram. */ + max: number; + /** The minimum value of all samples in the histogram. */ + min: number; + /** The total number of samples in the histogram. */ + nSamples: number; + /** p50 Quantile */ + p50: Quantile; + /** p95 Quantile */ + p90: Quantile; + /** p99 Quantile */ + p99: Quantile; + /** M2 for Welford's algorithm for variance calculation. + +Read about [Welford's algorithm](https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford's_online_algorithm) for more information on the algorithm. */ + squaredMean: number; + /** The start time of the histogram. */ + startTime: Date; + /** The sum of all samples in the histogram. */ + sumOfSamples: number; }; /** @@ -1615,8 +1531,6 @@ export type GroupResultsPage = { */ export type Hostname = string; -export type IdentityProviderType = "saml"; - /** * View of an Identity Provider */ @@ -1645,6 +1559,13 @@ export type IdentityProviderResultsPage = { nextPage?: string; }; +export type IdentityProviderType = "saml"; + +/** + * Describes what kind of identity is described by an id + */ +export type IdentityType = "silo_user" | "silo_group"; + export type IdpMetadataSource = | { type: "url"; url: string } | { data: string; type: "base64_encoded_xml" }; @@ -1679,14 +1600,6 @@ export type Image = { version: string; }; -/** - * The source of the underlying image. - */ -export type ImageSource = - | { id: string; type: "snapshot" } - /** Boot the Alpine ISO that ships with the Propolis zone. Intended for development purposes only. */ - | { type: "you_can_boot_anything_as_long_as_its_alpine" }; - /** * Create-time parameters for an `Image` */ @@ -1711,6 +1624,14 @@ export type ImageResultsPage = { nextPage?: string; }; +/** + * The source of the underlying image. + */ +export type ImageSource = + | { id: string; type: "snapshot" } + /** Boot the Alpine ISO that ships with the Propolis zone. Intended for development purposes only. */ + | { type: "you_can_boot_anything_as_long_as_its_alpine" }; + /** * Parameters for importing blocks with a bulk write */ @@ -1720,119 +1641,42 @@ export type ImportBlocksBulkWrite = { }; /** - * The number of CPUs in an Instance - */ -export type InstanceCpuCount = number; - -/** - * Running state of an Instance (primarily: booted or stopped) - * - * This typically reflects whether it's starting, running, stopping, or stopped, but also includes states related to the Instance's lifecycle - */ -export type InstanceState = - /** The instance is being created. */ - | "creating" - - /** The instance is currently starting up. */ - | "starting" - - /** The instance is currently running. */ - | "running" - - /** The instance has been requested to stop and a transition to "Stopped" is imminent. */ - | "stopping" - - /** The instance is currently stopped. */ - | "stopped" - - /** The instance is in the process of rebooting - it will remain in the "rebooting" state until the VM is starting once more. */ - | "rebooting" - - /** The instance is in the process of migrating - it will remain in the "migrating" state until the migration process is complete and the destination propolis is ready to continue execution. */ - | "migrating" - - /** The instance is attempting to recover from a failure. */ - | "repairing" - - /** The instance has encountered a failure. */ - | "failed" - - /** The instance has been deleted. */ - | "destroyed"; - -/** - * View of an Instance - */ -export type Instance = { - /** human-readable free-form text about a resource */ - description: string; - /** RFC1035-compliant hostname for the Instance. */ - hostname: string; - /** unique, immutable, system-controlled identifier for each resource */ - id: string; - /** memory allocated for this Instance */ - memory: ByteCount; - /** unique, mutable, user-controlled identifier for each resource */ - name: Name; - /** number of CPUs allocated for this Instance */ - ncpus: InstanceCpuCount; - /** id for the project containing this Instance */ - projectId: string; - runState: InstanceState; - /** timestamp when this resource was created */ - timeCreated: Date; - /** timestamp when this resource was last modified */ - timeModified: Date; - timeRunStateUpdated: Date; -}; - -/** - * Describe the instance's disks at creation time - */ -export type InstanceDiskAttachment = - /** During instance creation, create and attach disks */ - | { - description: string; - /** initial source for this disk */ - diskSource: DiskSource; - name: Name; - /** total size of the Disk in bytes */ - size: ByteCount; - type: "create"; - } - /** During instance creation, attach this disk */ - | { - /** A disk name to attach */ - name: Name; - type: "attach"; - }; + * Define policy relating to the import and export of prefixes from a BGP peer. + */ +export type ImportExportPolicy = + /** Do not perform any filtering. */ + { type: "no_filtering" } | { type: "allow"; value: IpNet[] }; /** - * Create-time parameters for an `InstanceNetworkInterface` + * View of an Instance */ -export type InstanceNetworkInterfaceCreate = { +export type Instance = { + /** human-readable free-form text about a resource */ description: string; - /** The IP address for the interface. One will be auto-assigned if not provided. */ - ip?: string; + /** RFC1035-compliant hostname for the Instance. */ + hostname: string; + /** unique, immutable, system-controlled identifier for each resource */ + id: string; + /** memory allocated for this Instance */ + memory: ByteCount; + /** unique, mutable, user-controlled identifier for each resource */ name: Name; - /** The VPC Subnet in which to create the interface. */ - subnetName: Name; - /** The VPC in which to create the interface. */ - vpcName: Name; + /** number of CPUs allocated for this Instance */ + ncpus: InstanceCpuCount; + /** id for the project containing this Instance */ + projectId: string; + runState: InstanceState; + /** timestamp when this resource was created */ + timeCreated: Date; + /** timestamp when this resource was last modified */ + timeModified: Date; + timeRunStateUpdated: Date; }; /** - * Describes an attachment of an `InstanceNetworkInterface` to an `Instance`, at the time the instance is created. + * The number of CPUs in an Instance */ -export type InstanceNetworkInterfaceAttachment = - /** Create one or more `InstanceNetworkInterface`s for the `Instance`. - -If more than one interface is provided, then the first will be designated the primary interface for the instance. */ - | { params: InstanceNetworkInterfaceCreate[]; type: "create" } - /** The default networking configuration for an instance is to create a single primary interface with an automatically-assigned IP address. The IP will be pulled from the Project's default VPC / VPC Subnet. */ - | { type: "default" } - /** No network interfaces at all will be created for the instance. */ - | { type: "none" }; +export type InstanceCpuCount = number; /** * Create-time parameters for an `Instance` @@ -1862,11 +1706,25 @@ If not provided, all SSH public keys from the user's profile will be sent. If an }; /** - * A MAC address - * - * A Media Access Control address, in EUI-48 format + * Describe the instance's disks at creation time */ -export type MacAddr = string; +export type InstanceDiskAttachment = + /** During instance creation, create and attach disks */ + | { + description: string; + /** initial source for this disk */ + diskSource: DiskSource; + name: Name; + /** total size of the Disk in bytes */ + size: ByteCount; + type: "create"; + } + /** During instance creation, attach this disk */ + | { + /** A disk name to attach */ + name: Name; + type: "attach"; + }; /** * An `InstanceNetworkInterface` represents a virtual network interface device attached to an instance. @@ -1898,6 +1756,33 @@ export type InstanceNetworkInterface = { vpcId: string; }; +/** + * Describes an attachment of an `InstanceNetworkInterface` to an `Instance`, at the time the instance is created. + */ +export type InstanceNetworkInterfaceAttachment = + /** Create one or more `InstanceNetworkInterface`s for the `Instance`. + +If more than one interface is provided, then the first will be designated the primary interface for the instance. */ + | { params: InstanceNetworkInterfaceCreate[]; type: "create" } + /** The default networking configuration for an instance is to create a single primary interface with an automatically-assigned IP address. The IP will be pulled from the Project's default VPC / VPC Subnet. */ + | { type: "default" } + /** No network interfaces at all will be created for the instance. */ + | { type: "none" }; + +/** + * Create-time parameters for an `InstanceNetworkInterface` + */ +export type InstanceNetworkInterfaceCreate = { + description: string; + /** The IP address for the interface. One will be auto-assigned if not provided. */ + ip?: string; + name: Name; + /** The VPC Subnet in which to create the interface. */ + subnetName: Name; + /** The VPC in which to create the interface. */ + vpcName: Name; +}; + /** * A single page of results */ @@ -1946,6 +1831,44 @@ export type InstanceSerialConsoleData = { lastByteOffset: number; }; +/** + * Running state of an Instance (primarily: booted or stopped) + * + * This typically reflects whether it's starting, running, stopping, or stopped, but also includes states related to the Instance's lifecycle + */ +export type InstanceState = + /** The instance is being created. */ + | "creating" + + /** The instance is currently starting up. */ + | "starting" + + /** The instance is currently running. */ + | "running" + + /** The instance has been requested to stop and a transition to "Stopped" is imminent. */ + | "stopping" + + /** The instance is currently stopped. */ + | "stopped" + + /** The instance is in the process of rebooting - it will remain in the "rebooting" state until the VM is starting once more. */ + | "rebooting" + + /** The instance is in the process of migrating - it will remain in the "migrating" state until the migration process is complete and the destination propolis is ready to continue execution. */ + | "migrating" + + /** The instance is attempting to recover from a failure. */ + | "repairing" + + /** The instance has encountered a failure. */ + | "failed" + + /** The instance has been deleted. */ + | "destroyed"; + +export type IpNet = Ipv4Net | Ipv6Net; + /** * A collection of IP ranges. If a pool is linked to a silo, IP addresses from the pool can be allocated within that silo */ @@ -1973,22 +1896,6 @@ export type IpPoolLinkSilo = { silo: NameOrId; }; -/** - * A non-decreasing IPv4 address range, inclusive of both ends. - * - * The first address must be less than or equal to the last address. - */ -export type Ipv4Range = { first: string; last: string }; - -/** - * A non-decreasing IPv6 address range, inclusive of both ends. - * - * The first address must be less than or equal to the last address. - */ -export type Ipv6Range = { first: string; last: string }; - -export type IpRange = Ipv4Range | Ipv6Range; - export type IpPoolRange = { id: string; ipPoolId: string; @@ -2046,6 +1953,29 @@ export type IpPoolSiloUpdate = { */ export type IpPoolUpdate = { description?: string; name?: Name }; +export type IpPoolUtilization = { + /** Number of allocated and total available IPv4 addresses in pool */ + ipv4: Ipv4Utilization; + /** Number of allocated and total available IPv6 addresses in pool */ + ipv6: Ipv6Utilization; +}; + +export type IpRange = Ipv4Range | Ipv6Range; + +/** + * An IPv4 subnet + * + * An IPv4 subnet, including prefix and prefix length + */ +export type Ipv4Net = string; + +/** + * A non-decreasing IPv4 address range, inclusive of both ends. + * + * The first address must be less than or equal to the last address. + */ +export type Ipv4Range = { first: string; last: string }; + export type Ipv4Utilization = { /** The number of IPv4 addresses allocated from this pool */ allocated: number; @@ -2053,6 +1983,20 @@ export type Ipv4Utilization = { capacity: number; }; +/** + * An IPv6 subnet + * + * An IPv6 subnet, including prefix and subnet mask + */ +export type Ipv6Net = string; + +/** + * A non-decreasing IPv6 address range, inclusive of both ends. + * + * The first address must be less than or equal to the last address. + */ +export type Ipv6Range = { first: string; last: string }; + export type Ipv6Utilization = { /** The number of IPv6 addresses allocated from this pool. A 128-bit integer string to match the capacity field. */ allocated: string; @@ -2060,13 +2004,6 @@ export type Ipv6Utilization = { capacity: string; }; -export type IpPoolUtilization = { - /** Number of allocated and total available IPv4 addresses in pool */ - ipv4: Ipv4Utilization; - /** Number of allocated and total available IPv6 addresses in pool */ - ipv6: Ipv6Utilization; -}; - /** * A range of IP ports * @@ -2074,6 +2011,22 @@ export type IpPoolUtilization = { */ export type L4PortRange = string; +/** + * Switch link configuration. + */ +export type LinkConfigCreate = { + /** Whether or not to set autonegotiation */ + autoneg: boolean; + /** The forward error correction mode of the link. */ + fec: LinkFec; + /** The link-layer discovery protocol (LLDP) configuration for the link. */ + lldp: LldpLinkConfigCreate; + /** Maximum transmission unit for the link. */ + mtu: number; + /** The speed of the link. */ + speed: LinkSpeed; +}; + /** * The forward error correction mode of a link. */ @@ -2087,26 +2040,6 @@ export type LinkFec = /** Reed-Solomon forward error correction. */ | "rs"; -/** - * The LLDP configuration associated with a port. - */ -export type LldpLinkConfigCreate = { - /** The LLDP chassis identifier TLV. */ - chassisId?: string; - /** Whether or not LLDP is enabled. */ - enabled: boolean; - /** The LLDP link description TLV. */ - linkDescription?: string; - /** The LLDP link name TLV. */ - linkName?: string; - /** The LLDP management IP TLV. */ - managementIp?: string; - /** The LLDP system description TLV. */ - systemDescription?: string; - /** The LLDP system name TLV. */ - systemName?: string; -}; - /** * The speed of a link. */ @@ -2139,37 +2072,41 @@ export type LinkSpeed = | "speed400_g"; /** - * Switch link configuration. + * A link layer discovery protocol (LLDP) service configuration. */ -export type LinkConfigCreate = { - /** Whether or not to set autonegotiation */ - autoneg: boolean; - /** The forward error correction mode of the link. */ - fec: LinkFec; - /** The link-layer discovery protocol (LLDP) configuration for the link. */ - lldp: LldpLinkConfigCreate; - /** Maximum transmission unit for the link. */ - mtu: number; - /** The speed of the link. */ - speed: LinkSpeed; +export type LldpLinkConfig = { + /** The LLDP chassis identifier TLV. */ + chassisId?: string; + /** Whether or not the LLDP service is enabled. */ + enabled: boolean; + /** The id of this LLDP service instance. */ + id: string; + /** The LLDP link description TLV. */ + linkDescription?: string; + /** The LLDP link name TLV. */ + linkName?: string; + /** The LLDP management IP TLV. */ + managementIp?: IpNet; + /** The LLDP system description TLV. */ + systemDescription?: string; + /** The LLDP system name TLV. */ + systemName?: string; }; /** - * A link layer discovery protocol (LLDP) service configuration. + * The LLDP configuration associated with a port. */ -export type LldpLinkConfig = { +export type LldpLinkConfigCreate = { /** The LLDP chassis identifier TLV. */ chassisId?: string; - /** Whether or not the LLDP service is enabled. */ + /** Whether or not LLDP is enabled. */ enabled: boolean; - /** The id of this LLDP service instance. */ - id: string; /** The LLDP link description TLV. */ linkDescription?: string; /** The LLDP link name TLV. */ linkName?: string; /** The LLDP management IP TLV. */ - managementIp?: IpNet; + managementIp?: string; /** The LLDP system description TLV. */ systemDescription?: string; /** The LLDP system name TLV. */ @@ -2220,6 +2157,13 @@ export type LoopbackAddressResultsPage = { nextPage?: string; }; +/** + * A MAC address + * + * A Media Access Control address, in EUI-48 format + */ +export type MacAddr = string; + /** * A `Measurement` is a timestamped datum from a single metric */ @@ -2248,21 +2192,16 @@ export type MetricType = /** The value represents an accumulation between two points in time. */ | "cumulative"; -/** - * The type of network interface - */ -export type NetworkInterfaceKind = - /** A vNIC attached to a guest instance */ - | { id: string; type: "instance" } - /** A vNIC associated with an internal service */ - | { id: string; type: "service" } - /** A vNIC associated with a probe */ - | { id: string; type: "probe" }; +export type MissingDatum = { datumType: DatumType; startTime?: Date }; /** - * A Geneve Virtual Network Identifier + * A name unique within the parent collection + * + * Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'. Names cannot be a UUID, but they may contain a UUID. They can be at most 63 characters long. */ -export type Vni = number; +export type Name = string; + +export type NameOrId = string | Name; /** * Information required to construct a virtual network interface @@ -2281,50 +2220,15 @@ export type NetworkInterface = { }; /** - * List of data values for one timeseries. - * - * Each element is an option, where `None` represents a missing sample. - */ -export type ValueArray = - | { type: "integer"; values: number[] } - | { type: "double"; values: number[] } - | { type: "boolean"; values: boolean[] } - | { type: "string"; values: string[] } - | { type: "integer_distribution"; values: Distributionint64[] } - | { type: "double_distribution"; values: Distributiondouble[] }; - -/** - * A single list of values, for one dimension of a timeseries. - */ -export type Values = { - /** The type of this metric. */ - metricType: MetricType; - /** The data values. */ - values: ValueArray; -}; - -/** - * Timepoints and values for one timeseries. - */ -export type Points = { - startTimes?: Date[]; - timestamps: Date[]; - values: Values[]; -}; - -/** - * A timeseries contains a timestamped set of values from one source. - * - * This includes the typed key-value pairs that uniquely identify it, and the set of timestamps and data values from it. - */ -export type Timeseries = { fields: Record; points: Points }; - -/** - * A table represents one or more timeseries with the same schema. - * - * A table is the result of an OxQL query. It contains a name, usually the name of the timeseries schema from which the data is derived, and any number of timeseries, which contain the actual data. + * The type of network interface */ -export type Table = { name: string; timeseries: Record }; +export type NetworkInterfaceKind = + /** A vNIC attached to a guest instance */ + | { id: string; type: "instance" } + /** A vNIC associated with an internal service */ + | { id: string; type: "service" } + /** A vNIC associated with a probe */ + | { id: string; type: "probe" }; /** * The result of a successful OxQL query. @@ -2341,36 +2245,6 @@ export type OxqlQueryResult = { */ export type Password = string; -/** - * Describes the form factor of physical disks. - */ -export type PhysicalDiskKind = "m2" | "u2"; - -/** - * The operator-defined policy of a physical disk. - */ -export type PhysicalDiskPolicy = - /** The operator has indicated that the disk is in-service. */ - | { kind: "in_service" } - /** The operator has indicated that the disk has been permanently removed from service. - -This is a terminal state: once a particular disk ID is expunged, it will never return to service. (The actual hardware may be reused, but it will be treated as a brand-new disk.) - -An expunged disk is always non-provisionable. */ - | { kind: "expunged" }; - -/** - * The current state of the disk, as determined by Nexus. - */ -export type PhysicalDiskState = - /** The disk is currently active, and has resources allocated on it. */ - | "active" - - /** The disk has been permanently removed from service. - -This is a terminal state: once a particular disk ID is decommissioned, it will never return to service. (The actual hardware may be reused, but it will be treated as a brand-new disk.) */ - | "decommissioned"; - /** * View of a Physical Disk * @@ -2395,6 +2269,24 @@ export type PhysicalDisk = { vendor: string; }; +/** + * Describes the form factor of physical disks. + */ +export type PhysicalDiskKind = "m2" | "u2"; + +/** + * The operator-defined policy of a physical disk. + */ +export type PhysicalDiskPolicy = + /** The operator has indicated that the disk is in-service. */ + | { kind: "in_service" } + /** The operator has indicated that the disk has been permanently removed from service. + +This is a terminal state: once a particular disk ID is expunged, it will never return to service. (The actual hardware may be reused, but it will be treated as a brand-new disk.) + +An expunged disk is always non-provisionable. */ + | { kind: "expunged" }; + /** * A single page of results */ @@ -2405,13 +2297,34 @@ export type PhysicalDiskResultsPage = { nextPage?: string; }; -export type PingStatus = "ok"; +/** + * The current state of the disk, as determined by Nexus. + */ +export type PhysicalDiskState = + /** The disk is currently active, and has resources allocated on it. */ + | "active" + + /** The disk has been permanently removed from service. + +This is a terminal state: once a particular disk ID is decommissioned, it will never return to service. (The actual hardware may be reused, but it will be treated as a brand-new disk.) */ + | "decommissioned"; export type Ping = { /** Whether the external API is reachable. Will always be Ok if the endpoint returns anything at all. */ status: PingStatus; }; +export type PingStatus = "ok"; + +/** + * Timepoints and values for one timeseries. + */ +export type Points = { + startTimes?: Date[]; + timestamps: Date[]; + values: Values[]; +}; + /** * Identity-related metadata that's included in nearly all public API objects */ @@ -2439,8 +2352,6 @@ export type ProbeCreate = { sled: string; }; -export type ProbeExternalIpKind = "snat" | "floating" | "ephemeral"; - export type ProbeExternalIp = { firstPort: number; ip: string; @@ -2448,6 +2359,8 @@ export type ProbeExternalIp = { lastPort: number; }; +export type ProbeExternalIpKind = "snat" | "floating" | "ephemeral"; + export type ProbeInfo = { externalIps: ProbeExternalIp[]; id: string; @@ -2499,6 +2412,16 @@ export type ProjectResultsPage = { export type ProjectRole = "admin" | "collaborator" | "viewer"; +/** + * Policy for a particular resource + * + * Note that the Policy only describes access granted explicitly for this resource. The policies of parent resources can also cause a user to have access to this resource. + */ +export type ProjectRolePolicy = { + /** Roles directly assigned on this resource */ + roleAssignments: ProjectRoleRoleAssignment[]; +}; + /** * Describes the assignment of a particular role on a particular resource to a particular identity (user, group, etc.) * @@ -2511,19 +2434,29 @@ export type ProjectRoleRoleAssignment = { }; /** - * Policy for a particular resource - * - * Note that the Policy only describes access granted explicitly for this resource. The policies of parent resources can also cause a user to have access to this resource. + * Updateable properties of a `Project` */ -export type ProjectRolePolicy = { - /** Roles directly assigned on this resource */ - roleAssignments: ProjectRoleRoleAssignment[]; -}; +export type ProjectUpdate = { description?: string; name?: Name }; /** - * Updateable properties of a `Project` + * Structure for estimating the p-quantile of a population. + * + * This is based on the P² algorithm for estimating quantiles using constant space. + * + * The algorithm consists of maintaining five markers: the minimum, the p/2-, p-, and (1 + p)/2 quantiles, and the maximum. */ -export type ProjectUpdate = { description?: string; name?: Name }; +export type Quantile = { + /** The desired marker positions. */ + desiredMarkerPositions: number[]; + /** The heights of the markers. */ + markerHeights: number[]; + /** The positions of the markers. + +We track sample size in the 5th position, as useful observations won't start until we've filled the heights at the 6th sample anyway This does deviate from the paper, but it's a more useful representation that works according to the paper's algorithm. */ + markerPositions: number[]; + /** The p value for the quantile. */ + p: number; +}; /** * View of an Rack @@ -2547,6 +2480,11 @@ export type RackResultsPage = { nextPage?: string; }; +/** + * View of a Role + */ +export type Role = { description: string; name: RoleName }; + /** * A name for a built-in role * @@ -2554,11 +2492,6 @@ export type RackResultsPage = { */ export type RoleName = string; -/** - * View of a Role - */ -export type Role = { description: string; name: RoleName }; - /** * A single page of results */ @@ -2600,54 +2533,28 @@ export type RouteDestination = /** Route applies to traffic destined for a specific IP address */ | { type: "ip"; value: string } /** Route applies to traffic destined for a specific IP subnet */ - | { type: "ip_net"; value: IpNet } - /** Route applies to traffic destined for the given VPC. */ - | { type: "vpc"; value: Name } - /** Route applies to traffic */ - | { type: "subnet"; value: Name }; - -/** - * A `RouteTarget` describes the possible locations that traffic matching a route destination can be sent. - */ -export type RouteTarget = - /** Forward traffic to a particular IP address. */ - | { type: "ip"; value: string } - /** Forward traffic to a VPC */ - | { type: "vpc"; value: Name } - /** Forward traffic to a VPC Subnet */ - | { type: "subnet"; value: Name } - /** Forward traffic to a specific instance */ - | { type: "instance"; value: Name } - /** Forward traffic to an internet gateway */ - | { type: "internet_gateway"; value: Name } - /** Drop matching traffic */ - | { type: "drop" }; - -/** - * The kind of a `RouterRoute` - * - * The kind determines certain attributes such as if the route is modifiable and describes how or where the route was created. - */ -export type RouterRouteKind = - /** Determines the default destination of traffic, such as whether it goes to the internet or not. - -`Destination: An Internet Gateway` `Modifiable: true` */ - | "default" - - /** Automatically added for each VPC Subnet in the VPC - -`Destination: A VPC Subnet` `Modifiable: false` */ - | "vpc_subnet" - - /** Automatically added when VPC peering is established - -`Destination: A different VPC` `Modifiable: false` */ - | "vpc_peering" - - /** Created by a user; see `RouteTarget` + | { type: "ip_net"; value: IpNet } + /** Route applies to traffic destined for the given VPC. */ + | { type: "vpc"; value: Name } + /** Route applies to traffic */ + | { type: "subnet"; value: Name }; -`Destination: User defined` `Modifiable: true` */ - | "custom"; +/** + * A `RouteTarget` describes the possible locations that traffic matching a route destination can be sent. + */ +export type RouteTarget = + /** Forward traffic to a particular IP address. */ + | { type: "ip"; value: string } + /** Forward traffic to a VPC */ + | { type: "vpc"; value: Name } + /** Forward traffic to a VPC Subnet */ + | { type: "subnet"; value: Name } + /** Forward traffic to a specific instance */ + | { type: "instance"; value: Name } + /** Forward traffic to an internet gateway */ + | { type: "internet_gateway"; value: Name } + /** Drop matching traffic */ + | { type: "drop" }; /** * A route defines a rule that governs where traffic should be sent based on its destination. @@ -2685,6 +2592,32 @@ export type RouterRouteCreate = { target: RouteTarget; }; +/** + * The kind of a `RouterRoute` + * + * The kind determines certain attributes such as if the route is modifiable and describes how or where the route was created. + */ +export type RouterRouteKind = + /** Determines the default destination of traffic, such as whether it goes to the internet or not. + +`Destination: An Internet Gateway` `Modifiable: true` */ + | "default" + + /** Automatically added for each VPC Subnet in the VPC + +`Destination: A VPC Subnet` `Modifiable: false` */ + | "vpc_subnet" + + /** Automatically added when VPC peering is established + +`Destination: A different VPC` `Modifiable: false` */ + | "vpc_peering" + + /** Created by a user; see `RouteTarget` + +`Destination: User defined` `Modifiable: true` */ + | "custom"; + /** * A single page of results */ @@ -2762,14 +2695,9 @@ export type SamlIdentityProviderCreate = { }; /** - * Describes how identities are managed and users are authenticated in this Silo + * The service intended to use this certificate. */ -export type SiloIdentityMode = - /** Users are authenticated with SAML using an external authentication provider. The system updates information about users and groups only during successful authentication (i.e,. "JIT provisioning" of users and groups). */ - | "saml_jit" - - /** The system is the source of truth about users. There is no linkage to an external authentication provider or identity provider. */ - | "local_only"; +export type ServiceUsingCertificate = "external_api"; /** * View of a Silo @@ -2797,18 +2725,6 @@ The default is that no Fleet roles are conferred by any Silo roles unless there' timeModified: Date; }; -/** - * The amount of provisionable resources for a Silo - */ -export type SiloQuotasCreate = { - /** The amount of virtual CPUs available for running instances in the Silo */ - cpus: number; - /** The amount of RAM (in bytes) available for running instances in the Silo */ - memory: ByteCount; - /** The amount of storage (in bytes) available for disks or snapshots */ - storage: ByteCount; -}; - /** * Create-time parameters for a `Silo` */ @@ -2831,6 +2747,16 @@ The default is that no Fleet roles are conferred by any Silo roles unless there' tlsCertificates: CertificateCreate[]; }; +/** + * Describes how identities are managed and users are authenticated in this Silo + */ +export type SiloIdentityMode = + /** Users are authenticated with SAML using an external authentication provider. The system updates information about users and groups only during successful authentication (i.e,. "JIT provisioning" of users and groups). */ + | "saml_jit" + + /** The system is the source of truth about users. There is no linkage to an external authentication provider or identity provider. */ + | "local_only"; + /** * An IP pool in the context of a silo */ @@ -2872,6 +2798,18 @@ export type SiloQuotas = { storage: ByteCount; }; +/** + * The amount of provisionable resources for a Silo + */ +export type SiloQuotasCreate = { + /** The amount of virtual CPUs available for running instances in the Silo */ + cpus: number; + /** The amount of RAM (in bytes) available for running instances in the Silo */ + memory: ByteCount; + /** The amount of storage (in bytes) available for disks or snapshots */ + storage: ByteCount; +}; + /** * A single page of results */ @@ -2906,17 +2844,6 @@ export type SiloResultsPage = { export type SiloRole = "admin" | "collaborator" | "viewer"; -/** - * Describes the assignment of a particular role on a particular resource to a particular identity (user, group, etc.) - * - * The resource is not part of this structure. Rather, `RoleAssignment`s are put into a `Policy` and that Policy is applied to a particular resource. - */ -export type SiloRoleRoleAssignment = { - identityId: string; - identityType: IdentityType; - roleName: SiloRole; -}; - /** * Policy for a particular resource * @@ -2928,15 +2855,14 @@ export type SiloRolePolicy = { }; /** - * A collection of resource counts used to describe capacity and utilization + * Describes the assignment of a particular role on a particular resource to a particular identity (user, group, etc.) + * + * The resource is not part of this structure. Rather, `RoleAssignment`s are put into a `Policy` and that Policy is applied to a particular resource. */ -export type VirtualResourceCounts = { - /** Number of virtual CPUs */ - cpus: number; - /** Amount of memory in bytes */ - memory: ByteCount; - /** Amount of disk storage in bytes */ - storage: ByteCount; +export type SiloRoleRoleAssignment = { + identityId: string; + identityType: IdentityType; + roleName: SiloRole; }; /** @@ -2961,47 +2887,6 @@ export type SiloUtilizationResultsPage = { nextPage?: string; }; -/** - * The operator-defined provision policy of a sled. - * - * This controls whether new resources are going to be provisioned on this sled. - */ -export type SledProvisionPolicy = - /** New resources will be provisioned on this sled. */ - | "provisionable" - - /** New resources will not be provisioned on this sled. However, if the sled is currently in service, existing resources will continue to be on this sled unless manually migrated off. */ - | "non_provisionable"; - -/** - * The operator-defined policy of a sled. - */ -export type SledPolicy = - /** The operator has indicated that the sled is in-service. */ - | { - kind: "in_service"; - /** Determines whether new resources can be provisioned onto the sled. */ - provisionPolicy: SledProvisionPolicy; - } - /** The operator has indicated that the sled has been permanently removed from service. - -This is a terminal state: once a particular sled ID is expunged, it will never return to service. (The actual hardware may be reused, but it will be treated as a brand-new sled.) - -An expunged sled is always non-provisionable. */ - | { kind: "expunged" }; - -/** - * The current state of the sled, as determined by Nexus. - */ -export type SledState = - /** The sled is currently active, and has resources allocated on it. */ - | "active" - - /** The sled has been permanently removed from service. - -This is a terminal state: once a particular sled ID is decommissioned, it will never return to service. (The actual hardware may be reused, but it will be treated as a brand-new sled.) */ - | "decommissioned"; - /** * An operator's view of a Sled. */ @@ -3060,6 +2945,35 @@ export type SledInstanceResultsPage = { nextPage?: string; }; +/** + * The operator-defined policy of a sled. + */ +export type SledPolicy = + /** The operator has indicated that the sled is in-service. */ + | { + kind: "in_service"; + /** Determines whether new resources can be provisioned onto the sled. */ + provisionPolicy: SledProvisionPolicy; + } + /** The operator has indicated that the sled has been permanently removed from service. + +This is a terminal state: once a particular sled ID is expunged, it will never return to service. (The actual hardware may be reused, but it will be treated as a brand-new sled.) + +An expunged sled is always non-provisionable. */ + | { kind: "expunged" }; + +/** + * The operator-defined provision policy of a sled. + * + * This controls whether new resources are going to be provisioned on this sled. + */ +export type SledProvisionPolicy = + /** New resources will be provisioned on this sled. */ + | "provisionable" + + /** New resources will not be provisioned on this sled. However, if the sled is currently in service, existing resources will continue to be on this sled unless manually migrated off. */ + | "non_provisionable"; + /** * Parameters for `sled_set_provision_policy`. */ @@ -3088,7 +3002,17 @@ export type SledResultsPage = { nextPage?: string; }; -export type SnapshotState = "creating" | "ready" | "faulted" | "destroyed"; +/** + * The current state of the sled, as determined by Nexus. + */ +export type SledState = + /** The sled is currently active, and has resources allocated on it. */ + | "active" + + /** The sled has been permanently removed from service. + +This is a terminal state: once a particular sled ID is decommissioned, it will never return to service. (The actual hardware may be reused, but it will be treated as a brand-new sled.) */ + | "decommissioned"; /** * View of a Snapshot @@ -3130,6 +3054,8 @@ export type SnapshotResultsPage = { nextPage?: string; }; +export type SnapshotState = "creating" | "ready" | "faulted" | "destroyed"; + /** * View of an SSH Key */ @@ -3186,17 +3112,14 @@ export type Switch = { }; /** - * Describes the kind of an switch interface. + * BGP message history for a particular switch. */ -export type SwitchInterfaceKind2 = - /** Primary interfaces are associated with physical links. There is exactly one primary interface per physical link. */ - | "primary" - - /** VLAN interfaces allow physical interfaces to be multiplexed onto multiple logical links, each distinguished by a 12-bit 802.1Q Ethernet tag. */ - | "vlan" - - /** Loopback interfaces are anchors for IP addresses that are not specific to any particular port. */ - | "loopback"; +export type SwitchBgpHistory = { + /** Message history indexed by peer address. */ + history: Record; + /** Switch this message history is associated with. */ + switch: SwitchLocation; +}; /** * A switch port interface configuration for a port settings object. @@ -3214,6 +3137,16 @@ export type SwitchInterfaceConfig = { v6Enabled: boolean; }; +/** + * A layer-3 switch interface configuration. When IPv6 is enabled, a link local address will be created for the interface. + */ +export type SwitchInterfaceConfigCreate = { + /** What kind of switch interface this configuration represents. */ + kind: SwitchInterfaceKind; + /** Whether or not IPv6 is enabled. */ + v6Enabled: boolean; +}; + /** * Indicates the kind for a switch interface. */ @@ -3230,17 +3163,30 @@ export type SwitchInterfaceKind = | { type: "loopback" }; /** - * A layer-3 switch interface configuration. When IPv6 is enabled, a link local address will be created for the interface. + * Describes the kind of an switch interface. */ -export type SwitchInterfaceConfigCreate = { - /** What kind of switch interface this configuration represents. */ - kind: SwitchInterfaceKind; - /** Whether or not IPv6 is enabled. */ - v6Enabled: boolean; -}; +export type SwitchInterfaceKind2 = + /** Primary interfaces are associated with physical links. There is exactly one primary interface per physical link. */ + | "primary" + + /** VLAN interfaces allow physical interfaces to be multiplexed onto multiple logical links, each distinguished by a 12-bit 802.1Q Ethernet tag. */ + | "vlan" + + /** Loopback interfaces are anchors for IP addresses that are not specific to any particular port. */ + | "loopback"; export type SwitchLinkState = Record; +/** + * Identifies switch physical location + */ +export type SwitchLocation = + /** Switch in upper slot */ + | "switch0" + + /** Switch in lower slot */ + | "switch1"; + /** * A switch port represents a physical external port on a rack switch. */ @@ -3281,19 +3227,6 @@ export type SwitchPortApplySettings = { portSettings: NameOrId; }; -/** - * The link geometry associated with a switch port. - */ -export type SwitchPortGeometry2 = - /** The port contains a single QSFP28 link with four lanes. */ - | "qsfp28x1" - - /** The port contains two QSFP28 links each with two lanes. */ - | "qsfp28x2" - - /** The port contains four SFP28 links each with one lane. */ - | "sfp28x4"; - /** * A physical port configuration for a port settings object. */ @@ -3304,6 +3237,14 @@ export type SwitchPortConfig = { portSettingsId: string; }; +/** + * Physical switch port configuration. + */ +export type SwitchPortConfigCreate = { + /** Link geometry for the switch port. */ + geometry: SwitchPortGeometry; +}; + /** * The link geometry associated with a switch port. */ @@ -3318,12 +3259,17 @@ export type SwitchPortGeometry = | "sfp28x4"; /** - * Physical switch port configuration. + * The link geometry associated with a switch port. */ -export type SwitchPortConfigCreate = { - /** Link geometry for the switch port. */ - geometry: SwitchPortGeometry; -}; +export type SwitchPortGeometry2 = + /** The port contains a single QSFP28 link with four lanes. */ + | "qsfp28x1" + + /** The port contains two QSFP28 links each with two lanes. */ + | "qsfp28x2" + + /** The port contains four SFP28 links each with one lane. */ + | "sfp28x4"; /** * A link configuration for a port settings object. @@ -3429,16 +3375,6 @@ export type SwitchPortSettingsResultsPage = { nextPage?: string; }; -/** - * A switch port VLAN interface configuration for a port settings object. - */ -export type SwitchVlanInterfaceConfig = { - /** The switch interface configuration this VLAN interface configuration belongs to. */ - interfaceConfigId: string; - /** The virtual network id for this interface that is used for producing and consuming 802.1Q Ethernet tags. This field has a maximum value of 4095 as 802.1Q tags are twelve bits. */ - vlanId: number; -}; - /** * This structure contains all port settings information in one place. It's a convenience data structure for getting a complete view of a particular port's settings. */ @@ -3475,6 +3411,30 @@ export type SwitchResultsPage = { nextPage?: string; }; +/** + * A switch port VLAN interface configuration for a port settings object. + */ +export type SwitchVlanInterfaceConfig = { + /** The switch interface configuration this VLAN interface configuration belongs to. */ + interfaceConfigId: string; + /** The virtual network id for this interface that is used for producing and consuming 802.1Q Ethernet tags. This field has a maximum value of 4095 as 802.1Q tags are twelve bits. */ + vlanId: number; +}; + +/** + * A table represents one or more timeseries with the same schema. + * + * A table is the result of an OxQL query. It contains a name, usually the name of the timeseries schema from which the data is derived, and any number of timeseries, which contain the actual data. + */ +export type Table = { name: string; timeseries: Record }; + +/** + * A timeseries contains a timestamped set of values from one source. + * + * This includes the typed key-value pairs that uniquely identify it, and the set of timestamps and data values from it. + */ +export type Timeseries = { fields: Record; points: Points }; + /** * Text descriptions for the target and metric of a timeseries. */ @@ -3495,25 +3455,6 @@ export type TimeseriesQuery = { query: string; }; -/** - * Measurement units for timeseries samples. - */ -export type Units = - | "count" - | "bytes" - | "seconds" - | "nanoseconds" - | "volts" - | "amps" - | "watts" - | "degrees_celsius" - - /** No meaningful units, e.g. a dimensionless quanity. */ - | "none" - - /** Rotations per minute. */ - | "rpm"; - /** * The schema for a timeseries. * @@ -3564,6 +3505,25 @@ export type UninitializedSledResultsPage = { nextPage?: string; }; +/** + * Measurement units for timeseries samples. + */ +export type Units = + | "count" + | "bytes" + | "seconds" + | "nanoseconds" + | "volts" + | "amps" + | "watts" + | "degrees_celsius" + + /** No meaningful units, e.g. a dimensionless quanity. */ + | "none" + + /** Rotations per minute. */ + | "rpm"; + /** * View of a User */ @@ -3603,6 +3563,16 @@ export type UserBuiltinResultsPage = { nextPage?: string; }; +/** + * Create-time parameters for a `User` + */ +export type UserCreate = { + /** username used to log in */ + externalId: UserId; + /** how to set the user's login password */ + password: UserPassword; +}; + /** * A username for a local-only user * @@ -3619,16 +3589,6 @@ export type UserPassword = /** Invalidates any current password (disabling password authentication) */ | { mode: "login_disallowed" }; -/** - * Create-time parameters for a `User` - */ -export type UserCreate = { - /** username used to log in */ - externalId: UserId; - /** how to set the user's login password */ - password: UserPassword; -}; - /** * A single page of results */ @@ -3657,6 +3617,46 @@ export type Utilization = { provisioned: VirtualResourceCounts; }; +/** + * List of data values for one timeseries. + * + * Each element is an option, where `None` represents a missing sample. + */ +export type ValueArray = + | { type: "integer"; values: number[] } + | { type: "double"; values: number[] } + | { type: "boolean"; values: boolean[] } + | { type: "string"; values: string[] } + | { type: "integer_distribution"; values: Distributionint64[] } + | { type: "double_distribution"; values: Distributiondouble[] }; + +/** + * A single list of values, for one dimension of a timeseries. + */ +export type Values = { + /** The type of this metric. */ + metricType: MetricType; + /** The data values. */ + values: ValueArray; +}; + +/** + * A collection of resource counts used to describe capacity and utilization + */ +export type VirtualResourceCounts = { + /** Number of virtual CPUs */ + cpus: number; + /** Amount of memory in bytes */ + memory: ByteCount; + /** Amount of disk storage in bytes */ + storage: ByteCount; +}; + +/** + * A Geneve Virtual Network Identifier + */ +export type Vni = number; + /** * View of a VPC */ @@ -3694,10 +3694,52 @@ All IPv6 subnets created from this VPC must be taken from this range, which shou name: Name; }; +/** + * A single rule in a VPC firewall + */ +export type VpcFirewallRule = { + /** Whether traffic matching the rule should be allowed or dropped */ + action: VpcFirewallRuleAction; + /** human-readable free-form text about a resource */ + description: string; + /** Whether this rule is for incoming or outgoing traffic */ + direction: VpcFirewallRuleDirection; + /** Reductions on the scope of the rule */ + filters: VpcFirewallRuleFilter; + /** unique, immutable, system-controlled identifier for each resource */ + id: string; + /** unique, mutable, user-controlled identifier for each resource */ + name: Name; + /** The relative priority of this rule */ + priority: number; + /** Whether this rule is in effect */ + status: VpcFirewallRuleStatus; + /** Determine the set of instances that the rule applies to */ + targets: VpcFirewallRuleTarget[]; + /** timestamp when this resource was created */ + timeCreated: Date; + /** timestamp when this resource was last modified */ + timeModified: Date; + /** The VPC to which this rule belongs */ + vpcId: string; +}; + export type VpcFirewallRuleAction = "allow" | "deny"; export type VpcFirewallRuleDirection = "inbound" | "outbound"; +/** + * Filters reduce the scope of a firewall rule. Without filters, the rule applies to all packets to the targets (or from the targets, if it's an outbound rule). With multiple filters, the rule applies only to packets matching ALL filters. The maximum number of each type of filter is 256. + */ +export type VpcFirewallRuleFilter = { + /** If present, host filters match the "other end" of traffic from the target’s perspective: for an inbound rule, they match the source of traffic. For an outbound rule, they match the destination. */ + hosts?: VpcFirewallRuleHostFilter[]; + /** If present, the destination ports or port ranges this rule applies to. */ + ports?: L4PortRange[]; + /** If present, the networking protocols this rule applies to. */ + protocols?: VpcFirewallRuleProtocol[]; +}; + /** * The `VpcFirewallRuleHostFilter` is used to filter traffic on the basis of its source or destination host. */ @@ -3718,18 +3760,6 @@ export type VpcFirewallRuleHostFilter = */ export type VpcFirewallRuleProtocol = "TCP" | "UDP" | "ICMP"; -/** - * Filters reduce the scope of a firewall rule. Without filters, the rule applies to all packets to the targets (or from the targets, if it's an outbound rule). With multiple filters, the rule applies only to packets matching ALL filters. The maximum number of each type of filter is 256. - */ -export type VpcFirewallRuleFilter = { - /** If present, host filters match the "other end" of traffic from the target’s perspective: for an inbound rule, they match the source of traffic. For an outbound rule, they match the destination. */ - hosts?: VpcFirewallRuleHostFilter[]; - /** If present, the destination ports or port ranges this rule applies to. */ - ports?: L4PortRange[]; - /** If present, the networking protocols this rule applies to. */ - protocols?: VpcFirewallRuleProtocol[]; -}; - export type VpcFirewallRuleStatus = "disabled" | "enabled"; /** @@ -3747,36 +3777,6 @@ export type VpcFirewallRuleTarget = /** The rule applies to a specific IP subnet */ | { type: "ip_net"; value: IpNet }; -/** - * A single rule in a VPC firewall - */ -export type VpcFirewallRule = { - /** Whether traffic matching the rule should be allowed or dropped */ - action: VpcFirewallRuleAction; - /** human-readable free-form text about a resource */ - description: string; - /** Whether this rule is for incoming or outgoing traffic */ - direction: VpcFirewallRuleDirection; - /** Reductions on the scope of the rule */ - filters: VpcFirewallRuleFilter; - /** unique, immutable, system-controlled identifier for each resource */ - id: string; - /** unique, mutable, user-controlled identifier for each resource */ - name: Name; - /** The relative priority of this rule */ - priority: number; - /** Whether this rule is in effect */ - status: VpcFirewallRuleStatus; - /** Determine the set of instances that the rule applies to */ - targets: VpcFirewallRuleTarget[]; - /** timestamp when this resource was created */ - timeCreated: Date; - /** timestamp when this resource was last modified */ - timeModified: Date; - /** The VPC to which this rule belongs */ - vpcId: string; -}; - /** * A single rule in a VPC firewall */ @@ -3819,8 +3819,6 @@ export type VpcResultsPage = { nextPage?: string; }; -export type VpcRouterKind = "system" | "custom"; - /** * A VPC router defines a series of rules that indicate where traffic should be sent depending on its destination. */ @@ -3845,6 +3843,8 @@ export type VpcRouter = { */ export type VpcRouterCreate = { description: string; name: Name }; +export type VpcRouterKind = "system" | "custom"; + /** * A single page of results */