From 44a032782b28cee5ec6b9cbddb3d4a8ceccf7903 Mon Sep 17 00:00:00 2001 From: Charlie Park Date: Thu, 8 Jan 2026 10:38:20 -0800 Subject: [PATCH 01/17] update file structure parsing for accessing latest nexus version --- OMICRON_VERSION | 2 +- oxide-api/src/Api.ts | 702 +- oxide-openapi-gen-ts/src/__snapshots__/Api.ts | 9825 +++++------------ .../src/__snapshots__/msw-handlers.ts | 362 +- .../src/__snapshots__/type-test.ts | 172 +- .../src/__snapshots__/validate.ts | 3479 +----- oxide-openapi-gen-ts/src/schema/types.test.ts | 1 + tools/gen.sh | 5 +- 8 files changed, 4135 insertions(+), 10413 deletions(-) diff --git a/OMICRON_VERSION b/OMICRON_VERSION index ad0d5dd..bf54a45 100644 --- a/OMICRON_VERSION +++ b/OMICRON_VERSION @@ -1 +1 @@ -a6e111cf72ab987b2ea5acd7d26610ea2a55bf0f +f4e6ee321ad9bcf9b86542f1c23ab948a1bd692e diff --git a/oxide-api/src/Api.ts b/oxide-api/src/Api.ts index 38a5d48..a752e2d 100644 --- a/oxide-api/src/Api.ts +++ b/oxide-api/src/Api.ts @@ -168,6 +168,49 @@ export type AddressLotViewResponse = { lot: AddressLot; }; +/** + * The IP address version. + */ +export type IpVersion = "v4" | "v6"; + +/** + * Specify which IP pool to allocate from. + */ +export type PoolSelector = + /** Use the specified pool by name or ID. */ + | { + /** The pool to allocate from. */ + pool: NameOrId; + type: "explicit"; + } + /** Use the default pool for the silo. */ + | { + /** IP version to use when multiple default pools exist. Required if both IPv4 and IPv6 default pools are configured. */ + ipVersion?: IpVersion | null; + type: "auto"; + }; + +/** + * Specify how to allocate a floating IP address. + */ +export type AddressSelector = + /** Reserve a specific IP address. */ + | { + /** The IP address to reserve. Must be available in the pool. */ + ip: string; + /** The pool containing this address. If not specified, the default pool for the address's IP version is used. */ + pool?: NameOrId | null; + type: "explicit"; + } + /** Automatically allocate an IP address from a specified pool. */ + | { + /** Pool selection. + +If omitted, this field uses the silo's default pool. If the silo has default pools for both IPv4 and IPv6, the request will fail unless `ip_version` is specified in the pool selector. */ + poolSelector?: PoolSelector; + type: "auto"; + }; + /** * Describes the scope of affinity for the purposes of co-location. */ @@ -960,6 +1003,9 @@ export type BgpPeerState = /** Waiting for keepaliave or notification from peer. */ | "open_confirm" + /** There is an ongoing Connection Collision that hasn't yet been resolved. Two connections are maintained until one connection receives an Open or is able to progress into Established. */ + | "connection_collision" + /** Synchronizing with peer. */ | "session_setup" @@ -1773,7 +1819,11 @@ export type DeviceAccessTokenResultsPage = { export type DeviceAuthRequest = { clientId: string; - /** Optional lifetime for the access token in seconds. If not specified, the silo's max TTL will be used (if set). */ + /** Optional lifetime for the access token in seconds. + +This value will be validated during the confirmation step. If not specified, it defaults to the silo's max TTL, which can be seen at `/v1/auth-settings`. If specified, must not exceed the silo's max TTL. + +Some special logic applies when authenticating the confirmation request with an existing device token: the requested TTL must not produce an expiration time later than the authenticating token's expiration. If no TTL is specified, the expiration will be the lesser of the silo max and the authenticating token's expiration time. To get the longest allowed lifetime, omit the TTL and authenticate with a web console session. */ ttlSeconds?: number | null; }; @@ -1781,6 +1831,8 @@ export type DeviceAuthVerify = { userCode: string }; export type Digest = { type: "sha256"; value: string }; +export type DiskType = "distributed" | "local"; + /** * State of a Disk */ @@ -1818,6 +1870,7 @@ export type Disk = { /** human-readable free-form text about a resource */ description: string; devicePath: string; + diskType: DiskType; /** unique, immutable, system-controlled identifier for each resource */ id: string; /** ID of image from which disk was created, if any */ @@ -1836,7 +1889,7 @@ export type Disk = { }; /** - * Different sources for a disk + * Different sources for a Distributed Disk */ export type DiskSource = /** Create a blank disk */ @@ -1852,13 +1905,24 @@ export type DiskSource = /** Create a blank disk that will accept bulk writes or pull blocks from an external source. */ | { blockSize: BlockSize; type: "importing_blocks" }; +/** + * The source of a `Disk`'s blocks + */ +export type DiskBackend = + | { type: "local" } + | { + /** The initial source for this disk */ + diskSource: DiskSource; + type: "distributed"; + }; + /** * Create-time parameters for a `Disk` */ export type DiskCreate = { description: string; - /** The initial source for this disk */ - diskSource: DiskSource; + /** The source for this `Disk`'s blocks */ + diskBackend: DiskBackend; name: Name; /** The total size of the Disk (in bytes) */ size: ByteCount; @@ -1889,9 +1953,9 @@ export type Distributiondouble = { counts: number[]; max?: number | null; min?: number | null; - p50?: Quantile | null; - p90?: Quantile | null; - p99?: Quantile | null; + p50?: number | null; + p90?: number | null; + p99?: number | null; squaredMean: number; sumOfSamples: number; }; @@ -1906,9 +1970,9 @@ export type Distributionint64 = { counts: number[]; max?: number | null; min?: number | null; - p50?: Quantile | null; - p90?: Quantile | null; - p99?: Quantile | null; + p50?: number | null; + p90?: number | null; + p99?: number | null; squaredMean: number; sumOfSamples: number; }; @@ -1917,8 +1981,8 @@ export type Distributionint64 = { * Parameters for creating an ephemeral IP address for an instance. */ export type EphemeralIpCreate = { - /** Name or ID of the IP pool used to allocate an address. If unspecified, the default IP pool will be used. */ - pool?: NameOrId | null; + /** Pool to allocate from. */ + poolSelector?: PoolSelector; }; export type ExternalIp = @@ -1964,8 +2028,12 @@ SNAT addresses are ephemeral addresses used only for outbound connectivity. */ * Parameters for creating an external IP address for instances. */ export type ExternalIpCreate = - /** An IP address providing both inbound and outbound access. The address is automatically assigned from the provided IP pool or the default IP pool if not specified. */ - | { pool?: NameOrId | null; type: "ephemeral" } + /** An IP address providing both inbound and outbound access. The address is automatically assigned from a pool. */ + | { + /** Pool to allocate from. */ + poolSelector?: PoolSelector; + type: "ephemeral"; + } /** An IP address providing both inbound and outbound access. The address is an existing floating IP object assigned to the current project. The floating IP must not be in use by another instance or service. */ @@ -2109,12 +2177,10 @@ export type FloatingIpAttach = { * Parameters for creating a new floating IP address for instances. */ export type FloatingIpCreate = { + /** IP address allocation method. */ + addressSelector?: AddressSelector; 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 | null; name: Name; - /** The parent IP pool that a floating IP is pulled from. If unset, the default pool is selected. */ - pool?: NameOrId | null; }; /** @@ -2357,8 +2423,8 @@ export type InstanceDiskAttachment = /** During instance creation, create and attach disks */ | { description: string; - /** The initial source for this disk */ - diskSource: DiskSource; + /** The source for this `Disk`'s blocks */ + diskBackend: DiskBackend; name: Name; /** The total size of the Disk (in bytes) */ size: ByteCount; @@ -2371,18 +2437,70 @@ export type InstanceDiskAttachment = type: "attach"; }; +/** + * How a VPC-private IP address is assigned to a network interface. + */ +export type Ipv4Assignment = + /** Automatically assign an IP address from the VPC Subnet. */ + | { type: "auto" } + /** Explicitly assign a specific address, if available. */ + | { type: "explicit"; value: string }; + +/** + * Configuration for a network interface's IPv4 addressing. + */ +export type PrivateIpv4StackCreate = { + /** The VPC-private address to assign to the interface. */ + ip: Ipv4Assignment; + /** Additional IP networks the interface can send / receive on. */ + transitIps?: Ipv4Net[]; +}; + +/** + * How a VPC-private IP address is assigned to a network interface. + */ +export type Ipv6Assignment = + /** Automatically assign an IP address from the VPC Subnet. */ + | { type: "auto" } + /** Explicitly assign a specific address, if available. */ + | { type: "explicit"; value: string }; + +/** + * Configuration for a network interface's IPv6 addressing. + */ +export type PrivateIpv6StackCreate = { + /** The VPC-private address to assign to the interface. */ + ip: Ipv6Assignment; + /** Additional IP networks the interface can send / receive on. */ + transitIps?: Ipv6Net[]; +}; + +/** + * Create parameters for a network interface's IP stack. + */ +export type PrivateIpStackCreate = + /** The interface has only an IPv4 stack. */ + | { type: "v4"; value: PrivateIpv4StackCreate } + /** The interface has only an IPv6 stack. */ + | { type: "v6"; value: PrivateIpv6StackCreate } + /** The interface has both an IPv4 and IPv6 stack. */ + | { + type: "dual_stack"; + value: { v4: PrivateIpv4StackCreate; v6: PrivateIpv6StackCreate }; + }; + /** * 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 | null; + /** The IP stack configuration for this interface. + +If not provided, a default configuration will be used, which creates a dual-stack IPv4 / IPv6 interface. */ + ipConfig?: PrivateIpStackCreate; name: Name; /** The VPC Subnet in which to create the interface. */ subnetName: Name; - /** A set of additional networks that this interface may send and receive traffic on. */ - transitIps?: IpNet[]; /** The VPC in which to create the interface. */ vpcName: Name; }; @@ -2395,8 +2513,18 @@ export type InstanceNetworkInterfaceAttachment = 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" } + /** Create a single primary interface with an automatically-assigned IPv4 address. + +The IP will be pulled from the Project's default VPC / VPC Subnet. */ + | { type: "default_ipv4" } + /** Create a single primary interface with an automatically-assigned IPv6 address. + +The IP will be pulled from the Project's default VPC / VPC Subnet. */ + | { type: "default_ipv6" } + /** Create a single primary interface with automatically-assigned IPv4 and IPv6 addresses. + +The IPs will be pulled from the Project's default VPC / VPC Subnet. */ + | { type: "default_dual_stack" } /** No network interfaces at all will be created for the instance. */ | { type: "none" }; @@ -2437,6 +2565,10 @@ By default, all instances have outbound connectivity, but no inbound connectivit hostname: Hostname; /** The amount of RAM (in bytes) to be allocated to the instance */ memory: ByteCount; + /** The multicast groups this instance should join. + +The instance will be automatically added as a member of the specified multicast groups during creation, enabling it to send and receive multicast traffic for those groups. */ + multicastGroups?: NameOrId[]; name: Name; /** The number of vCPUs to be allocated to the instance */ ncpus: InstanceCpuCount; @@ -2452,6 +2584,40 @@ If not provided, all SSH public keys from the user's profile will be sent. If an userData?: string; }; +/** + * The VPC-private IPv4 stack for a network interface + */ +export type PrivateIpv4Stack = { + /** The VPC-private IPv4 address for the interface. */ + ip: string; + /** A set of additional IPv4 networks that this interface may send and receive traffic on. */ + transitIps: Ipv4Net[]; +}; + +/** + * The VPC-private IPv6 stack for a network interface + */ +export type PrivateIpv6Stack = { + /** The VPC-private IPv6 address for the interface. */ + ip: string; + /** A set of additional IPv6 networks that this interface may send and receive traffic on. */ + transitIps: Ipv6Net[]; +}; + +/** + * The VPC-private IP stack for a network interface. + */ +export type PrivateIpStack = + /** The interface has only an IPv4 stack. */ + | { type: "v4"; value: PrivateIpv4Stack } + /** The interface has only an IPv6 stack. */ + | { type: "v6"; value: PrivateIpv6Stack } + /** The interface is dual-stack IPv4 and IPv6. */ + | { + type: "dual_stack"; + value: { v4: PrivateIpv4Stack; v6: PrivateIpv6Stack }; + }; + /** * A MAC address * @@ -2469,8 +2635,8 @@ export type InstanceNetworkInterface = { id: string; /** The Instance to which the interface belongs. */ instanceId: string; - /** The IP address assigned to this interface. */ - ip: string; + /** The VPC-private IP stack for this interface. */ + ipStack: PrivateIpStack; /** The MAC address assigned to this interface. */ mac: MacAddr; /** unique, mutable, user-controlled identifier for each resource */ @@ -2483,8 +2649,6 @@ export type InstanceNetworkInterface = { timeCreated: Date; /** timestamp when this resource was last modified */ timeModified: Date; - /** A set of additional networks that this interface may send and receive traffic on. */ - transitIps?: IpNet[]; /** The VPC to which the interface belongs. */ vpcId: string; }; @@ -2513,7 +2677,7 @@ If applied to a secondary interface, that interface will become the primary on t Note that this can only be used to select a new primary interface for an instance. Requests to change the primary interface into a secondary will return an error. */ primary?: boolean; - /** A set of additional networks that this interface may send and receive traffic on. */ + /** A set of additional networks that this interface may send and receive traffic on */ transitIps?: IpNet[]; }; @@ -2557,6 +2721,12 @@ An instance that does not have a boot disk set will use the boot options specifi cpuPlatform: InstanceCpuPlatform | null; /** The amount of RAM (in bytes) to be allocated to the instance */ memory: ByteCount; + /** Multicast groups this instance should join. + +When specified, this replaces the instance's current multicast group membership with the new set of groups. The instance will leave any groups not listed here and join any new groups that are specified. + +If not provided (None), the instance's multicast group membership will not be changed. */ + multicastGroups?: NameOrId[] | null; /** The number of vCPUs to be allocated to the instance */ ncpus: InstanceCpuCount; }; @@ -2677,11 +2847,6 @@ export type InternetGatewayResultsPage = { nextPage?: string | null; }; -/** - * The IP address version. - */ -export type IpVersion = "v4" | "v6"; - /** * Type of IP pool. */ @@ -2706,7 +2871,7 @@ export type IpPool = { ipVersion: IpVersion; /** unique, mutable, user-controlled identifier for each resource */ name: Name; - /** Type of IP pool (unicast or multicast) */ + /** Type of IP pool (unicast or multicast). */ poolType: IpPoolType; /** timestamp when this resource was created */ timeCreated: Date; @@ -2733,7 +2898,9 @@ The default is IPv4. */ }; export type IpPoolLinkSilo = { - /** When a pool is the default for a silo, floating IPs and instance ephemeral IPs will come from that pool when no other pool is specified. There can be at most one default for a given silo. */ + /** When a pool is the default for a silo, floating IPs and instance ephemeral IPs will come from that pool when no other pool is specified. + +A silo can have at most one default pool per combination of pool type (unicast or multicast) and IP version (IPv4 or IPv6), allowing up to 4 default pools total. */ isDefault: boolean; silo: NameOrId; }; @@ -2786,7 +2953,9 @@ export type IpPoolResultsPage = { */ export type IpPoolSiloLink = { ipPoolId: string; - /** When a pool is the default for a silo, floating IPs and instance ephemeral IPs will come from that pool when no other pool is specified. There can be at most one default for a given silo. */ + /** When a pool is the default for a silo, floating IPs and instance ephemeral IPs will come from that pool when no other pool is specified. + +A silo can have at most one default pool per combination of pool type (unicast or multicast) and IP version (IPv4 or IPv6), allowing up to 4 default pools total. */ isDefault: boolean; siloId: string; }; @@ -2802,7 +2971,9 @@ export type IpPoolSiloLinkResultsPage = { }; export type IpPoolSiloUpdate = { - /** When a pool is the default for a silo, floating IPs and instance ephemeral IPs will come from that pool when no other pool is specified. There can be at most one default for a given silo, so when a pool is made default, an existing default will remain linked but will no longer be the default. */ + /** When a pool is the default for a silo, floating IPs and instance ephemeral IPs will come from that pool when no other pool is specified. + +A silo can have at most one default pool per combination of pool type (unicast or multicast) and IP version (IPv4 or IPv6), allowing up to 4 default pools total. When a pool is made default, an existing default of the same type and version will remain linked but will no longer be the default. */ isDefault: boolean; }; @@ -3022,7 +3193,7 @@ export type LoopbackAddressCreate = { anycast: boolean; /** The subnet mask to use for the address. */ mask: number; - /** The containing the switch this loopback address will be configured on. */ + /** The rack containing the switch this loopback address will be configured on. */ rackId: string; /** The location of the switch within the rack this loopback address will be configured on. */ switchLocation: Name; @@ -3066,6 +3237,156 @@ export type MetricType = /** The value represents an accumulation between two points in time. */ | "cumulative"; +/** + * View of a Multicast Group + */ +export type MulticastGroup = { + /** human-readable free-form text about a resource */ + description: string; + /** unique, immutable, system-controlled identifier for each resource */ + id: string; + /** The ID of the IP pool this resource belongs to. */ + ipPoolId: string; + /** The multicast IP address held by this resource. */ + multicastIp: string; + /** Multicast VLAN (MVLAN) for egress multicast traffic to upstream networks. None means no VLAN tagging on egress. */ + mvlan?: number | null; + /** unique, mutable, user-controlled identifier for each resource */ + name: Name; + /** Source IP addresses for Source-Specific Multicast (SSM). Empty array means any source is allowed. */ + sourceIps: string[]; + /** Current state of the multicast group. */ + state: string; + /** timestamp when this resource was created */ + timeCreated: Date; + /** timestamp when this resource was last modified */ + timeModified: Date; +}; + +/** + * Create-time parameters for a multicast group. + */ +export type MulticastGroupCreate = { + description: string; + /** The multicast IP address to allocate. If None, one will be allocated from the default pool. */ + multicastIp?: string | null; + /** Multicast VLAN (MVLAN) for egress multicast traffic to upstream networks. Tags packets leaving the rack to traverse VLAN-segmented upstream networks. + +Valid range: 2-4094 (VLAN IDs 0-1 are reserved by IEEE 802.1Q standard). */ + mvlan?: number | null; + name: Name; + /** Name or ID of the IP pool to allocate from. If None, uses the default multicast pool. */ + pool?: NameOrId | null; + /** Source IP addresses for Source-Specific Multicast (SSM). + +None uses default behavior (Any-Source Multicast). Empty list explicitly allows any source (Any-Source Multicast). Non-empty list restricts to specific sources (SSM). */ + sourceIps?: string[] | null; +}; + +/** + * View of a Multicast Group Member (instance belonging to a multicast group) + */ +export type MulticastGroupMember = { + /** human-readable free-form text about a resource */ + description: string; + /** unique, immutable, system-controlled identifier for each resource */ + id: string; + /** The ID of the instance that is a member of this group. */ + instanceId: string; + /** The ID of the multicast group this member belongs to. */ + multicastGroupId: string; + /** unique, mutable, user-controlled identifier for each resource */ + name: Name; + /** Current state of the multicast group membership. */ + state: string; + /** timestamp when this resource was created */ + timeCreated: Date; + /** timestamp when this resource was last modified */ + timeModified: Date; +}; + +/** + * Parameters for adding an instance to a multicast group. + */ +export type MulticastGroupMemberAdd = { + /** Name or ID of the instance to add to the multicast group */ + instance: NameOrId; +}; + +/** + * A single page of results + */ +export type MulticastGroupMemberResultsPage = { + /** list of items on this page of results */ + items: MulticastGroupMember[]; + /** token used to fetch the next page of results (if any) */ + nextPage?: string | null; +}; + +/** + * A single page of results + */ +export type MulticastGroupResultsPage = { + /** list of items on this page of results */ + items: MulticastGroup[]; + /** token used to fetch the next page of results (if any) */ + nextPage?: string | null; +}; + +/** + * Update-time parameters for a multicast group. + */ +export type MulticastGroupUpdate = { + description?: string | null; + /** Multicast VLAN (MVLAN) for egress multicast traffic to upstream networks. Set to null to clear the MVLAN. Valid range: 2-4094 when provided. Omit the field to leave mvlan unchanged. */ + mvlan?: number | null; + name?: Name | null; + sourceIps?: string[] | null; +}; + +/** + * VPC-private IPv4 configuration for a network interface. + */ +export type PrivateIpv4Config = { + /** VPC-private IP address. */ + ip: string; + /** The IP subnet. */ + subnet: Ipv4Net; + /** Additional networks on which the interface can send / receive traffic. */ + transitIps?: Ipv4Net[]; +}; + +/** + * VPC-private IPv6 configuration for a network interface. + */ +export type PrivateIpv6Config = { + /** VPC-private IP address. */ + ip: string; + /** The IP subnet. */ + subnet: Ipv6Net; + /** Additional networks on which the interface can send / receive traffic. */ + transitIps: Ipv6Net[]; +}; + +/** + * VPC-private IP address configuration for a network interface. + */ +export type PrivateIpConfig = + /** The interface has only an IPv4 configuration. */ + | { type: "v4"; value: PrivateIpv4Config } + /** The interface has only an IPv6 configuration. */ + | { type: "v6"; value: PrivateIpv6Config } + /** The interface is dual-stack. */ + | { + type: "dual_stack"; + value: { + /** The interface's IPv4 configuration. */ + v4: PrivateIpv4Config; + /** The interface's IPv6 configuration. */ + v6: PrivateIpv6Config; + }; + }; + /** * The type of network interface */ @@ -3087,14 +3408,12 @@ export type Vni = number; */ export type NetworkInterface = { id: string; - ip: string; + ipConfig: PrivateIpConfig; kind: NetworkInterfaceKind; mac: MacAddr; name: Name; primary: boolean; slot: number; - subnet: IpNet; - transitIps?: IpNet[]; vni: Vni; }; @@ -3257,8 +3576,9 @@ export type Probe = { */ export type ProbeCreate = { description: string; - ipPool?: NameOrId | null; name: Name; + /** Pool to allocate from. */ + poolSelector?: PoolSelector; sled: string; }; @@ -3700,10 +4020,16 @@ export type SiloIpPool = { description: string; /** unique, immutable, system-controlled identifier for each resource */ id: string; - /** When a pool is the default for a silo, floating IPs and instance ephemeral IPs will come from that pool when no other pool is specified. There can be at most one default for a given silo. */ + /** The IP version for the pool. */ + ipVersion: IpVersion; + /** When a pool is the default for a silo, floating IPs and instance ephemeral IPs will come from that pool when no other pool is specified. + +A silo can have at most one default pool per combination of pool type (unicast or multicast) and IP version (IPv4 or IPv6), allowing up to 4 default pools total. */ isDefault: boolean; /** unique, mutable, user-controlled identifier for each resource */ name: Name; + /** Type of IP pool (unicast or multicast). */ + poolType: IpPoolType; /** timestamp when this resource was created */ timeCreated: Date; /** timestamp when this resource was last modified */ @@ -5659,6 +5985,32 @@ export interface InstanceEphemeralIpDetachQueryParams { project?: NameOrId; } +export interface InstanceMulticastGroupListPathParams { + instance: NameOrId; +} + +export interface InstanceMulticastGroupListQueryParams { + project?: NameOrId; +} + +export interface InstanceMulticastGroupJoinPathParams { + instance: NameOrId; + multicastGroup: NameOrId; +} + +export interface InstanceMulticastGroupJoinQueryParams { + project?: NameOrId; +} + +export interface InstanceMulticastGroupLeavePathParams { + instance: NameOrId; + multicastGroup: NameOrId; +} + +export interface InstanceMulticastGroupLeaveQueryParams { + project?: NameOrId; +} + export interface InstanceRebootPathParams { instance: NameOrId; } @@ -5855,6 +6207,51 @@ export interface SiloMetricQueryParams { project?: NameOrId; } +export interface MulticastGroupListQueryParams { + limit?: number | null; + pageToken?: string | null; + sortBy?: NameOrIdSortMode; +} + +export interface MulticastGroupViewPathParams { + multicastGroup: NameOrId; +} + +export interface MulticastGroupUpdatePathParams { + multicastGroup: NameOrId; +} + +export interface MulticastGroupDeletePathParams { + multicastGroup: NameOrId; +} + +export interface MulticastGroupMemberListPathParams { + multicastGroup: NameOrId; +} + +export interface MulticastGroupMemberListQueryParams { + limit?: number | null; + pageToken?: string | null; + sortBy?: IdSortMode; +} + +export interface MulticastGroupMemberAddPathParams { + multicastGroup: NameOrId; +} + +export interface MulticastGroupMemberAddQueryParams { + project?: NameOrId; +} + +export interface MulticastGroupMemberRemovePathParams { + instance: NameOrId; + multicastGroup: NameOrId; +} + +export interface MulticastGroupMemberRemoveQueryParams { + project?: NameOrId; +} + export interface InstanceNetworkInterfaceListQueryParams { instance?: NameOrId; limit?: number | null; @@ -6209,6 +6606,10 @@ export interface SystemMetricQueryParams { silo?: NameOrId; } +export interface LookupMulticastGroupByIpPathParams { + address: string; +} + export interface NetworkingAddressLotListQueryParams { limit?: number | null; pageToken?: string | null; @@ -6687,7 +7088,7 @@ export class Api { * Pulled from info.version in the OpenAPI schema. Sent in the * `api-version` header on all requests. */ - apiVersion = "20251008.0.0"; + apiVersion = "2026010500.0.0"; constructor({ host = "", baseParams = {}, token }: ApiConfig = {}) { this.host = host; @@ -8212,6 +8613,66 @@ export class Api { ...params, }); }, + /** + * List multicast groups for instance + */ + instanceMulticastGroupList: ( + { + path, + query = {}, + }: { + path: InstanceMulticastGroupListPathParams; + query?: InstanceMulticastGroupListQueryParams; + }, + params: FetchParams = {}, + ) => { + return this.request({ + path: `/v1/instances/${path.instance}/multicast-groups`, + method: "GET", + query, + ...params, + }); + }, + /** + * Join multicast group. + */ + instanceMulticastGroupJoin: ( + { + path, + query = {}, + }: { + path: InstanceMulticastGroupJoinPathParams; + query?: InstanceMulticastGroupJoinQueryParams; + }, + params: FetchParams = {}, + ) => { + return this.request({ + path: `/v1/instances/${path.instance}/multicast-groups/${path.multicastGroup}`, + method: "PUT", + query, + ...params, + }); + }, + /** + * Leave multicast group. + */ + instanceMulticastGroupLeave: ( + { + path, + query = {}, + }: { + path: InstanceMulticastGroupLeavePathParams; + query?: InstanceMulticastGroupLeaveQueryParams; + }, + params: FetchParams = {}, + ) => { + return this.request({ + path: `/v1/instances/${path.instance}/multicast-groups/${path.multicastGroup}`, + method: "DELETE", + query, + ...params, + }); + }, /** * Reboot an instance */ @@ -8664,6 +9125,140 @@ export class Api { ...params, }); }, + /** + * List all multicast groups. + */ + multicastGroupList: ( + { query = {} }: { query?: MulticastGroupListQueryParams }, + params: FetchParams = {}, + ) => { + return this.request({ + path: `/v1/multicast-groups`, + method: "GET", + query, + ...params, + }); + }, + /** + * Create a multicast group. + */ + multicastGroupCreate: ( + { body }: { body: MulticastGroupCreate }, + params: FetchParams = {}, + ) => { + return this.request({ + path: `/v1/multicast-groups`, + method: "POST", + body, + ...params, + }); + }, + /** + * Fetch a multicast group. + */ + multicastGroupView: ( + { path }: { path: MulticastGroupViewPathParams }, + params: FetchParams = {}, + ) => { + return this.request({ + path: `/v1/multicast-groups/${path.multicastGroup}`, + method: "GET", + ...params, + }); + }, + /** + * Update a multicast group. + */ + multicastGroupUpdate: ( + { + path, + body, + }: { path: MulticastGroupUpdatePathParams; body: MulticastGroupUpdate }, + params: FetchParams = {}, + ) => { + return this.request({ + path: `/v1/multicast-groups/${path.multicastGroup}`, + method: "PUT", + body, + ...params, + }); + }, + /** + * Delete a multicast group. + */ + multicastGroupDelete: ( + { path }: { path: MulticastGroupDeletePathParams }, + params: FetchParams = {}, + ) => { + return this.request({ + path: `/v1/multicast-groups/${path.multicastGroup}`, + method: "DELETE", + ...params, + }); + }, + /** + * List members of a multicast group. + */ + multicastGroupMemberList: ( + { + path, + query = {}, + }: { + path: MulticastGroupMemberListPathParams; + query?: MulticastGroupMemberListQueryParams; + }, + params: FetchParams = {}, + ) => { + return this.request({ + path: `/v1/multicast-groups/${path.multicastGroup}/members`, + method: "GET", + query, + ...params, + }); + }, + /** + * Add instance to a multicast group. + */ + multicastGroupMemberAdd: ( + { + path, + query = {}, + body, + }: { + path: MulticastGroupMemberAddPathParams; + query?: MulticastGroupMemberAddQueryParams; + body: MulticastGroupMemberAdd; + }, + params: FetchParams = {}, + ) => { + return this.request({ + path: `/v1/multicast-groups/${path.multicastGroup}/members`, + method: "POST", + body, + query, + ...params, + }); + }, + /** + * Remove instance from a multicast group. + */ + multicastGroupMemberRemove: ( + { + path, + query = {}, + }: { + path: MulticastGroupMemberRemovePathParams; + query?: MulticastGroupMemberRemoveQueryParams; + }, + params: FetchParams = {}, + ) => { + return this.request({ + path: `/v1/multicast-groups/${path.multicastGroup}/members/${path.instance}`, + method: "DELETE", + query, + ...params, + }); + }, /** * List network interfaces */ @@ -9685,6 +10280,19 @@ export class Api { ...params, }); }, + /** + * Look up multicast group by IP address. + */ + lookupMulticastGroupByIp: ( + { path }: { path: LookupMulticastGroupByIpPathParams }, + params: FetchParams = {}, + ) => { + return this.request({ + path: `/v1/system/multicast-groups/by-ip/${path.address}`, + method: "GET", + ...params, + }); + }, /** * List address lots */ diff --git a/oxide-openapi-gen-ts/src/__snapshots__/Api.ts b/oxide-openapi-gen-ts/src/__snapshots__/Api.ts index 6ab15cd..14d8c98 100644 --- a/oxide-openapi-gen-ts/src/__snapshots__/Api.ts +++ b/oxide-openapi-gen-ts/src/__snapshots__/Api.ts @@ -9,7 +9,7 @@ /** * An IPv4 subnet * -* An IPv4 subnet, including prefix and prefix length +* An IPv4 subnet, including prefix and subnet mask */ export type Ipv4Net = string; @@ -30,7 +30,7 @@ export type IpNet = /** * 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. +* 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 though they may contain a UUID. */ export type Name = string; @@ -48,9 +48,7 @@ export type Address = /** The address and prefix length of this address. */ "address": IpNet, /** The address lot this address is drawn from. */ -"addressLot": NameOrId, -/** Optional VLAN ID for this address */ -"vlanId"?: number | null,}; +"addressLot": NameOrId,}; /** * A set of addresses associated with a port configuration. @@ -58,9 +56,7 @@ export type Address = export type AddressConfig = { /** The set of addresses assigned to the port configuration. */ -"addresses": (Address)[], -/** Link to assign the addresses to. On ports that are not broken out, this is always phy0. On a 2x breakout the options are phy0 and phy1, on 4x phy0-phy3, etc. */ -"linkName": Name,}; +"addresses": (Address)[],}; /** * The kind associated with an address lot. @@ -155,138 +151,148 @@ export type AddressLotResultsPage = "nextPage"?: string | null,}; /** -* An address lot and associated blocks resulting from viewing an address lot. +* Properties that uniquely identify an Oxide hardware component */ -export type AddressLotViewResponse = -{ -/** The address lot blocks. */ -"blocks": (AddressLotBlock)[], -/** The address lot. */ -"lot": AddressLot,}; +export type Baseboard = +{"part": string,"revision": number,"serial": string,}; + +export type BfdMode = +"single_hop" +| "multi_hop" +; /** -* Describes the scope of affinity for the purposes of co-location. +* Information needed to disable a BFD session */ -export type FailureDomain = -"sled" -; +export type BfdSessionDisable = +{ +/** Address of the remote peer to disable a BFD session for. */ +"remote": string, +/** The switch to enable this session on. Must be `switch0` or `switch1`. */ +"switch": Name,}; /** -* Affinity policy used to describe "what to do when a request cannot be satisfied" -* -* Used for both Affinity and Anti-Affinity Groups +* Information about a bidirectional forwarding detection (BFD) session. */ -export type AffinityPolicy = -(/** If the affinity request cannot be satisfied, allow it anyway. +export type BfdSessionEnable = +{ +/** The negotiated Control packet transmission interval, multiplied by this variable, will be the Detection Time for this session (as seen by the remote system) */ +"detectionThreshold": number, +/** Address the Oxide switch will listen on for BFD traffic. If `None` then the unspecified address (0.0.0.0 or ::) is used. */ +"local"?: string | null, +/** Select either single-hop (RFC 5881) or multi-hop (RFC 5883) */ +"mode": BfdMode, +/** Address of the remote peer to establish a BFD session with. */ +"remote": string, +/** The minimum interval, in microseconds, between received BFD Control packets that this system requires */ +"requiredRx": number, +/** The switch to enable this session on. Must be `switch0` or `switch1`. */ +"switch": Name,}; + +export type BfdState = +(/** A stable down state. Non-responsive to incoming messages. */ +| "admin_down" + +/** The initial state. */ +| "down" -This enables a "best-effort" attempt to satisfy the affinity policy. */ -| "allow" +/** The peer has detected a remote peer in the down state. */ +| "init" -/** If the affinity request cannot be satisfied, fail explicitly. */ -| "fail" +/** The peer has detected a remote peer in the up or init state while in the init state. */ +| "up" ); +export type BfdStatus = +{"detectionThreshold": number,"local"?: string | null,"mode": BfdMode,"peer": string,"requiredRx": number,"state": BfdState,"switch": Name,}; + /** -* View of an Affinity Group +* Represents a BGP announce set by id. The id can be used with other API calls to view and manage the announce set. */ -export type AffinityGroup = +export type BgpAnnounceSet = { /** human-readable free-form text about a resource */ -"description": string,"failureDomain": FailureDomain, +"description": string, /** unique, immutable, system-controlled identifier for each resource */ "id": string, /** unique, mutable, user-controlled identifier for each resource */ -"name": Name,"policy": AffinityPolicy,"projectId": string, +"name": Name, /** timestamp when this resource was created */ "timeCreated": Date, /** timestamp when this resource was last modified */ "timeModified": Date,}; /** -* Create-time parameters for an `AffinityGroup` +* A BGP announcement tied to a particular address lot block. */ -export type AffinityGroupCreate = -{"description": string,"failureDomain": FailureDomain,"name": Name,"policy": AffinityPolicy,}; +export type BgpAnnouncementCreate = +{ +/** Address lot this announcement is drawn from. */ +"addressLotBlock": NameOrId, +/** The network being announced. */ +"network": IpNet,}; /** -* 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 +* Parameters for creating a named set of BGP announcements. */ -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 BgpAnnounceSetCreate = +{ +/** The announcements in this set. */ +"announcement": (BgpAnnouncementCreate)[],"description": string,"name": Name,}; -); +/** +* A BGP announcement tied to an address lot block. + */ +export type BgpAnnouncement = +{ +/** The address block the IP network being announced is drawn from. */ +"addressLotBlockId": string, +/** The id of the set this announcement is a part of. */ +"announceSetId": string, +/** The IP network being announced. */ +"network": IpNet,}; /** -* A member of an Affinity Group -* -* Membership in a group is not exclusive - members may belong to multiple affinity / anti-affinity groups. -* -* Affinity Groups can contain up to 32 members. +* A base BGP configuration. */ -export type AffinityGroupMember = -{"type": "instance" -,"value": {"id": string,"name": Name,"runState": InstanceState,},}; +export type BgpConfig = +{ +/** The autonomous system number of this BGP configuration. */ +"asn": number, +/** human-readable free-form text about a resource */ +"description": string, +/** unique, immutable, system-controlled identifier for each resource */ +"id": string, +/** unique, mutable, user-controlled identifier for each resource */ +"name": Name, +/** timestamp when this resource was created */ +"timeCreated": Date, +/** timestamp when this resource was last modified */ +"timeModified": Date, +/** Optional virtual routing and forwarding identifier for this BGP configuration. */ +"vrf"?: string | null,}; /** -* A single page of results +* Parameters for creating a BGP configuration. This includes and autonomous system number (ASN) and a virtual routing and forwarding (VRF) identifier. */ -export type AffinityGroupMemberResultsPage = +export type BgpConfigCreate = { -/** list of items on this page of results */ -"items": (AffinityGroupMember)[], -/** token used to fetch the next page of results (if any) */ -"nextPage"?: string | null,}; +/** The autonomous system number of this BGP configuration. */ +"asn": number,"bgpAnnounceSetId": NameOrId,"description": string,"name": Name, +/** Optional virtual routing and forwarding identifier for this BGP configuration. */ +"vrf"?: Name | null,}; /** * A single page of results */ -export type AffinityGroupResultsPage = +export type BgpConfigResultsPage = { /** list of items on this page of results */ -"items": (AffinityGroup)[], +"items": (BgpConfig)[], /** token used to fetch the next page of results (if any) */ "nextPage"?: string | null,}; -/** -* Updateable properties of an `AffinityGroup` - */ -export type AffinityGroupUpdate = -{"description"?: string | null,"name"?: Name | null,}; - -export type BgpMessageHistory = -Record; - /** * Identifies switch physical location */ @@ -300,2395 +306,1818 @@ export type SwitchLocation = ); /** -* BGP message history for a particular switch. +* A route imported from a BGP peer. */ -export type SwitchBgpHistory = +export type BgpImportedRouteIpv4 = { -/** Message history indexed by peer address. */ -"history": Record, -/** Switch this message history is associated with. */ +/** BGP identifier of the originating router. */ +"id": number, +/** The nexthop the prefix is reachable through. */ +"nexthop": string, +/** The destination network prefix. */ +"prefix": Ipv4Net, +/** Switch the route is imported into. */ "switch": SwitchLocation,}; /** -* BGP message history for rack switches. +* 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. */ -export type AggregateBgpMessageHistory = +export type BgpPeer = { -/** BGP history organized by switch. */ -"switchHistories": (SwitchBgpHistory)[],}; +/** The address of the host to peer with. */ +"addr": string, +/** The set of announcements advertised by the peer. */ +"bgpAnnounceSet": NameOrId, +/** The global BGP configuration used for establishing a session with this peer. */ +"bgpConfig": NameOrId, +/** How long to to wait between TCP connection retries (seconds). */ +"connectRetry": number, +/** How long to delay sending an open request after establishing a TCP session (seconds). */ +"delayOpen": number, +/** How long to hold peer connections between keppalives (seconds). */ +"holdTime": number, +/** How long to hold a peer in idle before attempting a new session (seconds). */ +"idleHoldTime": number, +/** The name of interface to peer on. This is relative to the port configuration this BGP peer configuration is a part of. For example this value could be phy0 to refer to a primary physical interface. Or it could be vlan47 to refer to a VLAN interface. */ +"interfaceName": string, +/** How often to send keepalive requests (seconds). */ +"keepalive": number,}; -/** -* An alert class. - */ -export type AlertClass = -{ -/** A description of what this alert class represents. */ -"description": string, -/** The name of the alert class. */ -"name": string,}; +export type BgpPeerConfig = +{"peers": (BgpPeer)[],}; /** -* A single page of results +* The current state of a BGP peer. */ -export type AlertClassResultsPage = -{ -/** list of items on this page of results */ -"items": (AlertClass)[], -/** token used to fetch the next page of results (if any) */ -"nextPage"?: string | null,}; +export type BgpPeerState = +(/** Initial state. Refuse all incomming BGP connections. No resources allocated to peer. */ +| "idle" -/** -* The response received from a webhook receiver endpoint. - */ -export type WebhookDeliveryResponse = -{ -/** The response time of the webhook endpoint, in milliseconds. */ -"durationMs": number, -/** The HTTP status code returned from the webhook endpoint. */ -"status": number,}; +/** Waiting for the TCP connection to be completed. */ +| "connect" + +/** Trying to acquire peer by listening for and accepting a TCP connection. */ +| "active" -export type WebhookDeliveryAttemptResult = -(/** The webhook event has been delivered successfully. */ -| "succeeded" +/** Waiting for open message from peer. */ +| "open_sent" -/** A webhook request was sent to the endpoint, and it returned a HTTP error status code indicating an error. */ -| "failed_http_error" +/** Waiting for keepaliave or notification from peer. */ +| "open_confirm" -/** The webhook request could not be sent to the receiver endpoint. */ -| "failed_unreachable" +/** Synchronizing with peer. */ +| "session_setup" -/** A connection to the receiver endpoint was successfully established, but no response was received within the delivery timeout. */ -| "failed_timeout" +/** Session established. Able to exchange update, notification and keepliave messages with peers. */ +| "established" ); /** -* An individual delivery attempt for a webhook event. -* -* This represents a single HTTP request that was sent to the receiver, and its outcome. +* The current status of a BGP peer. */ -export type WebhookDeliveryAttempt = +export type BgpPeerStatus = { -/** The attempt number. */ -"attempt": number,"response"?: WebhookDeliveryResponse | null, -/** The outcome of this delivery attempt: either the event was delivered successfully, or the request failed for one of several reasons. */ -"result": WebhookDeliveryAttemptResult, -/** The time at which the webhook delivery was attempted. */ -"timeSent": Date,}; +/** IP address of the peer. */ +"addr": string, +/** Local autonomous system number. */ +"localAsn": number, +/** Remote autonomous system number. */ +"remoteAsn": number, +/** State of the peer. */ +"state": BgpPeerState, +/** Time of last state change. */ +"stateDurationMillis": number, +/** Switch with the peer session. */ +"switch": SwitchLocation,}; /** -* A list of attempts to deliver an alert to a receiver. +* A type storing a range over `T`. * -* The type of the delivery attempt model depends on the receiver type, as it may contain information specific to that delivery mechanism. For example, webhook delivery attempts contain the HTTP status code of the webhook request. - */ -export type AlertDeliveryAttempts = -{"webhook": (WebhookDeliveryAttempt)[],}; - -/** -* The state of a webhook delivery attempt. +* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. */ -export type AlertDeliveryState = -(/** The webhook event has not yet been delivered successfully. - -Either no delivery attempts have yet been performed, or the delivery has failed at least once but has retries remaining. */ -| "pending" - -/** The webhook event has been delivered successfully. */ -| "delivered" - -/** The webhook delivery attempt has failed permanently and will not be retried again. */ -| "failed" - +export type BinRangedouble = +(/** A range unbounded below and exclusively above, `..end`. */ +| {"end": number,"type": "range_to" +,} +/** A range bounded inclusively below and exclusively above, `start..end`. */ +| {"end": number,"start": number,"type": "range" +,} +/** A range bounded inclusively below and unbounded above, `start..`. */ +| {"start": number,"type": "range_from" +,} ); /** -* The reason an alert was delivered +* A type storing a range over `T`. +* +* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. */ -export type AlertDeliveryTrigger = -(/** Delivery was triggered by the alert itself. */ -| "alert" - -/** Delivery was triggered by a request to resend the alert. */ -| "resend" - -/** This delivery is a liveness probe. */ -| "probe" - +export type BinRangefloat = +(/** A range unbounded below and exclusively above, `..end`. */ +| {"end": number,"type": "range_to" +,} +/** A range bounded inclusively below and exclusively above, `start..end`. */ +| {"end": number,"start": number,"type": "range" +,} +/** A range bounded inclusively below and unbounded above, `start..`. */ +| {"start": number,"type": "range_from" +,} ); /** -* A delivery of a webhook event. +* A type storing a range over `T`. +* +* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. */ -export type AlertDelivery = -{ -/** The event class. */ -"alertClass": string, -/** The UUID of the event. */ -"alertId": string, -/** Individual attempts to deliver this webhook event, and their outcomes. */ -"attempts": AlertDeliveryAttempts, -/** The UUID of this delivery attempt. */ -"id": string, -/** The UUID of the alert receiver that this event was delivered to. */ -"receiverId": string, -/** The state of this delivery. */ -"state": AlertDeliveryState, -/** The time at which this delivery began (i.e. the event was dispatched to the receiver). */ -"timeStarted": Date, -/** Why this delivery was performed. */ -"trigger": AlertDeliveryTrigger,}; - -export type AlertDeliveryId = -{"deliveryId": string,}; +export type BinRangeint16 = +(/** A range unbounded below and exclusively above, `..end`. */ +| {"end": number,"type": "range_to" +,} +/** A range bounded inclusively below and exclusively above, `start..end`. */ +| {"end": number,"start": number,"type": "range" +,} +/** A range bounded inclusively below and unbounded above, `start..`. */ +| {"start": number,"type": "range_from" +,} +); /** -* A single page of results +* A type storing a range over `T`. +* +* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. */ -export type AlertDeliveryResultsPage = -{ -/** list of items on this page of results */ -"items": (AlertDelivery)[], -/** token used to fetch the next page of results (if any) */ -"nextPage"?: string | null,}; +export type BinRangeint32 = +(/** A range unbounded below and exclusively above, `..end`. */ +| {"end": number,"type": "range_to" +,} +/** A range bounded inclusively below and exclusively above, `start..end`. */ +| {"end": number,"start": number,"type": "range" +,} +/** A range bounded inclusively below and unbounded above, `start..`. */ +| {"start": number,"type": "range_from" +,} +); /** -* Data describing the result of an alert receiver liveness probe attempt. +* A type storing a range over `T`. +* +* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. */ -export type AlertProbeResult = -{ -/** The outcome of the probe delivery. */ -"probe": AlertDelivery, -/** If the probe request succeeded, and resending failed deliveries on success was requested, the number of new delivery attempts started. Otherwise, if the probe did not succeed, or resending failed deliveries was not requested, this is null. - -Note that this may be 0, if there were no events found which had not been delivered successfully to this receiver. */ -"resendsStarted"?: number | null,}; +export type BinRangeint64 = +(/** A range unbounded below and exclusively above, `..end`. */ +| {"end": number,"type": "range_to" +,} +/** A range bounded inclusively below and exclusively above, `start..end`. */ +| {"end": number,"start": number,"type": "range" +,} +/** A range bounded inclusively below and unbounded above, `start..`. */ +| {"start": number,"type": "range_from" +,} +); /** -* A view of a shared secret key assigned to a webhook receiver. +* A type storing a range over `T`. * -* Once a secret is created, the value of the secret is not available in the API, as it must remain secret. Instead, secrets are referenced by their unique IDs assigned when they are created. +* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. */ -export type WebhookSecret = -{ -/** The public unique ID of the secret. */ -"id": string, -/** The UTC timestamp at which this secret was created. */ -"timeCreated": Date,}; +export type BinRangeint8 = +(/** A range unbounded below and exclusively above, `..end`. */ +| {"end": number,"type": "range_to" +,} +/** A range bounded inclusively below and exclusively above, `start..end`. */ +| {"end": number,"start": number,"type": "range" +,} +/** A range bounded inclusively below and unbounded above, `start..`. */ +| {"start": number,"type": "range_from" +,} +); /** -* The possible alert delivery mechanisms for an alert receiver. +* A type storing a range over `T`. +* +* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. */ -export type AlertReceiverKind = -{ -/** The URL that webhook notification requests are sent to. */ -"endpoint": string,"kind": "webhook" -,"secrets": (WebhookSecret)[],}; +export type BinRangeuint16 = +(/** A range unbounded below and exclusively above, `..end`. */ +| {"end": number,"type": "range_to" +,} +/** A range bounded inclusively below and exclusively above, `start..end`. */ +| {"end": number,"start": number,"type": "range" +,} +/** A range bounded inclusively below and unbounded above, `start..`. */ +| {"start": number,"type": "range_from" +,} +); /** -* A webhook event class subscription +* A type storing a range over `T`. * -* A webhook event class subscription matches either a single event class exactly, or a glob pattern including wildcards that may match multiple event classes +* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. */ -export type AlertSubscription = -string; +export type BinRangeuint32 = +(/** A range unbounded below and exclusively above, `..end`. */ +| {"end": number,"type": "range_to" +,} +/** A range bounded inclusively below and exclusively above, `start..end`. */ +| {"end": number,"start": number,"type": "range" +,} +/** A range bounded inclusively below and unbounded above, `start..`. */ +| {"start": number,"type": "range_from" +,} +); /** -* The configuration for an alert receiver. +* A type storing a range over `T`. +* +* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. */ -export type AlertReceiver = -{ -/** human-readable free-form text about a resource */ -"description": string, -/** unique, immutable, system-controlled identifier for each resource */ -"id": string, -/** Configuration specific to the kind of alert receiver that this is. */ -"kind": AlertReceiverKind, -/** unique, mutable, user-controlled identifier for each resource */ -"name": Name, -/** The list of alert classes to which this receiver is subscribed. */ -"subscriptions": (AlertSubscription)[], -/** timestamp when this resource was created */ -"timeCreated": Date, -/** timestamp when this resource was last modified */ -"timeModified": Date,}; +export type BinRangeuint64 = +(/** A range unbounded below and exclusively above, `..end`. */ +| {"end": number,"type": "range_to" +,} +/** A range bounded inclusively below and exclusively above, `start..end`. */ +| {"end": number,"start": number,"type": "range" +,} +/** A range bounded inclusively below and unbounded above, `start..`. */ +| {"start": number,"type": "range_from" +,} +); /** -* A single page of results +* A type storing a range over `T`. +* +* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. */ -export type AlertReceiverResultsPage = -{ -/** list of items on this page of results */ -"items": (AlertReceiver)[], -/** token used to fetch the next page of results (if any) */ -"nextPage"?: string | null,}; - -export type AlertSubscriptionCreate = -{ -/** The event class pattern to subscribe to. */ -"subscription": AlertSubscription,}; +export type BinRangeuint8 = +(/** A range unbounded below and exclusively above, `..end`. */ +| {"end": number,"type": "range_to" +,} +/** A range bounded inclusively below and exclusively above, `start..end`. */ +| {"end": number,"start": number,"type": "range" +,} +/** A range bounded inclusively below and unbounded above, `start..`. */ +| {"start": number,"type": "range_from" +,} +); -export type AlertSubscriptionCreated = +/** +* Type storing bin edges and a count of samples within it. + */ +export type Bindouble = { -/** The new subscription added to the receiver. */ -"subscription": AlertSubscription,}; +/** The total count of samples in this bin. */ +"count": number, +/** The range of the support covered by this bin. */ +"range": BinRangedouble,}; /** -* Description of source IPs allowed to reach rack services. +* Type storing bin edges and a count of samples within it. */ -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)[],} -); +export type Binfloat = +{ +/** The total count of samples in this bin. */ +"count": number, +/** The range of the support covered by this bin. */ +"range": BinRangefloat,}; /** -* Allowlist of IPs or subnets that can make requests to user-facing services. +* Type storing bin edges and a count of samples within it. */ -export type AllowList = +export type Binint16 = { -/** The allowlist of IPs or subnets. */ -"allowedIps": AllowedSourceIps, -/** Time the list was created. */ -"timeCreated": Date, -/** Time the list was last modified. */ -"timeModified": Date,}; +/** The total count of samples in this bin. */ +"count": number, +/** The range of the support covered by this bin. */ +"range": BinRangeint16,}; /** -* Parameters for updating allowed source IPs +* Type storing bin edges and a count of samples within it. */ -export type AllowListUpdate = +export type Binint32 = { -/** The new list of allowed source IPs. */ -"allowedIps": AllowedSourceIps,}; +/** The total count of samples in this bin. */ +"count": number, +/** The range of the support covered by this bin. */ +"range": BinRangeint32,}; /** -* View of an Anti-Affinity Group +* Type storing bin edges and a count of samples within it. */ -export type AntiAffinityGroup = +export type Binint64 = { -/** human-readable free-form text about a resource */ -"description": string,"failureDomain": FailureDomain, -/** unique, immutable, system-controlled identifier for each resource */ -"id": string, -/** unique, mutable, user-controlled identifier for each resource */ -"name": Name,"policy": AffinityPolicy,"projectId": string, -/** timestamp when this resource was created */ -"timeCreated": Date, -/** timestamp when this resource was last modified */ -"timeModified": Date,}; +/** The total count of samples in this bin. */ +"count": number, +/** The range of the support covered by this bin. */ +"range": BinRangeint64,}; /** -* Create-time parameters for an `AntiAffinityGroup` +* Type storing bin edges and a count of samples within it. */ -export type AntiAffinityGroupCreate = -{"description": string,"failureDomain": FailureDomain,"name": Name,"policy": AffinityPolicy,}; +export type Binint8 = +{ +/** The total count of samples in this bin. */ +"count": number, +/** The range of the support covered by this bin. */ +"range": BinRangeint8,}; /** -* A member of an Anti-Affinity Group -* -* Membership in a group is not exclusive - members may belong to multiple affinity / anti-affinity groups. -* -* Anti-Affinity Groups can contain up to 32 members. +* Type storing bin edges and a count of samples within it. */ -export type AntiAffinityGroupMember = -{"type": "instance" -,"value": {"id": string,"name": Name,"runState": InstanceState,},}; +export type Binuint16 = +{ +/** The total count of samples in this bin. */ +"count": number, +/** The range of the support covered by this bin. */ +"range": BinRangeuint16,}; /** -* A single page of results +* Type storing bin edges and a count of samples within it. */ -export type AntiAffinityGroupMemberResultsPage = +export type Binuint32 = { -/** list of items on this page of results */ -"items": (AntiAffinityGroupMember)[], -/** token used to fetch the next page of results (if any) */ -"nextPage"?: string | null,}; +/** The total count of samples in this bin. */ +"count": number, +/** The range of the support covered by this bin. */ +"range": BinRangeuint32,}; /** -* A single page of results +* Type storing bin edges and a count of samples within it. */ -export type AntiAffinityGroupResultsPage = +export type Binuint64 = { -/** list of items on this page of results */ -"items": (AntiAffinityGroup)[], -/** token used to fetch the next page of results (if any) */ -"nextPage"?: string | null,}; +/** The total count of samples in this bin. */ +"count": number, +/** The range of the support covered by this bin. */ +"range": BinRangeuint64,}; /** -* Updateable properties of an `AntiAffinityGroup` +* Type storing bin edges and a count of samples within it. */ -export type AntiAffinityGroupUpdate = -{"description"?: string | null,"name"?: Name | null,}; - -export type AuditLogEntryActor = -(| {"kind": "user_builtin" -,"userBuiltinId": string,} -| {"kind": "silo_user" -,"siloId": string,"siloUserId": string,} -| {"kind": "scim" -,"siloId": string,} -| {"kind": "unauthenticated" -,} -); +export type Binuint8 = +{ +/** The total count of samples in this bin. */ +"count": number, +/** The range of the support covered by this bin. */ +"range": BinRangeuint8,}; /** -* Result of an audit log entry +* disk block size in bytes */ -export type AuditLogEntryResult = -(/** The operation completed successfully */ -| { -/** HTTP status code */ -"httpStatusCode": number,"kind": "success" -,} -/** The operation failed */ -| {"errorCode"?: string | null,"errorMessage": string, -/** HTTP status code */ -"httpStatusCode": number,"kind": "error" -,} -/** After the logged operation completed, our attempt to write the result to the audit log failed, so it was automatically marked completed later by a background job. This does not imply that the operation itself timed out or failed, only our attempts to log its result. */ -| {"kind": "unknown" -,} -); +export type BlockSize = +512 +| 2048 +| 4096 +; /** -* Audit log entry +* Byte count to express memory or storage capacity. */ -export type AuditLogEntry = -{"actor": AuditLogEntryActor, -/** How the user authenticated the request. Possible values are "session_cookie" and "access_token". Optional because it will not be defined on unauthenticated requests like login attempts. */ -"authMethod"?: string | null, -/** Unique identifier for the audit log entry */ -"id": string, -/** API endpoint ID, e.g., `project_create` */ -"operationId": string, -/** Request ID for tracing requests through the system */ -"requestId": string, -/** URI of the request, truncated to 512 characters. Will only include host and scheme for HTTP/2 requests. For HTTP/1.1, the URI will consist of only the path and query. */ -"requestUri": string, -/** Result of the operation */ -"result": AuditLogEntryResult, -/** IP address that made the request */ -"sourceIp": string, -/** Time operation completed */ -"timeCompleted": Date, -/** When the request was received */ -"timeStarted": Date, -/** User agent string from the request, truncated to 256 characters. */ -"userAgent"?: string | null,}; +export type ByteCount = +number; /** -* A single page of results +* The service intended to use this certificate. */ -export type AuditLogEntryResultsPage = -{ -/** list of items on this page of results */ -"items": (AuditLogEntry)[], -/** token used to fetch the next page of results (if any) */ -"nextPage"?: string | null,}; +export type ServiceUsingCertificate = +"external_api" +; /** -* Authorization scope for a timeseries. -* -* This describes the level at which a user must be authorized to read data from a timeseries. For example, fleet-scoping means the data is only visible to an operator or fleet reader. Project-scoped, on the other hand, indicates that a user will see data limited to the projects on which they have read permissions. +* View of a Certificate */ -export type AuthzScope = -(/** Timeseries data is limited to fleet readers. */ -| "fleet" - -/** Timeseries data is limited to the authorized silo for a user. */ -| "silo" - -/** Timeseries data is limited to the authorized projects for a user. */ -| "project" - -/** The timeseries is viewable to all without limitation. */ -| "viewable_to_all" - -); - -/** -* Properties that uniquely identify an Oxide hardware component - */ -export type Baseboard = -{"part": string,"revision": number,"serial": string,}; - -/** -* BFD connection mode. - */ -export type BfdMode = -"single_hop" -| "multi_hop" -; - -/** -* Information needed to disable a BFD session - */ -export type BfdSessionDisable = -{ -/** Address of the remote peer to disable a BFD session for. */ -"remote": string, -/** The switch to enable this session on. Must be `switch0` or `switch1`. */ -"switch": Name,}; - -/** -* Information about a bidirectional forwarding detection (BFD) session. - */ -export type BfdSessionEnable = -{ -/** The negotiated Control packet transmission interval, multiplied by this variable, will be the Detection Time for this session (as seen by the remote system) */ -"detectionThreshold": number, -/** Address the Oxide switch will listen on for BFD traffic. If `None` then the unspecified address (0.0.0.0 or ::) is used. */ -"local"?: string | null, -/** Select either single-hop (RFC 5881) or multi-hop (RFC 5883) */ -"mode": BfdMode, -/** Address of the remote peer to establish a BFD session with. */ -"remote": string, -/** The minimum interval, in microseconds, between received BFD Control packets that this system requires */ -"requiredRx": number, -/** The switch to enable this session on. Must be `switch0` or `switch1`. */ -"switch": Name,}; - -export type BfdState = -(/** A stable down state. Non-responsive to incoming messages. */ -| "admin_down" - -/** The initial state. */ -| "down" - -/** The peer has detected a remote peer in the down state. */ -| "init" - -/** The peer has detected a remote peer in the up or init state while in the init state. */ -| "up" - -); - -export type BfdStatus = -{"detectionThreshold": number,"local"?: string | null,"mode": BfdMode,"peer": string,"requiredRx": number,"state": BfdState,"switch": Name,}; - -/** -* Represents a BGP announce set by id. The id can be used with other API calls to view and manage the announce set. - */ -export type BgpAnnounceSet = +export type Certificate = { /** human-readable free-form text about a resource */ "description": string, /** unique, immutable, system-controlled identifier for each resource */ "id": string, /** unique, mutable, user-controlled identifier for each resource */ -"name": Name, +"name": Name,"service": ServiceUsingCertificate, /** timestamp when this resource was created */ "timeCreated": Date, /** timestamp when this resource was last modified */ "timeModified": Date,}; /** -* A BGP announcement tied to a particular address lot block. +* Create-time parameters for a `Certificate` */ -export type BgpAnnouncementCreate = +export type CertificateCreate = { -/** Address lot this announcement is drawn from. */ -"addressLotBlock": NameOrId, -/** The network being announced. */ -"network": IpNet,}; +/** PEM-formatted string containing public certificate chain */ +"cert": string,"description": string, +/** PEM-formatted string containing private key */ +"key": string,"name": Name, +/** The service using this certificate */ +"service": ServiceUsingCertificate,}; /** -* Parameters for creating a named set of BGP announcements. +* A single page of results */ -export type BgpAnnounceSetCreate = +export type CertificateResultsPage = { -/** The announcements in this set. */ -"announcement": (BgpAnnouncementCreate)[],"description": string,"name": Name,}; +/** list of items on this page of results */ +"items": (Certificate)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; /** -* A BGP announcement tied to an address lot block. +* A cumulative or counter data type. */ -export type BgpAnnouncement = -{ -/** The address block the IP network being announced is drawn from. */ -"addressLotBlockId": string, -/** The id of the set this announcement is a part of. */ -"announceSetId": string, -/** The IP network being announced. */ -"network": IpNet,}; +export type Cumulativedouble = +{"startTime": Date,"value": number,}; /** -* A base BGP configuration. +* A cumulative or counter data type. */ -export type BgpConfig = -{ -/** The autonomous system number of this BGP configuration. */ -"asn": number, -/** human-readable free-form text about a resource */ -"description": string, -/** unique, immutable, system-controlled identifier for each resource */ -"id": string, -/** unique, mutable, user-controlled identifier for each resource */ -"name": Name, -/** timestamp when this resource was created */ -"timeCreated": Date, -/** timestamp when this resource was last modified */ -"timeModified": Date, -/** Optional virtual routing and forwarding identifier for this BGP configuration. */ -"vrf"?: string | null,}; +export type Cumulativefloat = +{"startTime": Date,"value": number,}; /** -* Parameters for creating a BGP configuration. This includes and autonomous system number (ASN) and a virtual routing and forwarding (VRF) identifier. +* A cumulative or counter data type. */ -export type BgpConfigCreate = -{ -/** The autonomous system number of this BGP configuration. */ -"asn": number,"bgpAnnounceSetId": NameOrId,"description": string,"name": Name, -/** Optional virtual routing and forwarding identifier for this BGP configuration. */ -"vrf"?: Name | null,}; +export type Cumulativeint64 = +{"startTime": Date,"value": number,}; /** -* A single page of results +* A cumulative or counter data type. */ -export type BgpConfigResultsPage = -{ -/** list of items on this page of results */ -"items": (BgpConfig)[], -/** token used to fetch the next page of results (if any) */ -"nextPage"?: string | null,}; +export type Cumulativeuint64 = +{"startTime": Date,"value": number,}; /** -* The current status of a BGP peer. +* Info about the current user */ -export type BgpExported = +export type CurrentUser = { -/** Exported routes indexed by peer address. */ -"exports": Record,}; +/** Human-readable name that can identify the user */ +"displayName": string,"id": string, +/** Uuid of the silo to which this user belongs */ +"siloId": string, +/** Name of the silo to which this user belongs. */ +"siloName": Name,}; /** -* A route imported from a BGP peer. +* 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 BgpImportedRouteIpv4 = -{ -/** BGP identifier of the originating router. */ -"id": number, -/** The nexthop the prefix is reachable through. */ -"nexthop": string, -/** The destination network prefix. */ -"prefix": Ipv4Net, -/** Switch the route is imported into. */ -"switch": SwitchLocation,}; +export type Histogramint8 = +{"bins": (Binint8)[],"nSamples": number,"startTime": Date,}; /** -* Define policy relating to the import and export of prefixes from a BGP peer. +* 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 ImportExportPolicy = -(/** Do not perform any filtering. */ -| {"type": "no_filtering" -,} -| {"type": "allow" -,"value": (IpNet)[],} -); +export type Histogramuint8 = +{"bins": (Binuint8)[],"nSamples": number,"startTime": Date,}; /** -* 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. +* 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 BgpPeer = -{ -/** The address of the host to peer with. */ -"addr": string, -/** Define export policy for a peer. */ -"allowedExport": ImportExportPolicy, -/** Define import policy for a peer. */ -"allowedImport": ImportExportPolicy, -/** The global BGP configuration used for establishing a session with this peer. */ -"bgpConfig": NameOrId, -/** Include the provided communities in updates sent to the peer. */ -"communities": (number)[], -/** How long to to wait between TCP connection retries (seconds). */ -"connectRetry": number, -/** How long to delay sending an open request after establishing a TCP session (seconds). */ -"delayOpen": number, -/** Enforce that the first AS in paths received from this peer is the peer's AS. */ -"enforceFirstAs": boolean, -/** How long to hold peer connections between keepalives (seconds). */ -"holdTime": number, -/** How long to hold a peer in idle before attempting a new session (seconds). */ -"idleHoldTime": number, -/** The name of interface to peer on. This is relative to the port configuration this BGP peer configuration is a part of. For example this value could be phy0 to refer to a primary physical interface. Or it could be vlan47 to refer to a VLAN interface. */ -"interfaceName": Name, -/** How often to send keepalive requests (seconds). */ -"keepalive": number, -/** Apply a local preference to routes received from this peer. */ -"localPref"?: number | null, -/** Use the given key for TCP-MD5 authentication with the peer. */ -"md5AuthKey"?: string | null, -/** Require messages from a peer have a minimum IP time to live field. */ -"minTtl"?: number | null, -/** Apply the provided multi-exit discriminator (MED) updates sent to the peer. */ -"multiExitDiscriminator"?: number | null, -/** Require that a peer has a specified ASN. */ -"remoteAsn"?: number | null, -/** Associate a VLAN ID with a peer. */ -"vlanId"?: number | null,}; - -export type BgpPeerConfig = -{ -/** Link that the peer is reachable on. On ports that are not broken out, this is always phy0. On a 2x breakout the options are phy0 and phy1, on 4x phy0-phy3, etc. */ -"linkName": Name,"peers": (BgpPeer)[],}; +export type Histogramint16 = +{"bins": (Binint16)[],"nSamples": number,"startTime": Date,}; /** -* The current state of a BGP peer. +* 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 BgpPeerState = -(/** Initial state. Refuse all incoming BGP connections. No resources allocated to peer. */ -| "idle" - -/** Waiting for the TCP connection to be completed. */ -| "connect" - -/** Trying to acquire peer by listening for and accepting a TCP connection. */ -| "active" - -/** Waiting for open message from peer. */ -| "open_sent" - -/** Waiting for keepaliave or notification from peer. */ -| "open_confirm" - -/** Synchronizing with peer. */ -| "session_setup" - -/** Session established. Able to exchange update, notification and keepalive messages with peers. */ -| "established" - -); +export type Histogramuint16 = +{"bins": (Binuint16)[],"nSamples": number,"startTime": Date,}; /** -* The current status of a BGP peer. +* 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 BgpPeerStatus = -{ -/** IP address of the peer. */ -"addr": string, -/** Local autonomous system number. */ -"localAsn": number, -/** Remote autonomous system number. */ -"remoteAsn": number, -/** State of the peer. */ -"state": BgpPeerState, -/** Time of last state change. */ -"stateDurationMillis": number, -/** Switch with the peer session. */ -"switch": SwitchLocation,}; +export type Histogramint32 = +{"bins": (Binint32)[],"nSamples": number,"startTime": Date,}; /** -* A type storing a range over `T`. +* Histogram metric * -* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. +* 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 BinRangedouble = -(/** A range unbounded below and exclusively above, `..end`. */ -| {"end": number,"type": "range_to" -,} -/** A range bounded inclusively below and exclusively above, `start..end`. */ -| {"end": number,"start": number,"type": "range" -,} -/** A range bounded inclusively below and unbounded above, `start..`. */ -| {"start": number,"type": "range_from" -,} -); +export type Histogramuint32 = +{"bins": (Binuint32)[],"nSamples": number,"startTime": Date,}; /** -* A type storing a range over `T`. +* Histogram metric * -* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. +* 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 BinRangefloat = -(/** A range unbounded below and exclusively above, `..end`. */ -| {"end": number,"type": "range_to" -,} -/** A range bounded inclusively below and exclusively above, `start..end`. */ -| {"end": number,"start": number,"type": "range" -,} -/** A range bounded inclusively below and unbounded above, `start..`. */ -| {"start": number,"type": "range_from" -,} -); +export type Histogramint64 = +{"bins": (Binint64)[],"nSamples": number,"startTime": Date,}; /** -* A type storing a range over `T`. +* Histogram metric * -* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. +* 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 BinRangeint16 = -(/** A range unbounded below and exclusively above, `..end`. */ -| {"end": number,"type": "range_to" -,} -/** A range bounded inclusively below and exclusively above, `start..end`. */ -| {"end": number,"start": number,"type": "range" -,} -/** A range bounded inclusively below and unbounded above, `start..`. */ -| {"start": number,"type": "range_from" -,} -); +export type Histogramuint64 = +{"bins": (Binuint64)[],"nSamples": number,"startTime": Date,}; /** -* A type storing a range over `T`. +* Histogram metric * -* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. +* 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 BinRangeint32 = -(/** A range unbounded below and exclusively above, `..end`. */ -| {"end": number,"type": "range_to" -,} -/** A range bounded inclusively below and exclusively above, `start..end`. */ -| {"end": number,"start": number,"type": "range" -,} -/** A range bounded inclusively below and unbounded above, `start..`. */ -| {"start": number,"type": "range_from" -,} -); +export type Histogramfloat = +{"bins": (Binfloat)[],"nSamples": number,"startTime": Date,}; /** -* A type storing a range over `T`. +* Histogram metric * -* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. +* 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 BinRangeint64 = -(/** A range unbounded below and exclusively above, `..end`. */ -| {"end": number,"type": "range_to" -,} -/** A range bounded inclusively below and exclusively above, `start..end`. */ -| {"end": number,"start": number,"type": "range" -,} -/** A range bounded inclusively below and unbounded above, `start..`. */ -| {"start": number,"type": "range_from" -,} -); +export type Histogramdouble = +{"bins": (Bindouble)[],"nSamples": number,"startTime": Date,}; /** -* A type storing a range over `T`. -* -* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. +* The type of an individual datum of a metric. */ -export type BinRangeint8 = -(/** A range unbounded below and exclusively above, `..end`. */ -| {"end": number,"type": "range_to" -,} -/** A range bounded inclusively below and exclusively above, `start..end`. */ -| {"end": number,"start": number,"type": "range" -,} -/** A range bounded inclusively below and unbounded above, `start..`. */ -| {"start": number,"type": "range_from" -,} -); +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 | null,}; /** -* A type storing a range over `T`. -* -* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. +* A `Datum` is a single sampled data point from a metric. */ -export type BinRangeuint16 = -(/** A range unbounded below and exclusively above, `..end`. */ -| {"end": number,"type": "range_to" +export type Datum = +(| {"datum": boolean,"type": "bool" ,} -/** A range bounded inclusively below and exclusively above, `start..end`. */ -| {"end": number,"start": number,"type": "range" +| {"datum": number,"type": "i8" ,} -/** A range bounded inclusively below and unbounded above, `start..`. */ -| {"start": number,"type": "range_from" +| {"datum": number,"type": "u8" ,} -); - -/** -* A type storing a range over `T`. -* -* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. - */ -export type BinRangeuint32 = -(/** A range unbounded below and exclusively above, `..end`. */ -| {"end": number,"type": "range_to" +| {"datum": number,"type": "i16" ,} -/** A range bounded inclusively below and exclusively above, `start..end`. */ -| {"end": number,"start": number,"type": "range" +| {"datum": number,"type": "u16" ,} -/** A range bounded inclusively below and unbounded above, `start..`. */ -| {"start": number,"type": "range_from" +| {"datum": number,"type": "i32" ,} -); - -/** -* A type storing a range over `T`. -* -* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. - */ -export type BinRangeuint64 = -(/** A range unbounded below and exclusively above, `..end`. */ -| {"end": number,"type": "range_to" +| {"datum": number,"type": "u32" ,} -/** A range bounded inclusively below and exclusively above, `start..end`. */ -| {"end": number,"start": number,"type": "range" +| {"datum": number,"type": "i64" ,} -/** A range bounded inclusively below and unbounded above, `start..`. */ -| {"start": number,"type": "range_from" +| {"datum": number,"type": "u64" ,} -); - -/** -* A type storing a range over `T`. -* -* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. - */ -export type BinRangeuint8 = -(/** A range unbounded below and exclusively above, `..end`. */ -| {"end": number,"type": "range_to" +| {"datum": number,"type": "f32" ,} -/** A range bounded inclusively below and exclusively above, `start..end`. */ -| {"end": number,"start": number,"type": "range" +| {"datum": number,"type": "f64" ,} -/** A range bounded inclusively below and unbounded above, `start..`. */ -| {"start": number,"type": "range_from" +| {"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" ,} ); -/** -* Type storing bin edges and a count of samples within it. - */ -export type Bindouble = +export type DerEncodedKeyPair = { -/** The total count of samples in this bin. */ -"count": number, -/** The range of the support covered by this bin. */ -"range": BinRangedouble,}; +/** request signing private key (base64 encoded der file) */ +"privateKey": string, +/** request signing public certificate (base64 encoded der file) */ +"publicCert": string,}; -/** -* Type storing bin edges and a count of samples within it. - */ -export type Binfloat = -{ -/** The total count of samples in this bin. */ -"count": number, -/** The range of the support covered by this bin. */ -"range": BinRangefloat,}; +export type DeviceAccessTokenRequest = +{"clientId": string,"deviceCode": string,"grantType": string,}; -/** -* Type storing bin edges and a count of samples within it. - */ -export type Binint16 = -{ -/** The total count of samples in this bin. */ -"count": number, -/** The range of the support covered by this bin. */ -"range": BinRangeint16,}; +export type DeviceAuthRequest = +{"clientId": string,}; -/** -* Type storing bin edges and a count of samples within it. - */ -export type Binint32 = -{ -/** The total count of samples in this bin. */ -"count": number, -/** The range of the support covered by this bin. */ -"range": BinRangeint32,}; +export type DeviceAuthVerify = +{"userCode": string,}; -/** -* Type storing bin edges and a count of samples within it. - */ -export type Binint64 = -{ -/** The total count of samples in this bin. */ -"count": number, -/** The range of the support covered by this bin. */ -"range": BinRangeint64,}; +export type Digest = +{"type": "sha256" +,"value": string,}; /** -* Type storing bin edges and a count of samples within it. +* State of a Disk */ -export type Binint8 = -{ -/** The total count of samples in this bin. */ -"count": number, -/** The range of the support covered by this bin. */ -"range": BinRangeint8,}; +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" +,} +); /** -* Type storing bin edges and a count of samples within it. +* View of a Disk */ -export type Binuint16 = -{ -/** The total count of samples in this bin. */ -"count": number, -/** The range of the support covered by this bin. */ -"range": BinRangeuint16,}; +export type Disk = +{"blockSize": ByteCount, +/** human-readable free-form text about a resource */ +"description": string,"devicePath": string, +/** unique, immutable, system-controlled identifier for each resource */ +"id": string, +/** ID of image from which disk was created, if any */ +"imageId"?: string | null, +/** unique, mutable, user-controlled identifier for each resource */ +"name": Name,"projectId": string,"size": ByteCount, +/** ID of snapshot from which disk was created, if any */ +"snapshotId"?: string | null,"state": DiskState, +/** timestamp when this resource was created */ +"timeCreated": Date, +/** timestamp when this resource was last modified */ +"timeModified": Date,}; /** -* Type storing bin edges and a count of samples within it. +* Different sources for a disk */ -export type Binuint32 = -{ -/** The total count of samples in this bin. */ -"count": number, -/** The range of the support covered by this bin. */ -"range": BinRangeuint32,}; +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" +,} +); /** -* Type storing bin edges and a count of samples within it. +* Create-time parameters for a `Disk` */ -export type Binuint64 = -{ -/** The total count of samples in this bin. */ -"count": number, -/** The range of the support covered by this bin. */ -"range": BinRangeuint64,}; +export type DiskCreate = +{"description": string, +/** initial source for this disk */ +"diskSource": DiskSource,"name": Name, +/** total size of the Disk in bytes */ +"size": ByteCount,}; -/** -* Type storing bin edges and a count of samples within it. - */ -export type Binuint8 = +export type DiskPath = { -/** The total count of samples in this bin. */ -"count": number, -/** The range of the support covered by this bin. */ -"range": BinRangeuint8,}; - -/** -* disk block size in bytes - */ -export type BlockSize = -512 -| 2048 -| 4096 -; - -/** -* Byte count to express memory or storage capacity. - */ -export type ByteCount = -number; +/** Name or ID of the disk */ +"disk": NameOrId,}; /** -* The service intended to use this certificate. +* A single page of results */ -export type ServiceUsingCertificate = -"external_api" -; +export type DiskResultsPage = +{ +/** list of items on this page of results */ +"items": (Disk)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; /** -* View of a Certificate +* Parameters for creating an ephemeral IP address for an instance. */ -export type Certificate = +export type EphemeralIpCreate = { -/** PEM-formatted string containing public certificate chain */ -"cert": string, +/** Name or ID of the IP pool used to allocate an address */ +"pool"?: NameOrId | null,}; + +export type ExternalIp = +(| {"ip": string,"kind": "ephemeral" +,} +/** A Floating IP is a well-known IP address which can be attached and detached from instances. */ +| { /** human-readable free-form text about a resource */ "description": string, /** unique, immutable, system-controlled identifier for each resource */ "id": string, +/** The ID of the instance that this Floating IP is attached to, if it is presently in use. */ +"instanceId"?: string | null, +/** The IP address held by this resource. */ +"ip": string,"kind": "floating" +, /** unique, mutable, user-controlled identifier for each resource */ "name": Name, -/** The service using this certificate */ -"service": ServiceUsingCertificate, +/** The project this resource exists within. */ +"projectId": string, /** timestamp when this resource was created */ "timeCreated": Date, /** timestamp when this resource was last modified */ -"timeModified": Date,}; +"timeModified": Date,} +); /** -* Create-time parameters for a `Certificate` +* Parameters for creating an external IP address for instances. */ -export type CertificateCreate = -{ -/** PEM-formatted string containing public certificate chain */ -"cert": string,"description": string, -/** PEM-formatted string containing private key */ -"key": string,"name": Name, -/** The service using this certificate */ -"service": ServiceUsingCertificate,}; +export type ExternalIpCreate = +(/** An IP address providing both inbound and outbound access. The address is automatically-assigned from the provided IP Pool, or the current silo's default pool if not specified. */ +| {"pool"?: NameOrId | null,"type": "ephemeral" +,} +/** An IP address providing both inbound and outbound access. The address is an existing floating IP object assigned to the current project. + +The floating IP must not be in use by another instance or service. */ +| {"floatingIp": NameOrId,"type": "floating" +,} +); /** * A single page of results */ -export type CertificateResultsPage = +export type ExternalIpResultsPage = { /** list of items on this page of results */ -"items": (Certificate)[], +"items": (ExternalIp)[], /** token used to fetch the next page of results (if any) */ "nextPage"?: string | null,}; /** -* View of a console session +* Parameters for finalizing a disk */ -export type ConsoleSession = +export type FinalizeDisk = { -/** A unique, immutable, system-controlled identifier for the session */ -"id": string,"timeCreated": Date,"timeLastUsed": Date,}; +/** If specified a snapshot of the disk will be created with the given name during finalization. If not specified, a snapshot for the disk will _not_ be created. A snapshot can be manually created once the disk transitions into the `Detached` state. */ +"snapshotName"?: Name | null,}; -/** -* A single page of results - */ -export type ConsoleSessionResultsPage = -{ -/** list of items on this page of results */ -"items": (ConsoleSession)[], -/** token used to fetch the next page of results (if any) */ -"nextPage"?: string | null,}; +export type FleetRole = +"admin" +| "collaborator" +| "viewer" +; /** -* A cumulative or counter data type. +* Describes what kind of identity is described by an id */ -export type Cumulativedouble = -{"startTime": Date,"value": number,}; +export type IdentityType = +"silo_user" +| "silo_group" +; /** -* A cumulative or counter data type. +* 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 Cumulativefloat = -{"startTime": Date,"value": number,}; +export type FleetRoleRoleAssignment = +{"identityId": string,"identityType": IdentityType,"roleName": FleetRole,}; /** -* A cumulative or counter data type. - */ -export type Cumulativeint64 = -{"startTime": Date,"value": number,}; - -/** -* A cumulative or counter data type. +* 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 Cumulativeuint64 = -{"startTime": Date,"value": number,}; +export type FleetRolePolicy = +{ +/** Roles directly assigned on this resource */ +"roleAssignments": (FleetRoleRoleAssignment)[],}; /** -* Info about the current user +* A Floating IP is a well-known IP address which can be attached and detached from instances. */ -export type CurrentUser = +export type FloatingIp = { -/** Human-readable name that can identify the user */ -"displayName": string, -/** Whether this user has the viewer role on the fleet. Used by the web console to determine whether to show system-level UI. */ -"fleetViewer": boolean,"id": string, -/** Whether this user has the admin role on their silo. Used by the web console to determine whether to show admin-only UI elements. */ -"siloAdmin": boolean, -/** Uuid of the silo to which this user belongs */ -"siloId": string, -/** Name of the silo to which this user belongs. */ -"siloName": Name,}; +/** human-readable free-form text about a resource */ +"description": string, +/** unique, immutable, system-controlled identifier for each resource */ +"id": string, +/** The ID of the instance that this Floating IP is attached to, if it is presently in use. */ +"instanceId"?: string | null, +/** The IP address held by this resource. */ +"ip": string, +/** unique, mutable, user-controlled identifier for each resource */ +"name": Name, +/** The project this resource exists within. */ +"projectId": string, +/** timestamp when this resource was created */ +"timeCreated": Date, +/** timestamp when this resource was last modified */ +"timeModified": Date,}; /** -* 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. +* The type of resource that a floating IP is attached to */ -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 FloatingIpParentKind = +"instance" +; /** -* 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. +* Parameters for attaching a floating IP address to another resource */ -export type Histogramint8 = +export type FloatingIpAttach = { -/** 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,}; +/** The type of `parent`'s resource */ +"kind": FloatingIpParentKind, +/** Name or ID of the resource that this IP address should be attached to */ +"parent": NameOrId,}; /** -* 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. +* Parameters for creating a new floating IP address for instances. */ -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,}; +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 | null,"name": Name, +/** The parent IP pool that a floating IP is pulled from. If unset, the default pool is selected. */ +"pool"?: NameOrId | null,}; /** -* 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. +* A single page of results */ -export type Histogramint16 = +export type FloatingIpResultsPage = { -/** 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,}; +/** list of items on this page of results */ +"items": (FloatingIp)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; /** -* 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. +* Updateable identity-related parameters */ -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,}; +export type FloatingIpUpdate = +{"description"?: string | null,"name"?: Name | null,}; /** -* 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. +* View of a Group */ -export type Histogramint32 = +export type Group = { -/** 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,}; +/** Human-readable name that can identify the group */ +"displayName": string,"id": string, +/** Uuid of the silo to which this group belongs */ +"siloId": 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. +* A single page of results */ -export type Histogramuint32 = +export type GroupResultsPage = { -/** 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,}; +/** list of items on this page of results */ +"items": (Group)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; /** -* 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. +* An RFC-1035-compliant hostname * -* Note that any gaps, unsorted bins, or non-finite values will result in an error. +* A hostname identifies a host on a network, and is usually a dot-delimited sequence of labels, where each label contains only letters, digits, or the hyphen. See RFCs 1035 and 952 for more details. */ -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,}; +export type Hostname = +string; + +export type IdentityProviderType = +"saml" +; /** -* 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. +* View of an Identity Provider */ -export type Histogramuint64 = +export type IdentityProvider = { -/** 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,}; +/** human-readable free-form text about a resource */ +"description": string, +/** unique, immutable, system-controlled identifier for each resource */ +"id": string, +/** unique, mutable, user-controlled identifier for each resource */ +"name": Name, +/** Identity provider type */ +"providerType": IdentityProviderType, +/** timestamp when this resource was created */ +"timeCreated": Date, +/** timestamp when this resource was last modified */ +"timeModified": Date,}; /** -* 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. +* A single page of results */ -export type Histogramfloat = +export type IdentityProviderResultsPage = { -/** 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,}; +/** list of items on this page of results */ +"items": (IdentityProvider)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; + +export type IdpMetadataSource = +(| {"type": "url" +,"url": string,} +| {"data": string,"type": "base64_encoded_xml" +,} +); /** -* 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. +* View of an image * -* Note that any gaps, unsorted bins, or non-finite values will result in an error. +* If `project_id` is present then the image is only visible inside that project. If it's not present then the image is visible to all projects in the silo. */ -export type Histogramdouble = +export type Image = { -/** 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,}; +/** size of blocks in bytes */ +"blockSize": ByteCount, +/** human-readable free-form text about a resource */ +"description": string, +/** Hash of the image contents, if applicable */ +"digest"?: Digest | null, +/** unique, immutable, system-controlled identifier for each resource */ +"id": string, +/** unique, mutable, user-controlled identifier for each resource */ +"name": Name, +/** The family of the operating system like Debian, Ubuntu, etc. */ +"os": string, +/** ID of the parent project if the image is a project image */ +"projectId"?: string | null, +/** total size in bytes */ +"size": ByteCount, +/** timestamp when this resource was created */ +"timeCreated": Date, +/** timestamp when this resource was last modified */ +"timeModified": Date, +/** Version of the operating system */ +"version": string,}; /** -* The type of an individual datum of a metric. +* The source of the underlying image. */ -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 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" +,} +); -export type MissingDatum = -{"datumType": DatumType,"startTime"?: Date | null,}; +/** +* Create-time parameters for an `Image` + */ +export type ImageCreate = +{"description": string,"name": Name, +/** The family of the operating system (e.g. Debian, Ubuntu, etc.) */ +"os": string, +/** The source of the image's contents. */ +"source": ImageSource, +/** The version of the operating system (e.g. 18.04, 20.04, etc.) */ +"version": string,}; /** -* A `Datum` is a single sampled data point from a metric. +* A single page of results */ -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 = +export type ImageResultsPage = { -/** request signing RSA private key in PKCS#1 format (base64 encoded der file) */ -"privateKey": string, -/** request signing public certificate (base64 encoded der file) */ -"publicCert": string,}; +/** list of items on this page of results */ +"items": (Image)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; /** -* View of a device access token +* Parameters for importing blocks with a bulk write */ -export type DeviceAccessToken = -{ -/** A unique, immutable, system-controlled identifier for the token. Note that this ID is not the bearer token itself, which starts with "oxide-token-" */ -"id": string,"timeCreated": Date, -/** Expiration timestamp. A null value means the token does not automatically expire. */ -"timeExpires"?: Date | null,}; +export type ImportBlocksBulkWrite = +{"base64EncodedData": string,"offset": number,}; -export type DeviceAccessTokenRequest = -{"clientId": string,"deviceCode": string,"grantType": string,}; +/** +* The number of CPUs in an Instance + */ +export type InstanceCpuCount = +number; /** -* A single page of results +* 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 DeviceAccessTokenResultsPage = -{ -/** list of items on this page of results */ -"items": (DeviceAccessToken)[], -/** token used to fetch the next page of results (if any) */ -"nextPage"?: string | null,}; +export type InstanceState = +(/** The instance is being created. */ +| "creating" -export type DeviceAuthRequest = -{"clientId": string, -/** Optional lifetime for the access token in seconds. If not specified, the silo's max TTL will be used (if set). */ -"ttlSeconds"?: number | null,}; +/** The instance is currently starting up. */ +| "starting" -export type DeviceAuthVerify = -{"userCode": string,}; +/** The instance is currently running. */ +| "running" -export type Digest = -{"type": "sha256" -,"value": string,}; +/** 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" -/** -* 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 an Instance */ -export type Disk = -{"blockSize": ByteCount, +export type Instance = +{ /** human-readable free-form text about a resource */ -"description": string,"devicePath": string, +"description": string, +/** RFC1035-compliant hostname for the Instance. */ +"hostname": string, /** unique, immutable, system-controlled identifier for each resource */ "id": string, -/** ID of image from which disk was created, if any */ -"imageId"?: string | null, +/** memory allocated for this Instance */ +"memory": ByteCount, /** unique, mutable, user-controlled identifier for each resource */ -"name": Name,"projectId": string,"size": ByteCount, -/** ID of snapshot from which disk was created, if any */ -"snapshotId"?: string | null,"state": DiskState, +"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,}; +"timeModified": Date,"timeRunStateUpdated": Date,}; /** -* Different sources for a disk +* Describe the instance's disks at creation time */ -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" +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" ,} -/** Create a blank disk that will accept bulk writes or pull blocks from an external source. */ -| {"blockSize": BlockSize,"type": "importing_blocks" +/** During instance creation, attach this disk */ +| { +/** A disk name to attach */ +"name": Name,"type": "attach" ,} ); /** -* Create-time parameters for a `Disk` +* Create-time parameters for an `InstanceNetworkInterface` */ -export type DiskCreate = +export type InstanceNetworkInterfaceCreate = {"description": string, -/** The initial source for this disk */ -"diskSource": DiskSource,"name": Name, -/** The total size of the Disk (in bytes) */ -"size": ByteCount,}; - -export type DiskPath = -{ -/** Name or ID of the disk */ -"disk": NameOrId,}; +/** The IP address for the interface. One will be auto-assigned if not provided. */ +"ip"?: string | null,"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 +* Describes an attachment of an `InstanceNetworkInterface` to an `Instance`, at the time the instance is created. */ -export type DiskResultsPage = -{ -/** list of items on this page of results */ -"items": (Disk)[], -/** token used to fetch the next page of results (if any) */ -"nextPage"?: string | null,}; +export type InstanceNetworkInterfaceAttachment = +(/** Create one or more `InstanceNetworkInterface`s for the `Instance`. -/** -* 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. -* -* Min, max, and the p-* quantiles are treated as optional due to the possibility of distribution operations, like subtraction. - */ -export type Distributiondouble = -{"bins": (number)[],"counts": (number)[],"max"?: number | null,"min"?: number | null,"p50"?: Quantile | null,"p90"?: Quantile | null,"p99"?: Quantile | null,"squaredMean": number,"sumOfSamples": number,}; +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" +,} +); /** -* 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. -* -* Min, max, and the p-* quantiles are treated as optional due to the possibility of distribution operations, like subtraction. +* Create-time parameters for an `Instance` */ -export type Distributionint64 = -{"bins": (number)[],"counts": (number)[],"max"?: number | null,"min"?: number | null,"p50"?: Quantile | null,"p90"?: Quantile | null,"p99"?: Quantile | null,"squaredMean": number,"sumOfSamples": number,}; +export type InstanceCreate = +{"description": string, +/** The disks to be created or attached for this instance. */ +"disks"?: (InstanceDiskAttachment)[], +/** The external IP addresses provided to this instance. -/** -* Parameters for creating an ephemeral IP address for an instance. - */ -export type EphemeralIpCreate = -{ -/** Name or ID of the IP pool used to allocate an address. If unspecified, the default IP pool will be used. */ -"pool"?: NameOrId | null,}; +By default, all instances have outbound connectivity, but no inbound connectivity. These external addresses can be used to provide a fixed, known IP address for making inbound connections to the instance. */ +"externalIps"?: (ExternalIpCreate)[],"hostname": Hostname,"memory": ByteCount,"name": Name,"ncpus": InstanceCpuCount, +/** The network interfaces to be created for this instance. */ +"networkInterfaces"?: InstanceNetworkInterfaceAttachment, +/** An allowlist of SSH public keys to be transferred to the instance via cloud-init during instance creation. -export type ExternalIp = -(/** A source NAT IP address. +If not provided, all SSH public keys from the user's profile will be sent. If an empty list is provided, no public keys will be transmitted to the instance. */ +"sshPublicKeys"?: (NameOrId)[] | null, +/** Should this instance be started upon creation; true by default. */ +"start"?: boolean, +/** User data for instance initialization systems (such as cloud-init). Must be a Base64-encoded string, as specified in RFC 4648 § 4 (+ and / characters with padding). Maximum 32 KiB unencoded data. */ +"userData"?: string,}; -SNAT addresses are ephemeral addresses used only for outbound connectivity. */ -| { -/** The first usable port within the IP address. */ -"firstPort": number, -/** The IP address. */ -"ip": string, -/** ID of the IP Pool from which the address is taken. */ -"ipPoolId": string,"kind": "snat" -, -/** The last usable port within the IP address. */ -"lastPort": number,} -| {"ip": string,"ipPoolId": string,"kind": "ephemeral" -,} -/** A Floating IP is a well-known IP address which can be attached and detached from instances. */ -| { +/** +* Migration parameters for an `Instance` + */ +export type InstanceMigrate = +{"dstSledId": string,}; + +/** +* A MAC address +* +* A Media Access Control address, in EUI-48 format + */ +export type MacAddr = +string; + +/** +* An `InstanceNetworkInterface` represents a virtual network interface device attached to an instance. + */ +export type InstanceNetworkInterface = +{ /** human-readable free-form text about a resource */ "description": string, /** unique, immutable, system-controlled identifier for each resource */ "id": string, -/** The ID of the instance that this Floating IP is attached to, if it is presently in use. */ -"instanceId"?: string | null, -/** The IP address held by this resource. */ +/** The Instance to which the interface belongs. */ +"instanceId": string, +/** The IP address assigned to this interface. */ "ip": string, -/** The ID of the IP pool this resource belongs to. */ -"ipPoolId": string,"kind": "floating" -, +/** The MAC address assigned to this interface. */ +"mac": MacAddr, /** unique, mutable, user-controlled identifier for each resource */ "name": Name, -/** The project this resource exists within. */ -"projectId": string, +/** True if this interface is the primary for the instance to which it's attached. */ +"primary": boolean, +/** The subnet to which the interface belongs. */ +"subnetId": string, /** timestamp when this resource was created */ "timeCreated": Date, /** timestamp when this resource was last modified */ -"timeModified": Date,} -); - -/** -* Parameters for creating an external IP address for instances. - */ -export type ExternalIpCreate = -(/** An IP address providing both inbound and outbound access. The address is automatically assigned from the provided IP pool or the default IP pool if not specified. */ -| {"pool"?: NameOrId | null,"type": "ephemeral" -,} -/** An IP address providing both inbound and outbound access. The address is an existing floating IP object assigned to the current project. - -The floating IP must not be in use by another instance or service. */ -| {"floatingIp": NameOrId,"type": "floating" -,} -); +"timeModified": Date, +/** The VPC to which the interface belongs. */ +"vpcId": string,}; /** * A single page of results */ -export type ExternalIpResultsPage = +export type InstanceNetworkInterfaceResultsPage = { /** list of items on this page of results */ -"items": (ExternalIp)[], +"items": (InstanceNetworkInterface)[], /** token used to fetch the next page of results (if any) */ "nextPage"?: string | null,}; /** -* The `FieldType` identifies the data type of a target or metric field. - */ -export type FieldType = -"string" -| "i8" -| "u8" -| "i16" -| "u16" -| "i32" -| "u32" -| "i64" -| "u64" -| "ip_addr" -| "uuid" -| "bool" -; - -/** -* The source from which a field is derived, the target or metric. +* Parameters for updating an `InstanceNetworkInterface` +* +* Note that modifying IP addresses for an interface is not yet supported, a new interface must be created instead. */ -export type FieldSource = -"target" -| "metric" -; +export type InstanceNetworkInterfaceUpdate = +{"description"?: string | null,"name"?: Name | null, +/** Make a secondary interface the instance's primary interface. -/** -* The name and type information for a field of a timeseries schema. - */ -export type FieldSchema = -{"description": string,"fieldType": FieldType,"name": string,"source": FieldSource,}; +If applied to a secondary interface, that interface will become the primary on the next reboot of the instance. Note that this may have implications for routing between instances, as the new primary interface will be on a distinct subnet from the previous primary interface. -/** -* The `FieldValue` contains the value of a target or metric field. - */ -export type FieldValue = -(| {"type": "string" -,"value": string,} -| {"type": "i8" -,"value": number,} -| {"type": "u8" -,"value": number,} -| {"type": "i16" -,"value": number,} -| {"type": "u16" -,"value": number,} -| {"type": "i32" -,"value": number,} -| {"type": "u32" -,"value": number,} -| {"type": "i64" -,"value": number,} -| {"type": "u64" -,"value": number,} -| {"type": "ip_addr" -,"value": string,} -| {"type": "uuid" -,"value": string,} -| {"type": "bool" -,"value": boolean,} -); +Note that this can only be used to select a new primary interface for an instance. Requests to change the primary interface into a secondary will return an error. */ +"primary"?: boolean,}; /** -* Parameters for finalizing a disk +* A single page of results */ -export type FinalizeDisk = +export type InstanceResultsPage = { -/** If specified a snapshot of the disk will be created with the given name during finalization. If not specified, a snapshot for the disk will _not_ be created. A snapshot can be manually created once the disk transitions into the `Detached` state. */ -"snapshotName"?: Name | null,}; - -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.) -* -* 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 FleetRoleRoleAssignment = -{"identityId": string,"identityType": IdentityType,"roleName": FleetRole,}; +/** list of items on this page of results */ +"items": (Instance)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; /** -* 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. +* Contents of an Instance's serial console buffer. */ -export type FleetRolePolicy = +export type InstanceSerialConsoleData = { -/** Roles directly assigned on this resource */ -"roleAssignments": (FleetRoleRoleAssignment)[],}; +/** The bytes starting from the requested offset up to either the end of the buffer or the request's `max_bytes`. Provided as a u8 array rather than a string, as it may not be UTF-8. */ +"data": (number)[], +/** The absolute offset since boot (suitable for use as `byte_offset` in a subsequent request) of the last byte returned in `data`. */ +"lastByteOffset": number,}; /** -* A Floating IP is a well-known IP address which can be attached and detached from instances. +* A collection of IP ranges. If a pool is linked to a silo, IP addresses from the pool can be allocated within that silo */ -export type FloatingIp = +export type IpPool = { /** human-readable free-form text about a resource */ "description": string, /** unique, immutable, system-controlled identifier for each resource */ "id": string, -/** The ID of the instance that this Floating IP is attached to, if it is presently in use. */ -"instanceId"?: string | null, -/** The IP address held by this resource. */ -"ip": string, -/** The ID of the IP pool this resource belongs to. */ -"ipPoolId": string, /** unique, mutable, user-controlled identifier for each resource */ "name": Name, -/** The project this resource exists within. */ -"projectId": string, /** timestamp when this resource was created */ "timeCreated": Date, /** timestamp when this resource was last modified */ "timeModified": Date,}; /** -* The type of resource that a floating IP is attached to +* Create-time parameters for an `IpPool` */ -export type FloatingIpParentKind = -"instance" -; +export type IpPoolCreate = +{"description": string,"name": Name,}; + +export type IpPoolLinkSilo = +{ +/** When a pool is the default for a silo, floating IPs and instance ephemeral IPs will come from that pool when no other pool is specified. There can be at most one default for a given silo. */ +"isDefault": boolean,"silo": NameOrId,}; /** -* Parameters for attaching a floating IP address to another resource +* 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 FloatingIpAttach = -{ -/** The type of `parent`'s resource */ -"kind": FloatingIpParentKind, -/** Name or ID of the resource that this IP address should be attached to */ -"parent": NameOrId,}; +export type Ipv4Range = +{"first": string,"last": string,}; /** -* Parameters for creating a new floating IP address for instances. +* 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 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 | null,"name": Name, -/** The parent IP pool that a floating IP is pulled from. If unset, the default pool is selected. */ -"pool"?: NameOrId | null,}; +export type Ipv6Range = +{"first": string,"last": string,}; + +export type IpRange = +(| Ipv4Range +| Ipv6Range +); + +export type IpPoolRange = +{"id": string,"ipPoolId": string,"range": IpRange,"timeCreated": Date,}; /** * A single page of results */ -export type FloatingIpResultsPage = +export type IpPoolRangeResultsPage = { /** list of items on this page of results */ -"items": (FloatingIp)[], +"items": (IpPoolRange)[], /** token used to fetch the next page of results (if any) */ "nextPage"?: string | null,}; /** -* Updateable identity-related parameters +* A single page of results */ -export type FloatingIpUpdate = -{"description"?: string | null,"name"?: Name | null,}; +export type IpPoolResultsPage = +{ +/** list of items on this page of results */ +"items": (IpPool)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; /** -* View of a Group +* A link between an IP pool and a silo that allows one to allocate IPs from the pool within the silo */ -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,}; +export type IpPoolSiloLink = +{"ipPoolId": string, +/** When a pool is the default for a silo, floating IPs and instance ephemeral IPs will come from that pool when no other pool is specified. There can be at most one default for a given silo. */ +"isDefault": boolean,"siloId": string,}; /** * A single page of results */ -export type GroupResultsPage = +export type IpPoolSiloLinkResultsPage = { /** list of items on this page of results */ -"items": (Group)[], +"items": (IpPoolSiloLink)[], /** token used to fetch the next page of results (if any) */ "nextPage"?: string | null,}; +export type IpPoolSiloUpdate = +{ +/** When a pool is the default for a silo, floating IPs and instance ephemeral IPs will come from that pool when no other pool is specified. There can be at most one default for a given silo, so when a pool is made default, an existing default will remain linked but will no longer be the default. */ +"isDefault": boolean,}; + /** -* An RFC-1035-compliant hostname -* -* A hostname identifies a host on a network, and is usually a dot-delimited sequence of labels, where each label contains only letters, digits, or the hyphen. See RFCs 1035 and 952 for more details. +* Parameters for updating an IP Pool */ -export type Hostname = -string; +export type IpPoolUpdate = +{"description"?: string | null,"name"?: Name | null,}; /** -* A range of ICMP(v6) types or codes +* A range of IP ports * -* An inclusive-inclusive range of ICMP(v6) types or codes. The second value may be omitted to represent a single parameter. +* An inclusive-inclusive range of IP ports. The second port may be omitted to represent a single port */ -export type IcmpParamRange = +export type L4PortRange = string; -export type IdentityProviderType = -"saml" -; - /** -* View of an Identity Provider +* The forward error correction mode of a link. */ -export type IdentityProvider = -{ -/** human-readable free-form text about a resource */ -"description": string, -/** unique, immutable, system-controlled identifier for each resource */ -"id": string, -/** unique, mutable, user-controlled identifier for each resource */ -"name": Name, -/** Identity provider type */ -"providerType": IdentityProviderType, -/** timestamp when this resource was created */ -"timeCreated": Date, -/** timestamp when this resource was last modified */ -"timeModified": Date,}; +export type LinkFec = +(/** Firecode foward error correction. */ +| "firecode" + +/** No forward error correction. */ +| "none" + +/** Reed-Solomon forward error correction. */ +| "rs" + +); /** -* A single page of results +* The LLDP configuration associated with a port. LLDP may be either enabled or disabled, if enabled, an LLDP configuration must be provided by name or id. */ -export type IdentityProviderResultsPage = +export type LldpServiceConfigCreate = { -/** list of items on this page of results */ -"items": (IdentityProvider)[], -/** token used to fetch the next page of results (if any) */ -"nextPage"?: string | null,}; +/** Whether or not LLDP is enabled. */ +"enabled": boolean, +/** A reference to the LLDP configuration used. Must not be `None` when `enabled` is `true`. */ +"lldpConfig"?: NameOrId | null,}; + +/** +* The speed of a link. + */ +export type LinkSpeed = +(/** Zero gigabits per second. */ +| "speed0_g" + +/** 1 gigabit per second. */ +| "speed1_g" + +/** 10 gigabits per second. */ +| "speed10_g" + +/** 25 gigabits per second. */ +| "speed25_g" + +/** 40 gigabits per second. */ +| "speed40_g" + +/** 50 gigabits per second. */ +| "speed50_g" + +/** 100 gigabits per second. */ +| "speed100_g" + +/** 200 gigabits per second. */ +| "speed200_g" + +/** 400 gigabits per second. */ +| "speed400_g" -export type IdpMetadataSource = -(| {"type": "url" -,"url": string,} -| {"data": string,"type": "base64_encoded_xml" -,} ); /** -* View of an image -* -* If `project_id` is present then the image is only visible inside that project. If it's not present then the image is visible to all projects in the silo. +* Switch link configuration. */ -export type Image = +export type LinkConfigCreate = { -/** size of blocks in bytes */ -"blockSize": ByteCount, -/** human-readable free-form text about a resource */ -"description": string, -/** Hash of the image contents, if applicable */ -"digest"?: Digest | null, -/** unique, immutable, system-controlled identifier for each resource */ +/** 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": LldpServiceConfigCreate, +/** Maximum transmission unit for the link. */ +"mtu": number, +/** The speed of the link. */ +"speed": LinkSpeed,}; + +/** +* A link layer discovery protocol (LLDP) service configuration. + */ +export type LldpServiceConfig = +{ +/** Whether or not the LLDP service is enabled. */ +"enabled": boolean, +/** The id of this LLDP service instance. */ "id": string, -/** unique, mutable, user-controlled identifier for each resource */ -"name": Name, -/** The family of the operating system like Debian, Ubuntu, etc. */ -"os": string, -/** ID of the parent project if the image is a project image */ -"projectId"?: string | null, -/** total size in bytes */ -"size": ByteCount, -/** timestamp when this resource was created */ -"timeCreated": Date, -/** timestamp when this resource was last modified */ -"timeModified": Date, -/** Version of the operating system */ -"version": string,}; +/** The link-layer discovery protocol configuration for this service. */ +"lldpConfigId"?: string | null,}; /** -* The source of the underlying image. +* A loopback address is an address that is assigned to a rack switch but is not associated with any particular port. */ -export type ImageSource = -{"id": string,"type": "snapshot" -,}; +export type LoopbackAddress = +{ +/** The loopback IP address and prefix length. */ +"address": IpNet, +/** The address lot block this address came from. */ +"addressLotBlockId": string, +/** The id of the loopback address. */ +"id": string, +/** The id of the rack where this loopback address is assigned. */ +"rackId": string, +/** Switch location where this loopback address is assigned. */ +"switchLocation": string,}; /** -* Create-time parameters for an `Image` +* Parameters for creating a loopback address on a particular rack switch. */ -export type ImageCreate = -{"description": string,"name": Name, -/** The family of the operating system (e.g. Debian, Ubuntu, etc.) */ -"os": string, -/** The source of the image's contents. */ -"source": ImageSource, -/** The version of the operating system (e.g. 18.04, 20.04, etc.) */ -"version": string,}; +export type LoopbackAddressCreate = +{ +/** The address to create. */ +"address": string, +/** The name or id of the address lot this loopback address will pull an address from. */ +"addressLot": NameOrId, +/** Address is an anycast address. This allows the address to be assigned to multiple locations simultaneously. */ +"anycast": boolean, +/** The subnet mask to use for the address. */ +"mask": number, +/** The containing the switch this loopback address will be configured on. */ +"rackId": string, +/** The location of the switch within the rack this loopback address will be configured on. */ +"switchLocation": Name,}; /** * A single page of results */ -export type ImageResultsPage = +export type LoopbackAddressResultsPage = { /** list of items on this page of results */ -"items": (Image)[], +"items": (LoopbackAddress)[], /** token used to fetch the next page of results (if any) */ "nextPage"?: string | null,}; /** -* Parameters for importing blocks with a bulk write +* A `Measurement` is a timestamped datum from a single metric */ -export type ImportBlocksBulkWrite = -{"base64EncodedData": string,"offset": number,}; +export type Measurement = +{"datum": Datum,"timestamp": Date,}; /** -* A policy determining when an instance should be automatically restarted by the control plane. +* A single page of results */ -export type InstanceAutoRestartPolicy = -(/** The instance should not be automatically restarted by the control plane if it fails. */ -| "never" - -/** If this instance is running and unexpectedly fails (e.g. due to a host software crash or unexpected host reboot), the control plane will make a best-effort attempt to restart it. The control plane may choose not to restart the instance to preserve the overall availability of the system. */ -| "best_effort" - -); +export type MeasurementResultsPage = +{ +/** list of items on this page of results */ +"items": (Measurement)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; /** -* A required CPU platform for an instance. -* -* When an instance specifies a required CPU platform: -* -* - The system may expose (to the VM) new CPU features that are only present on that platform (or on newer platforms of the same lineage that also support those features). - The instance must run on hosts that have CPUs that support all the features of the supplied platform. -* -* That is, the instance is restricted to hosts that have the CPUs which support all features of the required platform, but in exchange the CPU features exposed by the platform are available for the guest to use. Note that this may prevent an instance from starting (if the hosts that could run it are full but there is capacity on other incompatible hosts). -* -* If an instance does not specify a required CPU platform, then when it starts, the control plane selects a host for the instance and then supplies the guest with the "minimum" CPU platform supported by that host. This maximizes the number of hosts that can run the VM if it later needs to migrate to another host. +* A password used to authenticate a user * -* In all cases, the CPU features presented by a given CPU platform are a subset of what the corresponding hardware may actually support; features which cannot be used from a virtual environment or do not have full hypervisor support may be masked off. See RFD 314 for specific CPU features in a CPU platform. +* Passwords may be subject to additional constraints. */ -export type InstanceCpuPlatform = -(/** An AMD Milan-like CPU platform. */ -| "amd_milan" - -/** An AMD Turin-like CPU platform. */ -| "amd_turin" +export type Password = +string; -); +/** +* Describes the form factor of physical disks. + */ +export type PhysicalDiskKind = +"m2" +| "u2" +; /** -* The number of CPUs in an Instance +* View of a Physical Disk +* +* Physical disks reside in a particular sled and are used to store both Instance Disk data as well as internal metadata. */ -export type InstanceCpuCount = -number; +export type PhysicalDisk = +{"formFactor": PhysicalDiskKind, +/** unique, immutable, system-controlled identifier for each resource */ +"id": string,"model": string,"serial": string, +/** The sled to which this disk is attached, if any. */ +"sledId"?: string | null, +/** timestamp when this resource was created */ +"timeCreated": Date, +/** timestamp when this resource was last modified */ +"timeModified": Date,"vendor": string,}; /** -* View of an Instance +* A single page of results */ -export type Instance = +export type PhysicalDiskResultsPage = { -/** The time at which the auto-restart cooldown period for this instance completes, permitting it to be automatically restarted again. If the instance enters the `Failed` state, it will not be restarted until after this time. +/** list of items on this page of results */ +"items": (PhysicalDisk)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; + +export type PingStatus = +"ok" +; -If this is not present, then either the instance has never been automatically restarted, or the cooldown period has already expired, allowing the instance to be restarted immediately if it fails. */ -"autoRestartCooldownExpiration"?: Date | null, -/** `true` if this instance's auto-restart policy will permit the control plane to automatically restart it if it enters the `Failed` state. */ -"autoRestartEnabled": boolean, -/** The auto-restart policy configured for this instance, or `null` if no explicit policy has been configured. +export type Ping = +{ +/** Whether the external API is reachable. Will always be Ok if the endpoint returns anything at all. */ +"status": PingStatus,}; -This policy determines whether the instance should be automatically restarted by the control plane on failure. If this is `null`, the control plane will use the default policy when determining whether or not to automatically restart this instance, which may or may not allow it to be restarted. The value of the `auto_restart_enabled` field indicates whether the instance will be auto-restarted, based on its current policy or the default if it has no configured policy. */ -"autoRestartPolicy"?: InstanceAutoRestartPolicy | null, -/** the ID of the disk used to boot this Instance, if a specific one is assigned. */ -"bootDiskId"?: string | null, -/** The CPU platform for this instance. If this is `null`, the instance requires no particular CPU platform. */ -"cpuPlatform"?: InstanceCpuPlatform | null, +/** +* View of a Project + */ +export type Project = +{ /** 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, -/** The timestamp of the most recent time this instance was automatically restarted by the control plane. - -If this is not present, then this instance has not been automatically restarted. */ -"timeLastAutoRestarted"?: Date | null, /** timestamp when this resource was last modified */ -"timeModified": Date,"timeRunStateUpdated": Date,}; +"timeModified": Date,}; /** -* Describe the instance's disks at creation time +* Create-time parameters for a `Project` */ -export type InstanceDiskAttachment = -(/** During instance creation, create and attach disks */ -| {"description": string, -/** The initial source for this disk */ -"diskSource": DiskSource,"name": Name, -/** The 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" -,} -); +export type ProjectCreate = +{"description": string,"name": Name,}; /** -* Create-time parameters for an `InstanceNetworkInterface` +* A single page of results */ -export type InstanceNetworkInterfaceCreate = -{"description": string, -/** The IP address for the interface. One will be auto-assigned if not provided. */ -"ip"?: string | null,"name": Name, -/** The VPC Subnet in which to create the interface. */ -"subnetName": Name, -/** A set of additional networks that this interface may send and receive traffic on. */ -"transitIps"?: (IpNet)[], -/** The VPC in which to create the interface. */ -"vpcName": Name,}; +export type ProjectResultsPage = +{ +/** list of items on this page of results */ +"items": (Project)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; -/** -* 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`. +export type ProjectRole = +"admin" +| "collaborator" +| "viewer" +; -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" -,} -); +/** +* 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 ProjectRoleRoleAssignment = +{"identityId": string,"identityType": IdentityType,"roleName": ProjectRole,}; /** -* Create-time parameters for an `Instance` +* 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 InstanceCreate = +export type ProjectRolePolicy = { -/** Anti-Affinity groups which this instance should be added. */ -"antiAffinityGroups"?: (NameOrId)[], -/** The auto-restart policy for this instance. - -This policy determines whether the instance should be automatically restarted by the control plane on failure. If this is `null`, no auto-restart policy will be explicitly configured for this instance, and the control plane will select the default policy when determining whether the instance can be automatically restarted. - -Currently, the global default auto-restart policy is "best-effort", so instances with `null` auto-restart policies will be automatically restarted. However, in the future, the default policy may be configurable through other mechanisms, such as on a per-project basis. In that case, any configured default policy will be used if this is `null`. */ -"autoRestartPolicy"?: InstanceAutoRestartPolicy | null, -/** The disk the instance is configured to boot from. - -This disk can either be attached if it already exists or created along with the instance. - -Specifying a boot disk is optional but recommended to ensure predictable boot behavior. The boot disk can be set during instance creation or later if the instance is stopped. The boot disk counts against the disk attachment limit. - -An instance that does not have a boot disk set will use the boot options specified in its UEFI settings, which are controlled by both the instance's UEFI firmware and the guest operating system. Boot options can change as disks are attached and detached, which may result in an instance that only boots to the EFI shell until a boot disk is set. */ -"bootDisk"?: InstanceDiskAttachment | null, -/** The CPU platform to be used for this instance. If this is `null`, the instance requires no particular CPU platform; when it is started the instance will have the most general CPU platform supported by the sled it is initially placed on. */ -"cpuPlatform"?: InstanceCpuPlatform | null,"description": string, -/** A list of disks to be attached to the instance. - -Disk attachments of type "create" will be created, while those of type "attach" must already exist. - -The order of this list does not guarantee a boot order for the instance. Use the boot_disk attribute to specify a boot disk. When boot_disk is specified it will count against the disk attachment limit. */ -"disks"?: (InstanceDiskAttachment)[], -/** The external IP addresses provided to this instance. - -By default, all instances have outbound connectivity, but no inbound connectivity. These external addresses can be used to provide a fixed, known IP address for making inbound connections to the instance. */ -"externalIps"?: (ExternalIpCreate)[], -/** The hostname to be assigned to the instance */ -"hostname": Hostname, -/** The amount of RAM (in bytes) to be allocated to the instance */ -"memory": ByteCount,"name": Name, -/** The number of vCPUs to be allocated to the instance */ -"ncpus": InstanceCpuCount, -/** The network interfaces to be created for this instance. */ -"networkInterfaces"?: InstanceNetworkInterfaceAttachment, -/** An allowlist of SSH public keys to be transferred to the instance via cloud-init during instance creation. - -If not provided, all SSH public keys from the user's profile will be sent. If an empty list is provided, no public keys will be transmitted to the instance. */ -"sshPublicKeys"?: (NameOrId)[] | null, -/** Should this instance be started upon creation; true by default. */ -"start"?: boolean, -/** User data for instance initialization systems (such as cloud-init). Must be a Base64-encoded string, as specified in RFC 4648 § 4 (+ and / characters with padding). Maximum 32 KiB unencoded data. */ -"userData"?: string,}; +/** Roles directly assigned on this resource */ +"roleAssignments": (ProjectRoleRoleAssignment)[],}; /** -* A MAC address -* -* A Media Access Control address, in EUI-48 format +* Updateable properties of a `Project` */ -export type MacAddr = -string; +export type ProjectUpdate = +{"description"?: string | null,"name"?: Name | null,}; /** -* An `InstanceNetworkInterface` represents a virtual network interface device attached to an instance. +* View of an Rack */ -export type InstanceNetworkInterface = +export type Rack = { -/** human-readable free-form text about a resource */ -"description": string, /** unique, immutable, system-controlled identifier for each resource */ "id": string, -/** The Instance to which the interface belongs. */ -"instanceId": string, -/** The IP address assigned to this interface. */ -"ip": string, -/** The MAC address assigned to this interface. */ -"mac": MacAddr, -/** unique, mutable, user-controlled identifier for each resource */ -"name": Name, -/** True if this interface is the primary for the instance to which it's attached. */ -"primary": boolean, -/** The subnet to which the interface belongs. */ -"subnetId": string, /** timestamp when this resource was created */ "timeCreated": Date, /** timestamp when this resource was last modified */ -"timeModified": Date, -/** A set of additional networks that this interface may send and receive traffic on. */ -"transitIps"?: (IpNet)[], -/** The VPC to which the interface belongs. */ -"vpcId": string,}; +"timeModified": Date,}; /** * A single page of results */ -export type InstanceNetworkInterfaceResultsPage = +export type RackResultsPage = { /** list of items on this page of results */ -"items": (InstanceNetworkInterface)[], +"items": (Rack)[], /** token used to fetch the next page of results (if any) */ "nextPage"?: string | null,}; /** -* Parameters for updating an `InstanceNetworkInterface` +* A name for a built-in role * -* Note that modifying IP addresses for an interface is not yet supported, a new interface must be created instead. +* Role names consist of two string components separated by dot ("."). */ -export type InstanceNetworkInterfaceUpdate = -{"description"?: string | null,"name"?: Name | null, -/** Make a secondary interface the instance's primary interface. - -If applied to a secondary interface, that interface will become the primary on the next reboot of the instance. Note that this may have implications for routing between instances, as the new primary interface will be on a distinct subnet from the previous primary interface. +export type RoleName = +string; -Note that this can only be used to select a new primary interface for an instance. Requests to change the primary interface into a secondary will return an error. */ -"primary"?: boolean, -/** A set of additional networks that this interface may send and receive traffic on. */ -"transitIps"?: (IpNet)[],}; +/** +* View of a Role + */ +export type Role = +{"description": string,"name": RoleName,}; /** * A single page of results */ -export type InstanceResultsPage = +export type RoleResultsPage = { /** list of items on this page of results */ -"items": (Instance)[], +"items": (Role)[], /** token used to fetch the next page of results (if any) */ "nextPage"?: string | null,}; /** -* Contents of an Instance's serial console buffer. +* A route to a destination network through a gateway address. */ -export type InstanceSerialConsoleData = +export type Route = { -/** The bytes starting from the requested offset up to either the end of the buffer or the request's `max_bytes`. Provided as a u8 array rather than a string, as it may not be UTF-8. */ -"data": (number)[], -/** The absolute offset since boot (suitable for use as `byte_offset` in a subsequent request) of the last byte returned in `data`. */ -"lastByteOffset": number,}; +/** The route destination. */ +"dst": IpNet, +/** The route gateway. */ +"gw": string, +/** VLAN id the gateway is reachable over. */ +"vid"?: number | null,}; /** -* Parameters of an `Instance` that can be reconfigured after creation. +* Route configuration data associated with a switch port configuration. */ -export type InstanceUpdate = +export type RouteConfig = { -/** The auto-restart policy for this instance. - -This policy determines whether the instance should be automatically restarted by the control plane on failure. If this is `null`, any explicitly configured auto-restart policy will be unset, and the control plane will select the default policy when determining whether the instance can be automatically restarted. - -Currently, the global default auto-restart policy is "best-effort", so instances with `null` auto-restart policies will be automatically restarted. However, in the future, the default policy may be configurable through other mechanisms, such as on a per-project basis. In that case, any configured default policy will be used if this is `null`. */ -"autoRestartPolicy": InstanceAutoRestartPolicy | null, -/** The disk the instance is configured to boot from. - -Setting a boot disk is optional but recommended to ensure predictable boot behavior. The boot disk can be set during instance creation or later if the instance is stopped. The boot disk counts against the disk attachment limit. - -An instance that does not have a boot disk set will use the boot options specified in its UEFI settings, which are controlled by both the instance's UEFI firmware and the guest operating system. Boot options can change as disks are attached and detached, which may result in an instance that only boots to the EFI shell until a boot disk is set. */ -"bootDisk": NameOrId | null, -/** The CPU platform to be used for this instance. If this is `null`, the instance requires no particular CPU platform; when it is started the instance will have the most general CPU platform supported by the sled it is initially placed on. */ -"cpuPlatform": InstanceCpuPlatform | null, -/** The amount of RAM (in bytes) to be allocated to the instance */ -"memory": ByteCount, -/** The number of vCPUs to be allocated to the instance */ -"ncpus": InstanceCpuCount,}; - -export type InterfaceNum = -(| {"unknown": number,} -| {"ifIndex": number,} -| {"portNumber": number,} -); +/** The set of routes assigned to a switch port. */ +"routes": (Route)[],}; /** -* An internet gateway provides a path between VPC networks and external networks. +* Identity-related metadata that's included in nearly all public API objects */ -export type InternetGateway = +export type SamlIdentityProvider = { +/** Service provider endpoint where the response will be sent */ +"acsUrl": string, /** human-readable free-form text about a resource */ "description": string, +/** If set, attributes with this name will be considered to denote a user's group membership, where the values will be the group names. */ +"groupAttributeName"?: string | null, /** unique, immutable, system-controlled identifier for each resource */ "id": string, +/** IdP's entity id */ +"idpEntityId": string, /** unique, mutable, user-controlled identifier for each resource */ "name": Name, +/** Optional request signing public certificate (base64 encoded der file) */ +"publicCert"?: string | null, +/** Service provider endpoint where the idp should send log out requests */ +"sloUrl": string, +/** SP's client id */ +"spClientId": string, +/** Customer's technical contact for saml configuration */ +"technicalContactEmail": string, /** timestamp when this resource was created */ "timeCreated": Date, /** timestamp when this resource was last modified */ -"timeModified": Date, -/** The VPC to which the gateway belongs. */ -"vpcId": string,}; +"timeModified": Date,}; /** -* Create-time parameters for an `InternetGateway` +* Create-time identity-related parameters */ -export type InternetGatewayCreate = -{"description": string,"name": Name,}; +export type SamlIdentityProviderCreate = +{ +/** service provider endpoint where the response will be sent */ +"acsUrl": string,"description": string, +/** If set, SAML attributes with this name will be considered to denote a user's group membership, where the attribute value(s) should be a comma-separated list of group names. */ +"groupAttributeName"?: string | null, +/** idp's entity id */ +"idpEntityId": string, +/** the source of an identity provider metadata descriptor */ +"idpMetadataSource": IdpMetadataSource,"name": Name, +/** request signing key pair */ +"signingKeypair"?: DerEncodedKeyPair | null, +/** service provider endpoint where the idp should send log out requests */ +"sloUrl": string, +/** sp's client id */ +"spClientId": string, +/** customer's technical contact for saml configuration */ +"technicalContactEmail": string,}; + +/** +* 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 address that is attached to an internet gateway +* View of a Silo +* +* A Silo is the highest level unit of isolation. */ -export type InternetGatewayIpAddress = +export type Silo = { -/** The associated IP address, */ -"address": string, /** human-readable free-form text about a resource */ "description": string, +/** A silo where discoverable is false can be retrieved only by its id - it will not be part of the "list all silos" output. */ +"discoverable": boolean, /** unique, immutable, system-controlled identifier for each resource */ "id": string, -/** The associated internet gateway. */ -"internetGatewayId": string, +/** How users and groups are managed in this Silo */ +"identityMode": SiloIdentityMode, +/** Mapping of which Fleet roles are conferred by each Silo role + +The default is that no Fleet roles are conferred by any Silo roles unless there's a corresponding entry in this map. */ +"mappedFleetRoles": Record, /** unique, mutable, user-controlled identifier for each resource */ "name": Name, /** timestamp when this resource was created */ @@ -2697,34 +2126,46 @@ export type InternetGatewayIpAddress = "timeModified": Date,}; /** -* Create-time identity-related parameters +* The amount of provisionable resources for a Silo */ -export type InternetGatewayIpAddressCreate = -{"address": string,"description": string,"name": Name,}; +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 +* Create-time parameters for a `Silo` */ -export type InternetGatewayIpAddressResultsPage = +export type SiloCreate = { -/** list of items on this page of results */ -"items": (InternetGatewayIpAddress)[], -/** token used to fetch the next page of results (if any) */ -"nextPage"?: string | null,}; +/** If set, this group will be created during Silo creation and granted the "Silo Admin" role. Identity providers can assert that users belong to this group and those users can log in and further initialize the Silo. + +Note that if configuring a SAML based identity provider, group_attribute_name must be set for users to be considered part of a group. See `SamlIdentityProviderCreate` for more information. */ +"adminGroupName"?: string | null,"description": string,"discoverable": boolean,"identityMode": SiloIdentityMode, +/** Mapping of which Fleet roles are conferred by each Silo role + +The default is that no Fleet roles are conferred by any Silo roles unless there's a corresponding entry in this map. */ +"mappedFleetRoles"?: Record,"name": Name, +/** Limits the amount of provisionable CPU, memory, and storage in the Silo. CPU and memory are only consumed by running instances, while storage is consumed by any disk or snapshot. A value of 0 means that resource is *not* provisionable. */ +"quotas": SiloQuotasCreate, +/** Initial TLS certificates to be used for the new Silo's console and API endpoints. These should be valid for the Silo's DNS name(s). */ +"tlsCertificates": (CertificateCreate)[],}; /** -* An IP pool that is attached to an internet gateway +* An IP pool in the context of a silo */ -export type InternetGatewayIpPool = +export type SiloIpPool = { /** human-readable free-form text about a resource */ "description": string, /** unique, immutable, system-controlled identifier for each resource */ "id": string, -/** The associated internet gateway. */ -"internetGatewayId": string, -/** The associated IP pool. */ -"ipPoolId": string, +/** When a pool is the default for a silo, floating IPs and instance ephemeral IPs will come from that pool when no other pool is specified. There can be at most one default for a given silo. */ +"isDefault": boolean, /** unique, mutable, user-controlled identifier for each resource */ "name": Name, /** timestamp when this resource was created */ @@ -2732,721 +2173,668 @@ export type InternetGatewayIpPool = /** timestamp when this resource was last modified */ "timeModified": Date,}; -/** -* Create-time identity-related parameters - */ -export type InternetGatewayIpPoolCreate = -{"description": string,"ipPool": NameOrId,"name": Name,}; - /** * A single page of results */ -export type InternetGatewayIpPoolResultsPage = +export type SiloIpPoolResultsPage = { /** list of items on this page of results */ -"items": (InternetGatewayIpPool)[], +"items": (SiloIpPool)[], /** token used to fetch the next page of results (if any) */ "nextPage"?: string | null,}; +/** +* A collection of resource counts used to set the virtual capacity of a silo + */ +export type SiloQuotas = +{ +/** Number of virtual CPUs */ +"cpus": number, +/** Amount of memory in bytes */ +"memory": ByteCount,"siloId": string, +/** Amount of disk storage in bytes */ +"storage": ByteCount,}; + /** * A single page of results */ -export type InternetGatewayResultsPage = +export type SiloQuotasResultsPage = { /** list of items on this page of results */ -"items": (InternetGateway)[], +"items": (SiloQuotas)[], /** token used to fetch the next page of results (if any) */ "nextPage"?: string | null,}; /** -* The IP address version. +* Updateable properties of a Silo's resource limits. If a value is omitted it will not be updated. */ -export type IpVersion = -"v4" -| "v6" -; +export type SiloQuotasUpdate = +{ +/** The amount of virtual CPUs available for running instances in the Silo */ +"cpus"?: number | null, +/** The amount of RAM (in bytes) available for running instances in the Silo */ +"memory"?: ByteCount | null, +/** The amount of storage (in bytes) available for disks or snapshots */ +"storage"?: ByteCount | null,}; /** -* Type of IP pool. +* A single page of results */ -export type IpPoolType = -(/** Unicast IP pool for standard IP allocations. */ -| "unicast" - -/** Multicast IP pool for multicast group allocations. - -All ranges in a multicast pool must be either ASM or SSM (not mixed). */ -| "multicast" - -); - -/** -* A collection of IP ranges. If a pool is linked to a silo, IP addresses from the pool can be allocated within that silo - */ -export type IpPool = +export type SiloResultsPage = { -/** human-readable free-form text about a resource */ -"description": string, -/** unique, immutable, system-controlled identifier for each resource */ -"id": string, -/** The IP version for the pool. */ -"ipVersion": IpVersion, -/** unique, mutable, user-controlled identifier for each resource */ -"name": Name, -/** Type of IP pool (unicast or multicast) */ -"poolType": IpPoolType, -/** timestamp when this resource was created */ -"timeCreated": Date, -/** timestamp when this resource was last modified */ -"timeModified": Date,}; - -/** -* Create-time parameters for an `IpPool`. -* -* For multicast pools, all ranges must be either Any-Source Multicast (ASM) or Source-Specific Multicast (SSM), but not both. Mixing ASM and SSM ranges in the same pool is not allowed. -* -* ASM: IPv4 addresses outside 232.0.0.0/8, IPv6 addresses with flag field != 3 SSM: IPv4 addresses in 232.0.0.0/8, IPv6 addresses with flag field = 3 - */ -export type IpPoolCreate = -{"description": string, -/** The IP version of the pool. - -The default is IPv4. */ -"ipVersion"?: IpVersion,"name": Name, -/** Type of IP pool (defaults to Unicast) */ -"poolType"?: IpPoolType,}; +/** list of items on this page of results */ +"items": (Silo)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; -export type IpPoolLinkSilo = -{ -/** When a pool is the default for a silo, floating IPs and instance ephemeral IPs will come from that pool when no other pool is specified. There can be at most one default for a given silo. */ -"isDefault": boolean,"silo": NameOrId,}; +export type SiloRole = +"admin" +| "collaborator" +| "viewer" +; /** -* A non-decreasing IPv4 address range, inclusive of both ends. +* Describes the assignment of a particular role on a particular resource to a particular identity (user, group, etc.) * -* The first address must be less than or equal to the last address. +* 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 Ipv4Range = -{"first": string,"last": string,}; +export type SiloRoleRoleAssignment = +{"identityId": string,"identityType": IdentityType,"roleName": SiloRole,}; /** -* A non-decreasing IPv6 address range, inclusive of both ends. +* Policy for a particular resource * -* 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,"range": IpRange,"timeCreated": Date,}; - -/** -* A single page of results +* 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 IpPoolRangeResultsPage = +export type SiloRolePolicy = { -/** list of items on this page of results */ -"items": (IpPoolRange)[], -/** token used to fetch the next page of results (if any) */ -"nextPage"?: string | null,}; +/** Roles directly assigned on this resource */ +"roleAssignments": (SiloRoleRoleAssignment)[],}; /** -* A single page of results +* A collection of resource counts used to describe capacity and utilization */ -export type IpPoolResultsPage = +export type VirtualResourceCounts = { -/** list of items on this page of results */ -"items": (IpPool)[], -/** token used to fetch the next page of results (if any) */ -"nextPage"?: string | null,}; +/** Number of virtual CPUs */ +"cpus": number, +/** Amount of memory in bytes */ +"memory": ByteCount, +/** Amount of disk storage in bytes */ +"storage": ByteCount,}; /** -* A link between an IP pool and a silo that allows one to allocate IPs from the pool within the silo +* View of a silo's resource utilization and capacity */ -export type IpPoolSiloLink = -{"ipPoolId": string, -/** When a pool is the default for a silo, floating IPs and instance ephemeral IPs will come from that pool when no other pool is specified. There can be at most one default for a given silo. */ -"isDefault": boolean,"siloId": string,}; +export type SiloUtilization = +{ +/** Accounts for the total amount of resources reserved for silos via their quotas */ +"allocated": VirtualResourceCounts, +/** Accounts for resources allocated by in silos like CPU or memory for running instances and storage for disks and snapshots Note that CPU and memory resources associated with a stopped instances are not counted here */ +"provisioned": VirtualResourceCounts,"siloId": string,"siloName": Name,}; /** * A single page of results */ -export type IpPoolSiloLinkResultsPage = +export type SiloUtilizationResultsPage = { /** list of items on this page of results */ -"items": (IpPoolSiloLink)[], +"items": (SiloUtilization)[], /** token used to fetch the next page of results (if any) */ "nextPage"?: string | null,}; -export type IpPoolSiloUpdate = -{ -/** When a pool is the default for a silo, floating IPs and instance ephemeral IPs will come from that pool when no other pool is specified. There can be at most one default for a given silo, so when a pool is made default, an existing default will remain linked but will no longer be the default. */ -"isDefault": boolean,}; - -/** -* Parameters for updating an IP Pool - */ -export type IpPoolUpdate = -{"description"?: string | null,"name"?: Name | null,}; - /** -* The utilization of IP addresses in a pool. +* The operator-defined provision policy of a sled. * -* Note that both the count of remaining addresses and the total capacity are integers, reported as floating point numbers. This accommodates allocations larger than a 64-bit integer, which is common with IPv6 address spaces. With very large IP Pools (> 2**53 addresses), integer precision will be lost, in exchange for representing the entire range. In such a case the pool still has many available addresses. +* This controls whether new resources are going to be provisioned on this sled. */ -export type IpPoolUtilization = -{ -/** The total number of addresses in the pool. */ -"capacity": number, -/** The number of remaining addresses in the pool. */ -"remaining": number,}; +export type SledProvisionPolicy = +(/** New resources will be provisioned on this sled. */ +| "provisionable" -/** -* A range of IP ports -* -* An inclusive-inclusive range of IP ports. The second port may be omitted to represent a single port. - */ -export type L4PortRange = -string; +/** 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 forward error correction mode of a link. +* The operator-defined policy of a sled. */ -export type LinkFec = -(/** Firecode forward error correction. */ -| "firecode" - -/** No forward error correction. */ -| "none" +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. -/** Reed-Solomon forward error correction. */ -| "rs" +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 LLDP configuration associated with a port. - */ -export type LldpLinkConfigCreate = -{ -/** The LLDP chassis identifier TLV. */ -"chassisId"?: string | null, -/** Whether or not LLDP is enabled. */ -"enabled": boolean, -/** The LLDP link description TLV. */ -"linkDescription"?: string | null, -/** The LLDP link name TLV. */ -"linkName"?: string | null, -/** The LLDP management IP TLV. */ -"managementIp"?: string | null, -/** The LLDP system description TLV. */ -"systemDescription"?: string | null, -/** The LLDP system name TLV. */ -"systemName"?: string | null,}; - -/** -* The speed of a link. +* The current state of the sled, as determined by Nexus. */ -export type LinkSpeed = -(/** Zero gigabits per second. */ -| "speed0_g" - -/** 1 gigabit per second. */ -| "speed1_g" - -/** 10 gigabits per second. */ -| "speed10_g" - -/** 25 gigabits per second. */ -| "speed25_g" - -/** 40 gigabits per second. */ -| "speed40_g" - -/** 50 gigabits per second. */ -| "speed50_g" - -/** 100 gigabits per second. */ -| "speed100_g" +export type SledState = +(/** The sled is currently active, and has resources allocated on it. */ +| "active" -/** 200 gigabits per second. */ -| "speed200_g" +/** The sled has been permanently removed from service. -/** 400 gigabits per second. */ -| "speed400_g" +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" ); /** -* Per-port tx-eq overrides. This can be used to fine-tune the transceiver equalization settings to improve signal integrity. +* An operator's view of a Sled. */ -export type TxEqConfig = -{ -/** Main tap */ -"main"?: number | null, -/** Post-cursor tap1 */ -"post1"?: number | null, -/** Post-cursor tap2 */ -"post2"?: number | null, -/** Pre-cursor tap1 */ -"pre1"?: number | null, -/** Pre-cursor tap2 */ -"pre2"?: number | null,}; +export type Sled = +{"baseboard": Baseboard, +/** unique, immutable, system-controlled identifier for each resource */ +"id": string, +/** The operator-defined policy of a sled. */ +"policy": SledPolicy, +/** The rack to which this Sled is currently attached */ +"rackId": string, +/** The current state Nexus believes the sled to be in. */ +"state": SledState, +/** timestamp when this resource was created */ +"timeCreated": Date, +/** timestamp when this resource was last modified */ +"timeModified": Date, +/** The number of hardware threads which can execute on this sled */ +"usableHardwareThreads": number, +/** Amount of RAM which may be used by the Sled's OS */ +"usablePhysicalRam": ByteCount,}; /** -* Switch link configuration. +* An operator's view of an instance running on a given sled */ -export type LinkConfigCreate = -{ -/** Whether or not to set autonegotiation. */ -"autoneg": boolean, -/** The requested forward-error correction method. If this is not specified, the standard FEC for the underlying media will be applied if it can be determined. */ -"fec"?: LinkFec | null, -/** Link name. On ports that are not broken out, this is always phy0. On a 2x breakout the options are phy0 and phy1, on 4x phy0-phy3, etc. */ -"linkName": Name, -/** 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, -/** Optional tx_eq settings. */ -"txEq"?: TxEqConfig | null,}; +export type SledInstance = +{"activeSledId": string, +/** unique, immutable, system-controlled identifier for each resource */ +"id": string,"memory": number,"migrationId"?: string | null,"name": Name,"ncpus": number,"projectName": Name,"siloName": Name,"state": InstanceState, +/** timestamp when this resource was created */ +"timeCreated": Date, +/** timestamp when this resource was last modified */ +"timeModified": Date,}; /** -* A link layer discovery protocol (LLDP) service configuration. +* A single page of results */ -export type LldpLinkConfig = +export type SledInstanceResultsPage = { -/** The LLDP chassis identifier TLV. */ -"chassisId"?: string | null, -/** 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 | null, -/** The LLDP link name TLV. */ -"linkName"?: string | null, -/** The LLDP management IP TLV. */ -"managementIp"?: string | null, -/** The LLDP system description TLV. */ -"systemDescription"?: string | null, -/** The LLDP system name TLV. */ -"systemName"?: string | null,}; - -export type NetworkAddress = -(| {"ipAddr": string,} -| {"iEEE802": (number)[],} -); +/** list of items on this page of results */ +"items": (SledInstance)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; -export type ManagementAddress = -{"addr": NetworkAddress,"interfaceNum": InterfaceNum,"oid"?: (number)[] | null,}; +/** +* Parameters for `sled_set_provision_policy`. + */ +export type SledProvisionPolicyParams = +{ +/** The provision state. */ +"state": SledProvisionPolicy,}; /** -* Information about LLDP advertisements from other network entities directly connected to a switch port. This structure contains both metadata about when and where the neighbor was seen, as well as the specific information the neighbor was advertising. +* Response to `sled_set_provision_policy`. */ -export type LldpNeighbor = +export type SledProvisionPolicyResponse = { -/** The LLDP chassis identifier advertised by the neighbor */ -"chassisId": string, -/** Initial sighting of this LldpNeighbor */ -"firstSeen": Date, -/** Most recent sighting of this LldpNeighbor */ -"lastSeen": Date, -/** The LLDP link description advertised by the neighbor */ -"linkDescription"?: string | null, -/** The LLDP link name advertised by the neighbor */ -"linkName": string, -/** The port on which the neighbor was seen */ -"localPort": string, -/** The LLDP management IP(s) advertised by the neighbor */ -"managementIp": (ManagementAddress)[], -/** The LLDP system description advertised by the neighbor */ -"systemDescription"?: string | null, -/** The LLDP system name advertised by the neighbor */ -"systemName"?: string | null,}; +/** The new provision state. */ +"newState": SledProvisionPolicy, +/** The old provision state. */ +"oldState": SledProvisionPolicy,}; /** * A single page of results */ -export type LldpNeighborResultsPage = +export type SledResultsPage = { /** list of items on this page of results */ -"items": (LldpNeighbor)[], +"items": (Sled)[], /** token used to fetch the next page of results (if any) */ "nextPage"?: string | null,}; -/** -* A loopback address is an address that is assigned to a rack switch but is not associated with any particular port. - */ -export type LoopbackAddress = +export type SnapshotState = +"creating" +| "ready" +| "faulted" +| "destroyed" +; + +/** +* View of a Snapshot + */ +export type Snapshot = { -/** The loopback IP address and prefix length. */ -"address": IpNet, -/** The address lot block this address came from. */ -"addressLotBlockId": string, -/** The id of the loopback address. */ +/** human-readable free-form text about a resource */ +"description": string,"diskId": string, +/** unique, immutable, system-controlled identifier for each resource */ "id": string, -/** The id of the rack where this loopback address is assigned. */ -"rackId": string, -/** Switch location where this loopback address is assigned. */ -"switchLocation": string,}; +/** unique, mutable, user-controlled identifier for each resource */ +"name": Name,"projectId": string,"size": ByteCount,"state": SnapshotState, +/** timestamp when this resource was created */ +"timeCreated": Date, +/** timestamp when this resource was last modified */ +"timeModified": Date,}; /** -* Parameters for creating a loopback address on a particular rack switch. +* Create-time parameters for a `Snapshot` */ -export type LoopbackAddressCreate = -{ -/** The address to create. */ -"address": string, -/** The name or id of the address lot this loopback address will pull an address from. */ -"addressLot": NameOrId, -/** Address is an anycast address. This allows the address to be assigned to multiple locations simultaneously. */ -"anycast": boolean, -/** The subnet mask to use for the address. */ -"mask": number, -/** The containing the switch this loopback address will be configured on. */ -"rackId": string, -/** The location of the switch within the rack this loopback address will be configured on. */ -"switchLocation": Name,}; +export type SnapshotCreate = +{"description": string, +/** The disk to be snapshotted */ +"disk": NameOrId,"name": Name,}; /** * A single page of results */ -export type LoopbackAddressResultsPage = +export type SnapshotResultsPage = { /** list of items on this page of results */ -"items": (LoopbackAddress)[], +"items": (Snapshot)[], /** token used to fetch the next page of results (if any) */ "nextPage"?: string | null,}; /** -* A `Measurement` is a timestamped datum from a single metric +* View of an SSH Key */ -export type Measurement = -{"datum": Datum,"timestamp": Date,}; +export type SshKey = +{ +/** human-readable free-form text about a resource */ +"description": string, +/** unique, immutable, system-controlled identifier for each resource */ +"id": string, +/** unique, mutable, user-controlled identifier for each resource */ +"name": Name, +/** SSH public key, e.g., `"ssh-ed25519 AAAAC3NzaC..."` */ +"publicKey": string, +/** The user to whom this key belongs */ +"siloUserId": string, +/** timestamp when this resource was created */ +"timeCreated": Date, +/** timestamp when this resource was last modified */ +"timeModified": Date,}; + +/** +* Create-time parameters for an `SshKey` + */ +export type SshKeyCreate = +{"description": string,"name": Name, +/** SSH public key, e.g., `"ssh-ed25519 AAAAC3NzaC..."` */ +"publicKey": string,}; /** * A single page of results */ -export type MeasurementResultsPage = +export type SshKeyResultsPage = { /** list of items on this page of results */ -"items": (Measurement)[], +"items": (SshKey)[], /** token used to fetch the next page of results (if any) */ "nextPage"?: string | null,}; /** -* The type of the metric itself, indicating what its values represent. +* An operator's view of a Switch. */ -export type MetricType = -(/** The value represents an instantaneous measurement in time. */ -| "gauge" +export type Switch = +{"baseboard": Baseboard, +/** unique, immutable, system-controlled identifier for each resource */ +"id": string, +/** The rack to which this Switch is currently attached */ +"rackId": string, +/** timestamp when this resource was created */ +"timeCreated": Date, +/** timestamp when this resource was last modified */ +"timeModified": Date,}; -/** The value represents a difference between two points in time. */ -| "delta" +/** +* Describes the kind of an switch interface. + */ +export type SwitchInterfaceKind2 = +(/** Primary interfaces are associated with physical links. There is exactly one primary interface per physical link. */ +| "primary" -/** The value represents an accumulation between two points in time. */ -| "cumulative" +/** 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" -/** -* 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" -,} ); /** -* A Geneve Virtual Network Identifier +* A switch port interface configuration for a port settings object. */ -export type Vni = -number; +export type SwitchInterfaceConfig = +{ +/** A unique identifier for this switch interface. */ +"id": string, +/** The name of this switch interface. */ +"interfaceName": string, +/** The switch interface kind. */ +"kind": SwitchInterfaceKind2, +/** The port settings object this switch interface configuration belongs to. */ +"portSettingsId": string, +/** Whether or not IPv6 is enabled on this interface. */ +"v6Enabled": boolean,}; /** -* Information required to construct a virtual network interface +* Indicates the kind for a switch interface. */ -export type NetworkInterface = -{"id": string,"ip": string,"kind": NetworkInterfaceKind,"mac": MacAddr,"name": Name,"primary": boolean,"slot": number,"subnet": IpNet,"transitIps"?: (IpNet)[],"vni": Vni,}; - -/** -* 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 | null)[],} -| {"type": "double" -,"values": (number | null)[],} -| {"type": "boolean" -,"values": (boolean | null)[],} -| {"type": "string" -,"values": (string | null)[],} -| {"type": "integer_distribution" -,"values": (Distributionint64 | null)[],} -| {"type": "double_distribution" -,"values": (Distributiondouble | null)[],} +export type SwitchInterfaceKind = +(/** Primary interfaces are associated with physical links. There is exactly one primary interface per physical link. */ +| {"type": "primary" +,} +/** VLAN interfaces allow physical interfaces to be multiplexed onto multiple logical links, each distinguished by a 12-bit 802.1Q Ethernet tag. */ +| {"type": "vlan" +, +/** The virtual network id (VID) that distinguishes this interface and 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. */ +"vid": number,} +/** Loopback interfaces are anchors for IP addresses that are not specific to any particular port. */ +| {"type": "loopback" +,} ); /** -* A single list of values, for one dimension of a timeseries. +* A layer-3 switch interface configuration. When IPv6 is enabled, a link local address will be created for the interface. */ -export type Values = +export type SwitchInterfaceConfigCreate = { -/** The type of this metric. */ -"metricType": MetricType, -/** The data values. */ -"values": ValueArray,}; +/** What kind of switch interface this configuration represents. */ +"kind": SwitchInterfaceKind, +/** Whether or not IPv6 is enabled. */ +"v6Enabled": boolean,}; /** -* Timepoints and values for one timeseries. +* A switch port represents a physical external port on a rack switch. */ -export type Points = -{"startTimes"?: (Date)[] | null,"timestamps": (Date)[],"values": (Values)[],}; +export type SwitchPort = +{ +/** The id of the switch port. */ +"id": string, +/** The name of this switch port. */ +"portName": string, +/** The primary settings group of this switch port. Will be `None` until this switch port is configured. */ +"portSettingsId"?: string | null, +/** The rack this switch port belongs to. */ +"rackId": string, +/** The switch location of this switch port. */ +"switchLocation": string,}; /** -* 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. +* An IP address configuration for a port settings object. */ -export type Timeseries = -{"fields": Record,"points": Points,}; +export type SwitchPortAddressConfig = +{ +/** The IP address and prefix. */ +"address": IpNet, +/** The id of the address lot block this address is drawn from. */ +"addressLotBlockId": string, +/** The interface name this address belongs to. */ +"interfaceName": string, +/** The port settings object this address configuration belongs to. */ +"portSettingsId": string,}; /** -* 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. +* Parameters for applying settings to switch ports. */ -export type OxqlTable = +export type SwitchPortApplySettings = { -/** The name of the table. */ -"name": string, -/** The set of timeseries in the table, ordered by key. */ -"timeseries": (Timeseries)[],}; +/** A name or id to use when applying switch port settings. */ +"portSettings": NameOrId,}; /** -* The result of a successful OxQL query. +* A BGP peer configuration for a port settings object. */ -export type OxqlQueryResult = +export type SwitchPortBgpPeerConfig = { -/** Tables resulting from the query, each containing timeseries. */ -"tables": (OxqlTable)[],}; +/** The address of the peer. */ +"addr": string, +/** The id of the global BGP configuration referenced by this peer configuration. */ +"bgpConfigId": string, +/** The interface name used to establish a peer session. */ +"interfaceName": string, +/** The port settings object this BGP configuration belongs to. */ +"portSettingsId": string,}; /** -* A password used to authenticate a user -* -* Passwords may be subject to additional constraints. +* The link geometry associated with a switch port. */ -export type Password = -string; +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" + +); /** -* Describes the form factor of physical disks. +* A physical port configuration for a port settings object. */ -export type PhysicalDiskKind = -"m2" -| "u2" -; +export type SwitchPortConfig = +{ +/** The physical link geometry of the port. */ +"geometry": SwitchPortGeometry2, +/** The id of the port settings object this configuration belongs to. */ +"portSettingsId": string,}; /** -* The operator-defined policy of a physical disk. +* The link geometry associated with a switch port. */ -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. +export type SwitchPortGeometry = +(/** The port contains a single QSFP28 link with four lanes. */ +| "qsfp28x1" -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.) +/** The port contains two QSFP28 links each with two lanes. */ +| "qsfp28x2" + +/** The port contains four SFP28 links each with one lane. */ +| "sfp28x4" -An expunged disk is always non-provisionable. */ -| {"kind": "expunged" -,} ); /** -* The current state of the disk, as determined by Nexus. +* Physical switch port configuration. */ -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 SwitchPortConfigCreate = +{ +/** Link geometry for the switch port. */ +"geometry": SwitchPortGeometry,}; /** -* View of a Physical Disk -* -* Physical disks reside in a particular sled and are used to store both Instance Disk data as well as internal metadata. +* A link configuration for a port settings object. */ -export type PhysicalDisk = -{"formFactor": PhysicalDiskKind, -/** unique, immutable, system-controlled identifier for each resource */ -"id": string,"model": string, -/** The operator-defined policy for a physical disk. */ -"policy": PhysicalDiskPolicy,"serial": string, -/** The sled to which this disk is attached, if any. */ -"sledId"?: string | null, -/** The current state Nexus believes the disk to be in. */ -"state": PhysicalDiskState, -/** timestamp when this resource was created */ -"timeCreated": Date, -/** timestamp when this resource was last modified */ -"timeModified": Date,"vendor": string,}; +export type SwitchPortLinkConfig = +{ +/** The name of this link. */ +"linkName": string, +/** The link-layer discovery protocol service configuration id for this link. */ +"lldpServiceConfigId": string, +/** The maximum transmission unit for this link. */ +"mtu": number, +/** The port settings this link configuration belongs to. */ +"portSettingsId": string,}; /** * A single page of results */ -export type PhysicalDiskResultsPage = +export type SwitchPortResultsPage = { /** list of items on this page of results */ -"items": (PhysicalDisk)[], +"items": (SwitchPort)[], /** token used to fetch the next page of results (if any) */ "nextPage"?: string | null,}; -export type PingStatus = -"ok" -; - -export type Ping = +/** +* A route configuration for a port settings object. + */ +export type SwitchPortRouteConfig = { -/** Whether the external API is reachable. Will always be Ok if the endpoint returns anything at all. */ -"status": PingStatus,}; +/** The route's destination network. */ +"dst": IpNet, +/** The route's gateway address. */ +"gw": IpNet, +/** The interface name this route configuration is assigned to. */ +"interfaceName": string, +/** The port settings object this route configuration belongs to. */ +"portSettingsId": string, +/** The VLAN identifier for the route. Use this if the gateway is reachable over an 802.1Q tagged L2 segment. */ +"vlanId"?: number | null,}; /** -* Identity-related metadata that's included in nearly all public API objects +* A switch port settings identity whose id may be used to view additional details. */ -export type Probe = +export type SwitchPortSettings = { /** human-readable free-form text about a resource */ "description": string, /** unique, immutable, system-controlled identifier for each resource */ "id": string, /** unique, mutable, user-controlled identifier for each resource */ -"name": Name,"sled": string, +"name": Name, /** timestamp when this resource was created */ "timeCreated": Date, /** timestamp when this resource was last modified */ "timeModified": Date,}; /** -* Create time parameters for probes. +* Parameters for creating switch port settings. Switch port settings are the central data structure for setting up external networking. Switch port settings include link, interface, route, address and dynamic network protocol configuration. */ -export type ProbeCreate = -{"description": string,"ipPool"?: NameOrId | null,"name": Name,"sled": string,}; - -export type ProbeExternalIpKind = -"snat" -| "floating" -| "ephemeral" -; - -export type ProbeExternalIp = -{"firstPort": number,"ip": string,"kind": ProbeExternalIpKind,"lastPort": number,}; +export type SwitchPortSettingsCreate = +{ +/** Addresses indexed by interface name. */ +"addresses": Record, +/** BGP peers indexed by interface name. */ +"bgpPeers": Record,"description": string,"groups": (NameOrId)[], +/** Interfaces indexed by link name. */ +"interfaces": Record, +/** Links indexed by phy name. On ports that are not broken out, this is always phy0. On a 2x breakout the options are phy0 and phy1, on 4x phy0-phy3, etc. */ +"links": Record,"name": Name,"portConfig": SwitchPortConfigCreate, +/** Routes indexed by interface name. */ +"routes": Record,}; -export type ProbeInfo = -{"externalIps": (ProbeExternalIp)[],"id": string,"interface": NetworkInterface,"name": Name,"sled": string,}; +/** +* This structure maps a port settings object to a port settings groups. Port settings objects may inherit settings from groups. This mapping defines the relationship between settings objects and the groups they reference. + */ +export type SwitchPortSettingsGroups = +{ +/** The id of a port settings group being referenced by a port settings object. */ +"portSettingsGroupId": string, +/** The id of a port settings object referencing a port settings group. */ +"portSettingsId": string,}; /** * A single page of results */ -export type ProbeInfoResultsPage = +export type SwitchPortSettingsResultsPage = { /** list of items on this page of results */ -"items": (ProbeInfo)[], +"items": (SwitchPortSettings)[], /** token used to fetch the next page of results (if any) */ "nextPage"?: string | null,}; /** -* View of a Project +* A switch port VLAN interface configuration for a port settings object. */ -export type Project = +export type SwitchVlanInterfaceConfig = { -/** human-readable free-form text about a resource */ -"description": string, -/** unique, immutable, system-controlled identifier for each resource */ -"id": string, -/** unique, mutable, user-controlled identifier for each resource */ -"name": Name, -/** timestamp when this resource was created */ -"timeCreated": Date, -/** timestamp when this resource was last modified */ -"timeModified": Date,}; +/** 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,}; /** -* Create-time parameters for a `Project` +* 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. */ -export type ProjectCreate = -{"description": string,"name": Name,}; +export type SwitchPortSettingsView = +{ +/** Layer 3 IP address settings. */ +"addresses": (SwitchPortAddressConfig)[], +/** BGP peer settings. */ +"bgpPeers": (SwitchPortBgpPeerConfig)[], +/** Switch port settings included from other switch port settings groups. */ +"groups": (SwitchPortSettingsGroups)[], +/** Layer 3 interface settings. */ +"interfaces": (SwitchInterfaceConfig)[], +/** Link-layer discovery protocol (LLDP) settings. */ +"linkLldp": (LldpServiceConfig)[], +/** Layer 2 link settings. */ +"links": (SwitchPortLinkConfig)[], +/** Layer 1 physical port settings. */ +"port": SwitchPortConfig, +/** IP route settings. */ +"routes": (SwitchPortRouteConfig)[], +/** The primary switch port settings handle. */ +"settings": SwitchPortSettings, +/** Vlan interface settings. */ +"vlanInterfaces": (SwitchVlanInterfaceConfig)[],}; /** * A single page of results */ -export type ProjectResultsPage = +export type SwitchResultsPage = { /** list of items on this page of results */ -"items": (Project)[], +"items": (Switch)[], /** token used to fetch the next page of results (if any) */ "nextPage"?: string | null,}; -export type ProjectRole = -"admin" -| "collaborator" -| "limited_collaborator" -| "viewer" -; +/** +* A sled that has not been added to an initialized rack yet + */ +export type UninitializedSled = +{"baseboard": Baseboard,"cubby": number,"rackId": string,}; /** -* 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. +* The unique hardware ID for a sled */ -export type ProjectRoleRoleAssignment = -{"identityId": string,"identityType": IdentityType,"roleName": ProjectRole,}; +export type UninitializedSledId = +{"part": string,"serial": string,}; /** -* 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. +* A single page of results */ -export type ProjectRolePolicy = +export type UninitializedSledResultsPage = { -/** Roles directly assigned on this resource */ -"roleAssignments": (ProjectRoleRoleAssignment)[],}; +/** list of items on this page of results */ +"items": (UninitializedSled)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; /** -* Updateable properties of a `Project` +* View of a User */ -export type ProjectUpdate = -{"description"?: string | null,"name"?: Name | null,}; +export type User = +{ +/** Human-readable name that can identify the user */ +"displayName": string,"id": string, +/** Uuid of the silo to which this user belongs */ +"siloId": string,}; /** -* View of an Rack +* View of a Built-in User +* +* A Built-in User is explicitly created as opposed to being derived from an Identify Provider. */ -export type Rack = +export type UserBuiltin = { +/** human-readable free-form text about a resource */ +"description": string, /** unique, immutable, system-controlled identifier for each resource */ "id": string, +/** unique, mutable, user-controlled identifier for each resource */ +"name": Name, /** timestamp when this resource was created */ "timeCreated": Date, /** timestamp when this resource was last modified */ @@ -3455,4035 +2843,1414 @@ export type Rack = /** * A single page of results */ -export type RackResultsPage = +export type UserBuiltinResultsPage = { /** list of items on this page of results */ -"items": (Rack)[], +"items": (UserBuiltin)[], /** token used to fetch the next page of results (if any) */ "nextPage"?: string | null,}; /** -* A route to a destination network through a gateway address. - */ -export type Route = -{ -/** The route destination. */ -"dst": IpNet, -/** The route gateway. */ -"gw": string, -/** Route RIB priority. Higher priority indicates precedence within and across protocols. */ -"ribPriority"?: number | null, -/** VLAN id the gateway is reachable over. */ -"vid"?: number | null,}; - -/** -* Route configuration data associated with a switch port configuration. - */ -export type RouteConfig = -{ -/** Link name. On ports that are not broken out, this is always phy0. On a 2x breakout the options are phy0 and phy1, on 4x phy0-phy3, etc. */ -"linkName": Name, -/** The set of routes assigned to a switch port. */ -"routes": (Route)[],}; - -/** -* A `RouteDestination` is used to match traffic with a routing rule based on the destination of that traffic. +* A name unique within the parent collection * -* When traffic is to be sent to a destination that is within a given `RouteDestination`, the corresponding `RouterRoute` applies, and traffic will be forward to the `RouteTarget` for that rule. +* 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 though they may contain a UUID. */ -export type RouteDestination = -(/** Route applies to traffic destined for the specified IP address */ -| {"type": "ip" -,"value": string,} -/** Route applies to traffic destined for the specified IP subnet */ -| {"type": "ip_net" -,"value": IpNet,} -/** Route applies to traffic destined for the specified VPC */ -| {"type": "vpc" -,"value": Name,} -/** Route applies to traffic destined for the specified VPC subnet */ -| {"type": "subnet" -,"value": Name,} -); +export type UserId = +string; /** -* A `RouteTarget` describes the possible locations that traffic matching a route destination can be sent. +* Parameters for setting a user's password */ -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" +export type UserPassword = +(/** Sets the user's password to the provided value */ +| {"mode": "password" +,"value": Password,} +/** Invalidates any current password (disabling password authentication) */ +| {"mode": "login_disallowed" ,} ); /** -* 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 route defines a rule that governs where traffic should be sent based on its destination. +* Create-time parameters for a `User` */ -export type RouterRoute = +export type UserCreate = { -/** human-readable free-form text about a resource */ -"description": string, -/** Selects which traffic this routing rule will apply to */ -"destination": RouteDestination, -/** unique, immutable, system-controlled identifier for each resource */ -"id": string, -/** Describes the kind of router. Set at creation. `read-only` */ -"kind": RouterRouteKind, -/** unique, mutable, user-controlled identifier for each resource */ -"name": Name, -/** The location that matched packets should be forwarded to */ -"target": RouteTarget, -/** timestamp when this resource was created */ -"timeCreated": Date, -/** timestamp when this resource was last modified */ -"timeModified": Date, -/** The ID of the VPC Router to which the route belongs */ -"vpcRouterId": string,}; - -/** -* Create-time parameters for a `RouterRoute` - */ -export type RouterRouteCreate = -{"description": string, -/** Selects which traffic this routing rule will apply to. */ -"destination": RouteDestination,"name": Name, -/** The location that matched packets should be forwarded to. */ -"target": RouteTarget,}; +/** username used to log in */ +"externalId": UserId, +/** how to set the user's login password */ +"password": UserPassword,}; /** * A single page of results */ -export type RouterRouteResultsPage = +export type UserResultsPage = { /** list of items on this page of results */ -"items": (RouterRoute)[], +"items": (User)[], /** token used to fetch the next page of results (if any) */ "nextPage"?: string | null,}; /** -* Updateable properties of a `RouterRoute` +* Credentials for local user login */ -export type RouterRouteUpdate = -{"description"?: string | null, -/** Selects which traffic this routing rule will apply to. */ -"destination": RouteDestination,"name"?: Name | null, -/** The location that matched packets should be forwarded to. */ -"target": RouteTarget,}; +export type UsernamePasswordCredentials = +{"password": Password,"username": UserId,}; /** -* Identity-related metadata that's included in nearly all public API objects +* View of the current silo's resource utilization and capacity */ -export type SamlIdentityProvider = +export type Utilization = +{ +/** The total amount of resources that can be provisioned in this silo Actions that would exceed this limit will fail */ +"capacity": VirtualResourceCounts, +/** Accounts for resources allocated to running instances or storage allocated via disks or snapshots Note that CPU and memory resources associated with a stopped instances are not counted here whereas associated disks will still be counted */ +"provisioned": VirtualResourceCounts,}; + +/** +* View of a VPC + */ +export type Vpc = { -/** Service provider endpoint where the response will be sent */ -"acsUrl": string, /** human-readable free-form text about a resource */ "description": string, -/** If set, attributes with this name will be considered to denote a user's group membership, where the values will be the group names. */ -"groupAttributeName"?: string | null, +/** The name used for the VPC in DNS. */ +"dnsName": Name, /** unique, immutable, system-controlled identifier for each resource */ "id": string, -/** IdP's entity id */ -"idpEntityId": string, +/** The unique local IPv6 address range for subnets in this VPC */ +"ipv6Prefix": Ipv6Net, /** unique, mutable, user-controlled identifier for each resource */ "name": Name, -/** Optional request signing public certificate (base64 encoded der file) */ -"publicCert"?: string | null, -/** Service provider endpoint where the idp should send log out requests */ -"sloUrl": string, -/** SP's client id */ -"spClientId": string, -/** Customer's technical contact for saml configuration */ -"technicalContactEmail": string, +/** id for the project containing this VPC */ +"projectId": string, +/** id for the system router where subnet default routes are registered */ +"systemRouterId": string, /** timestamp when this resource was created */ "timeCreated": Date, /** timestamp when this resource was last modified */ "timeModified": Date,}; /** -* Create-time identity-related parameters +* Create-time parameters for a `Vpc` */ -export type SamlIdentityProviderCreate = -{ -/** service provider endpoint where the response will be sent */ -"acsUrl": string,"description": string, -/** If set, SAML attributes with this name will be considered to denote a user's group membership, where the attribute value(s) should be a comma-separated list of group names. */ -"groupAttributeName"?: string | null, -/** idp's entity id */ -"idpEntityId": string, -/** the source of an identity provider metadata descriptor */ -"idpMetadataSource": IdpMetadataSource,"name": Name, -/** request signing key pair */ -"signingKeypair"?: DerEncodedKeyPair | null, -/** service provider endpoint where the idp should send log out requests */ -"sloUrl": string, -/** sp's client id */ -"spClientId": string, -/** customer's technical contact for saml configuration */ -"technicalContactEmail": string,}; +export type VpcCreate = +{"description": string,"dnsName": Name, +/** The IPv6 prefix for this VPC + +All IPv6 subnets created from this VPC must be taken from this range, which should be a Unique Local Address in the range `fd00::/48`. The default VPC Subnet will have the first `/64` range from this prefix. */ +"ipv6Prefix"?: Ipv6Net | null,"name": Name,}; + +export type VpcFirewallRuleAction = +"allow" +| "deny" +; -export type ScimClientBearerToken = -{"id": string,"timeCreated": Date,"timeExpires"?: Date | null,}; +export type VpcFirewallRuleDirection = +"inbound" +| "outbound" +; /** -* The POST response is the only time the generated bearer token is returned to the client. +* The `VpcFirewallRuleHostFilter` is used to filter traffic on the basis of its source or destination host. */ -export type ScimClientBearerTokenValue = -{"bearerToken": string,"id": string,"timeCreated": Date,"timeExpires"?: Date | null,}; +export type VpcFirewallRuleHostFilter = +(/** The rule applies to traffic from/to all instances in the VPC */ +| {"type": "vpc" +,"value": Name,} +/** The rule applies to traffic from/to all instances in the VPC Subnet */ +| {"type": "subnet" +,"value": Name,} +/** The rule applies to traffic from/to this specific instance */ +| {"type": "instance" +,"value": Name,} +/** The rule applies to traffic from/to a specific IP address */ +| {"type": "ip" +,"value": string,} +/** The rule applies to traffic from/to a specific IP subnet */ +| {"type": "ip_net" +,"value": IpNet,} +); /** -* Configuration of inbound ICMP allowed by API services. +* The protocols that may be specified in a firewall rule's filter */ -export type ServiceIcmpConfig = -{ -/** When enabled, Nexus is able to receive ICMP Destination Unreachable type 3 (port unreachable) and type 4 (fragmentation needed), Redirect, and Time Exceeded messages. These enable Nexus to perform Path MTU discovery and better cope with fragmentation issues. Otherwise all inbound ICMP traffic will be dropped. */ -"enabled": boolean,}; +export type VpcFirewallRuleProtocol = +"TCP" +| "UDP" +| "ICMP" +; /** -* Parameters for PUT requests to `/v1/system/update/target-release`. +* Filter for a firewall rule. A given packet must match every field that is present for the rule to apply to it. A packet matches a field if any entry in that field matches the packet. */ -export type SetTargetReleaseParams = +export type VpcFirewallRuleFilter = { -/** Version of the system software to make the target release. */ -"systemVersion": string,}; +/** If present, the sources (if incoming) or destinations (if outgoing) this rule applies to. */ +"hosts"?: (VpcFirewallRuleHostFilter)[] | null, +/** If present, the destination ports this rule applies to. */ +"ports"?: (L4PortRange)[] | null, +/** If present, the networking protocols this rule applies to. */ +"protocols"?: (VpcFirewallRuleProtocol)[] | null,}; + +export type VpcFirewallRuleStatus = +"disabled" +| "enabled" +; /** -* Describes how identities are managed and users are authenticated in this Silo +* A `VpcFirewallRuleTarget` is used to specify the set of `Instance`s to which a firewall rule applies. */ -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" - -/** Users are authenticated with SAML using an external authentication provider. Users and groups are managed with SCIM API calls, likely from the same authentication provider. */ -| "saml_scim" - +export type VpcFirewallRuleTarget = +(/** The rule applies to all instances in the VPC */ +| {"type": "vpc" +,"value": Name,} +/** The rule applies to all instances in the VPC Subnet */ +| {"type": "subnet" +,"value": Name,} +/** The rule applies to this specific instance */ +| {"type": "instance" +,"value": Name,} +/** The rule applies to a specific IP address */ +| {"type": "ip" +,"value": string,} +/** The rule applies to a specific IP subnet */ +| {"type": "ip_net" +,"value": IpNet,} ); /** -* View of a Silo -* -* A Silo is the highest level unit of isolation. +* A single rule in a VPC firewall */ -export type Silo = +export type VpcFirewallRule = { -/** Optionally, silos can have a group name that is automatically granted the silo admin role. */ -"adminGroupName"?: string | null, +/** whether traffic matching the rule should be allowed or dropped */ +"action": VpcFirewallRuleAction, /** human-readable free-form text about a resource */ "description": string, -/** A silo where discoverable is false can be retrieved only by its id - it will not be part of the "list all silos" output. */ -"discoverable": boolean, +/** 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, -/** How users and groups are managed in this Silo */ -"identityMode": SiloIdentityMode, -/** Mapping of which Fleet roles are conferred by each Silo role - -The default is that no Fleet roles are conferred by any Silo roles unless there's a corresponding entry in this map. */ -"mappedFleetRoles": Record, /** 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, +/** list of sets 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,}; +"timeModified": Date, +/** the VPC to which this rule belongs */ +"vpcId": string,}; /** -* View of silo authentication settings +* A single rule in a VPC firewall */ -export type SiloAuthSettings = +export type VpcFirewallRuleUpdate = { -/** Maximum lifetime of a device token in seconds. If set to null, users will be able to create tokens that do not expire. */ -"deviceTokenMaxTtlSeconds"?: number | null,"siloId": string,}; +/** 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, +/** name of the rule, unique to this VPC */ +"name": Name, +/** the relative priority of this rule */ +"priority": number, +/** whether this rule is in effect */ +"status": VpcFirewallRuleStatus, +/** list of sets of instances that the rule applies to */ +"targets": (VpcFirewallRuleTarget)[],}; /** -* Updateable properties of a silo's settings. +* Updateable properties of a `Vpc`'s firewall Note that VpcFirewallRules are implicitly created along with a Vpc, so there is no explicit creation. */ -export type SiloAuthSettingsUpdate = -{ -/** Maximum lifetime of a device token in seconds. If set to null, users will be able to create tokens that do not expire. */ -"deviceTokenMaxTtlSeconds": number | null,}; +export type VpcFirewallRuleUpdateParams = +{"rules": (VpcFirewallRuleUpdate)[],}; /** -* The amount of provisionable resources for a Silo +* Collection of a Vpc's firewall rules */ -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,}; +export type VpcFirewallRules = +{"rules": (VpcFirewallRule)[],}; /** -* Create-time parameters for a `Silo` +* A single page of results */ -export type SiloCreate = +export type VpcResultsPage = { -/** If set, this group will be created during Silo creation and granted the "Silo Admin" role. Identity providers can assert that users belong to this group and those users can log in and further initialize the Silo. - -Note that if configuring a SAML based identity provider, group_attribute_name must be set for users to be considered part of a group. See `SamlIdentityProviderCreate` for more information. */ -"adminGroupName"?: string | null,"description": string,"discoverable": boolean,"identityMode": SiloIdentityMode, -/** Mapping of which Fleet roles are conferred by each Silo role - -The default is that no Fleet roles are conferred by any Silo roles unless there's a corresponding entry in this map. */ -"mappedFleetRoles"?: Record,"name": Name, -/** Limits the amount of provisionable CPU, memory, and storage in the Silo. CPU and memory are only consumed by running instances, while storage is consumed by any disk or snapshot. A value of 0 means that resource is *not* provisionable. */ -"quotas": SiloQuotasCreate, -/** Initial TLS certificates to be used for the new Silo's console and API endpoints. These should be valid for the Silo's DNS name(s). */ -"tlsCertificates": (CertificateCreate)[],}; +/** list of items on this page of results */ +"items": (Vpc)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; /** -* An IP pool in the context of a silo +* A VPC subnet represents a logical grouping for instances that allows network traffic between them, within a IPv4 subnetwork or optionall an IPv6 subnetwork. */ -export type SiloIpPool = +export type VpcSubnet = { /** human-readable free-form text about a resource */ "description": string, /** unique, immutable, system-controlled identifier for each resource */ "id": string, -/** When a pool is the default for a silo, floating IPs and instance ephemeral IPs will come from that pool when no other pool is specified. There can be at most one default for a given silo. */ -"isDefault": boolean, +/** The IPv4 subnet CIDR block. */ +"ipv4Block": Ipv4Net, +/** The IPv6 subnet CIDR block. */ +"ipv6Block": Ipv6Net, /** unique, mutable, user-controlled identifier for each resource */ "name": Name, /** timestamp when this resource was created */ "timeCreated": Date, /** timestamp when this resource was last modified */ -"timeModified": Date,}; +"timeModified": Date, +/** The VPC to which the subnet belongs. */ +"vpcId": string,}; /** -* A single page of results +* Create-time parameters for a `VpcSubnet` */ -export type SiloIpPoolResultsPage = -{ -/** list of items on this page of results */ -"items": (SiloIpPool)[], -/** token used to fetch the next page of results (if any) */ -"nextPage"?: string | null,}; +export type VpcSubnetCreate = +{"description": string, +/** The IPv4 address range for this subnet. -/** -* A collection of resource counts used to set the virtual capacity of a silo - */ -export type SiloQuotas = -{ -/** Number of virtual CPUs */ -"cpus": number, -/** Amount of memory in bytes */ -"memory": ByteCount,"siloId": string, -/** Amount of disk storage in bytes */ -"storage": ByteCount,}; +It must be allocated from an RFC 1918 private address range, and must not overlap with any other existing subnet in the VPC. */ +"ipv4Block": Ipv4Net, +/** The IPv6 address range for this subnet. + +It must be allocated from the RFC 4193 Unique Local Address range, with the prefix equal to the parent VPC's prefix. A random `/64` block will be assigned if one is not provided. It must not overlap with any existing subnet in the VPC. */ +"ipv6Block"?: Ipv6Net | null,"name": Name,}; /** * A single page of results */ -export type SiloQuotasResultsPage = +export type VpcSubnetResultsPage = { /** list of items on this page of results */ -"items": (SiloQuotas)[], +"items": (VpcSubnet)[], /** token used to fetch the next page of results (if any) */ "nextPage"?: string | null,}; /** -* Updateable properties of a Silo's resource limits. If a value is omitted it will not be updated. +* Updateable properties of a `VpcSubnet` */ -export type SiloQuotasUpdate = -{ -/** The amount of virtual CPUs available for running instances in the Silo */ -"cpus"?: number | null, -/** The amount of RAM (in bytes) available for running instances in the Silo */ -"memory"?: ByteCount | null, -/** The amount of storage (in bytes) available for disks or snapshots */ -"storage"?: ByteCount | null,}; +export type VpcSubnetUpdate = +{"description"?: string | null,"name"?: Name | null,}; /** -* A single page of results +* Updateable properties of a `Vpc` */ -export type SiloResultsPage = -{ -/** list of items on this page of results */ -"items": (Silo)[], -/** token used to fetch the next page of results (if any) */ -"nextPage"?: string | null,}; +export type VpcUpdate = +{"description"?: string | null,"dnsName"?: Name | null,"name"?: Name | null,}; -export type SiloRole = -"admin" -| "collaborator" -| "limited_collaborator" -| "viewer" +/** +* Supported set of sort modes for scanning by name or id + */ +export type NameOrIdSortMode = +(/** sort in increasing order of "name" */ +| "name_ascending" + +/** sort in decreasing order of "name" */ +| "name_descending" + +/** sort in increasing order of "id" */ +| "id_ascending" + +); + +export type DiskMetricName = +"activated" +| "flush" +| "read" +| "read_bytes" +| "write" +| "write_bytes" ; /** -* 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. +* The order in which the client wants to page through the requested collection */ -export type SiloRoleRoleAssignment = -{"identityId": string,"identityType": IdentityType,"roleName": SiloRole,}; +export type PaginationOrder = +"ascending" +| "descending" +; /** -* Policy for a particular resource +* Supported set of sort modes for scanning by id only. * -* 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. +* Currently, we only support scanning in ascending order. */ -export type SiloRolePolicy = -{ -/** Roles directly assigned on this resource */ -"roleAssignments": (SiloRoleRoleAssignment)[],}; - -/** -* 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,}; - -/** -* View of a silo's resource utilization and capacity - */ -export type SiloUtilization = -{ -/** Accounts for the total amount of resources reserved for silos via their quotas */ -"allocated": VirtualResourceCounts, -/** Accounts for resources allocated by in silos like CPU or memory for running instances and storage for disks and snapshots Note that CPU and memory resources associated with a stopped instances are not counted here */ -"provisioned": VirtualResourceCounts,"siloId": string,"siloName": Name,}; +export type IdSortMode = +"id_ascending" +; -/** -* A single page of results - */ -export type SiloUtilizationResultsPage = -{ -/** list of items on this page of results */ -"items": (SiloUtilization)[], -/** token used to fetch the next page of results (if any) */ -"nextPage"?: string | null,}; +export type SystemMetricName = +"virtual_disk_space_provisioned" +| "cpus_provisioned" +| "ram_provisioned" +; /** -* The operator-defined provision policy of a sled. +* Supported set of sort modes for scanning by name only * -* This controls whether new resources are going to be provisioned on this sled. +* Currently, we only support scanning in ascending order. */ -export type SledProvisionPolicy = -(/** New resources will be provisioned on this sled. */ -| "provisionable" +export type NameSortMode = +"name_ascending" +; -/** 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" +export interface LoginSamlPathParams { + providerName: Name, + siloName: Name, +} -); +export interface CertificateListQueryParams { + limit?: number | null, + pageToken?: string | null, + sortBy?: NameOrIdSortMode, +} -/** -* 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. +export interface CertificateViewPathParams { + certificate: NameOrId, +} -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.) +export interface CertificateDeletePathParams { + certificate: NameOrId, +} -An expunged sled is always non-provisionable. */ -| {"kind": "expunged" -,} -); +export interface DiskListQueryParams { + limit?: number | null, + pageToken?: string | null, + project?: NameOrId, + sortBy?: NameOrIdSortMode, +} -/** -* The current state of the sled. - */ -export type SledState = -(/** The sled is currently active, and has resources allocated on it. */ -| "active" +export interface DiskCreateQueryParams { + project: NameOrId, +} -/** The sled has been permanently removed from service. +export interface DiskViewPathParams { + disk: NameOrId, +} -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" +export interface DiskViewQueryParams { + project?: NameOrId, +} -); +export interface DiskDeletePathParams { + disk: NameOrId, +} -/** -* An operator's view of a Sled. - */ -export type Sled = -{"baseboard": Baseboard, -/** unique, immutable, system-controlled identifier for each resource */ -"id": string, -/** The operator-defined policy of a sled. */ -"policy": SledPolicy, -/** The rack to which this Sled is currently attached */ -"rackId": string, -/** The current state of the sled. */ -"state": SledState, -/** timestamp when this resource was created */ -"timeCreated": Date, -/** timestamp when this resource was last modified */ -"timeModified": Date, -/** The number of hardware threads which can execute on this sled */ -"usableHardwareThreads": number, -/** Amount of RAM which may be used by the Sled's OS */ -"usablePhysicalRam": ByteCount,}; +export interface DiskDeleteQueryParams { + project?: NameOrId, +} -/** -* The unique ID of a sled. - */ -export type SledId = -{"id": string,}; +export interface DiskBulkWriteImportPathParams { + disk: NameOrId, +} -/** -* An operator's view of an instance running on a given sled - */ -export type SledInstance = -{"activeSledId": string, -/** unique, immutable, system-controlled identifier for each resource */ -"id": string,"memory": number,"migrationId"?: string | null,"name": Name,"ncpus": number,"projectName": Name,"siloName": Name,"state": InstanceState, -/** timestamp when this resource was created */ -"timeCreated": Date, -/** timestamp when this resource was last modified */ -"timeModified": Date,}; +export interface DiskBulkWriteImportQueryParams { + project?: NameOrId, +} -/** -* A single page of results - */ -export type SledInstanceResultsPage = -{ -/** list of items on this page of results */ -"items": (SledInstance)[], -/** token used to fetch the next page of results (if any) */ -"nextPage"?: string | null,}; +export interface DiskBulkWriteImportStartPathParams { + disk: NameOrId, +} -/** -* Parameters for `sled_set_provision_policy`. - */ -export type SledProvisionPolicyParams = -{ -/** The provision state. */ -"state": SledProvisionPolicy,}; +export interface DiskBulkWriteImportStartQueryParams { + project?: NameOrId, +} -/** -* Response to `sled_set_provision_policy`. - */ -export type SledProvisionPolicyResponse = -{ -/** The new provision state. */ -"newState": SledProvisionPolicy, -/** The old provision state. */ -"oldState": SledProvisionPolicy,}; +export interface DiskBulkWriteImportStopPathParams { + disk: NameOrId, +} -/** -* A single page of results - */ -export type SledResultsPage = -{ -/** list of items on this page of results */ -"items": (Sled)[], -/** token used to fetch the next page of results (if any) */ -"nextPage"?: string | null,}; +export interface DiskBulkWriteImportStopQueryParams { + project?: NameOrId, +} -export type SnapshotState = -"creating" -| "ready" -| "faulted" -| "destroyed" -; +export interface DiskFinalizeImportPathParams { + disk: NameOrId, +} -/** -* View of a Snapshot - */ -export type Snapshot = -{ -/** human-readable free-form text about a resource */ -"description": string,"diskId": string, -/** unique, immutable, system-controlled identifier for each resource */ -"id": string, -/** unique, mutable, user-controlled identifier for each resource */ -"name": Name,"projectId": string,"size": ByteCount,"state": SnapshotState, -/** timestamp when this resource was created */ -"timeCreated": Date, -/** timestamp when this resource was last modified */ -"timeModified": Date,}; +export interface DiskFinalizeImportQueryParams { + project?: NameOrId, +} -/** -* Create-time parameters for a `Snapshot` - */ -export type SnapshotCreate = -{"description": string, -/** The disk to be snapshotted */ -"disk": NameOrId,"name": Name,}; +export interface DiskMetricsListPathParams { + disk: NameOrId, + metric: DiskMetricName, +} -/** -* A single page of results - */ -export type SnapshotResultsPage = -{ -/** list of items on this page of results */ -"items": (Snapshot)[], -/** token used to fetch the next page of results (if any) */ -"nextPage"?: string | null,}; +export interface DiskMetricsListQueryParams { + endTime?: Date, + limit?: number | null, + order?: PaginationOrder, + pageToken?: string | null, + startTime?: Date, + project?: NameOrId, +} -/** -* View of an SSH Key - */ -export type SshKey = -{ -/** human-readable free-form text about a resource */ -"description": string, -/** unique, immutable, system-controlled identifier for each resource */ -"id": string, -/** unique, mutable, user-controlled identifier for each resource */ -"name": Name, -/** SSH public key, e.g., `"ssh-ed25519 AAAAC3NzaC..."` */ -"publicKey": string, -/** The user to whom this key belongs */ -"siloUserId": string, -/** timestamp when this resource was created */ -"timeCreated": Date, -/** timestamp when this resource was last modified */ -"timeModified": Date,}; - -/** -* Create-time parameters for an `SshKey` - */ -export type SshKeyCreate = -{"description": string,"name": Name, -/** SSH public key, e.g., `"ssh-ed25519 AAAAC3NzaC..."` */ -"publicKey": string,}; +export interface FloatingIpListQueryParams { + limit?: number | null, + pageToken?: string | null, + project?: NameOrId, + sortBy?: NameOrIdSortMode, +} -/** -* A single page of results - */ -export type SshKeyResultsPage = -{ -/** list of items on this page of results */ -"items": (SshKey)[], -/** token used to fetch the next page of results (if any) */ -"nextPage"?: string | null,}; +export interface FloatingIpCreateQueryParams { + project: NameOrId, +} -export type SupportBundleCreate = -{ -/** User comment for the support bundle */ -"userComment"?: string | null,}; +export interface FloatingIpViewPathParams { + floatingIp: NameOrId, +} -export type SupportBundleState = -(/** Support Bundle still actively being collected. +export interface FloatingIpViewQueryParams { + project?: NameOrId, +} -This is the initial state for a Support Bundle, and it will automatically transition to either "Failing" or "Active". +export interface FloatingIpUpdatePathParams { + floatingIp: NameOrId, +} -If a user no longer wants to access a Support Bundle, they can request cancellation, which will transition to the "Destroying" state. */ -| "collecting" +export interface FloatingIpUpdateQueryParams { + project?: NameOrId, +} -/** Support Bundle is being destroyed. +export interface FloatingIpDeletePathParams { + floatingIp: NameOrId, +} -Once backing storage has been freed, this bundle is destroyed. */ -| "destroying" +export interface FloatingIpDeleteQueryParams { + project?: NameOrId, +} -/** Support Bundle was not created successfully, or was created and has lost backing storage. +export interface FloatingIpAttachPathParams { + floatingIp: NameOrId, +} -The record of the bundle still exists for readability, but the only valid operation on these bundles is to destroy them. */ -| "failed" +export interface FloatingIpAttachQueryParams { + project?: NameOrId, +} -/** Support Bundle has been processed, and is ready for usage. */ -| "active" +export interface FloatingIpDetachPathParams { + floatingIp: NameOrId, +} -); +export interface FloatingIpDetachQueryParams { + project?: NameOrId, +} -export type SupportBundleInfo = -{"id": string,"reasonForCreation": string,"reasonForFailure"?: string | null,"state": SupportBundleState,"timeCreated": Date,"userComment"?: string | null,}; +export interface GroupListQueryParams { + limit?: number | null, + pageToken?: string | null, + sortBy?: IdSortMode, +} -/** -* A single page of results - */ -export type SupportBundleInfoResultsPage = -{ -/** list of items on this page of results */ -"items": (SupportBundleInfo)[], -/** token used to fetch the next page of results (if any) */ -"nextPage"?: string | null,}; +export interface GroupViewPathParams { + groupId: string, +} -export type SupportBundleUpdate = -{ -/** User comment for the support bundle */ -"userComment"?: string | null,}; +export interface ImageListQueryParams { + limit?: number | null, + pageToken?: string | null, + project?: NameOrId, + sortBy?: NameOrIdSortMode, +} -/** -* An operator's view of a Switch. - */ -export type Switch = -{"baseboard": Baseboard, -/** unique, immutable, system-controlled identifier for each resource */ -"id": string, -/** The rack to which this Switch is currently attached */ -"rackId": string, -/** timestamp when this resource was created */ -"timeCreated": Date, -/** timestamp when this resource was last modified */ -"timeModified": Date,}; +export interface ImageCreateQueryParams { + project?: NameOrId, +} -/** -* Describes the kind of an switch interface. - */ -export type SwitchInterfaceKind2 = -(/** Primary interfaces are associated with physical links. There is exactly one primary interface per physical link. */ -| "primary" +export interface ImageViewPathParams { + image: NameOrId, +} -/** VLAN interfaces allow physical interfaces to be multiplexed onto multiple logical links, each distinguished by a 12-bit 802.1Q Ethernet tag. */ -| "vlan" +export interface ImageViewQueryParams { + project?: NameOrId, +} -/** Loopback interfaces are anchors for IP addresses that are not specific to any particular port. */ -| "loopback" +export interface ImageDeletePathParams { + image: NameOrId, +} -); +export interface ImageDeleteQueryParams { + project?: NameOrId, +} -/** -* A switch port interface configuration for a port settings object. - */ -export type SwitchInterfaceConfig = -{ -/** A unique identifier for this switch interface. */ -"id": string, -/** The name of this switch interface. */ -"interfaceName": Name, -/** The switch interface kind. */ -"kind": SwitchInterfaceKind2, -/** The port settings object this switch interface configuration belongs to. */ -"portSettingsId": string, -/** Whether or not IPv6 is enabled on this interface. */ -"v6Enabled": boolean,}; +export interface ImageDemotePathParams { + image: NameOrId, +} -/** -* Indicates the kind for a switch interface. - */ -export type SwitchInterfaceKind = -(/** Primary interfaces are associated with physical links. There is exactly one primary interface per physical link. */ -| {"type": "primary" -,} -/** VLAN interfaces allow physical interfaces to be multiplexed onto multiple logical links, each distinguished by a 12-bit 802.1Q Ethernet tag. */ -| {"type": "vlan" -, -/** The virtual network id (VID) that distinguishes this interface and 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. */ -"vid": number,} -/** Loopback interfaces are anchors for IP addresses that are not specific to any particular port. */ -| {"type": "loopback" -,} -); +export interface ImageDemoteQueryParams { + project: NameOrId, +} -/** -* 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, -/** Link name. On ports that are not broken out, this is always phy0. On a 2x breakout the options are phy0 and phy1, on 4x phy0-phy3, etc. */ -"linkName": Name, -/** Whether or not IPv6 is enabled. */ -"v6Enabled": boolean,}; +export interface ImagePromotePathParams { + image: NameOrId, +} -export type SwitchLinkState = -Record; +export interface ImagePromoteQueryParams { + project?: NameOrId, +} -/** -* A switch port represents a physical external port on a rack switch. - */ -export type SwitchPort = -{ -/** The id of the switch port. */ -"id": string, -/** The name of this switch port. */ -"portName": Name, -/** The primary settings group of this switch port. Will be `None` until this switch port is configured. */ -"portSettingsId"?: string | null, -/** The rack this switch port belongs to. */ -"rackId": string, -/** The switch location of this switch port. */ -"switchLocation": string,}; +export interface InstanceListQueryParams { + limit?: number | null, + pageToken?: string | null, + project?: NameOrId, + sortBy?: NameOrIdSortMode, +} -/** -* An IP address configuration for a port settings object. - */ -export type SwitchPortAddressView = -{ -/** The IP address and prefix. */ -"address": IpNet, -/** The id of the address lot block this address is drawn from. */ -"addressLotBlockId": string, -/** The id of the address lot this address is drawn from. */ -"addressLotId": string, -/** The name of the address lot this address is drawn from. */ -"addressLotName": Name, -/** The interface name this address belongs to. */ -"interfaceName": Name, -/** The port settings object this address configuration belongs to. */ -"portSettingsId": string, -/** An optional VLAN ID */ -"vlanId"?: number | null,}; +export interface InstanceCreateQueryParams { + project: NameOrId, +} -/** -* Parameters for applying settings to switch ports. - */ -export type SwitchPortApplySettings = -{ -/** A name or id to use when applying switch port settings. */ -"portSettings": NameOrId,}; +export interface InstanceViewPathParams { + instance: NameOrId, +} -/** -* The link geometry associated with a switch port. - */ -export type SwitchPortGeometry2 = -(/** The port contains a single QSFP28 link with four lanes. */ -| "qsfp28x1" +export interface InstanceViewQueryParams { + project?: NameOrId, +} -/** The port contains two QSFP28 links each with two lanes. */ -| "qsfp28x2" +export interface InstanceDeletePathParams { + instance: NameOrId, +} -/** The port contains four SFP28 links each with one lane. */ -| "sfp28x4" +export interface InstanceDeleteQueryParams { + project?: NameOrId, +} -); +export interface InstanceDiskListPathParams { + instance: NameOrId, +} -/** -* A physical port configuration for a port settings object. - */ -export type SwitchPortConfig = -{ -/** The physical link geometry of the port. */ -"geometry": SwitchPortGeometry2, -/** The id of the port settings object this configuration belongs to. */ -"portSettingsId": string,}; +export interface InstanceDiskListQueryParams { + limit?: number | null, + pageToken?: string | null, + project?: NameOrId, + sortBy?: NameOrIdSortMode, +} -/** -* The link geometry associated with a switch port. - */ -export type SwitchPortGeometry = -(/** The port contains a single QSFP28 link with four lanes. */ -| "qsfp28x1" +export interface InstanceDiskAttachPathParams { + instance: NameOrId, +} -/** The port contains two QSFP28 links each with two lanes. */ -| "qsfp28x2" +export interface InstanceDiskAttachQueryParams { + project?: NameOrId, +} -/** The port contains four SFP28 links each with one lane. */ -| "sfp28x4" +export interface InstanceDiskDetachPathParams { + instance: NameOrId, +} -); +export interface InstanceDiskDetachQueryParams { + project?: NameOrId, +} -/** -* Physical switch port configuration. - */ -export type SwitchPortConfigCreate = -{ -/** Link geometry for the switch port. */ -"geometry": SwitchPortGeometry,}; +export interface InstanceExternalIpListPathParams { + instance: NameOrId, +} -/** -* Per-port tx-eq overrides. This can be used to fine-tune the transceiver equalization settings to improve signal integrity. - */ -export type TxEqConfig2 = -{ -/** Main tap */ -"main"?: number | null, -/** Post-cursor tap1 */ -"post1"?: number | null, -/** Post-cursor tap2 */ -"post2"?: number | null, -/** Pre-cursor tap1 */ -"pre1"?: number | null, -/** Pre-cursor tap2 */ -"pre2"?: number | null,}; +export interface InstanceExternalIpListQueryParams { + project?: NameOrId, +} -/** -* A link configuration for a port settings object. - */ -export type SwitchPortLinkConfig = -{ -/** Whether or not the link has autonegotiation enabled. */ -"autoneg": boolean, -/** The requested forward-error correction method. If this is not specified, the standard FEC for the underlying media will be applied if it can be determined. */ -"fec"?: LinkFec | null, -/** The name of this link. */ -"linkName": Name, -/** The link-layer discovery protocol service configuration for this link. */ -"lldpLinkConfig"?: LldpLinkConfig | null, -/** The maximum transmission unit for this link. */ -"mtu": number, -/** The port settings this link configuration belongs to. */ -"portSettingsId": string, -/** The configured speed of the link. */ -"speed": LinkSpeed, -/** The tx_eq configuration for this link. */ -"txEqConfig"?: TxEqConfig2 | null,}; +export interface InstanceEphemeralIpAttachPathParams { + instance: NameOrId, +} -/** -* A single page of results - */ -export type SwitchPortResultsPage = -{ -/** list of items on this page of results */ -"items": (SwitchPort)[], -/** token used to fetch the next page of results (if any) */ -"nextPage"?: string | null,}; +export interface InstanceEphemeralIpAttachQueryParams { + project?: NameOrId, +} -/** -* A route configuration for a port settings object. - */ -export type SwitchPortRouteConfig = -{ -/** The route's destination network. */ -"dst": IpNet, -/** The route's gateway address. */ -"gw": string, -/** The interface name this route configuration is assigned to. */ -"interfaceName": Name, -/** The port settings object this route configuration belongs to. */ -"portSettingsId": string, -/** Route RIB priority. Higher priority indicates precedence within and across protocols. */ -"ribPriority"?: number | null, -/** The VLAN identifier for the route. Use this if the gateway is reachable over an 802.1Q tagged L2 segment. */ -"vlanId"?: number | null,}; +export interface InstanceEphemeralIpDetachPathParams { + instance: NameOrId, +} -/** -* This structure maps a port settings object to a port settings groups. Port settings objects may inherit settings from groups. This mapping defines the relationship between settings objects and the groups they reference. - */ -export type SwitchPortSettingsGroups = -{ -/** The id of a port settings group being referenced by a port settings object. */ -"portSettingsGroupId": string, -/** The id of a port settings object referencing a port settings group. */ -"portSettingsId": string,}; +export interface InstanceEphemeralIpDetachQueryParams { + project?: NameOrId, +} -/** -* 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,}; +export interface InstanceMigratePathParams { + instance: NameOrId, +} -/** -* 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. - */ -export type SwitchPortSettings = -{ -/** Layer 3 IP address settings. */ -"addresses": (SwitchPortAddressView)[], -/** BGP peer settings. */ -"bgpPeers": (BgpPeer)[], -/** human-readable free-form text about a resource */ -"description": string, -/** Switch port settings included from other switch port settings groups. */ -"groups": (SwitchPortSettingsGroups)[], -/** unique, immutable, system-controlled identifier for each resource */ -"id": string, -/** Layer 3 interface settings. */ -"interfaces": (SwitchInterfaceConfig)[], -/** Layer 2 link settings. */ -"links": (SwitchPortLinkConfig)[], -/** unique, mutable, user-controlled identifier for each resource */ -"name": Name, -/** Layer 1 physical port settings. */ -"port": SwitchPortConfig, -/** IP route settings. */ -"routes": (SwitchPortRouteConfig)[], -/** timestamp when this resource was created */ -"timeCreated": Date, -/** timestamp when this resource was last modified */ -"timeModified": Date, -/** Vlan interface settings. */ -"vlanInterfaces": (SwitchVlanInterfaceConfig)[],}; +export interface InstanceMigrateQueryParams { + project?: NameOrId, +} -/** -* Parameters for creating switch port settings. Switch port settings are the central data structure for setting up external networking. Switch port settings include link, interface, route, address and dynamic network protocol configuration. - */ -export type SwitchPortSettingsCreate = -{ -/** Address configurations. */ -"addresses": (AddressConfig)[], -/** BGP peer configurations. */ -"bgpPeers"?: (BgpPeerConfig)[],"description": string,"groups"?: (NameOrId)[], -/** Interface configurations. */ -"interfaces"?: (SwitchInterfaceConfigCreate)[], -/** Link configurations. */ -"links": (LinkConfigCreate)[],"name": Name,"portConfig": SwitchPortConfigCreate, -/** Route configurations. */ -"routes"?: (RouteConfig)[],}; +export interface InstanceRebootPathParams { + instance: NameOrId, +} -/** -* A switch port settings identity whose id may be used to view additional details. - */ -export type SwitchPortSettingsIdentity = -{ -/** human-readable free-form text about a resource */ -"description": string, -/** unique, immutable, system-controlled identifier for each resource */ -"id": string, -/** unique, mutable, user-controlled identifier for each resource */ -"name": Name, -/** timestamp when this resource was created */ -"timeCreated": Date, -/** timestamp when this resource was last modified */ -"timeModified": Date,}; +export interface InstanceRebootQueryParams { + project?: NameOrId, +} -/** -* A single page of results - */ -export type SwitchPortSettingsIdentityResultsPage = -{ -/** list of items on this page of results */ -"items": (SwitchPortSettingsIdentity)[], -/** token used to fetch the next page of results (if any) */ -"nextPage"?: string | null,}; +export interface InstanceSerialConsolePathParams { + instance: NameOrId, +} -/** -* A single page of results - */ -export type SwitchResultsPage = -{ -/** list of items on this page of results */ -"items": (Switch)[], -/** token used to fetch the next page of results (if any) */ -"nextPage"?: string | null,}; +export interface InstanceSerialConsoleQueryParams { + fromStart?: number | null, + maxBytes?: number | null, + mostRecent?: number | null, + project?: NameOrId, +} -/** -* View of a system software target release - */ -export type TargetRelease = -{ -/** Time this was set as the target release */ -"timeRequested": Date, -/** The specified release of the rack's system software */ -"version": string,}; +export interface InstanceSerialConsoleStreamPathParams { + instance: NameOrId, +} -/** -* Text descriptions for the target and metric of a timeseries. - */ -export type TimeseriesDescription = -{"metric": string,"target": string,}; +export interface InstanceSerialConsoleStreamQueryParams { + mostRecent?: number | null, + project?: NameOrId, +} -/** -* The name of a timeseries -* -* Names are constructed by concatenating the target and metric names with ':'. Target and metric names must be lowercase alphanumeric characters with '_' separating words. - */ -export type TimeseriesName = -string; +export interface InstanceSshPublicKeyListPathParams { + instance: NameOrId, +} -/** -* A timeseries query string, written in the Oximeter query language. - */ -export type TimeseriesQuery = -{ -/** A timeseries query string, written in the Oximeter query language. */ -"query": string,}; +export interface InstanceSshPublicKeyListQueryParams { + limit?: number | null, + pageToken?: string | null, + project?: NameOrId, + sortBy?: NameOrIdSortMode, +} -/** -* 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" +export interface InstanceStartPathParams { + instance: NameOrId, +} -/** Rotations per minute. */ -| "rpm" +export interface InstanceStartQueryParams { + project?: NameOrId, +} -); +export interface InstanceStopPathParams { + instance: NameOrId, +} -/** -* The schema for a timeseries. -* -* This includes the name of the timeseries, as well as the datum type of its metric and the schema for each field. - */ -export type TimeseriesSchema = -{"authzScope": AuthzScope,"created": Date,"datumType": DatumType,"description": TimeseriesDescription,"fieldSchema": (FieldSchema)[],"timeseriesName": TimeseriesName,"units": Units,"version": number,}; +export interface InstanceStopQueryParams { + project?: NameOrId, +} -/** -* A single page of results - */ -export type TimeseriesSchemaResultsPage = -{ -/** list of items on this page of results */ -"items": (TimeseriesSchema)[], -/** token used to fetch the next page of results (if any) */ -"nextPage"?: string | null,}; +export interface ProjectIpPoolListQueryParams { + limit?: number | null, + pageToken?: string | null, + sortBy?: NameOrIdSortMode, +} -/** -* Metadata about a TUF repository - */ -export type TufRepo = -{ -/** The file name of the repository, as reported by the client that uploaded it +export interface ProjectIpPoolViewPathParams { + pool: NameOrId, +} -This is intended for debugging. The file name may not match any particular pattern, and even if it does, it may not be accurate since it's just what the client reported. */ -"fileName": string, -/** The hash of the repository */ -"hash": string, -/** The system version for this repository +export interface LoginLocalPathParams { + siloName: Name, +} -The system version is a top-level version number applied to all the software in the repository. */ -"systemVersion": string, -/** Time the repository was uploaded */ -"timeCreated": Date,}; +export interface CurrentUserGroupsQueryParams { + limit?: number | null, + pageToken?: string | null, + sortBy?: IdSortMode, +} -/** -* A single page of results - */ -export type TufRepoResultsPage = -{ -/** list of items on this page of results */ -"items": (TufRepo)[], -/** token used to fetch the next page of results (if any) */ -"nextPage"?: string | null,}; +export interface CurrentUserSshKeyListQueryParams { + limit?: number | null, + pageToken?: string | null, + sortBy?: NameOrIdSortMode, +} -/** -* Whether the uploaded TUF repo already existed or was new and had to be inserted. Part of `TufRepoUpload`. - */ -export type TufRepoUploadStatus = -(/** The repository already existed in the database */ -| "already_exists" +export interface CurrentUserSshKeyViewPathParams { + sshKey: NameOrId, +} -/** The repository did not exist, and was inserted into the database */ -| "inserted" +export interface CurrentUserSshKeyDeletePathParams { + sshKey: NameOrId, +} -); +export interface SiloMetricPathParams { + metricName: SystemMetricName, +} -export type TufRepoUpload = -{"repo": TufRepo,"status": TufRepoUploadStatus,}; +export interface SiloMetricQueryParams { + endTime?: Date, + limit?: number | null, + order?: PaginationOrder, + pageToken?: string | null, + startTime?: Date, + project?: NameOrId, +} -/** -* A sled that has not been added to an initialized rack yet - */ -export type UninitializedSled = -{"baseboard": Baseboard,"cubby": number,"rackId": string,}; +export interface InstanceNetworkInterfaceListQueryParams { + instance?: NameOrId, + limit?: number | null, + pageToken?: string | null, + project?: NameOrId, + sortBy?: NameOrIdSortMode, +} -/** -* The unique hardware ID for a sled - */ -export type UninitializedSledId = -{"part": string,"serial": string,}; +export interface InstanceNetworkInterfaceCreateQueryParams { + instance: NameOrId, + project?: NameOrId, +} -/** -* A single page of results - */ -export type UninitializedSledResultsPage = -{ -/** list of items on this page of results */ -"items": (UninitializedSled)[], -/** token used to fetch the next page of results (if any) */ -"nextPage"?: string | null,}; +export interface InstanceNetworkInterfaceViewPathParams { + interface: NameOrId, +} -export type UpdateStatus = -{ -/** Count of components running each release version +export interface InstanceNetworkInterfaceViewQueryParams { + instance?: NameOrId, + project?: NameOrId, +} -Keys will be either: +export interface InstanceNetworkInterfaceUpdatePathParams { + interface: NameOrId, +} -* Semver-like release version strings * "install dataset", representing the initial rack software before any updates * "unknown", which means there is no TUF repo uploaded that matches the software running on the component) */ -"componentsByReleaseVersion": Record, -/** Whether automatic update is suspended due to manual update activity +export interface InstanceNetworkInterfaceUpdateQueryParams { + instance?: NameOrId, + project?: NameOrId, +} -After a manual support procedure that changes the system software, automatic update activity is suspended to avoid undoing the change. To resume automatic update, first upload the TUF repository matching the manually applied update, then set that as the target release. */ -"suspended": boolean, -/** Current target release of the system software +export interface InstanceNetworkInterfaceDeletePathParams { + interface: NameOrId, +} -This may not correspond to the actual system software running at the time of request; it is instead the release that the system should be moving towards as a goal state. The system asynchronously updates software to match this target release. +export interface InstanceNetworkInterfaceDeleteQueryParams { + instance?: NameOrId, + project?: NameOrId, +} -Will only be null if a target release has never been set. In that case, the system is not automatically attempting to manage software versions. */ -"targetRelease": TargetRelease | null, -/** Time of most recent update planning activity +export interface ProjectListQueryParams { + limit?: number | null, + pageToken?: string | null, + sortBy?: NameOrIdSortMode, +} -This is intended as a rough indicator of the last time something happened in the update planner. */ -"timeLastStepPlanned": Date,}; +export interface ProjectViewPathParams { + project: NameOrId, +} -/** -* Trusted root role used by the update system to verify update repositories. - */ -export type UpdatesTrustRoot = -{ -/** The UUID of this trusted root role. */ -"id": string, -/** The trusted root role itself, a JSON document as described by The Update Framework. */ -"rootRole": Record, -/** Time the trusted root role was added. */ -"timeCreated": Date,}; +export interface ProjectUpdatePathParams { + project: NameOrId, +} -/** -* A single page of results - */ -export type UpdatesTrustRootResultsPage = -{ -/** list of items on this page of results */ -"items": (UpdatesTrustRoot)[], -/** token used to fetch the next page of results (if any) */ -"nextPage"?: string | null,}; +export interface ProjectDeletePathParams { + project: NameOrId, +} -/** -* View of a User - */ -export type User = -{ -/** Human-readable name that can identify the user */ -"displayName": string,"id": string, -/** Uuid of the silo to which this user belongs */ -"siloId": string,}; +export interface ProjectPolicyViewPathParams { + project: NameOrId, +} -/** -* View of a Built-in User -* -* Built-in users are identities internal to the system, used when the control plane performs actions autonomously - */ -export type UserBuiltin = -{ -/** human-readable free-form text about a resource */ -"description": string, -/** unique, immutable, system-controlled identifier for each resource */ -"id": string, -/** unique, mutable, user-controlled identifier for each resource */ -"name": Name, -/** timestamp when this resource was created */ -"timeCreated": Date, -/** timestamp when this resource was last modified */ -"timeModified": Date,}; +export interface ProjectPolicyUpdatePathParams { + project: NameOrId, +} -/** -* A single page of results - */ -export type UserBuiltinResultsPage = -{ -/** list of items on this page of results */ -"items": (UserBuiltin)[], -/** token used to fetch the next page of results (if any) */ -"nextPage"?: string | null,}; +export interface SnapshotListQueryParams { + limit?: number | null, + pageToken?: string | null, + project?: NameOrId, + sortBy?: NameOrIdSortMode, +} -/** -* A username for a local-only user -* -* Usernames must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'. Usernames cannot be a UUID, but they may contain a UUID. They can be at most 63 characters long. - */ -export type UserId = -string; +export interface SnapshotCreateQueryParams { + project: NameOrId, +} -/** -* Parameters for setting a user's password - */ -export type UserPassword = -(/** Sets the user's password to the provided value */ -| {"mode": "password" -,"value": Password,} -/** Invalidates any current password (disabling password authentication) */ -| {"mode": "login_disallowed" -,} -); +export interface SnapshotViewPathParams { + snapshot: NameOrId, +} -/** -* 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,}; +export interface SnapshotViewQueryParams { + project?: NameOrId, +} -/** -* A single page of results - */ -export type UserResultsPage = -{ -/** list of items on this page of results */ -"items": (User)[], -/** token used to fetch the next page of results (if any) */ -"nextPage"?: string | null,}; +export interface SnapshotDeletePathParams { + snapshot: NameOrId, +} -/** -* Credentials for local user login - */ -export type UsernamePasswordCredentials = -{"password": Password,"username": UserId,}; +export interface SnapshotDeleteQueryParams { + project?: NameOrId, +} -/** -* View of the current silo's resource utilization and capacity - */ -export type Utilization = -{ -/** The total amount of resources that can be provisioned in this silo Actions that would exceed this limit will fail */ -"capacity": VirtualResourceCounts, -/** Accounts for resources allocated to running instances or storage allocated via disks or snapshots Note that CPU and memory resources associated with a stopped instances are not counted here whereas associated disks will still be counted */ -"provisioned": VirtualResourceCounts,}; +export interface PhysicalDiskListQueryParams { + limit?: number | null, + pageToken?: string | null, + sortBy?: IdSortMode, +} -/** -* View of a VPC - */ -export type Vpc = -{ -/** human-readable free-form text about a resource */ -"description": string, -/** The name used for the VPC in DNS. */ -"dnsName": Name, -/** unique, immutable, system-controlled identifier for each resource */ -"id": string, -/** The unique local IPv6 address range for subnets in this VPC */ -"ipv6Prefix": Ipv6Net, -/** unique, mutable, user-controlled identifier for each resource */ -"name": Name, -/** id for the project containing this VPC */ -"projectId": string, -/** id for the system router where subnet default routes are registered */ -"systemRouterId": string, -/** timestamp when this resource was created */ -"timeCreated": Date, -/** timestamp when this resource was last modified */ -"timeModified": Date,}; +export interface RackListQueryParams { + limit?: number | null, + pageToken?: string | null, + sortBy?: IdSortMode, +} -/** -* Create-time parameters for a `Vpc` - */ -export type VpcCreate = -{"description": string,"dnsName": Name, -/** The IPv6 prefix for this VPC +export interface RackViewPathParams { + rackId: string, +} -All IPv6 subnets created from this VPC must be taken from this range, which should be a Unique Local Address in the range `fd00::/48`. The default VPC Subnet will have the first `/64` range from this prefix. */ -"ipv6Prefix"?: Ipv6Net | null,"name": Name,}; +export interface SledListQueryParams { + limit?: number | null, + pageToken?: string | null, + sortBy?: IdSortMode, +} -export type VpcFirewallIcmpFilter = -{"code"?: IcmpParamRange | null,"icmpType": number,}; +export interface SledViewPathParams { + sledId: string, +} -export type VpcFirewallRuleAction = -"allow" -| "deny" -; +export interface SledPhysicalDiskListPathParams { + sledId: string, +} -export type VpcFirewallRuleDirection = -"inbound" -| "outbound" -; +export interface SledPhysicalDiskListQueryParams { + limit?: number | null, + pageToken?: string | null, + sortBy?: IdSortMode, +} -/** -* The `VpcFirewallRuleHostFilter` is used to filter traffic on the basis of its source or destination host. - */ -export type VpcFirewallRuleHostFilter = -(/** The rule applies to traffic from/to all instances in the VPC */ -| {"type": "vpc" -,"value": Name,} -/** The rule applies to traffic from/to all instances in the VPC Subnet */ -| {"type": "subnet" -,"value": Name,} -/** The rule applies to traffic from/to this specific instance */ -| {"type": "instance" -,"value": Name,} -/** The rule applies to traffic from/to a specific IP address */ -| {"type": "ip" -,"value": string,} -/** The rule applies to traffic from/to a specific IP subnet */ -| {"type": "ip_net" -,"value": IpNet,} -); +export interface SledInstanceListPathParams { + sledId: string, +} -/** -* The protocols that may be specified in a firewall rule's filter - */ -export type VpcFirewallRuleProtocol = -(| {"type": "tcp" -,} -| {"type": "udp" -,} -| {"type": "icmp" -,"value": VpcFirewallIcmpFilter | null,} -); +export interface SledInstanceListQueryParams { + limit?: number | null, + pageToken?: string | null, + sortBy?: IdSortMode, +} -/** -* 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)[] | null, -/** If present, the destination ports or port ranges this rule applies to. */ -"ports"?: (L4PortRange)[] | null, -/** If present, the networking protocols this rule applies to. */ -"protocols"?: (VpcFirewallRuleProtocol)[] | null,}; +export interface SledSetProvisionPolicyPathParams { + sledId: string, +} -export type VpcFirewallRuleStatus = -"disabled" -| "enabled" -; +export interface SledListUninitializedQueryParams { + limit?: number | null, + pageToken?: string | null, +} -/** -* A `VpcFirewallRuleTarget` is used to specify the set of instances to which a firewall rule applies. You can target instances directly by name, or specify a VPC, VPC subnet, IP, or IP subnet, which will apply the rule to traffic going to all matching instances. Targets are additive: the rule applies to instances matching ANY target. - */ -export type VpcFirewallRuleTarget = -(/** The rule applies to all instances in the VPC */ -| {"type": "vpc" -,"value": Name,} -/** The rule applies to all instances in the VPC Subnet */ -| {"type": "subnet" -,"value": Name,} -/** The rule applies to this specific instance */ -| {"type": "instance" -,"value": Name,} -/** The rule applies to a specific IP address */ -| {"type": "ip" -,"value": string,} -/** The rule applies to a specific IP subnet */ -| {"type": "ip_net" -,"value": IpNet,} -); +export interface NetworkingSwitchPortListQueryParams { + limit?: number | null, + pageToken?: string | null, + sortBy?: IdSortMode, + switchPortId?: string | null, +} -/** -* 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 interface NetworkingSwitchPortApplySettingsPathParams { + port: Name, +} -/** -* A single rule in a VPC firewall - */ -export type VpcFirewallRuleUpdate = -{ -/** 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, -/** Name of the rule, unique to this VPC */ -"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)[],}; +export interface NetworkingSwitchPortApplySettingsQueryParams { + rackId: string, + switchLocation: Name, +} -/** -* Updated list of firewall rules. Will replace all existing rules. - */ -export type VpcFirewallRuleUpdateParams = -{"rules"?: (VpcFirewallRuleUpdate)[],}; +export interface NetworkingSwitchPortClearSettingsPathParams { + port: Name, +} -/** -* Collection of a Vpc's firewall rules - */ -export type VpcFirewallRules = -{"rules": (VpcFirewallRule)[],}; +export interface NetworkingSwitchPortClearSettingsQueryParams { + rackId: string, + switchLocation: Name, +} -/** -* A single page of results - */ -export type VpcResultsPage = -{ -/** list of items on this page of results */ -"items": (Vpc)[], -/** token used to fetch the next page of results (if any) */ -"nextPage"?: string | null,}; +export interface SwitchListQueryParams { + limit?: number | null, + pageToken?: string | null, + sortBy?: IdSortMode, +} -export type VpcRouterKind = -"system" -| "custom" -; +export interface SwitchViewPathParams { + switchId: string, +} -/** -* A VPC router defines a series of rules that indicate where traffic should be sent depending on its destination. - */ -export type VpcRouter = -{ -/** human-readable free-form text about a resource */ -"description": string, -/** unique, immutable, system-controlled identifier for each resource */ -"id": string,"kind": VpcRouterKind, -/** unique, mutable, user-controlled identifier for each resource */ -"name": Name, -/** timestamp when this resource was created */ -"timeCreated": Date, -/** timestamp when this resource was last modified */ -"timeModified": Date, -/** The VPC to which the router belongs. */ -"vpcId": string,}; +export interface SiloIdentityProviderListQueryParams { + limit?: number | null, + pageToken?: string | null, + silo?: NameOrId, + sortBy?: NameOrIdSortMode, +} -/** -* Create-time parameters for a `VpcRouter` - */ -export type VpcRouterCreate = -{"description": string,"name": Name,}; +export interface LocalIdpUserCreateQueryParams { + silo: NameOrId, +} -/** -* A single page of results - */ -export type VpcRouterResultsPage = -{ -/** list of items on this page of results */ -"items": (VpcRouter)[], -/** token used to fetch the next page of results (if any) */ -"nextPage"?: string | null,}; +export interface LocalIdpUserDeletePathParams { + userId: string, +} -/** -* Updateable properties of a `VpcRouter` - */ -export type VpcRouterUpdate = -{"description"?: string | null,"name"?: Name | null,}; +export interface LocalIdpUserDeleteQueryParams { + silo: NameOrId, +} -/** -* A VPC subnet represents a logical grouping for instances that allows network traffic between them, within a IPv4 subnetwork or optionally an IPv6 subnetwork. - */ -export type VpcSubnet = -{ -/** ID for an attached custom router. */ -"customRouterId"?: string | null, -/** human-readable free-form text about a resource */ -"description": string, -/** unique, immutable, system-controlled identifier for each resource */ -"id": string, -/** The IPv4 subnet CIDR block. */ -"ipv4Block": Ipv4Net, -/** The IPv6 subnet CIDR block. */ -"ipv6Block": Ipv6Net, -/** unique, mutable, user-controlled identifier for each resource */ -"name": Name, -/** timestamp when this resource was created */ -"timeCreated": Date, -/** timestamp when this resource was last modified */ -"timeModified": Date, -/** The VPC to which the subnet belongs. */ -"vpcId": string,}; - -/** -* Create-time parameters for a `VpcSubnet` - */ -export type VpcSubnetCreate = -{ -/** An optional router, used to direct packets sent from hosts in this subnet to any destination address. - -Custom routers apply in addition to the VPC-wide *system* router, and have higher priority than the system router for an otherwise equal-prefix-length match. */ -"customRouter"?: NameOrId | null,"description": string, -/** The IPv4 address range for this subnet. - -It must be allocated from an RFC 1918 private address range, and must not overlap with any other existing subnet in the VPC. */ -"ipv4Block": Ipv4Net, -/** The IPv6 address range for this subnet. - -It must be allocated from the RFC 4193 Unique Local Address range, with the prefix equal to the parent VPC's prefix. A random `/64` block will be assigned if one is not provided. It must not overlap with any existing subnet in the VPC. */ -"ipv6Block"?: Ipv6Net | null,"name": Name,}; - -/** -* A single page of results - */ -export type VpcSubnetResultsPage = -{ -/** list of items on this page of results */ -"items": (VpcSubnet)[], -/** token used to fetch the next page of results (if any) */ -"nextPage"?: string | null,}; - -/** -* Updateable properties of a `VpcSubnet` - */ -export type VpcSubnetUpdate = -{ -/** An optional router, used to direct packets sent from hosts in this subnet to any destination address. */ -"customRouter"?: NameOrId | null,"description"?: string | null,"name"?: Name | null,}; - -/** -* Updateable properties of a `Vpc` - */ -export type VpcUpdate = -{"description"?: string | null,"dnsName"?: Name | null,"name"?: Name | null,}; - -/** -* Create-time identity-related parameters - */ -export type WebhookCreate = -{"description": string, -/** The URL that webhook notification requests should be sent to */ -"endpoint": string,"name": Name, -/** A non-empty list of secret keys used to sign webhook payloads. */ -"secrets": (string)[], -/** A list of webhook event class subscriptions. - -If this list is empty or is not included in the request body, the webhook will not be subscribed to any events. */ -"subscriptions"?: (AlertSubscription)[],}; - -/** -* The configuration for a webhook alert receiver. - */ -export type WebhookReceiver = -{ -/** human-readable free-form text about a resource */ -"description": string, -/** The URL that webhook notification requests are sent to. */ -"endpoint": string, -/** unique, immutable, system-controlled identifier for each resource */ -"id": string, -/** unique, mutable, user-controlled identifier for each resource */ -"name": Name,"secrets": (WebhookSecret)[], -/** The list of alert classes to which this receiver is subscribed. */ -"subscriptions": (AlertSubscription)[], -/** timestamp when this resource was created */ -"timeCreated": Date, -/** timestamp when this resource was last modified */ -"timeModified": Date,}; - -/** -* Parameters to update a webhook configuration. - */ -export type WebhookReceiverUpdate = -{"description"?: string | null, -/** The URL that webhook notification requests should be sent to */ -"endpoint"?: string | null,"name"?: Name | null,}; - -export type WebhookSecretCreate = -{ -/** The value of the shared secret key. */ -"secret": string,}; - -/** -* A list of the IDs of secrets associated with a webhook receiver. - */ -export type WebhookSecrets = -{"secrets": (WebhookSecret)[],}; - -/** -* Supported set of sort modes for scanning by name or id - */ -export type NameOrIdSortMode = -(/** sort in increasing order of "name" */ -| "name_ascending" - -/** sort in decreasing order of "name" */ -| "name_descending" - -/** sort in increasing order of "id" */ -| "id_ascending" - -); - -/** -* Supported set of sort modes for scanning by timestamp and ID - */ -export type TimeAndIdSortMode = -(/** sort in increasing order of timestamp and ID, i.e., earliest first */ -| "time_and_id_ascending" - -/** sort in increasing order of timestamp and ID, i.e., most recent first */ -| "time_and_id_descending" - -); - -/** -* Supported set of sort modes for scanning by id only. -* -* Currently, we only support scanning in ascending order. - */ -export type IdSortMode = -"id_ascending" -; - -export type SystemMetricName = -"virtual_disk_space_provisioned" -| "cpus_provisioned" -| "ram_provisioned" -; - -/** -* The order in which the client wants to page through the requested collection - */ -export type PaginationOrder = -"ascending" -| "descending" -; +export interface LocalIdpUserSetPasswordPathParams { + userId: string, +} -/** -* Supported sort modes when scanning by semantic version - */ -export type VersionSortMode = -(/** Sort in increasing semantic version order (oldest first) */ -| "version_ascending" +export interface LocalIdpUserSetPasswordQueryParams { + silo: NameOrId, +} -/** Sort in decreasing semantic version order (newest first) */ -| "version_descending" +export interface SamlIdentityProviderCreateQueryParams { + silo: NameOrId, +} -); +export interface SamlIdentityProviderViewPathParams { + provider: NameOrId, +} -/** -* Supported set of sort modes for scanning by name only -* -* Currently, we only support scanning in ascending order. - */ -export type NameSortMode = -"name_ascending" -; +export interface SamlIdentityProviderViewQueryParams { + silo: NameOrId, +} -export interface ProbeListQueryParams { +export interface IpPoolListQueryParams { limit?: number | null, pageToken?: string | null, - project?: NameOrId, sortBy?: NameOrIdSortMode, } -export interface ProbeCreateQueryParams { - project: NameOrId, -} - -export interface ProbeViewPathParams { - probe: NameOrId, +export interface IpPoolViewPathParams { + pool: NameOrId, } -export interface ProbeViewQueryParams { - project: NameOrId, +export interface IpPoolUpdatePathParams { + pool: NameOrId, } -export interface ProbeDeletePathParams { - probe: NameOrId, +export interface IpPoolDeletePathParams { + pool: NameOrId, } -export interface ProbeDeleteQueryParams { - project: NameOrId, +export interface IpPoolRangeListPathParams { + pool: NameOrId, } -export interface SupportBundleListQueryParams { +export interface IpPoolRangeListQueryParams { limit?: number | null, pageToken?: string | null, - sortBy?: TimeAndIdSortMode, } -export interface SupportBundleViewPathParams { - bundleId: string, +export interface IpPoolRangeAddPathParams { + pool: NameOrId, } -export interface SupportBundleUpdatePathParams { - bundleId: string, +export interface IpPoolRangeRemovePathParams { + pool: NameOrId, } -export interface SupportBundleDeletePathParams { - bundleId: string, +export interface IpPoolSiloListPathParams { + pool: NameOrId, } -export interface SupportBundleDownloadPathParams { - bundleId: string, +export interface IpPoolSiloListQueryParams { + limit?: number | null, + pageToken?: string | null, + sortBy?: IdSortMode, } -export interface SupportBundleHeadPathParams { - bundleId: string, +export interface IpPoolSiloLinkPathParams { + pool: NameOrId, } -export interface SupportBundleDownloadFilePathParams { - bundleId: string, - file: string, +export interface IpPoolSiloUpdatePathParams { + pool: NameOrId, + silo: NameOrId, } -export interface SupportBundleHeadFilePathParams { - bundleId: string, - file: string, +export interface IpPoolSiloUnlinkPathParams { + pool: NameOrId, + silo: NameOrId, } -export interface SupportBundleIndexPathParams { - bundleId: string, +export interface IpPoolServiceRangeListQueryParams { + limit?: number | null, + pageToken?: string | null, } -export interface LoginSamlPathParams { - providerName: Name, - siloName: Name, +export interface SystemMetricPathParams { + metricName: SystemMetricName, } -export interface AffinityGroupListQueryParams { +export interface SystemMetricQueryParams { + endTime?: Date, + limit?: number | null, + order?: PaginationOrder, + pageToken?: string | null, + startTime?: Date, + silo?: NameOrId, +} + +export interface NetworkingAddressLotListQueryParams { limit?: number | null, pageToken?: string | null, - project?: NameOrId, sortBy?: NameOrIdSortMode, } -export interface AffinityGroupCreateQueryParams { - project: NameOrId, +export interface NetworkingAddressLotDeletePathParams { + addressLot: NameOrId, } -export interface AffinityGroupViewPathParams { - affinityGroup: NameOrId, +export interface NetworkingAddressLotBlockListPathParams { + addressLot: NameOrId, } -export interface AffinityGroupViewQueryParams { - project?: NameOrId, +export interface NetworkingAddressLotBlockListQueryParams { + limit?: number | null, + pageToken?: string | null, + sortBy?: IdSortMode, } -export interface AffinityGroupUpdatePathParams { - affinityGroup: NameOrId, +export interface NetworkingBgpConfigListQueryParams { + limit?: number | null, + nameOrId?: NameOrId, + pageToken?: string | null, + sortBy?: NameOrIdSortMode, } -export interface AffinityGroupUpdateQueryParams { - project?: NameOrId, +export interface NetworkingBgpConfigDeleteQueryParams { + nameOrId: NameOrId, } -export interface AffinityGroupDeletePathParams { - affinityGroup: NameOrId, +export interface NetworkingBgpAnnounceSetListQueryParams { + nameOrId: NameOrId, } -export interface AffinityGroupDeleteQueryParams { - project?: NameOrId, +export interface NetworkingBgpAnnounceSetDeleteQueryParams { + nameOrId: NameOrId, } -export interface AffinityGroupMemberListPathParams { - affinityGroup: NameOrId, +export interface NetworkingBgpImportedRoutesIpv4QueryParams { + asn: number, } -export interface AffinityGroupMemberListQueryParams { +export interface NetworkingLoopbackAddressListQueryParams { limit?: number | null, pageToken?: string | null, - project?: NameOrId, - sortBy?: NameOrIdSortMode, + sortBy?: IdSortMode, } -export interface AffinityGroupMemberInstanceViewPathParams { - affinityGroup: NameOrId, - instance: NameOrId, +export interface NetworkingLoopbackAddressDeletePathParams { + address: string, + rackId: string, + subnetMask: number, + switchLocation: Name, } -export interface AffinityGroupMemberInstanceViewQueryParams { - project?: NameOrId, +export interface NetworkingSwitchPortSettingsListQueryParams { + limit?: number | null, + pageToken?: string | null, + portSettings?: NameOrId, + sortBy?: NameOrIdSortMode, } -export interface AffinityGroupMemberInstanceAddPathParams { - affinityGroup: NameOrId, - instance: NameOrId, +export interface NetworkingSwitchPortSettingsDeleteQueryParams { + portSettings?: NameOrId, } -export interface AffinityGroupMemberInstanceAddQueryParams { - project?: NameOrId, +export interface NetworkingSwitchPortSettingsViewPathParams { + port: NameOrId, } -export interface AffinityGroupMemberInstanceDeletePathParams { - affinityGroup: NameOrId, - instance: NameOrId, +export interface RoleListQueryParams { + limit?: number | null, + pageToken?: string | null, } -export interface AffinityGroupMemberInstanceDeleteQueryParams { - project?: NameOrId, +export interface RoleViewPathParams { + roleName: string, } -export interface AlertClassListQueryParams { +export interface SystemQuotasListQueryParams { limit?: number | null, pageToken?: string | null, - filter?: AlertSubscription, + sortBy?: IdSortMode, } -export interface AlertReceiverListQueryParams { +export interface SiloListQueryParams { limit?: number | null, pageToken?: string | null, sortBy?: NameOrIdSortMode, } -export interface AlertReceiverViewPathParams { - receiver: NameOrId, +export interface SiloViewPathParams { + silo: NameOrId, } -export interface AlertReceiverDeletePathParams { - receiver: NameOrId, +export interface SiloDeletePathParams { + silo: NameOrId, } -export interface AlertDeliveryListPathParams { - receiver: NameOrId, +export interface SiloIpPoolListPathParams { + silo: NameOrId, } -export interface AlertDeliveryListQueryParams { - delivered?: boolean | null, - failed?: boolean | null, - pending?: boolean | null, +export interface SiloIpPoolListQueryParams { limit?: number | null, pageToken?: string | null, - sortBy?: TimeAndIdSortMode, + sortBy?: NameOrIdSortMode, } -export interface AlertReceiverProbePathParams { - receiver: NameOrId, -} - -export interface AlertReceiverProbeQueryParams { - resend?: boolean, -} - -export interface AlertReceiverSubscriptionAddPathParams { - receiver: NameOrId, +export interface SiloPolicyViewPathParams { + silo: NameOrId, } -export interface AlertReceiverSubscriptionRemovePathParams { - receiver: NameOrId, - subscription: AlertSubscription, +export interface SiloPolicyUpdatePathParams { + silo: NameOrId, } -export interface AlertDeliveryResendPathParams { - alertId: string, +export interface SiloQuotasViewPathParams { + silo: NameOrId, } -export interface AlertDeliveryResendQueryParams { - receiver: NameOrId, +export interface SiloQuotasUpdatePathParams { + silo: NameOrId, } -export interface AntiAffinityGroupListQueryParams { +export interface SiloUserListQueryParams { limit?: number | null, pageToken?: string | null, - project?: NameOrId, - sortBy?: NameOrIdSortMode, -} - -export interface AntiAffinityGroupCreateQueryParams { - project: NameOrId, -} - -export interface AntiAffinityGroupViewPathParams { - antiAffinityGroup: NameOrId, -} - -export interface AntiAffinityGroupViewQueryParams { - project?: NameOrId, -} - -export interface AntiAffinityGroupUpdatePathParams { - antiAffinityGroup: NameOrId, -} - -export interface AntiAffinityGroupUpdateQueryParams { - project?: NameOrId, -} - -export interface AntiAffinityGroupDeletePathParams { - antiAffinityGroup: NameOrId, + silo?: NameOrId, + sortBy?: IdSortMode, } -export interface AntiAffinityGroupDeleteQueryParams { - project?: NameOrId, +export interface SiloUserViewPathParams { + userId: string, } -export interface AntiAffinityGroupMemberListPathParams { - antiAffinityGroup: NameOrId, +export interface SiloUserViewQueryParams { + silo: NameOrId, } -export interface AntiAffinityGroupMemberListQueryParams { +export interface UserBuiltinListQueryParams { limit?: number | null, pageToken?: string | null, - project?: NameOrId, - sortBy?: NameOrIdSortMode, -} - -export interface AntiAffinityGroupMemberInstanceViewPathParams { - antiAffinityGroup: NameOrId, - instance: NameOrId, -} - -export interface AntiAffinityGroupMemberInstanceViewQueryParams { - project?: NameOrId, -} - -export interface AntiAffinityGroupMemberInstanceAddPathParams { - antiAffinityGroup: NameOrId, - instance: NameOrId, -} - -export interface AntiAffinityGroupMemberInstanceAddQueryParams { - project?: NameOrId, -} - -export interface AntiAffinityGroupMemberInstanceDeletePathParams { - antiAffinityGroup: NameOrId, - instance: NameOrId, + sortBy?: NameSortMode, } -export interface AntiAffinityGroupMemberInstanceDeleteQueryParams { - project?: NameOrId, +export interface UserBuiltinViewPathParams { + user: NameOrId, } -export interface CertificateListQueryParams { +export interface SiloUtilizationListQueryParams { limit?: number | null, pageToken?: string | null, sortBy?: NameOrIdSortMode, } -export interface CertificateViewPathParams { - certificate: NameOrId, -} - -export interface CertificateDeletePathParams { - certificate: NameOrId, +export interface SiloUtilizationViewPathParams { + silo: NameOrId, } -export interface DiskListQueryParams { +export interface UserListQueryParams { + group?: string | null, limit?: number | null, pageToken?: string | null, - project?: NameOrId, - sortBy?: NameOrIdSortMode, -} - -export interface DiskCreateQueryParams { - project: NameOrId, -} - -export interface DiskViewPathParams { - disk: NameOrId, -} - -export interface DiskViewQueryParams { - project?: NameOrId, -} - -export interface DiskDeletePathParams { - disk: NameOrId, -} - -export interface DiskDeleteQueryParams { - project?: NameOrId, -} - -export interface DiskBulkWriteImportPathParams { - disk: NameOrId, -} - -export interface DiskBulkWriteImportQueryParams { - project?: NameOrId, -} - -export interface DiskBulkWriteImportStartPathParams { - disk: NameOrId, -} - -export interface DiskBulkWriteImportStartQueryParams { - project?: NameOrId, -} - -export interface DiskBulkWriteImportStopPathParams { - disk: NameOrId, + sortBy?: IdSortMode, } -export interface DiskBulkWriteImportStopQueryParams { +export interface VpcFirewallRulesViewQueryParams { project?: NameOrId, + vpc: NameOrId, } -export interface DiskFinalizeImportPathParams { - disk: NameOrId, -} - -export interface DiskFinalizeImportQueryParams { +export interface VpcFirewallRulesUpdateQueryParams { project?: NameOrId, + vpc: NameOrId, } -export interface FloatingIpListQueryParams { +export interface VpcSubnetListQueryParams { limit?: number | null, pageToken?: string | null, project?: NameOrId, sortBy?: NameOrIdSortMode, + vpc?: NameOrId, } -export interface FloatingIpCreateQueryParams { - project: NameOrId, -} - -export interface FloatingIpViewPathParams { - floatingIp: NameOrId, -} - -export interface FloatingIpViewQueryParams { +export interface VpcSubnetCreateQueryParams { project?: NameOrId, + vpc: NameOrId, } -export interface FloatingIpUpdatePathParams { - floatingIp: NameOrId, +export interface VpcSubnetViewPathParams { + subnet: NameOrId, } -export interface FloatingIpUpdateQueryParams { +export interface VpcSubnetViewQueryParams { project?: NameOrId, + vpc?: NameOrId, } -export interface FloatingIpDeletePathParams { - floatingIp: NameOrId, +export interface VpcSubnetUpdatePathParams { + subnet: NameOrId, } -export interface FloatingIpDeleteQueryParams { +export interface VpcSubnetUpdateQueryParams { project?: NameOrId, + vpc?: NameOrId, } -export interface FloatingIpAttachPathParams { - floatingIp: NameOrId, +export interface VpcSubnetDeletePathParams { + subnet: NameOrId, } -export interface FloatingIpAttachQueryParams { +export interface VpcSubnetDeleteQueryParams { project?: NameOrId, + vpc?: NameOrId, } -export interface FloatingIpDetachPathParams { - floatingIp: NameOrId, -} - -export interface FloatingIpDetachQueryParams { - project?: NameOrId, +export interface VpcSubnetListNetworkInterfacesPathParams { + subnet: NameOrId, } -export interface GroupListQueryParams { +export interface VpcSubnetListNetworkInterfacesQueryParams { limit?: number | null, pageToken?: string | null, - sortBy?: IdSortMode, -} - -export interface GroupViewPathParams { - groupId: string, + project?: NameOrId, + sortBy?: NameOrIdSortMode, + vpc?: NameOrId, } -export interface ImageListQueryParams { +export interface VpcListQueryParams { limit?: number | null, pageToken?: string | null, project?: NameOrId, sortBy?: NameOrIdSortMode, } -export interface ImageCreateQueryParams { - project?: NameOrId, +export interface VpcCreateQueryParams { + project: NameOrId, } -export interface ImageViewPathParams { - image: NameOrId, +export interface VpcViewPathParams { + vpc: NameOrId, } -export interface ImageViewQueryParams { +export interface VpcViewQueryParams { project?: NameOrId, } -export interface ImageDeletePathParams { - image: NameOrId, +export interface VpcUpdatePathParams { + vpc: NameOrId, } -export interface ImageDeleteQueryParams { +export interface VpcUpdateQueryParams { project?: NameOrId, } -export interface ImageDemotePathParams { - image: NameOrId, -} - -export interface ImageDemoteQueryParams { - project: NameOrId, -} - -export interface ImagePromotePathParams { - image: NameOrId, -} - -export interface ImagePromoteQueryParams { - project?: NameOrId, +export interface VpcDeletePathParams { + vpc: NameOrId, } -export interface InstanceListQueryParams { - limit?: number | null, - pageToken?: string | null, +export interface VpcDeleteQueryParams { project?: NameOrId, - sortBy?: NameOrIdSortMode, } -export interface InstanceCreateQueryParams { - project: NameOrId, -} +type EmptyObj = Record; +export interface ApiConfig { + /** + * No host means requests will be sent to the current host. This is used in + * the web console. + */ + host?: string; + token?: string; + baseParams?: FetchParams; + } -export interface InstanceViewPathParams { - instance: NameOrId, -} + export class Api { + host: string; + token?: string; + baseParams: FetchParams; + /** + * Pulled from info.version in the OpenAPI schema. Sent in the + * `api-version` header on all requests. + */ + apiVersion = "0.0.6"; -export interface InstanceViewQueryParams { - project?: NameOrId, -} + constructor({ host = "", baseParams = {}, token }: ApiConfig = {}) { + this.host = host; + this.token = token; -export interface InstanceUpdatePathParams { - instance: NameOrId, -} + const headers = new Headers({ + "Content-Type": "application/json", + "api-version": this.apiVersion, + }); -export interface InstanceUpdateQueryParams { - project?: NameOrId, -} + if (token) headers.append("Authorization", `Bearer ${token}`); -export interface InstanceDeletePathParams { - instance: NameOrId, -} - -export interface InstanceDeleteQueryParams { - project?: NameOrId, -} - -export interface InstanceAffinityGroupListPathParams { - instance: NameOrId, -} - -export interface InstanceAffinityGroupListQueryParams { - limit?: number | null, - pageToken?: string | null, - project?: NameOrId, - sortBy?: NameOrIdSortMode, -} - -export interface InstanceAntiAffinityGroupListPathParams { - instance: NameOrId, -} - -export interface InstanceAntiAffinityGroupListQueryParams { - limit?: number | null, - pageToken?: string | null, - project?: NameOrId, - sortBy?: NameOrIdSortMode, -} - -export interface InstanceDiskListPathParams { - instance: NameOrId, -} - -export interface InstanceDiskListQueryParams { - limit?: number | null, - pageToken?: string | null, - project?: NameOrId, - sortBy?: NameOrIdSortMode, -} - -export interface InstanceDiskAttachPathParams { - instance: NameOrId, -} - -export interface InstanceDiskAttachQueryParams { - project?: NameOrId, -} - -export interface InstanceDiskDetachPathParams { - instance: NameOrId, -} - -export interface InstanceDiskDetachQueryParams { - project?: NameOrId, -} - -export interface InstanceExternalIpListPathParams { - instance: NameOrId, -} - -export interface InstanceExternalIpListQueryParams { - project?: NameOrId, -} - -export interface InstanceEphemeralIpAttachPathParams { - instance: NameOrId, -} - -export interface InstanceEphemeralIpAttachQueryParams { - project?: NameOrId, -} - -export interface InstanceEphemeralIpDetachPathParams { - instance: NameOrId, -} - -export interface InstanceEphemeralIpDetachQueryParams { - project?: NameOrId, -} - -export interface InstanceRebootPathParams { - instance: NameOrId, -} - -export interface InstanceRebootQueryParams { - project?: NameOrId, -} - -export interface InstanceSerialConsolePathParams { - instance: NameOrId, -} - -export interface InstanceSerialConsoleQueryParams { - fromStart?: number | null, - maxBytes?: number | null, - mostRecent?: number | null, - project?: NameOrId, -} - -export interface InstanceSerialConsoleStreamPathParams { - instance: NameOrId, -} - -export interface InstanceSerialConsoleStreamQueryParams { - mostRecent?: number | null, - project?: NameOrId, -} - -export interface InstanceSshPublicKeyListPathParams { - instance: NameOrId, -} - -export interface InstanceSshPublicKeyListQueryParams { - limit?: number | null, - pageToken?: string | null, - project?: NameOrId, - sortBy?: NameOrIdSortMode, -} - -export interface InstanceStartPathParams { - instance: NameOrId, -} - -export interface InstanceStartQueryParams { - project?: NameOrId, -} - -export interface InstanceStopPathParams { - instance: NameOrId, -} - -export interface InstanceStopQueryParams { - project?: NameOrId, -} - -export interface InternetGatewayIpAddressListQueryParams { - gateway?: NameOrId, - limit?: number | null, - pageToken?: string | null, - project?: NameOrId, - sortBy?: NameOrIdSortMode, - vpc?: NameOrId, -} - -export interface InternetGatewayIpAddressCreateQueryParams { - gateway: NameOrId, - project?: NameOrId, - vpc?: NameOrId, -} - -export interface InternetGatewayIpAddressDeletePathParams { - address: NameOrId, -} - -export interface InternetGatewayIpAddressDeleteQueryParams { - cascade?: boolean, - gateway?: NameOrId, - project?: NameOrId, - vpc?: NameOrId, -} - -export interface InternetGatewayIpPoolListQueryParams { - gateway?: NameOrId, - limit?: number | null, - pageToken?: string | null, - project?: NameOrId, - sortBy?: NameOrIdSortMode, - vpc?: NameOrId, -} - -export interface InternetGatewayIpPoolCreateQueryParams { - gateway: NameOrId, - project?: NameOrId, - vpc?: NameOrId, -} - -export interface InternetGatewayIpPoolDeletePathParams { - pool: NameOrId, -} - -export interface InternetGatewayIpPoolDeleteQueryParams { - cascade?: boolean, - gateway?: NameOrId, - project?: NameOrId, - vpc?: NameOrId, -} - -export interface InternetGatewayListQueryParams { - limit?: number | null, - pageToken?: string | null, - project?: NameOrId, - sortBy?: NameOrIdSortMode, - vpc?: NameOrId, -} - -export interface InternetGatewayCreateQueryParams { - project?: NameOrId, - vpc: NameOrId, -} - -export interface InternetGatewayViewPathParams { - gateway: NameOrId, -} - -export interface InternetGatewayViewQueryParams { - project?: NameOrId, - vpc?: NameOrId, -} - -export interface InternetGatewayDeletePathParams { - gateway: NameOrId, -} - -export interface InternetGatewayDeleteQueryParams { - cascade?: boolean, - project?: NameOrId, - vpc?: NameOrId, -} - -export interface ProjectIpPoolListQueryParams { - limit?: number | null, - pageToken?: string | null, - sortBy?: NameOrIdSortMode, -} - -export interface ProjectIpPoolViewPathParams { - pool: NameOrId, -} - -export interface LoginLocalPathParams { - siloName: Name, -} - -export interface CurrentUserAccessTokenListQueryParams { - limit?: number | null, - pageToken?: string | null, - sortBy?: IdSortMode, -} - -export interface CurrentUserAccessTokenDeletePathParams { - tokenId: string, -} - -export interface CurrentUserGroupsQueryParams { - limit?: number | null, - pageToken?: string | null, - sortBy?: IdSortMode, -} - -export interface CurrentUserSshKeyListQueryParams { - limit?: number | null, - pageToken?: string | null, - sortBy?: NameOrIdSortMode, -} - -export interface CurrentUserSshKeyViewPathParams { - sshKey: NameOrId, -} - -export interface CurrentUserSshKeyDeletePathParams { - sshKey: NameOrId, -} - -export interface SiloMetricPathParams { - metricName: SystemMetricName, -} - -export interface SiloMetricQueryParams { - endTime?: Date, - limit?: number | null, - order?: PaginationOrder, - pageToken?: string | null, - startTime?: Date, - project?: NameOrId, -} - -export interface InstanceNetworkInterfaceListQueryParams { - instance?: NameOrId, - limit?: number | null, - pageToken?: string | null, - project?: NameOrId, - sortBy?: NameOrIdSortMode, -} + this.baseParams = mergeParams({ headers }, baseParams); + } -export interface InstanceNetworkInterfaceCreateQueryParams { - instance: NameOrId, - project?: NameOrId, -} - -export interface InstanceNetworkInterfaceViewPathParams { - interface: NameOrId, -} - -export interface InstanceNetworkInterfaceViewQueryParams { - instance?: NameOrId, - project?: NameOrId, -} - -export interface InstanceNetworkInterfaceUpdatePathParams { - interface: NameOrId, -} - -export interface InstanceNetworkInterfaceUpdateQueryParams { - instance?: NameOrId, - project?: NameOrId, -} - -export interface InstanceNetworkInterfaceDeletePathParams { - interface: NameOrId, -} - -export interface InstanceNetworkInterfaceDeleteQueryParams { - instance?: NameOrId, - project?: NameOrId, -} - -export interface ProjectListQueryParams { - limit?: number | null, - pageToken?: string | null, - sortBy?: NameOrIdSortMode, -} - -export interface ProjectViewPathParams { - project: NameOrId, -} - -export interface ProjectUpdatePathParams { - project: NameOrId, -} - -export interface ProjectDeletePathParams { - project: NameOrId, -} - -export interface ProjectPolicyViewPathParams { - project: NameOrId, -} - -export interface ProjectPolicyUpdatePathParams { - project: NameOrId, -} - -export interface SnapshotListQueryParams { - limit?: number | null, - pageToken?: string | null, - project?: NameOrId, - sortBy?: NameOrIdSortMode, -} - -export interface SnapshotCreateQueryParams { - project: NameOrId, -} - -export interface SnapshotViewPathParams { - snapshot: NameOrId, -} - -export interface SnapshotViewQueryParams { - project?: NameOrId, -} - -export interface SnapshotDeletePathParams { - snapshot: NameOrId, -} - -export interface SnapshotDeleteQueryParams { - project?: NameOrId, -} - -export interface AuditLogListQueryParams { - endTime?: Date | null, - limit?: number | null, - pageToken?: string | null, - sortBy?: TimeAndIdSortMode, - startTime?: Date, -} - -export interface PhysicalDiskListQueryParams { - limit?: number | null, - pageToken?: string | null, - sortBy?: IdSortMode, -} - -export interface PhysicalDiskViewPathParams { - diskId: string, -} - -export interface NetworkingSwitchPortLldpNeighborsPathParams { - port: Name, - rackId: string, - switchLocation: Name, -} - -export interface NetworkingSwitchPortLldpNeighborsQueryParams { - limit?: number | null, - pageToken?: string | null, - sortBy?: IdSortMode, -} - -export interface RackListQueryParams { - limit?: number | null, - pageToken?: string | null, - sortBy?: IdSortMode, -} - -export interface RackViewPathParams { - rackId: string, -} - -export interface SledListQueryParams { - limit?: number | null, - pageToken?: string | null, - sortBy?: IdSortMode, -} - -export interface SledViewPathParams { - sledId: string, -} - -export interface SledPhysicalDiskListPathParams { - sledId: string, -} - -export interface SledPhysicalDiskListQueryParams { - limit?: number | null, - pageToken?: string | null, - sortBy?: IdSortMode, -} - -export interface SledInstanceListPathParams { - sledId: string, -} - -export interface SledInstanceListQueryParams { - limit?: number | null, - pageToken?: string | null, - sortBy?: IdSortMode, -} - -export interface SledSetProvisionPolicyPathParams { - sledId: string, -} - -export interface SledListUninitializedQueryParams { - limit?: number | null, - pageToken?: string | null, -} - -export interface NetworkingSwitchPortListQueryParams { - limit?: number | null, - pageToken?: string | null, - sortBy?: IdSortMode, - switchPortId?: string | null, -} - -export interface NetworkingSwitchPortLldpConfigViewPathParams { - port: Name, -} - -export interface NetworkingSwitchPortLldpConfigViewQueryParams { - rackId: string, - switchLocation: Name, -} - -export interface NetworkingSwitchPortLldpConfigUpdatePathParams { - port: Name, -} - -export interface NetworkingSwitchPortLldpConfigUpdateQueryParams { - rackId: string, - switchLocation: Name, -} - -export interface NetworkingSwitchPortApplySettingsPathParams { - port: Name, -} - -export interface NetworkingSwitchPortApplySettingsQueryParams { - rackId: string, - switchLocation: Name, -} - -export interface NetworkingSwitchPortClearSettingsPathParams { - port: Name, -} - -export interface NetworkingSwitchPortClearSettingsQueryParams { - rackId: string, - switchLocation: Name, -} - -export interface NetworkingSwitchPortStatusPathParams { - port: Name, -} - -export interface NetworkingSwitchPortStatusQueryParams { - rackId: string, - switchLocation: Name, -} - -export interface SwitchListQueryParams { - limit?: number | null, - pageToken?: string | null, - sortBy?: IdSortMode, -} - -export interface SwitchViewPathParams { - switchId: string, -} - -export interface SiloIdentityProviderListQueryParams { - limit?: number | null, - pageToken?: string | null, - silo?: NameOrId, - sortBy?: NameOrIdSortMode, -} - -export interface LocalIdpUserCreateQueryParams { - silo: NameOrId, -} - -export interface LocalIdpUserDeletePathParams { - userId: string, -} - -export interface LocalIdpUserDeleteQueryParams { - silo: NameOrId, -} - -export interface LocalIdpUserSetPasswordPathParams { - userId: string, -} - -export interface LocalIdpUserSetPasswordQueryParams { - silo: NameOrId, -} - -export interface SamlIdentityProviderCreateQueryParams { - silo: NameOrId, -} - -export interface SamlIdentityProviderViewPathParams { - provider: NameOrId, -} - -export interface SamlIdentityProviderViewQueryParams { - silo?: NameOrId, -} - -export interface IpPoolListQueryParams { - limit?: number | null, - pageToken?: string | null, - sortBy?: NameOrIdSortMode, -} - -export interface IpPoolViewPathParams { - pool: NameOrId, -} - -export interface IpPoolUpdatePathParams { - pool: NameOrId, -} - -export interface IpPoolDeletePathParams { - pool: NameOrId, -} - -export interface IpPoolRangeListPathParams { - pool: NameOrId, -} - -export interface IpPoolRangeListQueryParams { - limit?: number | null, - pageToken?: string | null, -} - -export interface IpPoolRangeAddPathParams { - pool: NameOrId, -} - -export interface IpPoolRangeRemovePathParams { - pool: NameOrId, -} - -export interface IpPoolSiloListPathParams { - pool: NameOrId, -} - -export interface IpPoolSiloListQueryParams { - limit?: number | null, - pageToken?: string | null, - sortBy?: IdSortMode, -} - -export interface IpPoolSiloLinkPathParams { - pool: NameOrId, -} - -export interface IpPoolSiloUpdatePathParams { - pool: NameOrId, - silo: NameOrId, -} - -export interface IpPoolSiloUnlinkPathParams { - pool: NameOrId, - silo: NameOrId, -} - -export interface IpPoolUtilizationViewPathParams { - pool: NameOrId, -} - -export interface IpPoolServiceRangeListQueryParams { - limit?: number | null, - pageToken?: string | null, -} - -export interface SystemMetricPathParams { - metricName: SystemMetricName, -} - -export interface SystemMetricQueryParams { - endTime?: Date, - limit?: number | null, - order?: PaginationOrder, - pageToken?: string | null, - startTime?: Date, - silo?: NameOrId, -} - -export interface NetworkingAddressLotListQueryParams { - limit?: number | null, - pageToken?: string | null, - sortBy?: NameOrIdSortMode, -} - -export interface NetworkingAddressLotViewPathParams { - addressLot: NameOrId, -} - -export interface NetworkingAddressLotDeletePathParams { - addressLot: NameOrId, -} - -export interface NetworkingAddressLotBlockListPathParams { - addressLot: NameOrId, -} - -export interface NetworkingAddressLotBlockListQueryParams { - limit?: number | null, - pageToken?: string | null, - sortBy?: IdSortMode, -} - -export interface NetworkingBgpConfigListQueryParams { - limit?: number | null, - pageToken?: string | null, - sortBy?: NameOrIdSortMode, -} - -export interface NetworkingBgpConfigDeleteQueryParams { - nameOrId: NameOrId, -} - -export interface NetworkingBgpAnnounceSetListQueryParams { - limit?: number | null, - pageToken?: string | null, - sortBy?: NameOrIdSortMode, -} - -export interface NetworkingBgpAnnounceSetDeletePathParams { - announceSet: NameOrId, -} - -export interface NetworkingBgpAnnouncementListPathParams { - announceSet: NameOrId, -} - -export interface NetworkingBgpMessageHistoryQueryParams { - asn: number, -} - -export interface NetworkingBgpImportedRoutesIpv4QueryParams { - asn: number, -} - -export interface NetworkingLoopbackAddressListQueryParams { - limit?: number | null, - pageToken?: string | null, - sortBy?: IdSortMode, -} - -export interface NetworkingLoopbackAddressDeletePathParams { - address: string, - rackId: string, - subnetMask: number, - switchLocation: Name, -} - -export interface NetworkingSwitchPortSettingsListQueryParams { - limit?: number | null, - pageToken?: string | null, - portSettings?: NameOrId, - sortBy?: NameOrIdSortMode, -} - -export interface NetworkingSwitchPortSettingsDeleteQueryParams { - portSettings?: NameOrId, -} - -export interface NetworkingSwitchPortSettingsViewPathParams { - port: NameOrId, -} - -export interface ScimTokenListQueryParams { - silo: NameOrId, -} - -export interface ScimTokenCreateQueryParams { - silo: NameOrId, -} - -export interface ScimTokenViewPathParams { - tokenId: string, -} - -export interface ScimTokenViewQueryParams { - silo: NameOrId, -} - -export interface ScimTokenDeletePathParams { - tokenId: string, -} - -export interface ScimTokenDeleteQueryParams { - silo: NameOrId, -} - -export interface SystemQuotasListQueryParams { - limit?: number | null, - pageToken?: string | null, - sortBy?: IdSortMode, -} - -export interface SiloListQueryParams { - limit?: number | null, - pageToken?: string | null, - sortBy?: NameOrIdSortMode, -} - -export interface SiloViewPathParams { - silo: NameOrId, -} - -export interface SiloDeletePathParams { - silo: NameOrId, -} - -export interface SiloIpPoolListPathParams { - silo: NameOrId, -} - -export interface SiloIpPoolListQueryParams { - limit?: number | null, - pageToken?: string | null, - sortBy?: NameOrIdSortMode, -} - -export interface SiloPolicyViewPathParams { - silo: NameOrId, -} - -export interface SiloPolicyUpdatePathParams { - silo: NameOrId, -} - -export interface SiloQuotasViewPathParams { - silo: NameOrId, -} - -export interface SiloQuotasUpdatePathParams { - silo: NameOrId, -} - -export interface SystemTimeseriesSchemaListQueryParams { - limit?: number | null, - pageToken?: string | null, -} - -export interface SystemUpdateRepositoryListQueryParams { - limit?: number | null, - pageToken?: string | null, - sortBy?: VersionSortMode, -} - -export interface SystemUpdateRepositoryUploadQueryParams { - fileName: string, -} - -export interface SystemUpdateRepositoryViewPathParams { - systemVersion: string, -} - -export interface SystemUpdateTrustRootListQueryParams { - limit?: number | null, - pageToken?: string | null, - sortBy?: IdSortMode, -} - -export interface SystemUpdateTrustRootViewPathParams { - trustRootId: string, -} - -export interface SystemUpdateTrustRootDeletePathParams { - trustRootId: string, -} - -export interface SiloUserListQueryParams { - limit?: number | null, - pageToken?: string | null, - silo?: NameOrId, - sortBy?: IdSortMode, -} - -export interface SiloUserViewPathParams { - userId: string, -} - -export interface SiloUserViewQueryParams { - silo: NameOrId, -} - -export interface UserBuiltinListQueryParams { - limit?: number | null, - pageToken?: string | null, - sortBy?: NameSortMode, -} - -export interface UserBuiltinViewPathParams { - user: NameOrId, -} - -export interface SiloUtilizationListQueryParams { - limit?: number | null, - pageToken?: string | null, - sortBy?: NameOrIdSortMode, -} - -export interface SiloUtilizationViewPathParams { - silo: NameOrId, -} - -export interface TimeseriesQueryQueryParams { - project: NameOrId, -} - -export interface UserListQueryParams { - group?: string | null, - limit?: number | null, - pageToken?: string | null, - sortBy?: IdSortMode, -} - -export interface UserViewPathParams { - userId: string, -} - -export interface UserTokenListPathParams { - userId: string, -} - -export interface UserTokenListQueryParams { - limit?: number | null, - pageToken?: string | null, - sortBy?: IdSortMode, -} - -export interface UserLogoutPathParams { - userId: string, -} - -export interface UserSessionListPathParams { - userId: string, -} - -export interface UserSessionListQueryParams { - limit?: number | null, - pageToken?: string | null, - sortBy?: IdSortMode, -} - -export interface VpcFirewallRulesViewQueryParams { - project?: NameOrId, - vpc: NameOrId, -} - -export interface VpcFirewallRulesUpdateQueryParams { - project?: NameOrId, - vpc: NameOrId, -} - -export interface VpcRouterRouteListQueryParams { - limit?: number | null, - pageToken?: string | null, - project?: NameOrId, - router?: NameOrId, - sortBy?: NameOrIdSortMode, - vpc?: NameOrId, -} - -export interface VpcRouterRouteCreateQueryParams { - project?: NameOrId, - router: NameOrId, - vpc?: NameOrId, -} - -export interface VpcRouterRouteViewPathParams { - route: NameOrId, -} - -export interface VpcRouterRouteViewQueryParams { - project?: NameOrId, - router?: NameOrId, - vpc?: NameOrId, -} - -export interface VpcRouterRouteUpdatePathParams { - route: NameOrId, -} - -export interface VpcRouterRouteUpdateQueryParams { - project?: NameOrId, - router?: NameOrId, - vpc?: NameOrId, -} - -export interface VpcRouterRouteDeletePathParams { - route: NameOrId, -} - -export interface VpcRouterRouteDeleteQueryParams { - project?: NameOrId, - router?: NameOrId, - vpc?: NameOrId, -} - -export interface VpcRouterListQueryParams { - limit?: number | null, - pageToken?: string | null, - project?: NameOrId, - sortBy?: NameOrIdSortMode, - vpc?: NameOrId, -} - -export interface VpcRouterCreateQueryParams { - project?: NameOrId, - vpc: NameOrId, -} - -export interface VpcRouterViewPathParams { - router: NameOrId, -} - -export interface VpcRouterViewQueryParams { - project?: NameOrId, - vpc?: NameOrId, -} - -export interface VpcRouterUpdatePathParams { - router: NameOrId, -} - -export interface VpcRouterUpdateQueryParams { - project?: NameOrId, - vpc?: NameOrId, -} - -export interface VpcRouterDeletePathParams { - router: NameOrId, -} - -export interface VpcRouterDeleteQueryParams { - project?: NameOrId, - vpc?: NameOrId, -} - -export interface VpcSubnetListQueryParams { - limit?: number | null, - pageToken?: string | null, - project?: NameOrId, - sortBy?: NameOrIdSortMode, - vpc?: NameOrId, -} - -export interface VpcSubnetCreateQueryParams { - project?: NameOrId, - vpc: NameOrId, -} - -export interface VpcSubnetViewPathParams { - subnet: NameOrId, -} - -export interface VpcSubnetViewQueryParams { - project?: NameOrId, - vpc?: NameOrId, -} - -export interface VpcSubnetUpdatePathParams { - subnet: NameOrId, -} - -export interface VpcSubnetUpdateQueryParams { - project?: NameOrId, - vpc?: NameOrId, -} - -export interface VpcSubnetDeletePathParams { - subnet: NameOrId, -} - -export interface VpcSubnetDeleteQueryParams { - project?: NameOrId, - vpc?: NameOrId, -} - -export interface VpcSubnetListNetworkInterfacesPathParams { - subnet: NameOrId, -} - -export interface VpcSubnetListNetworkInterfacesQueryParams { - limit?: number | null, - pageToken?: string | null, - project?: NameOrId, - sortBy?: NameOrIdSortMode, - vpc?: NameOrId, -} - -export interface VpcListQueryParams { - limit?: number | null, - pageToken?: string | null, - project?: NameOrId, - sortBy?: NameOrIdSortMode, -} - -export interface VpcCreateQueryParams { - project: NameOrId, -} - -export interface VpcViewPathParams { - vpc: NameOrId, -} - -export interface VpcViewQueryParams { - project?: NameOrId, -} - -export interface VpcUpdatePathParams { - vpc: NameOrId, -} - -export interface VpcUpdateQueryParams { - project?: NameOrId, -} - -export interface VpcDeletePathParams { - vpc: NameOrId, -} - -export interface VpcDeleteQueryParams { - project?: NameOrId, -} - -export interface WebhookReceiverUpdatePathParams { - receiver: NameOrId, -} - -export interface WebhookSecretsListQueryParams { - receiver: NameOrId, -} - -export interface WebhookSecretsAddQueryParams { - receiver: NameOrId, -} - -export interface WebhookSecretsDeletePathParams { - secretId: string, -} - -type EmptyObj = Record; -export interface ApiConfig { - /** - * No host means requests will be sent to the current host. This is used in - * the web console. - */ - host?: string; - token?: string; - baseParams?: FetchParams; - } - - export class Api { - host: string; - token?: string; - baseParams: FetchParams; - /** - * Pulled from info.version in the OpenAPI schema. Sent in the - * `api-version` header on all requests. - */ - apiVersion = "20251008.0.0"; - - constructor({ host = "", baseParams = {}, token }: ApiConfig = {}) { - this.host = host; - this.token = token; - - const headers = new Headers({ - "Content-Type": "application/json", - "api-version": this.apiVersion, - }); - - if (token) headers.append("Authorization", `Bearer ${token}`); - - this.baseParams = mergeParams({ headers }, baseParams); - } - - public async request({ - body, - path, - query, - host, - ...fetchParams - }: FullParams): Promise> { - const url = (host || this.host) + path + toQueryString(query); - const init = { - ...mergeParams(this.baseParams, fetchParams), - body: JSON.stringify(snakeify(body), dateReplacer), - }; - return handleResponse(await fetch(url, init)); - } - - methods = { -/** -* Start an OAuth 2.0 Device Authorization Grant - */ -deviceAuthRequest: (_: EmptyObj, -params: FetchParams = {}) => { - return this.request({ - path: `/device/auth`, - method: "POST", - ...params, - }) - }, -/** -* Confirm an OAuth 2.0 Device Authorization Grant - */ -deviceAuthConfirm: ({ -body, }: {body: DeviceAuthVerify, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/device/confirm`, - method: "POST", - body, - ...params, - }) - }, -/** -* Request a device access token - */ -deviceAccessToken: (_: EmptyObj, -params: FetchParams = {}) => { - return this.request({ - path: `/device/token`, - method: "POST", - ...params, - }) - }, -/** -* List instrumentation probes - */ -probeList: ({ -query = {}, }: {query?: ProbeListQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/experimental/v1/probes`, - method: "GET", - query, - ...params, - }) - }, -/** -* Create instrumentation probe - */ -probeCreate: ({ -query, body, }: {query: ProbeCreateQueryParams, -body: ProbeCreate, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/experimental/v1/probes`, - method: "POST", - body, - query, - ...params, - }) - }, -/** -* View instrumentation probe - */ -probeView: ({ -path, query, }: {path: ProbeViewPathParams, -query: ProbeViewQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/experimental/v1/probes/${path.probe}`, - method: "GET", - query, - ...params, - }) - }, -/** -* Delete instrumentation probe - */ -probeDelete: ({ -path, query, }: {path: ProbeDeletePathParams, -query: ProbeDeleteQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/experimental/v1/probes/${path.probe}`, - method: "DELETE", - query, - ...params, - }) - }, -/** -* List all support bundles - */ -supportBundleList: ({ -query = {}, }: {query?: SupportBundleListQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/experimental/v1/system/support-bundles`, - method: "GET", - query, - ...params, - }) - }, -/** -* Create a new support bundle - */ -supportBundleCreate: ({ -body, }: {body: SupportBundleCreate, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/experimental/v1/system/support-bundles`, - method: "POST", - body, - ...params, - }) - }, -/** -* View a support bundle - */ -supportBundleView: ({ -path, }: {path: SupportBundleViewPathParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/experimental/v1/system/support-bundles/${path.bundleId}`, - method: "GET", - ...params, - }) - }, -/** -* Update a support bundle - */ -supportBundleUpdate: ({ -path, body, }: {path: SupportBundleUpdatePathParams, -body: SupportBundleUpdate, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/experimental/v1/system/support-bundles/${path.bundleId}`, - method: "PUT", - body, - ...params, - }) - }, -/** -* Delete an existing support bundle - */ -supportBundleDelete: ({ -path, }: {path: SupportBundleDeletePathParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/experimental/v1/system/support-bundles/${path.bundleId}`, - method: "DELETE", - ...params, - }) - }, -/** -* Download the contents of a support bundle - */ -supportBundleDownload: ({ -path, }: {path: SupportBundleDownloadPathParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/experimental/v1/system/support-bundles/${path.bundleId}/download`, - method: "GET", - ...params, - }) - }, -/** -* Download the metadata of a support bundle - */ -supportBundleHead: ({ -path, }: {path: SupportBundleHeadPathParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/experimental/v1/system/support-bundles/${path.bundleId}/download`, - method: "HEAD", - ...params, - }) - }, -/** -* Download a file within a support bundle - */ -supportBundleDownloadFile: ({ -path, }: {path: SupportBundleDownloadFilePathParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/experimental/v1/system/support-bundles/${path.bundleId}/download/${path.file}`, - method: "GET", - ...params, - }) - }, -/** -* Download the metadata of a file within the support bundle - */ -supportBundleHeadFile: ({ -path, }: {path: SupportBundleHeadFilePathParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/experimental/v1/system/support-bundles/${path.bundleId}/download/${path.file}`, - method: "HEAD", - ...params, - }) - }, -/** -* Download the index of a support bundle - */ -supportBundleIndex: ({ -path, }: {path: SupportBundleIndexPathParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/experimental/v1/system/support-bundles/${path.bundleId}/index`, - method: "GET", - ...params, - }) - }, -/** -* Authenticate a user via SAML - */ -loginSaml: ({ -path, }: {path: LoginSamlPathParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/login/${path.siloName}/saml/${path.providerName}`, - method: "POST", - ...params, - }) - }, -/** -* List affinity groups - */ -affinityGroupList: ({ -query = {}, }: {query?: AffinityGroupListQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/affinity-groups`, - method: "GET", - query, - ...params, - }) - }, -/** -* Create affinity group - */ -affinityGroupCreate: ({ -query, body, }: {query: AffinityGroupCreateQueryParams, -body: AffinityGroupCreate, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/affinity-groups`, - method: "POST", - body, - query, - ...params, - }) - }, -/** -* Fetch affinity group - */ -affinityGroupView: ({ -path, query = {}, }: {path: AffinityGroupViewPathParams, -query?: AffinityGroupViewQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/affinity-groups/${path.affinityGroup}`, - method: "GET", - query, - ...params, - }) - }, -/** -* Update affinity group - */ -affinityGroupUpdate: ({ -path, query = {}, body, }: {path: AffinityGroupUpdatePathParams, -query?: AffinityGroupUpdateQueryParams, -body: AffinityGroupUpdate, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/affinity-groups/${path.affinityGroup}`, - method: "PUT", - body, - query, - ...params, - }) - }, -/** -* Delete affinity group - */ -affinityGroupDelete: ({ -path, query = {}, }: {path: AffinityGroupDeletePathParams, -query?: AffinityGroupDeleteQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/affinity-groups/${path.affinityGroup}`, - method: "DELETE", - query, - ...params, - }) - }, -/** -* List affinity group members - */ -affinityGroupMemberList: ({ -path, query = {}, }: {path: AffinityGroupMemberListPathParams, -query?: AffinityGroupMemberListQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/affinity-groups/${path.affinityGroup}/members`, - method: "GET", - query, - ...params, - }) - }, -/** -* Fetch affinity group member - */ -affinityGroupMemberInstanceView: ({ -path, query = {}, }: {path: AffinityGroupMemberInstanceViewPathParams, -query?: AffinityGroupMemberInstanceViewQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/affinity-groups/${path.affinityGroup}/members/instance/${path.instance}`, - method: "GET", - query, - ...params, - }) - }, -/** -* Add member to affinity group - */ -affinityGroupMemberInstanceAdd: ({ -path, query = {}, }: {path: AffinityGroupMemberInstanceAddPathParams, -query?: AffinityGroupMemberInstanceAddQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/affinity-groups/${path.affinityGroup}/members/instance/${path.instance}`, - method: "POST", - query, - ...params, - }) - }, -/** -* Remove member from affinity group - */ -affinityGroupMemberInstanceDelete: ({ -path, query = {}, }: {path: AffinityGroupMemberInstanceDeletePathParams, -query?: AffinityGroupMemberInstanceDeleteQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/affinity-groups/${path.affinityGroup}/members/instance/${path.instance}`, - method: "DELETE", - query, - ...params, - }) - }, -/** -* List alert classes - */ -alertClassList: ({ -query = {}, }: {query?: AlertClassListQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/alert-classes`, - method: "GET", - query, - ...params, - }) - }, -/** -* List alert receivers - */ -alertReceiverList: ({ -query = {}, }: {query?: AlertReceiverListQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/alert-receivers`, - method: "GET", - query, - ...params, - }) - }, -/** -* Fetch alert receiver - */ -alertReceiverView: ({ -path, }: {path: AlertReceiverViewPathParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/alert-receivers/${path.receiver}`, - method: "GET", - ...params, - }) - }, -/** -* Delete alert receiver - */ -alertReceiverDelete: ({ -path, }: {path: AlertReceiverDeletePathParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/alert-receivers/${path.receiver}`, - method: "DELETE", - ...params, - }) - }, -/** -* List delivery attempts to alert receiver - */ -alertDeliveryList: ({ -path, query = {}, }: {path: AlertDeliveryListPathParams, -query?: AlertDeliveryListQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/alert-receivers/${path.receiver}/deliveries`, - method: "GET", - query, - ...params, - }) - }, -/** -* Send liveness probe to alert receiver - */ -alertReceiverProbe: ({ -path, query = {}, }: {path: AlertReceiverProbePathParams, -query?: AlertReceiverProbeQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/alert-receivers/${path.receiver}/probe`, - method: "POST", - query, - ...params, - }) - }, -/** -* Add alert receiver subscription - */ -alertReceiverSubscriptionAdd: ({ -path, body, }: {path: AlertReceiverSubscriptionAddPathParams, -body: AlertSubscriptionCreate, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/alert-receivers/${path.receiver}/subscriptions`, - method: "POST", - body, - ...params, - }) - }, -/** -* Remove alert receiver subscription - */ -alertReceiverSubscriptionRemove: ({ -path, }: {path: AlertReceiverSubscriptionRemovePathParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/alert-receivers/${path.receiver}/subscriptions/${path.subscription}`, - method: "DELETE", - ...params, - }) - }, -/** -* Request re-delivery of alert - */ -alertDeliveryResend: ({ -path, query, }: {path: AlertDeliveryResendPathParams, -query: AlertDeliveryResendQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/alerts/${path.alertId}/resend`, - method: "POST", - query, - ...params, - }) - }, -/** -* List anti-affinity groups - */ -antiAffinityGroupList: ({ -query = {}, }: {query?: AntiAffinityGroupListQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/anti-affinity-groups`, - method: "GET", - query, - ...params, - }) - }, -/** -* Create anti-affinity group - */ -antiAffinityGroupCreate: ({ -query, body, }: {query: AntiAffinityGroupCreateQueryParams, -body: AntiAffinityGroupCreate, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/anti-affinity-groups`, - method: "POST", - body, - query, - ...params, - }) - }, -/** -* Fetch anti-affinity group - */ -antiAffinityGroupView: ({ -path, query = {}, }: {path: AntiAffinityGroupViewPathParams, -query?: AntiAffinityGroupViewQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/anti-affinity-groups/${path.antiAffinityGroup}`, - method: "GET", - query, - ...params, - }) - }, -/** -* Update anti-affinity group - */ -antiAffinityGroupUpdate: ({ -path, query = {}, body, }: {path: AntiAffinityGroupUpdatePathParams, -query?: AntiAffinityGroupUpdateQueryParams, -body: AntiAffinityGroupUpdate, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/anti-affinity-groups/${path.antiAffinityGroup}`, - method: "PUT", - body, - query, - ...params, - }) - }, -/** -* Delete anti-affinity group - */ -antiAffinityGroupDelete: ({ -path, query = {}, }: {path: AntiAffinityGroupDeletePathParams, -query?: AntiAffinityGroupDeleteQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/anti-affinity-groups/${path.antiAffinityGroup}`, - method: "DELETE", - query, - ...params, - }) - }, -/** -* List anti-affinity group members - */ -antiAffinityGroupMemberList: ({ -path, query = {}, }: {path: AntiAffinityGroupMemberListPathParams, -query?: AntiAffinityGroupMemberListQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/anti-affinity-groups/${path.antiAffinityGroup}/members`, - method: "GET", - query, - ...params, - }) - }, -/** -* Fetch anti-affinity group member - */ -antiAffinityGroupMemberInstanceView: ({ -path, query = {}, }: {path: AntiAffinityGroupMemberInstanceViewPathParams, -query?: AntiAffinityGroupMemberInstanceViewQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/anti-affinity-groups/${path.antiAffinityGroup}/members/instance/${path.instance}`, - method: "GET", - query, - ...params, - }) - }, + public async request({ + body, + path, + query, + host, + ...fetchParams + }: FullParams): Promise> { + const url = (host || this.host) + path + toQueryString(query); + const init = { + ...mergeParams(this.baseParams, fetchParams), + body: JSON.stringify(snakeify(body), dateReplacer), + }; + return handleResponse(await fetch(url, init)); + } + + methods = { /** -* Add member to anti-affinity group +* Start an OAuth 2.0 Device Authorization Grant */ -antiAffinityGroupMemberInstanceAdd: ({ -path, query = {}, }: {path: AntiAffinityGroupMemberInstanceAddPathParams, -query?: AntiAffinityGroupMemberInstanceAddQueryParams, -}, +deviceAuthRequest: (_: EmptyObj, params: FetchParams = {}) => { - return this.request({ - path: `/v1/anti-affinity-groups/${path.antiAffinityGroup}/members/instance/${path.instance}`, + return this.request({ + path: `/device/auth`, method: "POST", - query, ...params, }) }, /** -* Remove member from anti-affinity group +* Confirm an OAuth 2.0 Device Authorization Grant */ -antiAffinityGroupMemberInstanceDelete: ({ -path, query = {}, }: {path: AntiAffinityGroupMemberInstanceDeletePathParams, -query?: AntiAffinityGroupMemberInstanceDeleteQueryParams, +deviceAuthConfirm: ({ +body, }: {body: DeviceAuthVerify, }, params: FetchParams = {}) => { return this.request({ - path: `/v1/anti-affinity-groups/${path.antiAffinityGroup}/members/instance/${path.instance}`, - method: "DELETE", - query, + path: `/device/confirm`, + method: "POST", + body, ...params, }) }, /** -* Fetch current silo's auth settings +* Request a device access token */ -authSettingsView: (_: EmptyObj, +deviceAccessToken: (_: EmptyObj, params: FetchParams = {}) => { - return this.request({ - path: `/v1/auth-settings`, - method: "GET", + return this.request({ + path: `/device/token`, + method: "POST", ...params, }) }, /** -* Update current silo's auth settings +* Authenticate a user via SAML */ -authSettingsUpdate: ({ -body, }: {body: SiloAuthSettingsUpdate, +loginSaml: ({ +path, }: {path: LoginSamlPathParams, }, params: FetchParams = {}) => { - return this.request({ - path: `/v1/auth-settings`, - method: "PUT", - body, + return this.request({ + path: `/login/${path.siloName}/saml/${path.providerName}`, + method: "POST", ...params, }) }, @@ -7666,7 +4433,22 @@ params: FetchParams = {}) => { }) }, /** -* List floating IPs +* Fetch disk metrics + */ +diskMetricsList: ({ +path, query = {}, }: {path: DiskMetricsListPathParams, +query?: DiskMetricsListQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/disks/${path.disk}/metrics/${path.metric}`, + method: "GET", + query, + ...params, + }) + }, +/** +* List all floating IPs */ floatingIpList: ({ query = {}, }: {query?: FloatingIpListQueryParams, @@ -7937,23 +4719,6 @@ params: FetchParams = {}) => { }) }, /** -* Update instance - */ -instanceUpdate: ({ -path, query = {}, body, }: {path: InstanceUpdatePathParams, -query?: InstanceUpdateQueryParams, -body: InstanceUpdate, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/instances/${path.instance}`, - method: "PUT", - body, - query, - ...params, - }) - }, -/** * Delete instance */ instanceDelete: ({ @@ -7969,36 +4734,6 @@ params: FetchParams = {}) => { }) }, /** -* List affinity groups containing instance - */ -instanceAffinityGroupList: ({ -path, query = {}, }: {path: InstanceAffinityGroupListPathParams, -query?: InstanceAffinityGroupListQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/instances/${path.instance}/affinity-groups`, - method: "GET", - query, - ...params, - }) - }, -/** -* List anti-affinity groups containing instance - */ -instanceAntiAffinityGroupList: ({ -path, query = {}, }: {path: InstanceAntiAffinityGroupListPathParams, -query?: InstanceAntiAffinityGroupListQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/instances/${path.instance}/anti-affinity-groups`, - method: "GET", - query, - ...params, - }) - }, -/** * List disks for instance */ instanceDiskList: ({ @@ -8095,6 +4830,23 @@ params: FetchParams = {}) => { }) }, /** +* Migrate an instance + */ +instanceMigrate: ({ +path, query = {}, body, }: {path: InstanceMigratePathParams, +query?: InstanceMigrateQueryParams, +body: InstanceMigrate, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/instances/${path.instance}/migrate`, + method: "POST", + body, + query, + ...params, + }) + }, +/** * Reboot an instance */ instanceReboot: ({ @@ -8170,157 +4922,7 @@ params: FetchParams = {}) => { }) }, /** -* List IP addresses attached to internet gateway - */ -internetGatewayIpAddressList: ({ -query = {}, }: {query?: InternetGatewayIpAddressListQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/internet-gateway-ip-addresses`, - method: "GET", - query, - ...params, - }) - }, -/** -* Attach IP address to internet gateway - */ -internetGatewayIpAddressCreate: ({ -query, body, }: {query: InternetGatewayIpAddressCreateQueryParams, -body: InternetGatewayIpAddressCreate, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/internet-gateway-ip-addresses`, - method: "POST", - body, - query, - ...params, - }) - }, -/** -* Detach IP address from internet gateway - */ -internetGatewayIpAddressDelete: ({ -path, query = {}, }: {path: InternetGatewayIpAddressDeletePathParams, -query?: InternetGatewayIpAddressDeleteQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/internet-gateway-ip-addresses/${path.address}`, - method: "DELETE", - query, - ...params, - }) - }, -/** -* List IP pools attached to internet gateway - */ -internetGatewayIpPoolList: ({ -query = {}, }: {query?: InternetGatewayIpPoolListQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/internet-gateway-ip-pools`, - method: "GET", - query, - ...params, - }) - }, -/** -* Attach IP pool to internet gateway - */ -internetGatewayIpPoolCreate: ({ -query, body, }: {query: InternetGatewayIpPoolCreateQueryParams, -body: InternetGatewayIpPoolCreate, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/internet-gateway-ip-pools`, - method: "POST", - body, - query, - ...params, - }) - }, -/** -* Detach IP pool from internet gateway - */ -internetGatewayIpPoolDelete: ({ -path, query = {}, }: {path: InternetGatewayIpPoolDeletePathParams, -query?: InternetGatewayIpPoolDeleteQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/internet-gateway-ip-pools/${path.pool}`, - method: "DELETE", - query, - ...params, - }) - }, -/** -* List internet gateways - */ -internetGatewayList: ({ -query = {}, }: {query?: InternetGatewayListQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/internet-gateways`, - method: "GET", - query, - ...params, - }) - }, -/** -* Create VPC internet gateway - */ -internetGatewayCreate: ({ -query, body, }: {query: InternetGatewayCreateQueryParams, -body: InternetGatewayCreate, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/internet-gateways`, - method: "POST", - body, - query, - ...params, - }) - }, -/** -* Fetch internet gateway - */ -internetGatewayView: ({ -path, query = {}, }: {path: InternetGatewayViewPathParams, -query?: InternetGatewayViewQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/internet-gateways/${path.gateway}`, - method: "GET", - query, - ...params, - }) - }, -/** -* Delete internet gateway - */ -internetGatewayDelete: ({ -path, query = {}, }: {path: InternetGatewayDeletePathParams, -query?: InternetGatewayDeleteQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/internet-gateways/${path.gateway}`, - method: "DELETE", - query, - ...params, - }) - }, -/** -* List IP pools +* List all IP pools */ projectIpPoolList: ({ query = {}, }: {query?: ProjectIpPoolListQueryParams, @@ -8384,33 +4986,6 @@ params: FetchParams = {}) => { }) }, /** -* List access tokens - */ -currentUserAccessTokenList: ({ -query = {}, }: {query?: CurrentUserAccessTokenListQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/me/access-tokens`, - method: "GET", - query, - ...params, - }) - }, -/** -* Delete access token - */ -currentUserAccessTokenDelete: ({ -path, }: {path: CurrentUserAccessTokenDeletePathParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/me/access-tokens/${path.tokenId}`, - method: "DELETE", - ...params, - }) - }, -/** * Fetch current user's groups */ currentUserGroups: ({ @@ -8479,7 +5054,7 @@ params: FetchParams = {}) => { }) }, /** -* View metrics +* Access metrics data */ siloMetric: ({ path, query = {}, }: {path: SiloMetricPathParams, @@ -8764,20 +5339,6 @@ params: FetchParams = {}) => { }) }, /** -* View audit log - */ -auditLogList: ({ -query = {}, }: {query?: AuditLogListQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/audit-log`, - method: "GET", - query, - ...params, - }) - }, -/** * List physical disks */ physicalDiskList: ({ @@ -8792,34 +5353,6 @@ params: FetchParams = {}) => { }) }, /** -* Get a physical disk - */ -physicalDiskView: ({ -path, }: {path: PhysicalDiskViewPathParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/hardware/disks/${path.diskId}`, - method: "GET", - ...params, - }) - }, -/** -* Fetch the LLDP neighbors seen on a switch port - */ -networkingSwitchPortLldpNeighbors: ({ -path, query = {}, }: {path: NetworkingSwitchPortLldpNeighborsPathParams, -query?: NetworkingSwitchPortLldpNeighborsQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/hardware/rack-switch-port/${path.rackId}/${path.switchLocation}/${path.port}/lldp/neighbors`, - method: "GET", - query, - ...params, - }) - }, -/** * List racks */ rackList: ({ @@ -8867,7 +5400,7 @@ sledAdd: ({ body, }: {body: UninitializedSledId, }, params: FetchParams = {}) => { - return this.request({ + return this.request({ path: `/v1/system/hardware/sleds`, method: "POST", body, @@ -8947,47 +5480,15 @@ params: FetchParams = {}) => { }) }, /** -* List switch ports - */ -networkingSwitchPortList: ({ -query = {}, }: {query?: NetworkingSwitchPortListQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/hardware/switch-port`, - method: "GET", - query, - ...params, - }) - }, -/** -* Fetch the LLDP configuration for a switch port - */ -networkingSwitchPortLldpConfigView: ({ -path, query, }: {path: NetworkingSwitchPortLldpConfigViewPathParams, -query: NetworkingSwitchPortLldpConfigViewQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/hardware/switch-port/${path.port}/lldp/config`, - method: "GET", - query, - ...params, - }) - }, -/** -* Update the LLDP configuration for a switch port +* List switch ports */ -networkingSwitchPortLldpConfigUpdate: ({ -path, query, body, }: {path: NetworkingSwitchPortLldpConfigUpdatePathParams, -query: NetworkingSwitchPortLldpConfigUpdateQueryParams, -body: LldpLinkConfig, +networkingSwitchPortList: ({ +query = {}, }: {query?: NetworkingSwitchPortListQueryParams, }, params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/hardware/switch-port/${path.port}/lldp/config`, - method: "POST", - body, + return this.request({ + path: `/v1/system/hardware/switch-port`, + method: "GET", query, ...params, }) @@ -9025,21 +5526,6 @@ params: FetchParams = {}) => { }) }, /** -* Get switch port status - */ -networkingSwitchPortStatus: ({ -path, query, }: {path: NetworkingSwitchPortStatusPathParams, -query: NetworkingSwitchPortStatusQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/hardware/switch-port/${path.port}/status`, - method: "GET", - query, - ...params, - }) - }, -/** * List switches */ switchList: ({ @@ -9067,7 +5553,7 @@ params: FetchParams = {}) => { }) }, /** -* List identity providers for silo +* List a silo's IdP's name */ siloIdentityProviderList: ({ query = {}, }: {query?: SiloIdentityProviderListQueryParams, @@ -9129,7 +5615,7 @@ params: FetchParams = {}) => { }) }, /** -* Create SAML identity provider +* Create SAML IdP */ samlIdentityProviderCreate: ({ query, body, }: {query: SamlIdentityProviderCreateQueryParams, @@ -9145,11 +5631,11 @@ params: FetchParams = {}) => { }) }, /** -* Fetch SAML identity provider +* Fetch SAML IdP */ samlIdentityProviderView: ({ -path, query = {}, }: {path: SamlIdentityProviderViewPathParams, -query?: SamlIdentityProviderViewQueryParams, +path, query, }: {path: SamlIdentityProviderViewPathParams, +query: SamlIdentityProviderViewQueryParams, }, params: FetchParams = {}) => { return this.request({ @@ -9244,7 +5730,7 @@ params: FetchParams = {}) => { }) }, /** -* Add range to IP pool. +* Add range to IP pool */ ipPoolRangeAdd: ({ path, body, }: {path: IpPoolRangeAddPathParams, @@ -9332,19 +5818,6 @@ params: FetchParams = {}) => { }) }, /** -* Fetch IP pool utilization - */ -ipPoolUtilizationView: ({ -path, }: {path: IpPoolUtilizationViewPathParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/ip-pools/${path.pool}/utilization`, - method: "GET", - ...params, - }) - }, -/** * Fetch Oxide service IP pool */ ipPoolServiceView: (_: EmptyObj, @@ -9398,7 +5871,7 @@ params: FetchParams = {}) => { }) }, /** -* View metrics +* Access metrics data */ systemMetric: ({ path, query = {}, }: {path: SystemMetricPathParams, @@ -9441,19 +5914,6 @@ params: FetchParams = {}) => { }) }, /** -* Fetch address lot - */ -networkingAddressLotView: ({ -path, }: {path: NetworkingAddressLotViewPathParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/networking/address-lot/${path.addressLot}`, - method: "GET", - ...params, - }) - }, -/** * Delete address lot */ networkingAddressLotDelete: ({ @@ -9482,31 +5942,6 @@ params: FetchParams = {}) => { }) }, /** -* Get user-facing services IP allowlist - */ -networkingAllowListView: (_: EmptyObj, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/networking/allow-list`, - method: "GET", - ...params, - }) - }, -/** -* Update user-facing services IP allowlist - */ -networkingAllowListUpdate: ({ -body, }: {body: AllowListUpdate, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/networking/allow-list`, - method: "PUT", - body, - ...params, - }) - }, -/** * Disable a BFD session */ networkingBfdDisable: ({ @@ -9588,29 +6023,29 @@ params: FetchParams = {}) => { }) }, /** -* List BGP announce sets +* Get originated routes for a BGP configuration */ networkingBgpAnnounceSetList: ({ -query = {}, }: {query?: NetworkingBgpAnnounceSetListQueryParams, +query, }: {query: NetworkingBgpAnnounceSetListQueryParams, }, params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/networking/bgp-announce-set`, + return this.request({ + path: `/v1/system/networking/bgp-announce`, method: "GET", query, ...params, }) }, /** -* Update BGP announce set +* Create new BGP announce set */ -networkingBgpAnnounceSetUpdate: ({ +networkingBgpAnnounceSetCreate: ({ body, }: {body: BgpAnnounceSetCreate, }, params: FetchParams = {}) => { return this.request({ - path: `/v1/system/networking/bgp-announce-set`, - method: "PUT", + path: `/v1/system/networking/bgp-announce`, + method: "POST", body, ...params, }) @@ -9619,49 +6054,12 @@ params: FetchParams = {}) => { * Delete BGP announce set */ networkingBgpAnnounceSetDelete: ({ -path, }: {path: NetworkingBgpAnnounceSetDeletePathParams, +query, }: {query: NetworkingBgpAnnounceSetDeleteQueryParams, }, params: FetchParams = {}) => { return this.request({ - path: `/v1/system/networking/bgp-announce-set/${path.announceSet}`, + path: `/v1/system/networking/bgp-announce`, method: "DELETE", - ...params, - }) - }, -/** -* Get originated routes for a specified BGP announce set - */ -networkingBgpAnnouncementList: ({ -path, }: {path: NetworkingBgpAnnouncementListPathParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/networking/bgp-announce-set/${path.announceSet}/announcement`, - method: "GET", - ...params, - }) - }, -/** -* Get BGP exported routes - */ -networkingBgpExported: (_: EmptyObj, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/networking/bgp-exported`, - method: "GET", - ...params, - }) - }, -/** -* Get BGP router message history - */ -networkingBgpMessageHistory: ({ -query, }: {query: NetworkingBgpMessageHistoryQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/networking/bgp-message-history`, - method: "GET", query, ...params, }) @@ -9692,31 +6090,6 @@ params: FetchParams = {}) => { }) }, /** -* Return whether API services can receive limited ICMP traffic - */ -networkingInboundIcmpView: (_: EmptyObj, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/networking/inbound-icmp`, - method: "GET", - ...params, - }) - }, -/** -* Set whether API services can receive limited ICMP traffic - */ -networkingInboundIcmpUpdate: ({ -body, }: {body: ServiceIcmpConfig, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/networking/inbound-icmp`, - method: "PUT", - body, - ...params, - }) - }, -/** * List loopback addresses */ networkingLoopbackAddressList: ({ @@ -9764,7 +6137,7 @@ networkingSwitchPortSettingsList: ({ query = {}, }: {query?: NetworkingSwitchPortSettingsListQueryParams, }, params: FetchParams = {}) => { - return this.request({ + return this.request({ path: `/v1/system/networking/switch-port-settings`, method: "GET", query, @@ -9778,7 +6151,7 @@ networkingSwitchPortSettingsCreate: ({ body, }: {body: SwitchPortSettingsCreate, }, params: FetchParams = {}) => { - return this.request({ + return this.request({ path: `/v1/system/networking/switch-port-settings`, method: "POST", body, @@ -9806,7 +6179,7 @@ networkingSwitchPortSettingsView: ({ path, }: {path: NetworkingSwitchPortSettingsViewPathParams, }, params: FetchParams = {}) => { - return this.request({ + return this.request({ path: `/v1/system/networking/switch-port-settings/${path.port}`, method: "GET", ...params, @@ -9838,60 +6211,29 @@ params: FetchParams = {}) => { }) }, /** -* List SCIM tokens +* List built-in roles */ -scimTokenList: ({ -query, }: {query: ScimTokenListQueryParams, +roleList: ({ +query = {}, }: {query?: RoleListQueryParams, }, params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/scim/tokens`, + return this.request({ + path: `/v1/system/roles`, method: "GET", query, ...params, }) }, /** -* Create SCIM token - */ -scimTokenCreate: ({ -query, }: {query: ScimTokenCreateQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/scim/tokens`, - method: "POST", - query, - ...params, - }) - }, -/** -* Fetch SCIM token +* Fetch built-in role */ -scimTokenView: ({ -path, query, }: {path: ScimTokenViewPathParams, -query: ScimTokenViewQueryParams, +roleView: ({ +path, }: {path: RoleViewPathParams, }, params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/scim/tokens/${path.tokenId}`, + return this.request({ + path: `/v1/system/roles/${path.roleName}`, method: "GET", - query, - ...params, - }) - }, -/** -* Delete SCIM token - */ -scimTokenDelete: ({ -path, query, }: {path: ScimTokenDeletePathParams, -query: ScimTokenDeleteQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/scim/tokens/${path.tokenId}`, - method: "DELETE", - query, ...params, }) }, @@ -9913,269 +6255,124 @@ params: FetchParams = {}) => { * List silos */ siloList: ({ -query = {}, }: {query?: SiloListQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/silos`, - method: "GET", - query, - ...params, - }) - }, -/** -* Create a silo - */ -siloCreate: ({ -body, }: {body: SiloCreate, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/silos`, - method: "POST", - body, - ...params, - }) - }, -/** -* Fetch silo - */ -siloView: ({ -path, }: {path: SiloViewPathParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/silos/${path.silo}`, - method: "GET", - ...params, - }) - }, -/** -* Delete a silo - */ -siloDelete: ({ -path, }: {path: SiloDeletePathParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/silos/${path.silo}`, - method: "DELETE", - ...params, - }) - }, -/** -* List IP pools linked to silo - */ -siloIpPoolList: ({ -path, query = {}, }: {path: SiloIpPoolListPathParams, -query?: SiloIpPoolListQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/silos/${path.silo}/ip-pools`, - method: "GET", - query, - ...params, - }) - }, -/** -* Fetch silo IAM policy - */ -siloPolicyView: ({ -path, }: {path: SiloPolicyViewPathParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/silos/${path.silo}/policy`, - method: "GET", - ...params, - }) - }, -/** -* Update silo IAM policy - */ -siloPolicyUpdate: ({ -path, body, }: {path: SiloPolicyUpdatePathParams, -body: SiloRolePolicy, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/silos/${path.silo}/policy`, - method: "PUT", - body, - ...params, - }) - }, -/** -* Fetch resource quotas for silo - */ -siloQuotasView: ({ -path, }: {path: SiloQuotasViewPathParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/silos/${path.silo}/quotas`, - method: "GET", - ...params, - }) - }, -/** -* Update resource quotas for silo - */ -siloQuotasUpdate: ({ -path, body, }: {path: SiloQuotasUpdatePathParams, -body: SiloQuotasUpdate, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/silos/${path.silo}/quotas`, - method: "PUT", - body, - ...params, - }) - }, -/** -* Run timeseries query - */ -systemTimeseriesQuery: ({ -body, }: {body: TimeseriesQuery, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/timeseries/query`, - method: "POST", - body, - ...params, - }) - }, -/** -* List timeseries schemas - */ -systemTimeseriesSchemaList: ({ -query = {}, }: {query?: SystemTimeseriesSchemaListQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/timeseries/schemas`, - method: "GET", - query, - ...params, - }) - }, -/** -* List all TUF repositories - */ -systemUpdateRepositoryList: ({ -query = {}, }: {query?: SystemUpdateRepositoryListQueryParams, +query = {}, }: {query?: SiloListQueryParams, }, params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/update/repositories`, + return this.request({ + path: `/v1/system/silos`, method: "GET", query, ...params, }) }, /** -* Upload system release repository +* Create a silo */ -systemUpdateRepositoryUpload: ({ -query, }: {query: SystemUpdateRepositoryUploadQueryParams, +siloCreate: ({ +body, }: {body: SiloCreate, }, params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/update/repositories`, - method: "PUT", - query, + return this.request({ + path: `/v1/system/silos`, + method: "POST", + body, ...params, }) }, /** -* Fetch system release repository by version +* Fetch silo */ -systemUpdateRepositoryView: ({ -path, }: {path: SystemUpdateRepositoryViewPathParams, +siloView: ({ +path, }: {path: SiloViewPathParams, }, params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/update/repositories/${path.systemVersion}`, + return this.request({ + path: `/v1/system/silos/${path.silo}`, method: "GET", ...params, }) }, /** -* Fetch system update status +* Delete a silo */ -systemUpdateStatus: (_: EmptyObj, +siloDelete: ({ +path, }: {path: SiloDeletePathParams, +}, params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/update/status`, - method: "GET", + return this.request({ + path: `/v1/system/silos/${path.silo}`, + method: "DELETE", ...params, }) }, /** -* Set target release +* List IP pools linked to silo */ -targetReleaseUpdate: ({ -body, }: {body: SetTargetReleaseParams, +siloIpPoolList: ({ +path, query = {}, }: {path: SiloIpPoolListPathParams, +query?: SiloIpPoolListQueryParams, }, params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/update/target-release`, - method: "PUT", - body, + return this.request({ + path: `/v1/system/silos/${path.silo}/ip-pools`, + method: "GET", + query, ...params, }) }, /** -* List root roles in the updates trust store +* Fetch silo IAM policy */ -systemUpdateTrustRootList: ({ -query = {}, }: {query?: SystemUpdateTrustRootListQueryParams, +siloPolicyView: ({ +path, }: {path: SiloPolicyViewPathParams, }, params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/update/trust-roots`, + return this.request({ + path: `/v1/system/silos/${path.silo}/policy`, method: "GET", - query, ...params, }) }, /** -* Add trusted root role to updates trust store +* Update silo IAM policy */ -systemUpdateTrustRootCreate: (_: EmptyObj, +siloPolicyUpdate: ({ +path, body, }: {path: SiloPolicyUpdatePathParams, +body: SiloRolePolicy, +}, params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/update/trust-roots`, - method: "POST", + return this.request({ + path: `/v1/system/silos/${path.silo}/policy`, + method: "PUT", + body, ...params, }) }, /** -* Fetch trusted root role +* Fetch resource quotas for silo */ -systemUpdateTrustRootView: ({ -path, }: {path: SystemUpdateTrustRootViewPathParams, +siloQuotasView: ({ +path, }: {path: SiloQuotasViewPathParams, }, params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/update/trust-roots/${path.trustRootId}`, + return this.request({ + path: `/v1/system/silos/${path.silo}/quotas`, method: "GET", ...params, }) }, /** -* Delete trusted root role +* Update resource quotas for silo */ -systemUpdateTrustRootDelete: ({ -path, }: {path: SystemUpdateTrustRootDeletePathParams, +siloQuotasUpdate: ({ +path, body, }: {path: SiloQuotasUpdatePathParams, +body: SiloQuotasUpdate, }, params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/update/trust-roots/${path.trustRootId}`, - method: "DELETE", + return this.request({ + path: `/v1/system/silos/${path.silo}/quotas`, + method: "PUT", + body, ...params, }) }, @@ -10263,22 +6460,6 @@ params: FetchParams = {}) => { }) }, /** -* Run project-scoped timeseries query - */ -timeseriesQuery: ({ -query, body, }: {query: TimeseriesQueryQueryParams, -body: TimeseriesQuery, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/timeseries/query`, - method: "POST", - body, - query, - ...params, - }) - }, -/** * List users */ userList: ({ @@ -10293,62 +6474,6 @@ params: FetchParams = {}) => { }) }, /** -* Fetch user - */ -userView: ({ -path, }: {path: UserViewPathParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/users/${path.userId}`, - method: "GET", - ...params, - }) - }, -/** -* List user's access tokens - */ -userTokenList: ({ -path, query = {}, }: {path: UserTokenListPathParams, -query?: UserTokenListQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/users/${path.userId}/access-tokens`, - method: "GET", - query, - ...params, - }) - }, -/** -* Log user out - */ -userLogout: ({ -path, }: {path: UserLogoutPathParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/users/${path.userId}/logout`, - method: "POST", - ...params, - }) - }, -/** -* List user's console sessions - */ -userSessionList: ({ -path, query = {}, }: {path: UserSessionListPathParams, -query?: UserSessionListQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/users/${path.userId}/sessions`, - method: "GET", - query, - ...params, - }) - }, -/** * Fetch resource utilization for user's current silo */ utilizationView: (_: EmptyObj, @@ -10390,160 +6515,6 @@ params: FetchParams = {}) => { }) }, /** -* List routes - */ -vpcRouterRouteList: ({ -query = {}, }: {query?: VpcRouterRouteListQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/vpc-router-routes`, - method: "GET", - query, - ...params, - }) - }, -/** -* Create route - */ -vpcRouterRouteCreate: ({ -query, body, }: {query: VpcRouterRouteCreateQueryParams, -body: RouterRouteCreate, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/vpc-router-routes`, - method: "POST", - body, - query, - ...params, - }) - }, -/** -* Fetch route - */ -vpcRouterRouteView: ({ -path, query = {}, }: {path: VpcRouterRouteViewPathParams, -query?: VpcRouterRouteViewQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/vpc-router-routes/${path.route}`, - method: "GET", - query, - ...params, - }) - }, -/** -* Update route - */ -vpcRouterRouteUpdate: ({ -path, query = {}, body, }: {path: VpcRouterRouteUpdatePathParams, -query?: VpcRouterRouteUpdateQueryParams, -body: RouterRouteUpdate, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/vpc-router-routes/${path.route}`, - method: "PUT", - body, - query, - ...params, - }) - }, -/** -* Delete route - */ -vpcRouterRouteDelete: ({ -path, query = {}, }: {path: VpcRouterRouteDeletePathParams, -query?: VpcRouterRouteDeleteQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/vpc-router-routes/${path.route}`, - method: "DELETE", - query, - ...params, - }) - }, -/** -* List routers - */ -vpcRouterList: ({ -query = {}, }: {query?: VpcRouterListQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/vpc-routers`, - method: "GET", - query, - ...params, - }) - }, -/** -* Create VPC router - */ -vpcRouterCreate: ({ -query, body, }: {query: VpcRouterCreateQueryParams, -body: VpcRouterCreate, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/vpc-routers`, - method: "POST", - body, - query, - ...params, - }) - }, -/** -* Fetch router - */ -vpcRouterView: ({ -path, query = {}, }: {path: VpcRouterViewPathParams, -query?: VpcRouterViewQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/vpc-routers/${path.router}`, - method: "GET", - query, - ...params, - }) - }, -/** -* Update router - */ -vpcRouterUpdate: ({ -path, query = {}, body, }: {path: VpcRouterUpdatePathParams, -query?: VpcRouterUpdateQueryParams, -body: VpcRouterUpdate, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/vpc-routers/${path.router}`, - method: "PUT", - body, - query, - ...params, - }) - }, -/** -* Delete router - */ -vpcRouterDelete: ({ -path, query = {}, }: {path: VpcRouterDeletePathParams, -query?: VpcRouterDeleteQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/vpc-routers/${path.router}`, - method: "DELETE", - query, - ...params, - }) - }, -/** * List subnets */ vpcSubnetList: ({ @@ -10712,78 +6683,6 @@ params: FetchParams = {}) => { ...params, }) }, -/** -* Create webhook receiver - */ -webhookReceiverCreate: ({ -body, }: {body: WebhookCreate, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/webhook-receivers`, - method: "POST", - body, - ...params, - }) - }, -/** -* Update webhook receiver - */ -webhookReceiverUpdate: ({ -path, body, }: {path: WebhookReceiverUpdatePathParams, -body: WebhookReceiverUpdate, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/webhook-receivers/${path.receiver}`, - method: "PUT", - body, - ...params, - }) - }, -/** -* List webhook receiver secret IDs - */ -webhookSecretsList: ({ -query, }: {query: WebhookSecretsListQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/webhook-secrets`, - method: "GET", - query, - ...params, - }) - }, -/** -* Add secret to webhook receiver - */ -webhookSecretsAdd: ({ -query, body, }: {query: WebhookSecretsAddQueryParams, -body: WebhookSecretCreate, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/webhook-secrets`, - method: "POST", - body, - query, - ...params, - }) - }, -/** -* Remove secret from webhook receiver - */ -webhookSecretsDelete: ({ -path, }: {path: WebhookSecretsDeletePathParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/webhook-secrets/${path.secretId}`, - method: "DELETE", - ...params, - }) - }, } ws = { /** diff --git a/oxide-openapi-gen-ts/src/__snapshots__/msw-handlers.ts b/oxide-openapi-gen-ts/src/__snapshots__/msw-handlers.ts index 303d258..527c8dd 100644 --- a/oxide-openapi-gen-ts/src/__snapshots__/msw-handlers.ts +++ b/oxide-openapi-gen-ts/src/__snapshots__/msw-handlers.ts @@ -44,94 +44,8 @@ export interface MSWHandlers { deviceAuthConfirm: (params: { body: Json, req: Request, cookies: Record }) => Promisable, /** `POST /device/token` */ deviceAccessToken: (params: { req: Request, cookies: Record }) => Promisable, -/** `GET /experimental/v1/probes` */ - probeList: (params: { query: Api.ProbeListQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `POST /experimental/v1/probes` */ - probeCreate: (params: { query: Api.ProbeCreateQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, -/** `GET /experimental/v1/probes/:probe` */ - probeView: (params: { path: Api.ProbeViewPathParams, query: Api.ProbeViewQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `DELETE /experimental/v1/probes/:probe` */ - probeDelete: (params: { path: Api.ProbeDeletePathParams, query: Api.ProbeDeleteQueryParams, req: Request, cookies: Record }) => Promisable, -/** `GET /experimental/v1/system/support-bundles` */ - supportBundleList: (params: { query: Api.SupportBundleListQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `POST /experimental/v1/system/support-bundles` */ - supportBundleCreate: (params: { body: Json, req: Request, cookies: Record }) => Promisable>, -/** `GET /experimental/v1/system/support-bundles/:bundleId` */ - supportBundleView: (params: { path: Api.SupportBundleViewPathParams, req: Request, cookies: Record }) => Promisable>, -/** `PUT /experimental/v1/system/support-bundles/:bundleId` */ - supportBundleUpdate: (params: { path: Api.SupportBundleUpdatePathParams, body: Json, req: Request, cookies: Record }) => Promisable>, -/** `DELETE /experimental/v1/system/support-bundles/:bundleId` */ - supportBundleDelete: (params: { path: Api.SupportBundleDeletePathParams, req: Request, cookies: Record }) => Promisable, -/** `GET /experimental/v1/system/support-bundles/:bundleId/download` */ - supportBundleDownload: (params: { path: Api.SupportBundleDownloadPathParams, req: Request, cookies: Record }) => Promisable, -/** `HEAD /experimental/v1/system/support-bundles/:bundleId/download` */ - supportBundleHead: (params: { path: Api.SupportBundleHeadPathParams, req: Request, cookies: Record }) => Promisable, -/** `GET /experimental/v1/system/support-bundles/:bundleId/download/:file` */ - supportBundleDownloadFile: (params: { path: Api.SupportBundleDownloadFilePathParams, req: Request, cookies: Record }) => Promisable, -/** `HEAD /experimental/v1/system/support-bundles/:bundleId/download/:file` */ - supportBundleHeadFile: (params: { path: Api.SupportBundleHeadFilePathParams, req: Request, cookies: Record }) => Promisable, -/** `GET /experimental/v1/system/support-bundles/:bundleId/index` */ - supportBundleIndex: (params: { path: Api.SupportBundleIndexPathParams, req: Request, cookies: Record }) => Promisable, /** `POST /login/:siloName/saml/:providerName` */ loginSaml: (params: { path: Api.LoginSamlPathParams, req: Request, cookies: Record }) => Promisable, -/** `GET /v1/affinity-groups` */ - affinityGroupList: (params: { query: Api.AffinityGroupListQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `POST /v1/affinity-groups` */ - affinityGroupCreate: (params: { query: Api.AffinityGroupCreateQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, -/** `GET /v1/affinity-groups/:affinityGroup` */ - affinityGroupView: (params: { path: Api.AffinityGroupViewPathParams, query: Api.AffinityGroupViewQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `PUT /v1/affinity-groups/:affinityGroup` */ - affinityGroupUpdate: (params: { path: Api.AffinityGroupUpdatePathParams, query: Api.AffinityGroupUpdateQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, -/** `DELETE /v1/affinity-groups/:affinityGroup` */ - affinityGroupDelete: (params: { path: Api.AffinityGroupDeletePathParams, query: Api.AffinityGroupDeleteQueryParams, req: Request, cookies: Record }) => Promisable, -/** `GET /v1/affinity-groups/:affinityGroup/members` */ - affinityGroupMemberList: (params: { path: Api.AffinityGroupMemberListPathParams, query: Api.AffinityGroupMemberListQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `GET /v1/affinity-groups/:affinityGroup/members/instance/:instance` */ - affinityGroupMemberInstanceView: (params: { path: Api.AffinityGroupMemberInstanceViewPathParams, query: Api.AffinityGroupMemberInstanceViewQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `POST /v1/affinity-groups/:affinityGroup/members/instance/:instance` */ - affinityGroupMemberInstanceAdd: (params: { path: Api.AffinityGroupMemberInstanceAddPathParams, query: Api.AffinityGroupMemberInstanceAddQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `DELETE /v1/affinity-groups/:affinityGroup/members/instance/:instance` */ - affinityGroupMemberInstanceDelete: (params: { path: Api.AffinityGroupMemberInstanceDeletePathParams, query: Api.AffinityGroupMemberInstanceDeleteQueryParams, req: Request, cookies: Record }) => Promisable, -/** `GET /v1/alert-classes` */ - alertClassList: (params: { query: Api.AlertClassListQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `GET /v1/alert-receivers` */ - alertReceiverList: (params: { query: Api.AlertReceiverListQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `GET /v1/alert-receivers/:receiver` */ - alertReceiverView: (params: { path: Api.AlertReceiverViewPathParams, req: Request, cookies: Record }) => Promisable>, -/** `DELETE /v1/alert-receivers/:receiver` */ - alertReceiverDelete: (params: { path: Api.AlertReceiverDeletePathParams, req: Request, cookies: Record }) => Promisable, -/** `GET /v1/alert-receivers/:receiver/deliveries` */ - alertDeliveryList: (params: { path: Api.AlertDeliveryListPathParams, query: Api.AlertDeliveryListQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `POST /v1/alert-receivers/:receiver/probe` */ - alertReceiverProbe: (params: { path: Api.AlertReceiverProbePathParams, query: Api.AlertReceiverProbeQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `POST /v1/alert-receivers/:receiver/subscriptions` */ - alertReceiverSubscriptionAdd: (params: { path: Api.AlertReceiverSubscriptionAddPathParams, body: Json, req: Request, cookies: Record }) => Promisable>, -/** `DELETE /v1/alert-receivers/:receiver/subscriptions/:subscription` */ - alertReceiverSubscriptionRemove: (params: { path: Api.AlertReceiverSubscriptionRemovePathParams, req: Request, cookies: Record }) => Promisable, -/** `POST /v1/alerts/:alertId/resend` */ - alertDeliveryResend: (params: { path: Api.AlertDeliveryResendPathParams, query: Api.AlertDeliveryResendQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `GET /v1/anti-affinity-groups` */ - antiAffinityGroupList: (params: { query: Api.AntiAffinityGroupListQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `POST /v1/anti-affinity-groups` */ - antiAffinityGroupCreate: (params: { query: Api.AntiAffinityGroupCreateQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, -/** `GET /v1/anti-affinity-groups/:antiAffinityGroup` */ - antiAffinityGroupView: (params: { path: Api.AntiAffinityGroupViewPathParams, query: Api.AntiAffinityGroupViewQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `PUT /v1/anti-affinity-groups/:antiAffinityGroup` */ - antiAffinityGroupUpdate: (params: { path: Api.AntiAffinityGroupUpdatePathParams, query: Api.AntiAffinityGroupUpdateQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, -/** `DELETE /v1/anti-affinity-groups/:antiAffinityGroup` */ - antiAffinityGroupDelete: (params: { path: Api.AntiAffinityGroupDeletePathParams, query: Api.AntiAffinityGroupDeleteQueryParams, req: Request, cookies: Record }) => Promisable, -/** `GET /v1/anti-affinity-groups/:antiAffinityGroup/members` */ - antiAffinityGroupMemberList: (params: { path: Api.AntiAffinityGroupMemberListPathParams, query: Api.AntiAffinityGroupMemberListQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `GET /v1/anti-affinity-groups/:antiAffinityGroup/members/instance/:instance` */ - antiAffinityGroupMemberInstanceView: (params: { path: Api.AntiAffinityGroupMemberInstanceViewPathParams, query: Api.AntiAffinityGroupMemberInstanceViewQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `POST /v1/anti-affinity-groups/:antiAffinityGroup/members/instance/:instance` */ - antiAffinityGroupMemberInstanceAdd: (params: { path: Api.AntiAffinityGroupMemberInstanceAddPathParams, query: Api.AntiAffinityGroupMemberInstanceAddQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `DELETE /v1/anti-affinity-groups/:antiAffinityGroup/members/instance/:instance` */ - antiAffinityGroupMemberInstanceDelete: (params: { path: Api.AntiAffinityGroupMemberInstanceDeletePathParams, query: Api.AntiAffinityGroupMemberInstanceDeleteQueryParams, req: Request, cookies: Record }) => Promisable, -/** `GET /v1/auth-settings` */ - authSettingsView: (params: { req: Request, cookies: Record }) => Promisable>, -/** `PUT /v1/auth-settings` */ - authSettingsUpdate: (params: { body: Json, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/certificates` */ certificateList: (params: { query: Api.CertificateListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `POST /v1/certificates` */ @@ -156,6 +70,8 @@ export interface MSWHandlers { diskBulkWriteImportStop: (params: { path: Api.DiskBulkWriteImportStopPathParams, query: Api.DiskBulkWriteImportStopQueryParams, req: Request, cookies: Record }) => Promisable, /** `POST /v1/disks/:disk/finalize` */ diskFinalizeImport: (params: { path: Api.DiskFinalizeImportPathParams, query: Api.DiskFinalizeImportQueryParams, body: Json, req: Request, cookies: Record }) => Promisable, +/** `GET /v1/disks/:disk/metrics/:metric` */ + diskMetricsList: (params: { path: Api.DiskMetricsListPathParams, query: Api.DiskMetricsListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/floating-ips` */ floatingIpList: (params: { query: Api.FloatingIpListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `POST /v1/floating-ips` */ @@ -192,14 +108,8 @@ export interface MSWHandlers { instanceCreate: (params: { query: Api.InstanceCreateQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/instances/:instance` */ instanceView: (params: { path: Api.InstanceViewPathParams, query: Api.InstanceViewQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `PUT /v1/instances/:instance` */ - instanceUpdate: (params: { path: Api.InstanceUpdatePathParams, query: Api.InstanceUpdateQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, /** `DELETE /v1/instances/:instance` */ instanceDelete: (params: { path: Api.InstanceDeletePathParams, query: Api.InstanceDeleteQueryParams, req: Request, cookies: Record }) => Promisable, -/** `GET /v1/instances/:instance/affinity-groups` */ - instanceAffinityGroupList: (params: { path: Api.InstanceAffinityGroupListPathParams, query: Api.InstanceAffinityGroupListQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `GET /v1/instances/:instance/anti-affinity-groups` */ - instanceAntiAffinityGroupList: (params: { path: Api.InstanceAntiAffinityGroupListPathParams, query: Api.InstanceAntiAffinityGroupListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/instances/:instance/disks` */ instanceDiskList: (params: { path: Api.InstanceDiskListPathParams, query: Api.InstanceDiskListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `POST /v1/instances/:instance/disks/attach` */ @@ -212,6 +122,8 @@ export interface MSWHandlers { instanceEphemeralIpAttach: (params: { path: Api.InstanceEphemeralIpAttachPathParams, query: Api.InstanceEphemeralIpAttachQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, /** `DELETE /v1/instances/:instance/external-ips/ephemeral` */ instanceEphemeralIpDetach: (params: { path: Api.InstanceEphemeralIpDetachPathParams, query: Api.InstanceEphemeralIpDetachQueryParams, req: Request, cookies: Record }) => Promisable, +/** `POST /v1/instances/:instance/migrate` */ + instanceMigrate: (params: { path: Api.InstanceMigratePathParams, query: Api.InstanceMigrateQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, /** `POST /v1/instances/:instance/reboot` */ instanceReboot: (params: { path: Api.InstanceRebootPathParams, query: Api.InstanceRebootQueryParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/instances/:instance/serial-console` */ @@ -224,26 +136,6 @@ export interface MSWHandlers { instanceStart: (params: { path: Api.InstanceStartPathParams, query: Api.InstanceStartQueryParams, req: Request, cookies: Record }) => Promisable>, /** `POST /v1/instances/:instance/stop` */ instanceStop: (params: { path: Api.InstanceStopPathParams, query: Api.InstanceStopQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `GET /v1/internet-gateway-ip-addresses` */ - internetGatewayIpAddressList: (params: { query: Api.InternetGatewayIpAddressListQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `POST /v1/internet-gateway-ip-addresses` */ - internetGatewayIpAddressCreate: (params: { query: Api.InternetGatewayIpAddressCreateQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, -/** `DELETE /v1/internet-gateway-ip-addresses/:address` */ - internetGatewayIpAddressDelete: (params: { path: Api.InternetGatewayIpAddressDeletePathParams, query: Api.InternetGatewayIpAddressDeleteQueryParams, req: Request, cookies: Record }) => Promisable, -/** `GET /v1/internet-gateway-ip-pools` */ - internetGatewayIpPoolList: (params: { query: Api.InternetGatewayIpPoolListQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `POST /v1/internet-gateway-ip-pools` */ - internetGatewayIpPoolCreate: (params: { query: Api.InternetGatewayIpPoolCreateQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, -/** `DELETE /v1/internet-gateway-ip-pools/:pool` */ - internetGatewayIpPoolDelete: (params: { path: Api.InternetGatewayIpPoolDeletePathParams, query: Api.InternetGatewayIpPoolDeleteQueryParams, req: Request, cookies: Record }) => Promisable, -/** `GET /v1/internet-gateways` */ - internetGatewayList: (params: { query: Api.InternetGatewayListQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `POST /v1/internet-gateways` */ - internetGatewayCreate: (params: { query: Api.InternetGatewayCreateQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, -/** `GET /v1/internet-gateways/:gateway` */ - internetGatewayView: (params: { path: Api.InternetGatewayViewPathParams, query: Api.InternetGatewayViewQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `DELETE /v1/internet-gateways/:gateway` */ - internetGatewayDelete: (params: { path: Api.InternetGatewayDeletePathParams, query: Api.InternetGatewayDeleteQueryParams, req: Request, cookies: Record }) => Promisable, /** `GET /v1/ip-pools` */ projectIpPoolList: (params: { query: Api.ProjectIpPoolListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/ip-pools/:pool` */ @@ -254,10 +146,6 @@ export interface MSWHandlers { logout: (params: { req: Request, cookies: Record }) => Promisable, /** `GET /v1/me` */ currentUserView: (params: { req: Request, cookies: Record }) => Promisable>, -/** `GET /v1/me/access-tokens` */ - currentUserAccessTokenList: (params: { query: Api.CurrentUserAccessTokenListQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `DELETE /v1/me/access-tokens/:tokenId` */ - currentUserAccessTokenDelete: (params: { path: Api.CurrentUserAccessTokenDeletePathParams, req: Request, cookies: Record }) => Promisable, /** `GET /v1/me/groups` */ currentUserGroups: (params: { query: Api.CurrentUserGroupsQueryParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/me/ssh-keys` */ @@ -308,14 +196,8 @@ export interface MSWHandlers { snapshotView: (params: { path: Api.SnapshotViewPathParams, query: Api.SnapshotViewQueryParams, req: Request, cookies: Record }) => Promisable>, /** `DELETE /v1/snapshots/:snapshot` */ snapshotDelete: (params: { path: Api.SnapshotDeletePathParams, query: Api.SnapshotDeleteQueryParams, req: Request, cookies: Record }) => Promisable, -/** `GET /v1/system/audit-log` */ - auditLogList: (params: { query: Api.AuditLogListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/system/hardware/disks` */ physicalDiskList: (params: { query: Api.PhysicalDiskListQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `GET /v1/system/hardware/disks/:diskId` */ - physicalDiskView: (params: { path: Api.PhysicalDiskViewPathParams, req: Request, cookies: Record }) => Promisable>, -/** `GET /v1/system/hardware/rack-switch-port/:rackId/:switchLocation/:port/lldp/neighbors` */ - networkingSwitchPortLldpNeighbors: (params: { path: Api.NetworkingSwitchPortLldpNeighborsPathParams, query: Api.NetworkingSwitchPortLldpNeighborsQueryParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/system/hardware/racks` */ rackList: (params: { query: Api.RackListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/system/hardware/racks/:rackId` */ @@ -323,7 +205,7 @@ export interface MSWHandlers { /** `GET /v1/system/hardware/sleds` */ sledList: (params: { query: Api.SledListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `POST /v1/system/hardware/sleds` */ - sledAdd: (params: { body: Json, req: Request, cookies: Record }) => Promisable>, + sledAdd: (params: { body: Json, req: Request, cookies: Record }) => Promisable, /** `GET /v1/system/hardware/sleds/:sledId` */ sledView: (params: { path: Api.SledViewPathParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/system/hardware/sleds/:sledId/disks` */ @@ -336,16 +218,10 @@ export interface MSWHandlers { sledListUninitialized: (params: { query: Api.SledListUninitializedQueryParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/system/hardware/switch-port` */ networkingSwitchPortList: (params: { query: Api.NetworkingSwitchPortListQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `GET /v1/system/hardware/switch-port/:port/lldp/config` */ - networkingSwitchPortLldpConfigView: (params: { path: Api.NetworkingSwitchPortLldpConfigViewPathParams, query: Api.NetworkingSwitchPortLldpConfigViewQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `POST /v1/system/hardware/switch-port/:port/lldp/config` */ - networkingSwitchPortLldpConfigUpdate: (params: { path: Api.NetworkingSwitchPortLldpConfigUpdatePathParams, query: Api.NetworkingSwitchPortLldpConfigUpdateQueryParams, body: Json, req: Request, cookies: Record }) => Promisable, /** `POST /v1/system/hardware/switch-port/:port/settings` */ networkingSwitchPortApplySettings: (params: { path: Api.NetworkingSwitchPortApplySettingsPathParams, query: Api.NetworkingSwitchPortApplySettingsQueryParams, body: Json, req: Request, cookies: Record }) => Promisable, /** `DELETE /v1/system/hardware/switch-port/:port/settings` */ networkingSwitchPortClearSettings: (params: { path: Api.NetworkingSwitchPortClearSettingsPathParams, query: Api.NetworkingSwitchPortClearSettingsQueryParams, req: Request, cookies: Record }) => Promisable, -/** `GET /v1/system/hardware/switch-port/:port/status` */ - networkingSwitchPortStatus: (params: { path: Api.NetworkingSwitchPortStatusPathParams, query: Api.NetworkingSwitchPortStatusQueryParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/system/hardware/switches` */ switchList: (params: { query: Api.SwitchListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/system/hardware/switches/:switchId` */ @@ -386,8 +262,6 @@ export interface MSWHandlers { ipPoolSiloUpdate: (params: { path: Api.IpPoolSiloUpdatePathParams, body: Json, req: Request, cookies: Record }) => Promisable>, /** `DELETE /v1/system/ip-pools/:pool/silos/:silo` */ ipPoolSiloUnlink: (params: { path: Api.IpPoolSiloUnlinkPathParams, req: Request, cookies: Record }) => Promisable, -/** `GET /v1/system/ip-pools/:pool/utilization` */ - ipPoolUtilizationView: (params: { path: Api.IpPoolUtilizationViewPathParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/system/ip-pools-service` */ ipPoolServiceView: (params: { req: Request, cookies: Record }) => Promisable>, /** `GET /v1/system/ip-pools-service/ranges` */ @@ -402,16 +276,10 @@ export interface MSWHandlers { networkingAddressLotList: (params: { query: Api.NetworkingAddressLotListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `POST /v1/system/networking/address-lot` */ networkingAddressLotCreate: (params: { body: Json, req: Request, cookies: Record }) => Promisable>, -/** `GET /v1/system/networking/address-lot/:addressLot` */ - networkingAddressLotView: (params: { path: Api.NetworkingAddressLotViewPathParams, req: Request, cookies: Record }) => Promisable>, /** `DELETE /v1/system/networking/address-lot/:addressLot` */ networkingAddressLotDelete: (params: { path: Api.NetworkingAddressLotDeletePathParams, req: Request, cookies: Record }) => Promisable, /** `GET /v1/system/networking/address-lot/:addressLot/blocks` */ networkingAddressLotBlockList: (params: { path: Api.NetworkingAddressLotBlockListPathParams, query: Api.NetworkingAddressLotBlockListQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `GET /v1/system/networking/allow-list` */ - networkingAllowListView: (params: { req: Request, cookies: Record }) => Promisable>, -/** `PUT /v1/system/networking/allow-list` */ - networkingAllowListUpdate: (params: { body: Json, req: Request, cookies: Record }) => Promisable>, /** `POST /v1/system/networking/bfd-disable` */ networkingBfdDisable: (params: { body: Json, req: Request, cookies: Record }) => Promisable, /** `POST /v1/system/networking/bfd-enable` */ @@ -424,26 +292,16 @@ export interface MSWHandlers { networkingBgpConfigCreate: (params: { body: Json, req: Request, cookies: Record }) => Promisable>, /** `DELETE /v1/system/networking/bgp` */ networkingBgpConfigDelete: (params: { query: Api.NetworkingBgpConfigDeleteQueryParams, req: Request, cookies: Record }) => Promisable, -/** `GET /v1/system/networking/bgp-announce-set` */ - networkingBgpAnnounceSetList: (params: { query: Api.NetworkingBgpAnnounceSetListQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `PUT /v1/system/networking/bgp-announce-set` */ - networkingBgpAnnounceSetUpdate: (params: { body: Json, req: Request, cookies: Record }) => Promisable>, -/** `DELETE /v1/system/networking/bgp-announce-set/:announceSet` */ - networkingBgpAnnounceSetDelete: (params: { path: Api.NetworkingBgpAnnounceSetDeletePathParams, req: Request, cookies: Record }) => Promisable, -/** `GET /v1/system/networking/bgp-announce-set/:announceSet/announcement` */ - networkingBgpAnnouncementList: (params: { path: Api.NetworkingBgpAnnouncementListPathParams, req: Request, cookies: Record }) => Promisable>, -/** `GET /v1/system/networking/bgp-exported` */ - networkingBgpExported: (params: { req: Request, cookies: Record }) => Promisable>, -/** `GET /v1/system/networking/bgp-message-history` */ - networkingBgpMessageHistory: (params: { query: Api.NetworkingBgpMessageHistoryQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `GET /v1/system/networking/bgp-announce` */ + networkingBgpAnnounceSetList: (params: { query: Api.NetworkingBgpAnnounceSetListQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `POST /v1/system/networking/bgp-announce` */ + networkingBgpAnnounceSetCreate: (params: { body: Json, req: Request, cookies: Record }) => Promisable>, +/** `DELETE /v1/system/networking/bgp-announce` */ + networkingBgpAnnounceSetDelete: (params: { query: Api.NetworkingBgpAnnounceSetDeleteQueryParams, req: Request, cookies: Record }) => Promisable, /** `GET /v1/system/networking/bgp-routes-ipv4` */ networkingBgpImportedRoutesIpv4: (params: { query: Api.NetworkingBgpImportedRoutesIpv4QueryParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/system/networking/bgp-status` */ networkingBgpStatus: (params: { req: Request, cookies: Record }) => Promisable>, -/** `GET /v1/system/networking/inbound-icmp` */ - networkingInboundIcmpView: (params: { req: Request, cookies: Record }) => Promisable>, -/** `PUT /v1/system/networking/inbound-icmp` */ - networkingInboundIcmpUpdate: (params: { body: Json, req: Request, cookies: Record }) => Promisable, /** `GET /v1/system/networking/loopback-address` */ networkingLoopbackAddressList: (params: { query: Api.NetworkingLoopbackAddressListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `POST /v1/system/networking/loopback-address` */ @@ -451,25 +309,21 @@ export interface MSWHandlers { /** `DELETE /v1/system/networking/loopback-address/:rackId/:switchLocation/:address/:subnetMask` */ networkingLoopbackAddressDelete: (params: { path: Api.NetworkingLoopbackAddressDeletePathParams, req: Request, cookies: Record }) => Promisable, /** `GET /v1/system/networking/switch-port-settings` */ - networkingSwitchPortSettingsList: (params: { query: Api.NetworkingSwitchPortSettingsListQueryParams, req: Request, cookies: Record }) => Promisable>, + networkingSwitchPortSettingsList: (params: { query: Api.NetworkingSwitchPortSettingsListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `POST /v1/system/networking/switch-port-settings` */ - networkingSwitchPortSettingsCreate: (params: { body: Json, req: Request, cookies: Record }) => Promisable>, + networkingSwitchPortSettingsCreate: (params: { body: Json, req: Request, cookies: Record }) => Promisable>, /** `DELETE /v1/system/networking/switch-port-settings` */ networkingSwitchPortSettingsDelete: (params: { query: Api.NetworkingSwitchPortSettingsDeleteQueryParams, req: Request, cookies: Record }) => Promisable, /** `GET /v1/system/networking/switch-port-settings/:port` */ - networkingSwitchPortSettingsView: (params: { path: Api.NetworkingSwitchPortSettingsViewPathParams, req: Request, cookies: Record }) => Promisable>, + networkingSwitchPortSettingsView: (params: { path: Api.NetworkingSwitchPortSettingsViewPathParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/system/policy` */ systemPolicyView: (params: { req: Request, cookies: Record }) => Promisable>, /** `PUT /v1/system/policy` */ systemPolicyUpdate: (params: { body: Json, req: Request, cookies: Record }) => Promisable>, -/** `GET /v1/system/scim/tokens` */ - scimTokenList: (params: { query: Api.ScimTokenListQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `POST /v1/system/scim/tokens` */ - scimTokenCreate: (params: { query: Api.ScimTokenCreateQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `GET /v1/system/scim/tokens/:tokenId` */ - scimTokenView: (params: { path: Api.ScimTokenViewPathParams, query: Api.ScimTokenViewQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `DELETE /v1/system/scim/tokens/:tokenId` */ - scimTokenDelete: (params: { path: Api.ScimTokenDeletePathParams, query: Api.ScimTokenDeleteQueryParams, req: Request, cookies: Record }) => Promisable, +/** `GET /v1/system/roles` */ + roleList: (params: { query: Api.RoleListQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `GET /v1/system/roles/:roleName` */ + roleView: (params: { path: Api.RoleViewPathParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/system/silo-quotas` */ systemQuotasList: (params: { query: Api.SystemQuotasListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/system/silos` */ @@ -490,28 +344,6 @@ export interface MSWHandlers { siloQuotasView: (params: { path: Api.SiloQuotasViewPathParams, req: Request, cookies: Record }) => Promisable>, /** `PUT /v1/system/silos/:silo/quotas` */ siloQuotasUpdate: (params: { path: Api.SiloQuotasUpdatePathParams, body: Json, req: Request, cookies: Record }) => Promisable>, -/** `POST /v1/system/timeseries/query` */ - systemTimeseriesQuery: (params: { body: Json, req: Request, cookies: Record }) => Promisable>, -/** `GET /v1/system/timeseries/schemas` */ - systemTimeseriesSchemaList: (params: { query: Api.SystemTimeseriesSchemaListQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `GET /v1/system/update/repositories` */ - systemUpdateRepositoryList: (params: { query: Api.SystemUpdateRepositoryListQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `PUT /v1/system/update/repositories` */ - systemUpdateRepositoryUpload: (params: { query: Api.SystemUpdateRepositoryUploadQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `GET /v1/system/update/repositories/:systemVersion` */ - systemUpdateRepositoryView: (params: { path: Api.SystemUpdateRepositoryViewPathParams, req: Request, cookies: Record }) => Promisable>, -/** `GET /v1/system/update/status` */ - systemUpdateStatus: (params: { req: Request, cookies: Record }) => Promisable>, -/** `PUT /v1/system/update/target-release` */ - targetReleaseUpdate: (params: { body: Json, req: Request, cookies: Record }) => Promisable, -/** `GET /v1/system/update/trust-roots` */ - systemUpdateTrustRootList: (params: { query: Api.SystemUpdateTrustRootListQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `POST /v1/system/update/trust-roots` */ - systemUpdateTrustRootCreate: (params: { req: Request, cookies: Record }) => Promisable>, -/** `GET /v1/system/update/trust-roots/:trustRootId` */ - systemUpdateTrustRootView: (params: { path: Api.SystemUpdateTrustRootViewPathParams, req: Request, cookies: Record }) => Promisable>, -/** `DELETE /v1/system/update/trust-roots/:trustRootId` */ - systemUpdateTrustRootDelete: (params: { path: Api.SystemUpdateTrustRootDeletePathParams, req: Request, cookies: Record }) => Promisable, /** `GET /v1/system/users` */ siloUserList: (params: { query: Api.SiloUserListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/system/users/:userId` */ @@ -524,44 +356,14 @@ export interface MSWHandlers { siloUtilizationList: (params: { query: Api.SiloUtilizationListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/system/utilization/silos/:silo` */ siloUtilizationView: (params: { path: Api.SiloUtilizationViewPathParams, req: Request, cookies: Record }) => Promisable>, -/** `POST /v1/timeseries/query` */ - timeseriesQuery: (params: { query: Api.TimeseriesQueryQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/users` */ userList: (params: { query: Api.UserListQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `GET /v1/users/:userId` */ - userView: (params: { path: Api.UserViewPathParams, req: Request, cookies: Record }) => Promisable>, -/** `GET /v1/users/:userId/access-tokens` */ - userTokenList: (params: { path: Api.UserTokenListPathParams, query: Api.UserTokenListQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `POST /v1/users/:userId/logout` */ - userLogout: (params: { path: Api.UserLogoutPathParams, req: Request, cookies: Record }) => Promisable, -/** `GET /v1/users/:userId/sessions` */ - userSessionList: (params: { path: Api.UserSessionListPathParams, query: Api.UserSessionListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/utilization` */ utilizationView: (params: { req: Request, cookies: Record }) => Promisable>, /** `GET /v1/vpc-firewall-rules` */ vpcFirewallRulesView: (params: { query: Api.VpcFirewallRulesViewQueryParams, req: Request, cookies: Record }) => Promisable>, /** `PUT /v1/vpc-firewall-rules` */ vpcFirewallRulesUpdate: (params: { query: Api.VpcFirewallRulesUpdateQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, -/** `GET /v1/vpc-router-routes` */ - vpcRouterRouteList: (params: { query: Api.VpcRouterRouteListQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `POST /v1/vpc-router-routes` */ - vpcRouterRouteCreate: (params: { query: Api.VpcRouterRouteCreateQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, -/** `GET /v1/vpc-router-routes/:route` */ - vpcRouterRouteView: (params: { path: Api.VpcRouterRouteViewPathParams, query: Api.VpcRouterRouteViewQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `PUT /v1/vpc-router-routes/:route` */ - vpcRouterRouteUpdate: (params: { path: Api.VpcRouterRouteUpdatePathParams, query: Api.VpcRouterRouteUpdateQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, -/** `DELETE /v1/vpc-router-routes/:route` */ - vpcRouterRouteDelete: (params: { path: Api.VpcRouterRouteDeletePathParams, query: Api.VpcRouterRouteDeleteQueryParams, req: Request, cookies: Record }) => Promisable, -/** `GET /v1/vpc-routers` */ - vpcRouterList: (params: { query: Api.VpcRouterListQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `POST /v1/vpc-routers` */ - vpcRouterCreate: (params: { query: Api.VpcRouterCreateQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, -/** `GET /v1/vpc-routers/:router` */ - vpcRouterView: (params: { path: Api.VpcRouterViewPathParams, query: Api.VpcRouterViewQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `PUT /v1/vpc-routers/:router` */ - vpcRouterUpdate: (params: { path: Api.VpcRouterUpdatePathParams, query: Api.VpcRouterUpdateQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, -/** `DELETE /v1/vpc-routers/:router` */ - vpcRouterDelete: (params: { path: Api.VpcRouterDeletePathParams, query: Api.VpcRouterDeleteQueryParams, req: Request, cookies: Record }) => Promisable, /** `GET /v1/vpc-subnets` */ vpcSubnetList: (params: { query: Api.VpcSubnetListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `POST /v1/vpc-subnets` */ @@ -584,16 +386,6 @@ export interface MSWHandlers { vpcUpdate: (params: { path: Api.VpcUpdatePathParams, query: Api.VpcUpdateQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, /** `DELETE /v1/vpcs/:vpc` */ vpcDelete: (params: { path: Api.VpcDeletePathParams, query: Api.VpcDeleteQueryParams, req: Request, cookies: Record }) => Promisable, -/** `POST /v1/webhook-receivers` */ - webhookReceiverCreate: (params: { body: Json, req: Request, cookies: Record }) => Promisable>, -/** `PUT /v1/webhook-receivers/:receiver` */ - webhookReceiverUpdate: (params: { path: Api.WebhookReceiverUpdatePathParams, body: Json, req: Request, cookies: Record }) => Promisable, -/** `GET /v1/webhook-secrets` */ - webhookSecretsList: (params: { query: Api.WebhookSecretsListQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `POST /v1/webhook-secrets` */ - webhookSecretsAdd: (params: { query: Api.WebhookSecretsAddQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, -/** `DELETE /v1/webhook-secrets/:secretId` */ - webhookSecretsDelete: (params: { path: Api.WebhookSecretsDeletePathParams, req: Request, cookies: Record }) => Promisable, } function validateParams(schema: S, req: Request, pathParams: PathParams) { @@ -697,50 +489,7 @@ export interface MSWHandlers { http.post('/device/auth', handler(handlers['deviceAuthRequest'], null, null)), http.post('/device/confirm', handler(handlers['deviceAuthConfirm'], null, schema.DeviceAuthVerify)), http.post('/device/token', handler(handlers['deviceAccessToken'], null, null)), -http.get('/experimental/v1/probes', handler(handlers['probeList'], schema.ProbeListParams, null)), -http.post('/experimental/v1/probes', handler(handlers['probeCreate'], schema.ProbeCreateParams, schema.ProbeCreate)), -http.get('/experimental/v1/probes/:probe', handler(handlers['probeView'], schema.ProbeViewParams, null)), -http.delete('/experimental/v1/probes/:probe', handler(handlers['probeDelete'], schema.ProbeDeleteParams, null)), -http.get('/experimental/v1/system/support-bundles', handler(handlers['supportBundleList'], schema.SupportBundleListParams, null)), -http.post('/experimental/v1/system/support-bundles', handler(handlers['supportBundleCreate'], null, schema.SupportBundleCreate)), -http.get('/experimental/v1/system/support-bundles/:bundleId', handler(handlers['supportBundleView'], schema.SupportBundleViewParams, null)), -http.put('/experimental/v1/system/support-bundles/:bundleId', handler(handlers['supportBundleUpdate'], schema.SupportBundleUpdateParams, schema.SupportBundleUpdate)), -http.delete('/experimental/v1/system/support-bundles/:bundleId', handler(handlers['supportBundleDelete'], schema.SupportBundleDeleteParams, null)), -http.get('/experimental/v1/system/support-bundles/:bundleId/download', handler(handlers['supportBundleDownload'], schema.SupportBundleDownloadParams, null)), -http.head('/experimental/v1/system/support-bundles/:bundleId/download', handler(handlers['supportBundleHead'], schema.SupportBundleHeadParams, null)), -http.get('/experimental/v1/system/support-bundles/:bundleId/download/:file', handler(handlers['supportBundleDownloadFile'], schema.SupportBundleDownloadFileParams, null)), -http.head('/experimental/v1/system/support-bundles/:bundleId/download/:file', handler(handlers['supportBundleHeadFile'], schema.SupportBundleHeadFileParams, null)), -http.get('/experimental/v1/system/support-bundles/:bundleId/index', handler(handlers['supportBundleIndex'], schema.SupportBundleIndexParams, null)), http.post('/login/:siloName/saml/:providerName', handler(handlers['loginSaml'], schema.LoginSamlParams, null)), -http.get('/v1/affinity-groups', handler(handlers['affinityGroupList'], schema.AffinityGroupListParams, null)), -http.post('/v1/affinity-groups', handler(handlers['affinityGroupCreate'], schema.AffinityGroupCreateParams, schema.AffinityGroupCreate)), -http.get('/v1/affinity-groups/:affinityGroup', handler(handlers['affinityGroupView'], schema.AffinityGroupViewParams, null)), -http.put('/v1/affinity-groups/:affinityGroup', handler(handlers['affinityGroupUpdate'], schema.AffinityGroupUpdateParams, schema.AffinityGroupUpdate)), -http.delete('/v1/affinity-groups/:affinityGroup', handler(handlers['affinityGroupDelete'], schema.AffinityGroupDeleteParams, null)), -http.get('/v1/affinity-groups/:affinityGroup/members', handler(handlers['affinityGroupMemberList'], schema.AffinityGroupMemberListParams, null)), -http.get('/v1/affinity-groups/:affinityGroup/members/instance/:instance', handler(handlers['affinityGroupMemberInstanceView'], schema.AffinityGroupMemberInstanceViewParams, null)), -http.post('/v1/affinity-groups/:affinityGroup/members/instance/:instance', handler(handlers['affinityGroupMemberInstanceAdd'], schema.AffinityGroupMemberInstanceAddParams, null)), -http.delete('/v1/affinity-groups/:affinityGroup/members/instance/:instance', handler(handlers['affinityGroupMemberInstanceDelete'], schema.AffinityGroupMemberInstanceDeleteParams, null)), -http.get('/v1/alert-classes', handler(handlers['alertClassList'], schema.AlertClassListParams, null)), -http.get('/v1/alert-receivers', handler(handlers['alertReceiverList'], schema.AlertReceiverListParams, null)), -http.get('/v1/alert-receivers/:receiver', handler(handlers['alertReceiverView'], schema.AlertReceiverViewParams, null)), -http.delete('/v1/alert-receivers/:receiver', handler(handlers['alertReceiverDelete'], schema.AlertReceiverDeleteParams, null)), -http.get('/v1/alert-receivers/:receiver/deliveries', handler(handlers['alertDeliveryList'], schema.AlertDeliveryListParams, null)), -http.post('/v1/alert-receivers/:receiver/probe', handler(handlers['alertReceiverProbe'], schema.AlertReceiverProbeParams, null)), -http.post('/v1/alert-receivers/:receiver/subscriptions', handler(handlers['alertReceiverSubscriptionAdd'], schema.AlertReceiverSubscriptionAddParams, schema.AlertSubscriptionCreate)), -http.delete('/v1/alert-receivers/:receiver/subscriptions/:subscription', handler(handlers['alertReceiverSubscriptionRemove'], schema.AlertReceiverSubscriptionRemoveParams, null)), -http.post('/v1/alerts/:alertId/resend', handler(handlers['alertDeliveryResend'], schema.AlertDeliveryResendParams, null)), -http.get('/v1/anti-affinity-groups', handler(handlers['antiAffinityGroupList'], schema.AntiAffinityGroupListParams, null)), -http.post('/v1/anti-affinity-groups', handler(handlers['antiAffinityGroupCreate'], schema.AntiAffinityGroupCreateParams, schema.AntiAffinityGroupCreate)), -http.get('/v1/anti-affinity-groups/:antiAffinityGroup', handler(handlers['antiAffinityGroupView'], schema.AntiAffinityGroupViewParams, null)), -http.put('/v1/anti-affinity-groups/:antiAffinityGroup', handler(handlers['antiAffinityGroupUpdate'], schema.AntiAffinityGroupUpdateParams, schema.AntiAffinityGroupUpdate)), -http.delete('/v1/anti-affinity-groups/:antiAffinityGroup', handler(handlers['antiAffinityGroupDelete'], schema.AntiAffinityGroupDeleteParams, null)), -http.get('/v1/anti-affinity-groups/:antiAffinityGroup/members', handler(handlers['antiAffinityGroupMemberList'], schema.AntiAffinityGroupMemberListParams, null)), -http.get('/v1/anti-affinity-groups/:antiAffinityGroup/members/instance/:instance', handler(handlers['antiAffinityGroupMemberInstanceView'], schema.AntiAffinityGroupMemberInstanceViewParams, null)), -http.post('/v1/anti-affinity-groups/:antiAffinityGroup/members/instance/:instance', handler(handlers['antiAffinityGroupMemberInstanceAdd'], schema.AntiAffinityGroupMemberInstanceAddParams, null)), -http.delete('/v1/anti-affinity-groups/:antiAffinityGroup/members/instance/:instance', handler(handlers['antiAffinityGroupMemberInstanceDelete'], schema.AntiAffinityGroupMemberInstanceDeleteParams, null)), -http.get('/v1/auth-settings', handler(handlers['authSettingsView'], null, null)), -http.put('/v1/auth-settings', handler(handlers['authSettingsUpdate'], null, schema.SiloAuthSettingsUpdate)), http.get('/v1/certificates', handler(handlers['certificateList'], schema.CertificateListParams, null)), http.post('/v1/certificates', handler(handlers['certificateCreate'], null, schema.CertificateCreate)), http.get('/v1/certificates/:certificate', handler(handlers['certificateView'], schema.CertificateViewParams, null)), @@ -753,6 +502,7 @@ http.post('/v1/disks/:disk/bulk-write', handler(handlers['diskBulkWriteImport'], http.post('/v1/disks/:disk/bulk-write-start', handler(handlers['diskBulkWriteImportStart'], schema.DiskBulkWriteImportStartParams, null)), http.post('/v1/disks/:disk/bulk-write-stop', handler(handlers['diskBulkWriteImportStop'], schema.DiskBulkWriteImportStopParams, null)), http.post('/v1/disks/:disk/finalize', handler(handlers['diskFinalizeImport'], schema.DiskFinalizeImportParams, schema.FinalizeDisk)), +http.get('/v1/disks/:disk/metrics/:metric', handler(handlers['diskMetricsList'], schema.DiskMetricsListParams, null)), http.get('/v1/floating-ips', handler(handlers['floatingIpList'], schema.FloatingIpListParams, null)), http.post('/v1/floating-ips', handler(handlers['floatingIpCreate'], schema.FloatingIpCreateParams, schema.FloatingIpCreate)), http.get('/v1/floating-ips/:floatingIp', handler(handlers['floatingIpView'], schema.FloatingIpViewParams, null)), @@ -771,39 +521,25 @@ http.post('/v1/images/:image/promote', handler(handlers['imagePromote'], schema. http.get('/v1/instances', handler(handlers['instanceList'], schema.InstanceListParams, null)), http.post('/v1/instances', handler(handlers['instanceCreate'], schema.InstanceCreateParams, schema.InstanceCreate)), http.get('/v1/instances/:instance', handler(handlers['instanceView'], schema.InstanceViewParams, null)), -http.put('/v1/instances/:instance', handler(handlers['instanceUpdate'], schema.InstanceUpdateParams, schema.InstanceUpdate)), http.delete('/v1/instances/:instance', handler(handlers['instanceDelete'], schema.InstanceDeleteParams, null)), -http.get('/v1/instances/:instance/affinity-groups', handler(handlers['instanceAffinityGroupList'], schema.InstanceAffinityGroupListParams, null)), -http.get('/v1/instances/:instance/anti-affinity-groups', handler(handlers['instanceAntiAffinityGroupList'], schema.InstanceAntiAffinityGroupListParams, null)), http.get('/v1/instances/:instance/disks', handler(handlers['instanceDiskList'], schema.InstanceDiskListParams, null)), http.post('/v1/instances/:instance/disks/attach', handler(handlers['instanceDiskAttach'], schema.InstanceDiskAttachParams, schema.DiskPath)), http.post('/v1/instances/:instance/disks/detach', handler(handlers['instanceDiskDetach'], schema.InstanceDiskDetachParams, schema.DiskPath)), http.get('/v1/instances/:instance/external-ips', handler(handlers['instanceExternalIpList'], schema.InstanceExternalIpListParams, null)), http.post('/v1/instances/:instance/external-ips/ephemeral', handler(handlers['instanceEphemeralIpAttach'], schema.InstanceEphemeralIpAttachParams, schema.EphemeralIpCreate)), http.delete('/v1/instances/:instance/external-ips/ephemeral', handler(handlers['instanceEphemeralIpDetach'], schema.InstanceEphemeralIpDetachParams, null)), +http.post('/v1/instances/:instance/migrate', handler(handlers['instanceMigrate'], schema.InstanceMigrateParams, schema.InstanceMigrate)), http.post('/v1/instances/:instance/reboot', handler(handlers['instanceReboot'], schema.InstanceRebootParams, null)), http.get('/v1/instances/:instance/serial-console', handler(handlers['instanceSerialConsole'], schema.InstanceSerialConsoleParams, null)), http.get('/v1/instances/:instance/serial-console/stream', handler(handlers['instanceSerialConsoleStream'], schema.InstanceSerialConsoleStreamParams, null)), http.get('/v1/instances/:instance/ssh-public-keys', handler(handlers['instanceSshPublicKeyList'], schema.InstanceSshPublicKeyListParams, null)), http.post('/v1/instances/:instance/start', handler(handlers['instanceStart'], schema.InstanceStartParams, null)), http.post('/v1/instances/:instance/stop', handler(handlers['instanceStop'], schema.InstanceStopParams, null)), -http.get('/v1/internet-gateway-ip-addresses', handler(handlers['internetGatewayIpAddressList'], schema.InternetGatewayIpAddressListParams, null)), -http.post('/v1/internet-gateway-ip-addresses', handler(handlers['internetGatewayIpAddressCreate'], schema.InternetGatewayIpAddressCreateParams, schema.InternetGatewayIpAddressCreate)), -http.delete('/v1/internet-gateway-ip-addresses/:address', handler(handlers['internetGatewayIpAddressDelete'], schema.InternetGatewayIpAddressDeleteParams, null)), -http.get('/v1/internet-gateway-ip-pools', handler(handlers['internetGatewayIpPoolList'], schema.InternetGatewayIpPoolListParams, null)), -http.post('/v1/internet-gateway-ip-pools', handler(handlers['internetGatewayIpPoolCreate'], schema.InternetGatewayIpPoolCreateParams, schema.InternetGatewayIpPoolCreate)), -http.delete('/v1/internet-gateway-ip-pools/:pool', handler(handlers['internetGatewayIpPoolDelete'], schema.InternetGatewayIpPoolDeleteParams, null)), -http.get('/v1/internet-gateways', handler(handlers['internetGatewayList'], schema.InternetGatewayListParams, null)), -http.post('/v1/internet-gateways', handler(handlers['internetGatewayCreate'], schema.InternetGatewayCreateParams, schema.InternetGatewayCreate)), -http.get('/v1/internet-gateways/:gateway', handler(handlers['internetGatewayView'], schema.InternetGatewayViewParams, null)), -http.delete('/v1/internet-gateways/:gateway', handler(handlers['internetGatewayDelete'], schema.InternetGatewayDeleteParams, null)), http.get('/v1/ip-pools', handler(handlers['projectIpPoolList'], schema.ProjectIpPoolListParams, null)), http.get('/v1/ip-pools/:pool', handler(handlers['projectIpPoolView'], schema.ProjectIpPoolViewParams, null)), http.post('/v1/login/:siloName/local', handler(handlers['loginLocal'], schema.LoginLocalParams, schema.UsernamePasswordCredentials)), http.post('/v1/logout', handler(handlers['logout'], null, null)), http.get('/v1/me', handler(handlers['currentUserView'], null, null)), -http.get('/v1/me/access-tokens', handler(handlers['currentUserAccessTokenList'], schema.CurrentUserAccessTokenListParams, null)), -http.delete('/v1/me/access-tokens/:tokenId', handler(handlers['currentUserAccessTokenDelete'], schema.CurrentUserAccessTokenDeleteParams, null)), http.get('/v1/me/groups', handler(handlers['currentUserGroups'], schema.CurrentUserGroupsParams, null)), http.get('/v1/me/ssh-keys', handler(handlers['currentUserSshKeyList'], schema.CurrentUserSshKeyListParams, null)), http.post('/v1/me/ssh-keys', handler(handlers['currentUserSshKeyCreate'], null, schema.SshKeyCreate)), @@ -829,10 +565,7 @@ http.get('/v1/snapshots', handler(handlers['snapshotList'], schema.SnapshotListP http.post('/v1/snapshots', handler(handlers['snapshotCreate'], schema.SnapshotCreateParams, schema.SnapshotCreate)), http.get('/v1/snapshots/:snapshot', handler(handlers['snapshotView'], schema.SnapshotViewParams, null)), http.delete('/v1/snapshots/:snapshot', handler(handlers['snapshotDelete'], schema.SnapshotDeleteParams, null)), -http.get('/v1/system/audit-log', handler(handlers['auditLogList'], schema.AuditLogListParams, null)), http.get('/v1/system/hardware/disks', handler(handlers['physicalDiskList'], schema.PhysicalDiskListParams, null)), -http.get('/v1/system/hardware/disks/:diskId', handler(handlers['physicalDiskView'], schema.PhysicalDiskViewParams, null)), -http.get('/v1/system/hardware/rack-switch-port/:rackId/:switchLocation/:port/lldp/neighbors', handler(handlers['networkingSwitchPortLldpNeighbors'], schema.NetworkingSwitchPortLldpNeighborsParams, null)), http.get('/v1/system/hardware/racks', handler(handlers['rackList'], schema.RackListParams, null)), http.get('/v1/system/hardware/racks/:rackId', handler(handlers['rackView'], schema.RackViewParams, null)), http.get('/v1/system/hardware/sleds', handler(handlers['sledList'], schema.SledListParams, null)), @@ -843,11 +576,8 @@ http.get('/v1/system/hardware/sleds/:sledId/instances', handler(handlers['sledIn http.put('/v1/system/hardware/sleds/:sledId/provision-policy', handler(handlers['sledSetProvisionPolicy'], schema.SledSetProvisionPolicyParams, schema.SledProvisionPolicyParams)), http.get('/v1/system/hardware/sleds-uninitialized', handler(handlers['sledListUninitialized'], schema.SledListUninitializedParams, null)), http.get('/v1/system/hardware/switch-port', handler(handlers['networkingSwitchPortList'], schema.NetworkingSwitchPortListParams, null)), -http.get('/v1/system/hardware/switch-port/:port/lldp/config', handler(handlers['networkingSwitchPortLldpConfigView'], schema.NetworkingSwitchPortLldpConfigViewParams, null)), -http.post('/v1/system/hardware/switch-port/:port/lldp/config', handler(handlers['networkingSwitchPortLldpConfigUpdate'], schema.NetworkingSwitchPortLldpConfigUpdateParams, schema.LldpLinkConfig)), http.post('/v1/system/hardware/switch-port/:port/settings', handler(handlers['networkingSwitchPortApplySettings'], schema.NetworkingSwitchPortApplySettingsParams, schema.SwitchPortApplySettings)), http.delete('/v1/system/hardware/switch-port/:port/settings', handler(handlers['networkingSwitchPortClearSettings'], schema.NetworkingSwitchPortClearSettingsParams, null)), -http.get('/v1/system/hardware/switch-port/:port/status', handler(handlers['networkingSwitchPortStatus'], schema.NetworkingSwitchPortStatusParams, null)), http.get('/v1/system/hardware/switches', handler(handlers['switchList'], schema.SwitchListParams, null)), http.get('/v1/system/hardware/switches/:switchId', handler(handlers['switchView'], schema.SwitchViewParams, null)), http.get('/v1/system/identity-providers', handler(handlers['siloIdentityProviderList'], schema.SiloIdentityProviderListParams, null)), @@ -868,7 +598,6 @@ http.get('/v1/system/ip-pools/:pool/silos', handler(handlers['ipPoolSiloList'], http.post('/v1/system/ip-pools/:pool/silos', handler(handlers['ipPoolSiloLink'], schema.IpPoolSiloLinkParams, schema.IpPoolLinkSilo)), http.put('/v1/system/ip-pools/:pool/silos/:silo', handler(handlers['ipPoolSiloUpdate'], schema.IpPoolSiloUpdateParams, schema.IpPoolSiloUpdate)), http.delete('/v1/system/ip-pools/:pool/silos/:silo', handler(handlers['ipPoolSiloUnlink'], schema.IpPoolSiloUnlinkParams, null)), -http.get('/v1/system/ip-pools/:pool/utilization', handler(handlers['ipPoolUtilizationView'], schema.IpPoolUtilizationViewParams, null)), http.get('/v1/system/ip-pools-service', handler(handlers['ipPoolServiceView'], null, null)), http.get('/v1/system/ip-pools-service/ranges', handler(handlers['ipPoolServiceRangeList'], schema.IpPoolServiceRangeListParams, null)), http.post('/v1/system/ip-pools-service/ranges/add', handler(handlers['ipPoolServiceRangeAdd'], null, schema.IpRange)), @@ -876,27 +605,19 @@ http.post('/v1/system/ip-pools-service/ranges/remove', handler(handlers['ipPoolS http.get('/v1/system/metrics/:metricName', handler(handlers['systemMetric'], schema.SystemMetricParams, null)), http.get('/v1/system/networking/address-lot', handler(handlers['networkingAddressLotList'], schema.NetworkingAddressLotListParams, null)), http.post('/v1/system/networking/address-lot', handler(handlers['networkingAddressLotCreate'], null, schema.AddressLotCreate)), -http.get('/v1/system/networking/address-lot/:addressLot', handler(handlers['networkingAddressLotView'], schema.NetworkingAddressLotViewParams, null)), http.delete('/v1/system/networking/address-lot/:addressLot', handler(handlers['networkingAddressLotDelete'], schema.NetworkingAddressLotDeleteParams, null)), http.get('/v1/system/networking/address-lot/:addressLot/blocks', handler(handlers['networkingAddressLotBlockList'], schema.NetworkingAddressLotBlockListParams, null)), -http.get('/v1/system/networking/allow-list', handler(handlers['networkingAllowListView'], null, null)), -http.put('/v1/system/networking/allow-list', handler(handlers['networkingAllowListUpdate'], null, schema.AllowListUpdate)), http.post('/v1/system/networking/bfd-disable', handler(handlers['networkingBfdDisable'], null, schema.BfdSessionDisable)), http.post('/v1/system/networking/bfd-enable', handler(handlers['networkingBfdEnable'], null, schema.BfdSessionEnable)), http.get('/v1/system/networking/bfd-status', handler(handlers['networkingBfdStatus'], null, null)), http.get('/v1/system/networking/bgp', handler(handlers['networkingBgpConfigList'], schema.NetworkingBgpConfigListParams, null)), http.post('/v1/system/networking/bgp', handler(handlers['networkingBgpConfigCreate'], null, schema.BgpConfigCreate)), http.delete('/v1/system/networking/bgp', handler(handlers['networkingBgpConfigDelete'], schema.NetworkingBgpConfigDeleteParams, null)), -http.get('/v1/system/networking/bgp-announce-set', handler(handlers['networkingBgpAnnounceSetList'], schema.NetworkingBgpAnnounceSetListParams, null)), -http.put('/v1/system/networking/bgp-announce-set', handler(handlers['networkingBgpAnnounceSetUpdate'], null, schema.BgpAnnounceSetCreate)), -http.delete('/v1/system/networking/bgp-announce-set/:announceSet', handler(handlers['networkingBgpAnnounceSetDelete'], schema.NetworkingBgpAnnounceSetDeleteParams, null)), -http.get('/v1/system/networking/bgp-announce-set/:announceSet/announcement', handler(handlers['networkingBgpAnnouncementList'], schema.NetworkingBgpAnnouncementListParams, null)), -http.get('/v1/system/networking/bgp-exported', handler(handlers['networkingBgpExported'], null, null)), -http.get('/v1/system/networking/bgp-message-history', handler(handlers['networkingBgpMessageHistory'], schema.NetworkingBgpMessageHistoryParams, null)), +http.get('/v1/system/networking/bgp-announce', handler(handlers['networkingBgpAnnounceSetList'], schema.NetworkingBgpAnnounceSetListParams, null)), +http.post('/v1/system/networking/bgp-announce', handler(handlers['networkingBgpAnnounceSetCreate'], null, schema.BgpAnnounceSetCreate)), +http.delete('/v1/system/networking/bgp-announce', handler(handlers['networkingBgpAnnounceSetDelete'], schema.NetworkingBgpAnnounceSetDeleteParams, null)), http.get('/v1/system/networking/bgp-routes-ipv4', handler(handlers['networkingBgpImportedRoutesIpv4'], schema.NetworkingBgpImportedRoutesIpv4Params, null)), http.get('/v1/system/networking/bgp-status', handler(handlers['networkingBgpStatus'], null, null)), -http.get('/v1/system/networking/inbound-icmp', handler(handlers['networkingInboundIcmpView'], null, null)), -http.put('/v1/system/networking/inbound-icmp', handler(handlers['networkingInboundIcmpUpdate'], null, schema.ServiceIcmpConfig)), http.get('/v1/system/networking/loopback-address', handler(handlers['networkingLoopbackAddressList'], schema.NetworkingLoopbackAddressListParams, null)), http.post('/v1/system/networking/loopback-address', handler(handlers['networkingLoopbackAddressCreate'], null, schema.LoopbackAddressCreate)), http.delete('/v1/system/networking/loopback-address/:rackId/:switchLocation/:address/:subnetMask', handler(handlers['networkingLoopbackAddressDelete'], schema.NetworkingLoopbackAddressDeleteParams, null)), @@ -906,10 +627,8 @@ http.delete('/v1/system/networking/switch-port-settings', handler(handlers['netw http.get('/v1/system/networking/switch-port-settings/:port', handler(handlers['networkingSwitchPortSettingsView'], schema.NetworkingSwitchPortSettingsViewParams, null)), http.get('/v1/system/policy', handler(handlers['systemPolicyView'], null, null)), http.put('/v1/system/policy', handler(handlers['systemPolicyUpdate'], null, schema.FleetRolePolicy)), -http.get('/v1/system/scim/tokens', handler(handlers['scimTokenList'], schema.ScimTokenListParams, null)), -http.post('/v1/system/scim/tokens', handler(handlers['scimTokenCreate'], schema.ScimTokenCreateParams, null)), -http.get('/v1/system/scim/tokens/:tokenId', handler(handlers['scimTokenView'], schema.ScimTokenViewParams, null)), -http.delete('/v1/system/scim/tokens/:tokenId', handler(handlers['scimTokenDelete'], schema.ScimTokenDeleteParams, null)), +http.get('/v1/system/roles', handler(handlers['roleList'], schema.RoleListParams, null)), +http.get('/v1/system/roles/:roleName', handler(handlers['roleView'], schema.RoleViewParams, null)), http.get('/v1/system/silo-quotas', handler(handlers['systemQuotasList'], schema.SystemQuotasListParams, null)), http.get('/v1/system/silos', handler(handlers['siloList'], schema.SiloListParams, null)), http.post('/v1/system/silos', handler(handlers['siloCreate'], null, schema.SiloCreate)), @@ -920,42 +639,16 @@ http.get('/v1/system/silos/:silo/policy', handler(handlers['siloPolicyView'], sc http.put('/v1/system/silos/:silo/policy', handler(handlers['siloPolicyUpdate'], schema.SiloPolicyUpdateParams, schema.SiloRolePolicy)), http.get('/v1/system/silos/:silo/quotas', handler(handlers['siloQuotasView'], schema.SiloQuotasViewParams, null)), http.put('/v1/system/silos/:silo/quotas', handler(handlers['siloQuotasUpdate'], schema.SiloQuotasUpdateParams, schema.SiloQuotasUpdate)), -http.post('/v1/system/timeseries/query', handler(handlers['systemTimeseriesQuery'], null, schema.TimeseriesQuery)), -http.get('/v1/system/timeseries/schemas', handler(handlers['systemTimeseriesSchemaList'], schema.SystemTimeseriesSchemaListParams, null)), -http.get('/v1/system/update/repositories', handler(handlers['systemUpdateRepositoryList'], schema.SystemUpdateRepositoryListParams, null)), -http.put('/v1/system/update/repositories', handler(handlers['systemUpdateRepositoryUpload'], schema.SystemUpdateRepositoryUploadParams, null)), -http.get('/v1/system/update/repositories/:systemVersion', handler(handlers['systemUpdateRepositoryView'], schema.SystemUpdateRepositoryViewParams, null)), -http.get('/v1/system/update/status', handler(handlers['systemUpdateStatus'], null, null)), -http.put('/v1/system/update/target-release', handler(handlers['targetReleaseUpdate'], null, schema.SetTargetReleaseParams)), -http.get('/v1/system/update/trust-roots', handler(handlers['systemUpdateTrustRootList'], schema.SystemUpdateTrustRootListParams, null)), -http.post('/v1/system/update/trust-roots', handler(handlers['systemUpdateTrustRootCreate'], null, null)), -http.get('/v1/system/update/trust-roots/:trustRootId', handler(handlers['systemUpdateTrustRootView'], schema.SystemUpdateTrustRootViewParams, null)), -http.delete('/v1/system/update/trust-roots/:trustRootId', handler(handlers['systemUpdateTrustRootDelete'], schema.SystemUpdateTrustRootDeleteParams, null)), http.get('/v1/system/users', handler(handlers['siloUserList'], schema.SiloUserListParams, null)), http.get('/v1/system/users/:userId', handler(handlers['siloUserView'], schema.SiloUserViewParams, null)), http.get('/v1/system/users-builtin', handler(handlers['userBuiltinList'], schema.UserBuiltinListParams, null)), http.get('/v1/system/users-builtin/:user', handler(handlers['userBuiltinView'], schema.UserBuiltinViewParams, null)), http.get('/v1/system/utilization/silos', handler(handlers['siloUtilizationList'], schema.SiloUtilizationListParams, null)), http.get('/v1/system/utilization/silos/:silo', handler(handlers['siloUtilizationView'], schema.SiloUtilizationViewParams, null)), -http.post('/v1/timeseries/query', handler(handlers['timeseriesQuery'], schema.TimeseriesQueryParams, schema.TimeseriesQuery)), http.get('/v1/users', handler(handlers['userList'], schema.UserListParams, null)), -http.get('/v1/users/:userId', handler(handlers['userView'], schema.UserViewParams, null)), -http.get('/v1/users/:userId/access-tokens', handler(handlers['userTokenList'], schema.UserTokenListParams, null)), -http.post('/v1/users/:userId/logout', handler(handlers['userLogout'], schema.UserLogoutParams, null)), -http.get('/v1/users/:userId/sessions', handler(handlers['userSessionList'], schema.UserSessionListParams, null)), http.get('/v1/utilization', handler(handlers['utilizationView'], null, null)), http.get('/v1/vpc-firewall-rules', handler(handlers['vpcFirewallRulesView'], schema.VpcFirewallRulesViewParams, null)), http.put('/v1/vpc-firewall-rules', handler(handlers['vpcFirewallRulesUpdate'], schema.VpcFirewallRulesUpdateParams, schema.VpcFirewallRuleUpdateParams)), -http.get('/v1/vpc-router-routes', handler(handlers['vpcRouterRouteList'], schema.VpcRouterRouteListParams, null)), -http.post('/v1/vpc-router-routes', handler(handlers['vpcRouterRouteCreate'], schema.VpcRouterRouteCreateParams, schema.RouterRouteCreate)), -http.get('/v1/vpc-router-routes/:route', handler(handlers['vpcRouterRouteView'], schema.VpcRouterRouteViewParams, null)), -http.put('/v1/vpc-router-routes/:route', handler(handlers['vpcRouterRouteUpdate'], schema.VpcRouterRouteUpdateParams, schema.RouterRouteUpdate)), -http.delete('/v1/vpc-router-routes/:route', handler(handlers['vpcRouterRouteDelete'], schema.VpcRouterRouteDeleteParams, null)), -http.get('/v1/vpc-routers', handler(handlers['vpcRouterList'], schema.VpcRouterListParams, null)), -http.post('/v1/vpc-routers', handler(handlers['vpcRouterCreate'], schema.VpcRouterCreateParams, schema.VpcRouterCreate)), -http.get('/v1/vpc-routers/:router', handler(handlers['vpcRouterView'], schema.VpcRouterViewParams, null)), -http.put('/v1/vpc-routers/:router', handler(handlers['vpcRouterUpdate'], schema.VpcRouterUpdateParams, schema.VpcRouterUpdate)), -http.delete('/v1/vpc-routers/:router', handler(handlers['vpcRouterDelete'], schema.VpcRouterDeleteParams, null)), http.get('/v1/vpc-subnets', handler(handlers['vpcSubnetList'], schema.VpcSubnetListParams, null)), http.post('/v1/vpc-subnets', handler(handlers['vpcSubnetCreate'], schema.VpcSubnetCreateParams, schema.VpcSubnetCreate)), http.get('/v1/vpc-subnets/:subnet', handler(handlers['vpcSubnetView'], schema.VpcSubnetViewParams, null)), @@ -967,9 +660,4 @@ http.post('/v1/vpcs', handler(handlers['vpcCreate'], schema.VpcCreateParams, sch http.get('/v1/vpcs/:vpc', handler(handlers['vpcView'], schema.VpcViewParams, null)), http.put('/v1/vpcs/:vpc', handler(handlers['vpcUpdate'], schema.VpcUpdateParams, schema.VpcUpdate)), http.delete('/v1/vpcs/:vpc', handler(handlers['vpcDelete'], schema.VpcDeleteParams, null)), -http.post('/v1/webhook-receivers', handler(handlers['webhookReceiverCreate'], null, schema.WebhookCreate)), -http.put('/v1/webhook-receivers/:receiver', handler(handlers['webhookReceiverUpdate'], schema.WebhookReceiverUpdateParams, schema.WebhookReceiverUpdate)), -http.get('/v1/webhook-secrets', handler(handlers['webhookSecretsList'], schema.WebhookSecretsListParams, null)), -http.post('/v1/webhook-secrets', handler(handlers['webhookSecretsAdd'], schema.WebhookSecretsAddParams, schema.WebhookSecretCreate)), -http.delete('/v1/webhook-secrets/:secretId', handler(handlers['webhookSecretsDelete'], schema.WebhookSecretsDeleteParams, null)), ]} diff --git a/oxide-openapi-gen-ts/src/__snapshots__/type-test.ts b/oxide-openapi-gen-ts/src/__snapshots__/type-test.ts index 9d2fe9b..06d19c0 100644 --- a/oxide-openapi-gen-ts/src/__snapshots__/type-test.ts +++ b/oxide-openapi-gen-ts/src/__snapshots__/type-test.ts @@ -19,53 +19,6 @@ assert>>(); assert>>(); assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); assert>>(); assert>>(); assert>>(); @@ -79,9 +32,8 @@ assert>>(); assert>>(); assert>>(); assert>>(); -assert>>(); +assert>>(); assert>>(); -assert>>(); assert>>(); assert>>(); assert>>(); @@ -112,14 +64,11 @@ assert>>(); assert>>(); assert>>(); -assert>>(); -assert>>(); assert>>(); assert>>(); assert>>(); assert>>(); assert>>(); -assert>>(); assert>>(); assert>>(); assert>>(); @@ -134,9 +83,7 @@ assert>>(); assert>>(); assert>>(); assert>>(); -assert>>(); assert>>(); -assert>>(); assert>>(); assert>>(); assert>>(); @@ -146,16 +93,10 @@ assert>>(); assert>>(); assert>>(); assert>>(); -assert>>(); -assert>>(); assert>>(); assert>>(); assert>>(); assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); assert>>(); assert>>(); assert>>(); @@ -170,7 +111,6 @@ assert>>(); assert>>(); assert>>(); assert>>(); -assert>>(); assert>>(); assert>>(); assert>>(); @@ -180,33 +120,20 @@ assert>>(); assert>>(); assert>>(); assert>>(); -assert>>(); -assert>>(); assert>>(); +assert>>(); assert>>(); assert>>(); assert>>(); assert>>(); assert>>(); +assert>>(); assert>>(); assert>>(); assert>>(); assert>>(); assert>>(); assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); assert>>(); assert>>(); assert>>(); @@ -220,47 +147,23 @@ assert>>(); assert>>(); assert>>(); assert>>(); -assert>>(); assert>>(); assert>>(); -assert>>(); +assert>>(); assert>>(); -assert>>(); assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); +assert>>(); assert>>(); assert>>(); assert>>(); assert>>(); assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); assert>>(); assert>>(); -assert>>(); -assert>>(); assert>>(); assert>>(); assert>>(); assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); assert>>(); assert>>(); assert>>(); @@ -270,25 +173,15 @@ assert>>(); assert>>(); assert>>(); assert>>(); +assert>>(); +assert>>(); +assert>>(); assert>>(); assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); assert>>(); assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); assert>>(); assert>>(); -assert>>(); -assert>>(); assert>>(); assert>>(); assert>>(); @@ -307,7 +200,6 @@ assert>>(); assert>>(); assert>>(); assert>>(); -assert>>(); assert>>(); assert>>(); assert>>(); @@ -320,52 +212,32 @@ assert>>(); assert>>(); assert>>(); assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); assert>>(); assert>>(); assert>>(); assert>>(); assert>>(); -assert>>(); assert>>(); -assert>>(); +assert>>(); assert>>(); +assert>>(); assert>>(); assert>>(); assert>>(); assert>>(); -assert>>(); assert>>(); assert>>(); assert>>(); -assert>>(); -assert>>(); assert>>(); assert>>(); -assert>>(); -assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); assert>>(); assert>>(); assert>>(); -assert>>(); -assert>>(); -assert>>(); assert>>(); assert>>(); assert>>(); @@ -377,7 +249,6 @@ assert>>(); assert>>(); assert>>(); -assert>>(); assert>>(); assert>>(); assert>>(); @@ -390,25 +261,14 @@ assert>> assert>>(); assert>>(); assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); assert>>(); assert>>(); assert>>(); assert>>(); assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); -assert>>(); assert>>(); -assert>>(); +assert>>(); +assert>>(); assert>>(); assert>>(); -assert>>(); -assert>>(); assert>>(); diff --git a/oxide-openapi-gen-ts/src/__snapshots__/validate.ts b/oxide-openapi-gen-ts/src/__snapshots__/validate.ts index 2ef6092..3658401 100644 --- a/oxide-openapi-gen-ts/src/__snapshots__/validate.ts +++ b/oxide-openapi-gen-ts/src/__snapshots__/validate.ts @@ -19,7 +19,7 @@ /** * An IPv4 subnet * -* An IPv4 subnet, including prefix and prefix length +* An IPv4 subnet, including prefix and subnet mask */ export const Ipv4Net = z.preprocess(processResponseBody,z.string().regex(/^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\/([0-9]|1[0-9]|2[0-9]|3[0-2])$/)) @@ -28,7 +28,7 @@ export const Ipv4Net = z.preprocess(processResponseBody,z.string().regex(/^(([0- * * An IPv6 subnet, including prefix and subnet mask */ -export const Ipv6Net = z.preprocess(processResponseBody,z.string().regex(/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8])$/)) +export const Ipv6Net = z.preprocess(processResponseBody,z.string().regex(/^([fF][dD])[0-9a-fA-F]{2}:(([0-9a-fA-F]{1,4}:){6}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,6}:)([0-9a-fA-F]{1,4})?\/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8])$/)) export const IpNet = z.preprocess(processResponseBody,z.union([ Ipv4Net, @@ -39,7 +39,7 @@ 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. +* 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 though they may contain a UUID. */ export const Name = z.preprocess(processResponseBody,z.string().min(1).max(63).regex(/^(?![0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)^[a-z]([a-zA-Z0-9-]*[a-zA-Z0-9]+)?$/)) @@ -54,14 +54,12 @@ Name, */ export const Address = z.preprocess(processResponseBody,z.object({"address": IpNet, "addressLot": NameOrId, -"vlanId": z.number().min(0).max(65535).nullable().optional(), })) /** * A set of addresses associated with a port configuration. */ export const AddressConfig = z.preprocess(processResponseBody,z.object({"addresses": Address.array(), -"linkName": Name, })) /** @@ -126,404 +124,14 @@ export const AddressLotResultsPage = z.preprocess(processResponseBody,z.object({ "nextPage": z.string().nullable().optional(), })) -/** -* An address lot and associated blocks resulting from viewing an address lot. - */ -export const AddressLotViewResponse = z.preprocess(processResponseBody,z.object({"blocks": AddressLotBlock.array(), -"lot": AddressLot, -})) - -/** -* Describes the scope of affinity for the purposes of co-location. - */ -export const FailureDomain = z.preprocess(processResponseBody,z.enum(["sled"])) - -/** -* Affinity policy used to describe "what to do when a request cannot be satisfied" -* -* Used for both Affinity and Anti-Affinity Groups - */ -export const AffinityPolicy = z.preprocess(processResponseBody,z.enum(["allow", "fail"]) -) - -/** -* View of an Affinity Group - */ -export const AffinityGroup = z.preprocess(processResponseBody,z.object({"description": z.string(), -"failureDomain": FailureDomain, -"id": z.uuid(), -"name": Name, -"policy": AffinityPolicy, -"projectId": z.uuid(), -"timeCreated": z.coerce.date(), -"timeModified": z.coerce.date(), -})) - -/** -* Create-time parameters for an `AffinityGroup` - */ -export const AffinityGroupCreate = z.preprocess(processResponseBody,z.object({"description": z.string(), -"failureDomain": FailureDomain, -"name": Name, -"policy": AffinityPolicy, -})) - -/** -* 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 const InstanceState = z.preprocess(processResponseBody,z.enum(["creating", "starting", "running", "stopping", "stopped", "rebooting", "migrating", "repairing", "failed", "destroyed"]) -) - -/** -* A member of an Affinity Group -* -* Membership in a group is not exclusive - members may belong to multiple affinity / anti-affinity groups. -* -* Affinity Groups can contain up to 32 members. - */ -export const AffinityGroupMember = z.preprocess(processResponseBody,z.object({"type": z.enum(["instance"]), -"value": z.object({"id": z.uuid(), -"name": Name, -"runState": InstanceState, -}), -})) - -/** -* A single page of results - */ -export const AffinityGroupMemberResultsPage = z.preprocess(processResponseBody,z.object({"items": AffinityGroupMember.array(), -"nextPage": z.string().nullable().optional(), -})) - -/** -* A single page of results - */ -export const AffinityGroupResultsPage = z.preprocess(processResponseBody,z.object({"items": AffinityGroup.array(), -"nextPage": z.string().nullable().optional(), -})) - -/** -* Updateable properties of an `AffinityGroup` - */ -export const AffinityGroupUpdate = z.preprocess(processResponseBody,z.object({"description": z.string().nullable().optional(), -"name": Name.nullable().optional(), -})) - -export const BgpMessageHistory = z.preprocess(processResponseBody,z.record(z.string(), z.unknown())) - -/** -* Identifies switch physical location - */ -export const SwitchLocation = z.preprocess(processResponseBody,z.enum(["switch0", "switch1"]) -) - -/** -* BGP message history for a particular switch. - */ -export const SwitchBgpHistory = z.preprocess(processResponseBody,z.object({"history": z.record(z.string(),BgpMessageHistory), -"switch": SwitchLocation, -})) - -/** -* BGP message history for rack switches. - */ -export const AggregateBgpMessageHistory = z.preprocess(processResponseBody,z.object({"switchHistories": SwitchBgpHistory.array(), -})) - -/** -* An alert class. - */ -export const AlertClass = z.preprocess(processResponseBody,z.object({"description": z.string(), -"name": z.string(), -})) - -/** -* A single page of results - */ -export const AlertClassResultsPage = z.preprocess(processResponseBody,z.object({"items": AlertClass.array(), -"nextPage": z.string().nullable().optional(), -})) - -/** -* The response received from a webhook receiver endpoint. - */ -export const WebhookDeliveryResponse = z.preprocess(processResponseBody,z.object({"durationMs": z.number().min(0), -"status": z.number().min(0).max(65535), -})) - -export const WebhookDeliveryAttemptResult = z.preprocess(processResponseBody,z.enum(["succeeded", "failed_http_error", "failed_unreachable", "failed_timeout"]) -) - -/** -* An individual delivery attempt for a webhook event. -* -* This represents a single HTTP request that was sent to the receiver, and its outcome. - */ -export const WebhookDeliveryAttempt = z.preprocess(processResponseBody,z.object({"attempt": z.number().min(0), -"response": WebhookDeliveryResponse.nullable().optional(), -"result": WebhookDeliveryAttemptResult, -"timeSent": z.coerce.date(), -})) - -/** -* A list of attempts to deliver an alert to a receiver. -* -* The type of the delivery attempt model depends on the receiver type, as it may contain information specific to that delivery mechanism. For example, webhook delivery attempts contain the HTTP status code of the webhook request. - */ -export const AlertDeliveryAttempts = z.preprocess(processResponseBody,z.object({"webhook": WebhookDeliveryAttempt.array(), -})) - -/** -* The state of a webhook delivery attempt. - */ -export const AlertDeliveryState = z.preprocess(processResponseBody,z.enum(["pending", "delivered", "failed"]) -) - -/** -* The reason an alert was delivered - */ -export const AlertDeliveryTrigger = z.preprocess(processResponseBody,z.enum(["alert", "resend", "probe"]) -) - -/** -* A delivery of a webhook event. - */ -export const AlertDelivery = z.preprocess(processResponseBody,z.object({"alertClass": z.string(), -"alertId": z.uuid(), -"attempts": AlertDeliveryAttempts, -"id": z.uuid(), -"receiverId": z.uuid(), -"state": AlertDeliveryState, -"timeStarted": z.coerce.date(), -"trigger": AlertDeliveryTrigger, -})) - -export const AlertDeliveryId = z.preprocess(processResponseBody,z.object({"deliveryId": z.uuid(), -})) - -/** -* A single page of results - */ -export const AlertDeliveryResultsPage = z.preprocess(processResponseBody,z.object({"items": AlertDelivery.array(), -"nextPage": z.string().nullable().optional(), -})) - -/** -* Data describing the result of an alert receiver liveness probe attempt. - */ -export const AlertProbeResult = z.preprocess(processResponseBody,z.object({"probe": AlertDelivery, -"resendsStarted": z.number().min(0).nullable().optional(), -})) - -/** -* A view of a shared secret key assigned to a webhook receiver. -* -* Once a secret is created, the value of the secret is not available in the API, as it must remain secret. Instead, secrets are referenced by their unique IDs assigned when they are created. - */ -export const WebhookSecret = z.preprocess(processResponseBody,z.object({"id": z.uuid(), -"timeCreated": z.coerce.date(), -})) - -/** -* The possible alert delivery mechanisms for an alert receiver. - */ -export const AlertReceiverKind = z.preprocess(processResponseBody,z.object({"endpoint": z.string(), -"kind": z.enum(["webhook"]), -"secrets": WebhookSecret.array(), -})) - -/** -* A webhook event class subscription -* -* A webhook event class subscription matches either a single event class exactly, or a glob pattern including wildcards that may match multiple event classes - */ -export const AlertSubscription = z.preprocess(processResponseBody,z.string().regex(/^([a-zA-Z0-9_]+|\*|\*\*)(\.([a-zA-Z0-9_]+|\*|\*\*))*$/)) - -/** -* The configuration for an alert receiver. - */ -export const AlertReceiver = z.preprocess(processResponseBody,z.object({"description": z.string(), -"id": z.uuid(), -"kind": AlertReceiverKind, -"name": Name, -"subscriptions": AlertSubscription.array(), -"timeCreated": z.coerce.date(), -"timeModified": z.coerce.date(), -})) - -/** -* A single page of results - */ -export const AlertReceiverResultsPage = z.preprocess(processResponseBody,z.object({"items": AlertReceiver.array(), -"nextPage": z.string().nullable().optional(), -})) - -export const AlertSubscriptionCreate = z.preprocess(processResponseBody,z.object({"subscription": AlertSubscription, -})) - -export const AlertSubscriptionCreated = z.preprocess(processResponseBody,z.object({"subscription": AlertSubscription, -})) - -/** -* Description of source IPs allowed to reach rack services. - */ -export const AllowedSourceIps = z.preprocess(processResponseBody,z.union([ -z.object({"allow": z.enum(["any"]), -}), -z.object({"allow": z.enum(["list"]), -"ips": IpNet.array(), -}), -]) -) - -/** -* Allowlist of IPs or subnets that can make requests to user-facing services. - */ -export const AllowList = z.preprocess(processResponseBody,z.object({"allowedIps": AllowedSourceIps, -"timeCreated": z.coerce.date(), -"timeModified": z.coerce.date(), -})) - -/** -* Parameters for updating allowed source IPs - */ -export const AllowListUpdate = z.preprocess(processResponseBody,z.object({"allowedIps": AllowedSourceIps, -})) - -/** -* View of an Anti-Affinity Group - */ -export const AntiAffinityGroup = z.preprocess(processResponseBody,z.object({"description": z.string(), -"failureDomain": FailureDomain, -"id": z.uuid(), -"name": Name, -"policy": AffinityPolicy, -"projectId": z.uuid(), -"timeCreated": z.coerce.date(), -"timeModified": z.coerce.date(), -})) - -/** -* Create-time parameters for an `AntiAffinityGroup` - */ -export const AntiAffinityGroupCreate = z.preprocess(processResponseBody,z.object({"description": z.string(), -"failureDomain": FailureDomain, -"name": Name, -"policy": AffinityPolicy, -})) - -/** -* A member of an Anti-Affinity Group -* -* Membership in a group is not exclusive - members may belong to multiple affinity / anti-affinity groups. -* -* Anti-Affinity Groups can contain up to 32 members. - */ -export const AntiAffinityGroupMember = z.preprocess(processResponseBody,z.object({"type": z.enum(["instance"]), -"value": z.object({"id": z.uuid(), -"name": Name, -"runState": InstanceState, -}), -})) - -/** -* A single page of results - */ -export const AntiAffinityGroupMemberResultsPage = z.preprocess(processResponseBody,z.object({"items": AntiAffinityGroupMember.array(), -"nextPage": z.string().nullable().optional(), -})) - -/** -* A single page of results - */ -export const AntiAffinityGroupResultsPage = z.preprocess(processResponseBody,z.object({"items": AntiAffinityGroup.array(), -"nextPage": z.string().nullable().optional(), -})) - -/** -* Updateable properties of an `AntiAffinityGroup` - */ -export const AntiAffinityGroupUpdate = z.preprocess(processResponseBody,z.object({"description": z.string().nullable().optional(), -"name": Name.nullable().optional(), -})) - -export const AuditLogEntryActor = z.preprocess(processResponseBody,z.union([ -z.object({"kind": z.enum(["user_builtin"]), -"userBuiltinId": z.uuid(), -}), -z.object({"kind": z.enum(["silo_user"]), -"siloId": z.uuid(), -"siloUserId": z.uuid(), -}), -z.object({"kind": z.enum(["scim"]), -"siloId": z.uuid(), -}), -z.object({"kind": z.enum(["unauthenticated"]), -}), -]) -) - -/** -* Result of an audit log entry - */ -export const AuditLogEntryResult = z.preprocess(processResponseBody,z.union([ -z.object({"httpStatusCode": z.number().min(0).max(65535), -"kind": z.enum(["success"]), -}), -z.object({"errorCode": z.string().nullable().optional(), -"errorMessage": z.string(), -"httpStatusCode": z.number().min(0).max(65535), -"kind": z.enum(["error"]), -}), -z.object({"kind": z.enum(["unknown"]), -}), -]) -) - -/** -* Audit log entry - */ -export const AuditLogEntry = z.preprocess(processResponseBody,z.object({"actor": AuditLogEntryActor, -"authMethod": z.string().nullable().optional(), -"id": z.uuid(), -"operationId": z.string(), -"requestId": z.string(), -"requestUri": z.string(), -"result": AuditLogEntryResult, -"sourceIp": z.ipv4(), -"timeCompleted": z.coerce.date(), -"timeStarted": z.coerce.date(), -"userAgent": z.string().nullable().optional(), -})) - -/** -* A single page of results - */ -export const AuditLogEntryResultsPage = z.preprocess(processResponseBody,z.object({"items": AuditLogEntry.array(), -"nextPage": z.string().nullable().optional(), -})) - -/** -* Authorization scope for a timeseries. -* -* This describes the level at which a user must be authorized to read data from a timeseries. For example, fleet-scoping means the data is only visible to an operator or fleet reader. Project-scoped, on the other hand, indicates that a user will see data limited to the projects on which they have read permissions. - */ -export const AuthzScope = z.preprocess(processResponseBody,z.enum(["fleet", "silo", "project", "viewable_to_all"]) -) - /** * Properties that uniquely identify an Oxide hardware component */ export const Baseboard = z.preprocess(processResponseBody,z.object({"part": z.string(), -"revision": z.number().min(0).max(4294967295), +"revision": z.number(), "serial": z.string(), })) -/** -* BFD connection mode. - */ export const BfdMode = z.preprocess(processResponseBody,z.enum(["single_hop","multi_hop"])) /** @@ -619,10 +227,10 @@ export const BgpConfigResultsPage = z.preprocess(processResponseBody,z.object({" })) /** -* The current status of a BGP peer. +* Identifies switch physical location */ -export const BgpExported = z.preprocess(processResponseBody,z.object({"exports": z.record(z.string(),Ipv4Net.array()), -})) +export const SwitchLocation = z.preprocess(processResponseBody,z.enum(["switch0", "switch1"]) +) /** * A route imported from a BGP peer. @@ -633,43 +241,21 @@ export const BgpImportedRouteIpv4 = z.preprocess(processResponseBody,z.object({" "switch": SwitchLocation, })) -/** -* Define policy relating to the import and export of prefixes from a BGP peer. - */ -export const ImportExportPolicy = z.preprocess(processResponseBody,z.union([ -z.object({"type": z.enum(["no_filtering"]), -}), -z.object({"type": z.enum(["allow"]), -"value": IpNet.array(), -}), -]) -) - /** * 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. */ export const BgpPeer = z.preprocess(processResponseBody,z.object({"addr": z.ipv4(), -"allowedExport": ImportExportPolicy, -"allowedImport": ImportExportPolicy, +"bgpAnnounceSet": NameOrId, "bgpConfig": NameOrId, -"communities": z.number().min(0).max(4294967295).array(), "connectRetry": z.number().min(0).max(4294967295), "delayOpen": z.number().min(0).max(4294967295), -"enforceFirstAs": SafeBoolean, "holdTime": z.number().min(0).max(4294967295), "idleHoldTime": z.number().min(0).max(4294967295), -"interfaceName": Name, +"interfaceName": z.string(), "keepalive": z.number().min(0).max(4294967295), -"localPref": z.number().min(0).max(4294967295).nullable().optional(), -"md5AuthKey": z.string().nullable().optional(), -"minTtl": z.number().min(0).max(255).nullable().optional(), -"multiExitDiscriminator": z.number().min(0).max(4294967295).nullable().optional(), -"remoteAsn": z.number().min(0).max(4294967295).nullable().optional(), -"vlanId": z.number().min(0).max(65535).nullable().optional(), })) -export const BgpPeerConfig = z.preprocess(processResponseBody,z.object({"linkName": Name, -"peers": BgpPeer.array(), +export const BgpPeerConfig = z.preprocess(processResponseBody,z.object({"peers": BgpPeer.array(), })) /** @@ -967,8 +553,7 @@ export const ServiceUsingCertificate = z.preprocess(processResponseBody,z.enum([ /** * View of a Certificate */ -export const Certificate = z.preprocess(processResponseBody,z.object({"cert": z.string(), -"description": z.string(), +export const Certificate = z.preprocess(processResponseBody,z.object({"description": z.string(), "id": z.uuid(), "name": Name, "service": ServiceUsingCertificate, @@ -993,21 +578,6 @@ export const CertificateResultsPage = z.preprocess(processResponseBody,z.object( "nextPage": z.string().nullable().optional(), })) -/** -* View of a console session - */ -export const ConsoleSession = z.preprocess(processResponseBody,z.object({"id": z.uuid(), -"timeCreated": z.coerce.date(), -"timeLastUsed": z.coerce.date(), -})) - -/** -* A single page of results - */ -export const ConsoleSessionResultsPage = z.preprocess(processResponseBody,z.object({"items": ConsoleSession.array(), -"nextPage": z.string().nullable().optional(), -})) - /** * A cumulative or counter data type. */ @@ -1040,26 +610,11 @@ export const Cumulativeuint64 = z.preprocess(processResponseBody,z.object({"star * Info about the current user */ export const CurrentUser = z.preprocess(processResponseBody,z.object({"displayName": z.string(), -"fleetViewer": SafeBoolean, "id": z.uuid(), -"siloAdmin": SafeBoolean, "siloId": z.uuid(), "siloName": Name, })) -/** -* 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 const Quantile = z.preprocess(processResponseBody,z.object({"desiredMarkerPositions": z.number().array(), -"markerHeights": z.number().array(), -"markerPositions": z.number().min(0).array(), -"p": z.number(), -})) - /** * Histogram metric * @@ -1068,15 +623,8 @@ export const Quantile = z.preprocess(processResponseBody,z.object({"desiredMarke * Note that any gaps, unsorted bins, or non-finite values will result in an error. */ export const Histogramint8 = z.preprocess(processResponseBody,z.object({"bins": Binint8.array(), -"max": z.number().min(-127).max(127), -"min": z.number().min(-127).max(127), "nSamples": z.number().min(0), -"p50": Quantile, -"p90": Quantile, -"p99": Quantile, -"squaredMean": z.number(), "startTime": z.coerce.date(), -"sumOfSamples": z.number(), })) /** @@ -1087,15 +635,8 @@ export const Histogramint8 = z.preprocess(processResponseBody,z.object({"bins": * Note that any gaps, unsorted bins, or non-finite values will result in an error. */ export const Histogramuint8 = z.preprocess(processResponseBody,z.object({"bins": Binuint8.array(), -"max": z.number().min(0).max(255), -"min": z.number().min(0).max(255), "nSamples": z.number().min(0), -"p50": Quantile, -"p90": Quantile, -"p99": Quantile, -"squaredMean": z.number(), "startTime": z.coerce.date(), -"sumOfSamples": z.number(), })) /** @@ -1106,15 +647,8 @@ export const Histogramuint8 = z.preprocess(processResponseBody,z.object({"bins": * Note that any gaps, unsorted bins, or non-finite values will result in an error. */ export const Histogramint16 = z.preprocess(processResponseBody,z.object({"bins": Binint16.array(), -"max": z.number().min(-32767).max(32767), -"min": z.number().min(-32767).max(32767), "nSamples": z.number().min(0), -"p50": Quantile, -"p90": Quantile, -"p99": Quantile, -"squaredMean": z.number(), "startTime": z.coerce.date(), -"sumOfSamples": z.number(), })) /** @@ -1125,15 +659,8 @@ export const Histogramint16 = z.preprocess(processResponseBody,z.object({"bins": * Note that any gaps, unsorted bins, or non-finite values will result in an error. */ export const Histogramuint16 = z.preprocess(processResponseBody,z.object({"bins": Binuint16.array(), -"max": z.number().min(0).max(65535), -"min": z.number().min(0).max(65535), "nSamples": z.number().min(0), -"p50": Quantile, -"p90": Quantile, -"p99": Quantile, -"squaredMean": z.number(), "startTime": z.coerce.date(), -"sumOfSamples": z.number(), })) /** @@ -1144,15 +671,8 @@ export const Histogramuint16 = z.preprocess(processResponseBody,z.object({"bins" * Note that any gaps, unsorted bins, or non-finite values will result in an error. */ export const Histogramint32 = z.preprocess(processResponseBody,z.object({"bins": Binint32.array(), -"max": z.number().min(-2147483647).max(2147483647), -"min": z.number().min(-2147483647).max(2147483647), "nSamples": z.number().min(0), -"p50": Quantile, -"p90": Quantile, -"p99": Quantile, -"squaredMean": z.number(), "startTime": z.coerce.date(), -"sumOfSamples": z.number(), })) /** @@ -1163,15 +683,8 @@ export const Histogramint32 = z.preprocess(processResponseBody,z.object({"bins": * Note that any gaps, unsorted bins, or non-finite values will result in an error. */ export const Histogramuint32 = z.preprocess(processResponseBody,z.object({"bins": Binuint32.array(), -"max": z.number().min(0).max(4294967295), -"min": z.number().min(0).max(4294967295), "nSamples": z.number().min(0), -"p50": Quantile, -"p90": Quantile, -"p99": Quantile, -"squaredMean": z.number(), "startTime": z.coerce.date(), -"sumOfSamples": z.number(), })) /** @@ -1182,15 +695,8 @@ export const Histogramuint32 = z.preprocess(processResponseBody,z.object({"bins" * Note that any gaps, unsorted bins, or non-finite values will result in an error. */ export const Histogramint64 = z.preprocess(processResponseBody,z.object({"bins": Binint64.array(), -"max": z.number(), -"min": z.number(), "nSamples": z.number().min(0), -"p50": Quantile, -"p90": Quantile, -"p99": Quantile, -"squaredMean": z.number(), "startTime": z.coerce.date(), -"sumOfSamples": z.number(), })) /** @@ -1201,15 +707,8 @@ export const Histogramint64 = z.preprocess(processResponseBody,z.object({"bins": * Note that any gaps, unsorted bins, or non-finite values will result in an error. */ export const Histogramuint64 = z.preprocess(processResponseBody,z.object({"bins": Binuint64.array(), -"max": z.number().min(0), -"min": z.number().min(0), "nSamples": z.number().min(0), -"p50": Quantile, -"p90": Quantile, -"p99": Quantile, -"squaredMean": z.number(), "startTime": z.coerce.date(), -"sumOfSamples": z.number(), })) /** @@ -1220,15 +719,8 @@ export const Histogramuint64 = z.preprocess(processResponseBody,z.object({"bins" * Note that any gaps, unsorted bins, or non-finite values will result in an error. */ export const Histogramfloat = z.preprocess(processResponseBody,z.object({"bins": Binfloat.array(), -"max": z.number(), -"min": z.number(), "nSamples": z.number().min(0), -"p50": Quantile, -"p90": Quantile, -"p99": Quantile, -"squaredMean": z.number(), "startTime": z.coerce.date(), -"sumOfSamples": z.number(), })) /** @@ -1239,15 +731,8 @@ export const Histogramfloat = z.preprocess(processResponseBody,z.object({"bins": * Note that any gaps, unsorted bins, or non-finite values will result in an error. */ export const Histogramdouble = z.preprocess(processResponseBody,z.object({"bins": Bindouble.array(), -"max": z.number(), -"min": z.number(), "nSamples": z.number().min(0), -"p50": Quantile, -"p90": Quantile, -"p99": Quantile, -"squaredMean": z.number(), "startTime": z.coerce.date(), -"sumOfSamples": z.number(), })) /** @@ -1354,28 +839,12 @@ export const DerEncodedKeyPair = z.preprocess(processResponseBody,z.object({"pri "publicCert": z.string(), })) -/** -* View of a device access token - */ -export const DeviceAccessToken = z.preprocess(processResponseBody,z.object({"id": z.uuid(), -"timeCreated": z.coerce.date(), -"timeExpires": z.coerce.date().nullable().optional(), -})) - export const DeviceAccessTokenRequest = z.preprocess(processResponseBody,z.object({"clientId": z.uuid(), "deviceCode": z.string(), "grantType": z.string(), })) -/** -* A single page of results - */ -export const DeviceAccessTokenResultsPage = z.preprocess(processResponseBody,z.object({"items": DeviceAccessToken.array(), -"nextPage": z.string().nullable().optional(), -})) - export const DeviceAuthRequest = z.preprocess(processResponseBody,z.object({"clientId": z.uuid(), -"ttlSeconds": z.number().min(1).max(4294967295).nullable().optional(), })) export const DeviceAuthVerify = z.preprocess(processResponseBody,z.object({"userCode": z.string(), @@ -1474,38 +943,6 @@ export const DiskResultsPage = z.preprocess(processResponseBody,z.object({"items "nextPage": z.string().nullable().optional(), })) -/** -* 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. -* -* Min, max, and the p-* quantiles are treated as optional due to the possibility of distribution operations, like subtraction. - */ -export const Distributiondouble = z.preprocess(processResponseBody,z.object({"bins": z.number().array(), -"counts": z.number().min(0).array(), -"max": z.number().nullable().optional(), -"min": z.number().nullable().optional(), -"p50": Quantile.nullable().optional(), -"p90": Quantile.nullable().optional(), -"p99": Quantile.nullable().optional(), -"squaredMean": z.number(), -"sumOfSamples": z.number(), -})) - -/** -* 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. -* -* Min, max, and the p-* quantiles are treated as optional due to the possibility of distribution operations, like subtraction. - */ -export const Distributionint64 = z.preprocess(processResponseBody,z.object({"bins": z.number().array(), -"counts": z.number().min(0).array(), -"max": z.number().nullable().optional(), -"min": z.number().nullable().optional(), -"p50": Quantile.nullable().optional(), -"p90": Quantile.nullable().optional(), -"p99": Quantile.nullable().optional(), -"squaredMean": z.number(), -"sumOfSamples": z.number(), -})) - /** * Parameters for creating an ephemeral IP address for an instance. */ @@ -1521,21 +958,13 @@ export const Error = z.preprocess(processResponseBody,z.object({"errorCode": z.s })) export const ExternalIp = z.preprocess(processResponseBody,z.union([ -z.object({"firstPort": z.number().min(0).max(65535), -"ip": z.ipv4(), -"ipPoolId": z.uuid(), -"kind": z.enum(["snat"]), -"lastPort": z.number().min(0).max(65535), -}), z.object({"ip": z.ipv4(), -"ipPoolId": z.uuid(), "kind": z.enum(["ephemeral"]), }), z.object({"description": z.string(), "id": z.uuid(), "instanceId": z.uuid().nullable().optional(), "ip": z.ipv4(), -"ipPoolId": z.uuid(), "kind": z.enum(["floating"]), "name": Name, "projectId": z.uuid(), @@ -1565,68 +994,6 @@ export const ExternalIpResultsPage = z.preprocess(processResponseBody,z.object({ "nextPage": z.string().nullable().optional(), })) -/** -* The `FieldType` identifies the data type of a target or metric field. - */ -export const FieldType = z.preprocess(processResponseBody,z.enum(["string","i8","u8","i16","u16","i32","u32","i64","u64","ip_addr","uuid","bool"])) - -/** -* The source from which a field is derived, the target or metric. - */ -export const FieldSource = z.preprocess(processResponseBody,z.enum(["target","metric"])) - -/** -* The name and type information for a field of a timeseries schema. - */ -export const FieldSchema = z.preprocess(processResponseBody,z.object({"description": z.string(), -"fieldType": FieldType, -"name": z.string(), -"source": FieldSource, -})) - -/** -* The `FieldValue` contains the value of a target or metric field. - */ -export const FieldValue = z.preprocess(processResponseBody,z.union([ -z.object({"type": z.enum(["string"]), -"value": z.string(), -}), -z.object({"type": z.enum(["i8"]), -"value": z.number().min(-127).max(127), -}), -z.object({"type": z.enum(["u8"]), -"value": z.number().min(0).max(255), -}), -z.object({"type": z.enum(["i16"]), -"value": z.number().min(-32767).max(32767), -}), -z.object({"type": z.enum(["u16"]), -"value": z.number().min(0).max(65535), -}), -z.object({"type": z.enum(["i32"]), -"value": z.number().min(-2147483647).max(2147483647), -}), -z.object({"type": z.enum(["u32"]), -"value": z.number().min(0).max(4294967295), -}), -z.object({"type": z.enum(["i64"]), -"value": z.number(), -}), -z.object({"type": z.enum(["u64"]), -"value": z.number().min(0), -}), -z.object({"type": z.enum(["ip_addr"]), -"value": z.ipv4(), -}), -z.object({"type": z.enum(["uuid"]), -"value": z.uuid(), -}), -z.object({"type": z.enum(["bool"]), -"value": SafeBoolean, -}), -]) -) - /** * Parameters for finalizing a disk */ @@ -1665,7 +1032,6 @@ export const FloatingIp = z.preprocess(processResponseBody,z.object({"descriptio "id": z.uuid(), "instanceId": z.uuid().nullable().optional(), "ip": z.ipv4(), -"ipPoolId": z.uuid(), "name": Name, "projectId": z.uuid(), "timeCreated": z.coerce.date(), @@ -1729,13 +1095,6 @@ export const GroupResultsPage = z.preprocess(processResponseBody,z.object({"item */ export const Hostname = z.preprocess(processResponseBody,z.string().min(1).max(253).regex(/^([a-zA-Z0-9]+[a-zA-Z0-9\-]*(? 2**53 addresses), integer precision will be lost, in exchange for representing the entire range. In such a case the pool still has many available addresses. - */ -export const IpPoolUtilization = z.preprocess(processResponseBody,z.object({"capacity": z.number(), -"remaining": z.number(), -})) - /** * A range of IP ports * -* An inclusive-inclusive range of IP ports. The second port may be omitted to represent a single port. +* An inclusive-inclusive range of IP ports. The second port may be omitted to represent a single port */ export const L4PortRange = z.preprocess(processResponseBody,z.string().min(1).max(11).regex(/^[0-9]{1,5}(-[0-9]{1,5})?$/)) @@ -2212,15 +1428,10 @@ export const LinkFec = z.preprocess(processResponseBody,z.enum(["firecode", "non ) /** -* The LLDP configuration associated with a port. +* The LLDP configuration associated with a port. LLDP may be either enabled or disabled, if enabled, an LLDP configuration must be provided by name or id. */ -export const LldpLinkConfigCreate = z.preprocess(processResponseBody,z.object({"chassisId": z.string().nullable().optional(), -"enabled": SafeBoolean, -"linkDescription": z.string().nullable().optional(), -"linkName": z.string().nullable().optional(), -"managementIp": z.ipv4().nullable().optional(), -"systemDescription": z.string().nullable().optional(), -"systemName": z.string().nullable().optional(), +export const LldpServiceConfigCreate = z.preprocess(processResponseBody,z.object({"enabled": SafeBoolean, +"lldpConfig": NameOrId.nullable().optional(), })) /** @@ -2229,73 +1440,22 @@ export const LldpLinkConfigCreate = z.preprocess(processResponseBody,z.object({" export const LinkSpeed = z.preprocess(processResponseBody,z.enum(["speed0_g", "speed1_g", "speed10_g", "speed25_g", "speed40_g", "speed50_g", "speed100_g", "speed200_g", "speed400_g"]) ) -/** -* Per-port tx-eq overrides. This can be used to fine-tune the transceiver equalization settings to improve signal integrity. - */ -export const TxEqConfig = z.preprocess(processResponseBody,z.object({"main": z.number().min(-2147483647).max(2147483647).nullable().optional(), -"post1": z.number().min(-2147483647).max(2147483647).nullable().optional(), -"post2": z.number().min(-2147483647).max(2147483647).nullable().optional(), -"pre1": z.number().min(-2147483647).max(2147483647).nullable().optional(), -"pre2": z.number().min(-2147483647).max(2147483647).nullable().optional(), -})) - /** * Switch link configuration. */ export const LinkConfigCreate = z.preprocess(processResponseBody,z.object({"autoneg": SafeBoolean, -"fec": LinkFec.nullable().optional(), -"linkName": Name, -"lldp": LldpLinkConfigCreate, +"fec": LinkFec, +"lldp": LldpServiceConfigCreate, "mtu": z.number().min(0).max(65535), "speed": LinkSpeed, -"txEq": TxEqConfig.nullable().optional(), })) /** * A link layer discovery protocol (LLDP) service configuration. */ -export const LldpLinkConfig = z.preprocess(processResponseBody,z.object({"chassisId": z.string().nullable().optional(), -"enabled": SafeBoolean, +export const LldpServiceConfig = z.preprocess(processResponseBody,z.object({"enabled": SafeBoolean, "id": z.uuid(), -"linkDescription": z.string().nullable().optional(), -"linkName": z.string().nullable().optional(), -"managementIp": z.ipv4().nullable().optional(), -"systemDescription": z.string().nullable().optional(), -"systemName": z.string().nullable().optional(), -})) - -export const NetworkAddress = z.preprocess(processResponseBody,z.union([ -z.object({"ipAddr": z.ipv4(), -}), -z.object({"iEEE802": z.number().min(0).max(255).array(), -}), -]) -) - -export const ManagementAddress = z.preprocess(processResponseBody,z.object({"addr": NetworkAddress, -"interfaceNum": InterfaceNum, -"oid": z.number().min(0).max(255).array().nullable().optional(), -})) - -/** -* Information about LLDP advertisements from other network entities directly connected to a switch port. This structure contains both metadata about when and where the neighbor was seen, as well as the specific information the neighbor was advertising. - */ -export const LldpNeighbor = z.preprocess(processResponseBody,z.object({"chassisId": z.string(), -"firstSeen": z.coerce.date(), -"lastSeen": z.coerce.date(), -"linkDescription": z.string().nullable().optional(), -"linkName": z.string(), -"localPort": z.string(), -"managementIp": ManagementAddress.array(), -"systemDescription": z.string().nullable().optional(), -"systemName": z.string().nullable().optional(), -})) - -/** -* A single page of results - */ -export const LldpNeighborResultsPage = z.preprocess(processResponseBody,z.object({"items": LldpNeighbor.array(), -"nextPage": z.string().nullable().optional(), +"lldpConfigId": z.uuid().nullable().optional(), })) /** @@ -2341,158 +1501,31 @@ export const MeasurementResultsPage = z.preprocess(processResponseBody,z.object( })) /** -* The type of the metric itself, indicating what its values represent. +* A password used to authenticate a user +* +* Passwords may be subject to additional constraints. */ -export const MetricType = z.preprocess(processResponseBody,z.enum(["gauge", "delta", "cumulative"]) -) +export const Password = z.preprocess(processResponseBody,z.string().max(512)) /** -* The type of network interface +* Describes the form factor of physical disks. */ -export const NetworkInterfaceKind = z.preprocess(processResponseBody,z.union([ -z.object({"id": z.uuid(), -"type": z.enum(["instance"]), -}), -z.object({"id": z.uuid(), -"type": z.enum(["service"]), -}), -z.object({"id": z.uuid(), -"type": z.enum(["probe"]), -}), -]) -) +export const PhysicalDiskKind = z.preprocess(processResponseBody,z.enum(["m2","u2"])) /** -* A Geneve Virtual Network Identifier +* View of a Physical Disk +* +* Physical disks reside in a particular sled and are used to store both Instance Disk data as well as internal metadata. */ -export const Vni = z.preprocess(processResponseBody,z.number().min(0).max(4294967295)) - -/** -* Information required to construct a virtual network interface - */ -export const NetworkInterface = z.preprocess(processResponseBody,z.object({"id": z.uuid(), -"ip": z.ipv4(), -"kind": NetworkInterfaceKind, -"mac": MacAddr, -"name": Name, -"primary": SafeBoolean, -"slot": z.number().min(0).max(255), -"subnet": IpNet, -"transitIps": IpNet.array().default([]).optional(), -"vni": Vni, -})) - -/** -* List of data values for one timeseries. -* -* Each element is an option, where `None` represents a missing sample. - */ -export const ValueArray = z.preprocess(processResponseBody,z.union([ -z.object({"type": z.enum(["integer"]), -"values": z.number().nullable().array(), -}), -z.object({"type": z.enum(["double"]), -"values": z.number().nullable().array(), -}), -z.object({"type": z.enum(["boolean"]), -"values": SafeBoolean.nullable().array(), -}), -z.object({"type": z.enum(["string"]), -"values": z.string().nullable().array(), -}), -z.object({"type": z.enum(["integer_distribution"]), -"values": Distributionint64.nullable().array(), -}), -z.object({"type": z.enum(["double_distribution"]), -"values": Distributiondouble.nullable().array(), -}), -]) -) - -/** -* A single list of values, for one dimension of a timeseries. - */ -export const Values = z.preprocess(processResponseBody,z.object({"metricType": MetricType, -"values": ValueArray, -})) - -/** -* Timepoints and values for one timeseries. - */ -export const Points = z.preprocess(processResponseBody,z.object({"startTimes": z.coerce.date().array().nullable().optional(), -"timestamps": z.coerce.date().array(), -"values": Values.array(), -})) - -/** -* 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 const Timeseries = z.preprocess(processResponseBody,z.object({"fields": z.record(z.string(),FieldValue), -"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. - */ -export const OxqlTable = z.preprocess(processResponseBody,z.object({"name": z.string(), -"timeseries": Timeseries.array(), -})) - -/** -* The result of a successful OxQL query. - */ -export const OxqlQueryResult = z.preprocess(processResponseBody,z.object({"tables": OxqlTable.array(), -})) - -/** -* A password used to authenticate a user -* -* Passwords may be subject to additional constraints. - */ -export const Password = z.preprocess(processResponseBody,z.string().max(512)) - -/** -* Describes the form factor of physical disks. - */ -export const PhysicalDiskKind = z.preprocess(processResponseBody,z.enum(["m2","u2"])) - -/** -* The operator-defined policy of a physical disk. - */ -export const PhysicalDiskPolicy = z.preprocess(processResponseBody,z.union([ -z.object({"kind": z.enum(["in_service"]), -}), -z.object({"kind": z.enum(["expunged"]), -}), -]) -) - -/** -* The current state of the disk, as determined by Nexus. - */ -export const PhysicalDiskState = z.preprocess(processResponseBody,z.enum(["active", "decommissioned"]) -) - -/** -* View of a Physical Disk -* -* Physical disks reside in a particular sled and are used to store both Instance Disk data as well as internal metadata. - */ -export const PhysicalDisk = z.preprocess(processResponseBody,z.object({"formFactor": PhysicalDiskKind, -"id": z.uuid(), -"model": z.string(), -"policy": PhysicalDiskPolicy, -"serial": z.string(), -"sledId": z.uuid().nullable().optional(), -"state": PhysicalDiskState, -"timeCreated": z.coerce.date(), -"timeModified": z.coerce.date(), -"vendor": z.string(), -})) +export const PhysicalDisk = z.preprocess(processResponseBody,z.object({"formFactor": PhysicalDiskKind, +"id": z.uuid(), +"model": z.string(), +"serial": z.string(), +"sledId": z.uuid().nullable().optional(), +"timeCreated": z.coerce.date(), +"timeModified": z.coerce.date(), +"vendor": z.string(), +})) /** * A single page of results @@ -2506,48 +1539,6 @@ export const PingStatus = z.preprocess(processResponseBody,z.enum(["ok"])) export const Ping = z.preprocess(processResponseBody,z.object({"status": PingStatus, })) -/** -* Identity-related metadata that's included in nearly all public API objects - */ -export const Probe = z.preprocess(processResponseBody,z.object({"description": z.string(), -"id": z.uuid(), -"name": Name, -"sled": z.uuid(), -"timeCreated": z.coerce.date(), -"timeModified": z.coerce.date(), -})) - -/** -* Create time parameters for probes. - */ -export const ProbeCreate = z.preprocess(processResponseBody,z.object({"description": z.string(), -"ipPool": NameOrId.nullable().optional(), -"name": Name, -"sled": z.uuid(), -})) - -export const ProbeExternalIpKind = z.preprocess(processResponseBody,z.enum(["snat","floating","ephemeral"])) - -export const ProbeExternalIp = z.preprocess(processResponseBody,z.object({"firstPort": z.number().min(0).max(65535), -"ip": z.ipv4(), -"kind": ProbeExternalIpKind, -"lastPort": z.number().min(0).max(65535), -})) - -export const ProbeInfo = z.preprocess(processResponseBody,z.object({"externalIps": ProbeExternalIp.array(), -"id": z.uuid(), -"interface": NetworkInterface, -"name": Name, -"sled": z.uuid(), -})) - -/** -* A single page of results - */ -export const ProbeInfoResultsPage = z.preprocess(processResponseBody,z.object({"items": ProbeInfo.array(), -"nextPage": z.string().nullable().optional(), -})) - /** * View of a Project */ @@ -2572,7 +1563,7 @@ export const ProjectResultsPage = z.preprocess(processResponseBody,z.object({"it "nextPage": z.string().nullable().optional(), })) -export const ProjectRole = z.preprocess(processResponseBody,z.enum(["admin","collaborator","limited_collaborator","viewer"])) +export const ProjectRole = z.preprocess(processResponseBody,z.enum(["admin","collaborator","viewer"])) /** * Describes the assignment of a particular role on a particular resource to a particular identity (user, group, etc.) @@ -2615,111 +1606,38 @@ export const RackResultsPage = z.preprocess(processResponseBody,z.object({"items })) /** -* A route to a destination network through a gateway address. - */ -export const Route = z.preprocess(processResponseBody,z.object({"dst": IpNet, -"gw": z.ipv4(), -"ribPriority": z.number().min(0).max(255).nullable().optional(), -"vid": z.number().min(0).max(65535).nullable().optional(), -})) - -/** -* Route configuration data associated with a switch port configuration. - */ -export const RouteConfig = z.preprocess(processResponseBody,z.object({"linkName": Name, -"routes": Route.array(), -})) - -/** -* A `RouteDestination` is used to match traffic with a routing rule based on the destination of that traffic. -* -* When traffic is to be sent to a destination that is within a given `RouteDestination`, the corresponding `RouterRoute` applies, and traffic will be forward to the `RouteTarget` for that rule. - */ -export const RouteDestination = z.preprocess(processResponseBody,z.union([ -z.object({"type": z.enum(["ip"]), -"value": z.ipv4(), -}), -z.object({"type": z.enum(["ip_net"]), -"value": IpNet, -}), -z.object({"type": z.enum(["vpc"]), -"value": Name, -}), -z.object({"type": z.enum(["subnet"]), -"value": Name, -}), -]) -) - -/** -* A `RouteTarget` describes the possible locations that traffic matching a route destination can be sent. - */ -export const RouteTarget = z.preprocess(processResponseBody,z.union([ -z.object({"type": z.enum(["ip"]), -"value": z.ipv4(), -}), -z.object({"type": z.enum(["vpc"]), -"value": Name, -}), -z.object({"type": z.enum(["subnet"]), -"value": Name, -}), -z.object({"type": z.enum(["instance"]), -"value": Name, -}), -z.object({"type": z.enum(["internet_gateway"]), -"value": Name, -}), -z.object({"type": z.enum(["drop"]), -}), -]) -) - -/** -* The kind of a `RouterRoute` +* A name for a built-in role * -* The kind determines certain attributes such as if the route is modifiable and describes how or where the route was created. +* Role names consist of two string components separated by dot ("."). */ -export const RouterRouteKind = z.preprocess(processResponseBody,z.enum(["default", "vpc_subnet", "vpc_peering", "custom"]) -) +export const RoleName = z.preprocess(processResponseBody,z.string().max(63).regex(/[a-z-]+\.[a-z-]+/)) /** -* A route defines a rule that governs where traffic should be sent based on its destination. +* View of a Role */ -export const RouterRoute = z.preprocess(processResponseBody,z.object({"description": z.string(), -"destination": RouteDestination, -"id": z.uuid(), -"kind": RouterRouteKind, -"name": Name, -"target": RouteTarget, -"timeCreated": z.coerce.date(), -"timeModified": z.coerce.date(), -"vpcRouterId": z.uuid(), +export const Role = z.preprocess(processResponseBody,z.object({"description": z.string(), +"name": RoleName, })) /** -* Create-time parameters for a `RouterRoute` +* A single page of results */ -export const RouterRouteCreate = z.preprocess(processResponseBody,z.object({"description": z.string(), -"destination": RouteDestination, -"name": Name, -"target": RouteTarget, +export const RoleResultsPage = z.preprocess(processResponseBody,z.object({"items": Role.array(), +"nextPage": z.string().nullable().optional(), })) /** -* A single page of results +* A route to a destination network through a gateway address. */ -export const RouterRouteResultsPage = z.preprocess(processResponseBody,z.object({"items": RouterRoute.array(), -"nextPage": z.string().nullable().optional(), +export const Route = z.preprocess(processResponseBody,z.object({"dst": IpNet, +"gw": z.ipv4(), +"vid": z.number().min(0).max(65535).nullable().optional(), })) /** -* Updateable properties of a `RouterRoute` +* Route configuration data associated with a switch port configuration. */ -export const RouterRouteUpdate = z.preprocess(processResponseBody,z.object({"description": z.string().nullable().optional(), -"destination": RouteDestination, -"name": Name.nullable().optional(), -"target": RouteTarget, +export const RouteConfig = z.preprocess(processResponseBody,z.object({"routes": Route.array(), })) /** @@ -2754,36 +1672,10 @@ export const SamlIdentityProviderCreate = z.preprocess(processResponseBody,z.obj "technicalContactEmail": z.string(), })) -export const ScimClientBearerToken = z.preprocess(processResponseBody,z.object({"id": z.uuid(), -"timeCreated": z.coerce.date(), -"timeExpires": z.coerce.date().nullable().optional(), -})) - -/** -* The POST response is the only time the generated bearer token is returned to the client. - */ -export const ScimClientBearerTokenValue = z.preprocess(processResponseBody,z.object({"bearerToken": z.string(), -"id": z.uuid(), -"timeCreated": z.coerce.date(), -"timeExpires": z.coerce.date().nullable().optional(), -})) - -/** -* Configuration of inbound ICMP allowed by API services. - */ -export const ServiceIcmpConfig = z.preprocess(processResponseBody,z.object({"enabled": SafeBoolean, -})) - -/** -* Parameters for PUT requests to `/v1/system/update/target-release`. - */ -export const SetTargetReleaseParams = z.preprocess(processResponseBody,z.object({"systemVersion": z.string().regex(/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/), -})) - /** * Describes how identities are managed and users are authenticated in this Silo */ -export const SiloIdentityMode = z.preprocess(processResponseBody,z.enum(["saml_jit", "local_only", "saml_scim"]) +export const SiloIdentityMode = z.preprocess(processResponseBody,z.enum(["saml_jit", "local_only"]) ) /** @@ -2791,8 +1683,7 @@ export const SiloIdentityMode = z.preprocess(processResponseBody,z.enum(["saml_j * * A Silo is the highest level unit of isolation. */ -export const Silo = z.preprocess(processResponseBody,z.object({"adminGroupName": z.string().nullable().optional(), -"description": z.string(), +export const Silo = z.preprocess(processResponseBody,z.object({"description": z.string(), "discoverable": SafeBoolean, "id": z.uuid(), "identityMode": SiloIdentityMode, @@ -2802,19 +1693,6 @@ export const Silo = z.preprocess(processResponseBody,z.object({"adminGroupName": "timeModified": z.coerce.date(), })) -/** -* View of silo authentication settings - */ -export const SiloAuthSettings = z.preprocess(processResponseBody,z.object({"deviceTokenMaxTtlSeconds": z.number().min(0).max(4294967295).nullable().optional(), -"siloId": z.uuid(), -})) - -/** -* Updateable properties of a silo's settings. - */ -export const SiloAuthSettingsUpdate = z.preprocess(processResponseBody,z.object({"deviceTokenMaxTtlSeconds": z.number().min(1).max(4294967295).nullable(), -})) - /** * The amount of provisionable resources for a Silo */ @@ -2885,7 +1763,7 @@ export const SiloResultsPage = z.preprocess(processResponseBody,z.object({"items "nextPage": z.string().nullable().optional(), })) -export const SiloRole = z.preprocess(processResponseBody,z.enum(["admin","collaborator","limited_collaborator","viewer"])) +export const SiloRole = z.preprocess(processResponseBody,z.enum(["admin","collaborator","viewer"])) /** * Describes the assignment of a particular role on a particular resource to a particular identity (user, group, etc.) @@ -2950,7 +1828,7 @@ z.object({"kind": z.enum(["expunged"]), ) /** -* The current state of the sled. +* The current state of the sled, as determined by Nexus. */ export const SledState = z.preprocess(processResponseBody,z.enum(["active", "decommissioned"]) ) @@ -2969,12 +1847,6 @@ export const Sled = z.preprocess(processResponseBody,z.object({"baseboard": Base "usablePhysicalRam": ByteCount, })) -/** -* The unique ID of a sled. - */ -export const SledId = z.preprocess(processResponseBody,z.object({"id": z.uuid(), -})) - /** * An operator's view of an instance running on a given sled */ @@ -3076,30 +1948,6 @@ export const SshKeyResultsPage = z.preprocess(processResponseBody,z.object({"ite "nextPage": z.string().nullable().optional(), })) -export const SupportBundleCreate = z.preprocess(processResponseBody,z.object({"userComment": z.string().nullable().optional(), -})) - -export const SupportBundleState = z.preprocess(processResponseBody,z.enum(["collecting", "destroying", "failed", "active"]) -) - -export const SupportBundleInfo = z.preprocess(processResponseBody,z.object({"id": z.uuid(), -"reasonForCreation": z.string(), -"reasonForFailure": z.string().nullable().optional(), -"state": SupportBundleState, -"timeCreated": z.coerce.date(), -"userComment": z.string().nullable().optional(), -})) - -/** -* A single page of results - */ -export const SupportBundleInfoResultsPage = z.preprocess(processResponseBody,z.object({"items": SupportBundleInfo.array(), -"nextPage": z.string().nullable().optional(), -})) - -export const SupportBundleUpdate = z.preprocess(processResponseBody,z.object({"userComment": z.string().nullable().optional(), -})) - /** * An operator's view of a Switch. */ @@ -3120,7 +1968,7 @@ export const SwitchInterfaceKind2 = z.preprocess(processResponseBody,z.enum(["pr * A switch port interface configuration for a port settings object. */ export const SwitchInterfaceConfig = z.preprocess(processResponseBody,z.object({"id": z.uuid(), -"interfaceName": Name, +"interfaceName": z.string(), "kind": SwitchInterfaceKind2, "portSettingsId": z.uuid(), "v6Enabled": SafeBoolean, @@ -3144,17 +1992,14 @@ z.object({"type": z.enum(["loopback"]), * A layer-3 switch interface configuration. When IPv6 is enabled, a link local address will be created for the interface. */ export const SwitchInterfaceConfigCreate = z.preprocess(processResponseBody,z.object({"kind": SwitchInterfaceKind, -"linkName": Name, "v6Enabled": SafeBoolean, })) -export const SwitchLinkState = z.preprocess(processResponseBody,z.record(z.string(), z.unknown())) - /** * A switch port represents a physical external port on a rack switch. */ export const SwitchPort = z.preprocess(processResponseBody,z.object({"id": z.uuid(), -"portName": Name, +"portName": z.string(), "portSettingsId": z.uuid().nullable().optional(), "rackId": z.uuid(), "switchLocation": z.string(), @@ -3163,13 +2008,10 @@ export const SwitchPort = z.preprocess(processResponseBody,z.object({"id": z.uui /** * An IP address configuration for a port settings object. */ -export const SwitchPortAddressView = z.preprocess(processResponseBody,z.object({"address": IpNet, +export const SwitchPortAddressConfig = z.preprocess(processResponseBody,z.object({"address": IpNet, "addressLotBlockId": z.uuid(), -"addressLotId": z.uuid(), -"addressLotName": Name, -"interfaceName": Name, +"interfaceName": z.string(), "portSettingsId": z.uuid(), -"vlanId": z.number().min(0).max(65535).nullable().optional(), })) /** @@ -3178,6 +2020,15 @@ export const SwitchPortAddressView = z.preprocess(processResponseBody,z.object({ export const SwitchPortApplySettings = z.preprocess(processResponseBody,z.object({"portSettings": NameOrId, })) +/** +* A BGP peer configuration for a port settings object. + */ +export const SwitchPortBgpPeerConfig = z.preprocess(processResponseBody,z.object({"addr": z.ipv4(), +"bgpConfigId": z.uuid(), +"interfaceName": z.string(), +"portSettingsId": z.uuid(), +})) + /** * The link geometry associated with a switch port. */ @@ -3203,27 +2054,13 @@ export const SwitchPortGeometry = z.preprocess(processResponseBody,z.enum(["qsfp export const SwitchPortConfigCreate = z.preprocess(processResponseBody,z.object({"geometry": SwitchPortGeometry, })) -/** -* Per-port tx-eq overrides. This can be used to fine-tune the transceiver equalization settings to improve signal integrity. - */ -export const TxEqConfig2 = z.preprocess(processResponseBody,z.object({"main": z.number().min(-2147483647).max(2147483647).nullable().optional(), -"post1": z.number().min(-2147483647).max(2147483647).nullable().optional(), -"post2": z.number().min(-2147483647).max(2147483647).nullable().optional(), -"pre1": z.number().min(-2147483647).max(2147483647).nullable().optional(), -"pre2": z.number().min(-2147483647).max(2147483647).nullable().optional(), -})) - /** * A link configuration for a port settings object. */ -export const SwitchPortLinkConfig = z.preprocess(processResponseBody,z.object({"autoneg": SafeBoolean, -"fec": LinkFec.nullable().optional(), -"linkName": Name, -"lldpLinkConfig": LldpLinkConfig.nullable().optional(), +export const SwitchPortLinkConfig = z.preprocess(processResponseBody,z.object({"linkName": z.string(), +"lldpServiceConfigId": z.uuid(), "mtu": z.number().min(0).max(65535), "portSettingsId": z.uuid(), -"speed": LinkSpeed, -"txEqConfig": TxEqConfig2.nullable().optional(), })) /** @@ -3237,168 +2074,79 @@ export const SwitchPortResultsPage = z.preprocess(processResponseBody,z.object({ * A route configuration for a port settings object. */ export const SwitchPortRouteConfig = z.preprocess(processResponseBody,z.object({"dst": IpNet, -"gw": z.ipv4(), -"interfaceName": Name, +"gw": IpNet, +"interfaceName": z.string(), "portSettingsId": z.uuid(), -"ribPriority": z.number().min(0).max(255).nullable().optional(), "vlanId": z.number().min(0).max(65535).nullable().optional(), })) /** -* This structure maps a port settings object to a port settings groups. Port settings objects may inherit settings from groups. This mapping defines the relationship between settings objects and the groups they reference. +* A switch port settings identity whose id may be used to view additional details. */ -export const SwitchPortSettingsGroups = z.preprocess(processResponseBody,z.object({"portSettingsGroupId": z.uuid(), -"portSettingsId": z.uuid(), +export const SwitchPortSettings = z.preprocess(processResponseBody,z.object({"description": z.string(), +"id": z.uuid(), +"name": Name, +"timeCreated": z.coerce.date(), +"timeModified": z.coerce.date(), })) /** -* A switch port VLAN interface configuration for a port settings object. +* Parameters for creating switch port settings. Switch port settings are the central data structure for setting up external networking. Switch port settings include link, interface, route, address and dynamic network protocol configuration. */ -export const SwitchVlanInterfaceConfig = z.preprocess(processResponseBody,z.object({"interfaceConfigId": z.uuid(), -"vlanId": z.number().min(0).max(65535), +export const SwitchPortSettingsCreate = z.preprocess(processResponseBody,z.object({"addresses": z.record(z.string(),AddressConfig), +"bgpPeers": z.record(z.string(),BgpPeerConfig), +"description": z.string(), +"groups": NameOrId.array(), +"interfaces": z.record(z.string(),SwitchInterfaceConfigCreate), +"links": z.record(z.string(),LinkConfigCreate), +"name": Name, +"portConfig": SwitchPortConfigCreate, +"routes": z.record(z.string(),RouteConfig), })) /** -* 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. +* This structure maps a port settings object to a port settings groups. Port settings objects may inherit settings from groups. This mapping defines the relationship between settings objects and the groups they reference. */ -export const SwitchPortSettings = z.preprocess(processResponseBody,z.object({"addresses": SwitchPortAddressView.array(), -"bgpPeers": BgpPeer.array(), -"description": z.string(), -"groups": SwitchPortSettingsGroups.array(), -"id": z.uuid(), -"interfaces": SwitchInterfaceConfig.array(), -"links": SwitchPortLinkConfig.array(), -"name": Name, -"port": SwitchPortConfig, -"routes": SwitchPortRouteConfig.array(), -"timeCreated": z.coerce.date(), -"timeModified": z.coerce.date(), -"vlanInterfaces": SwitchVlanInterfaceConfig.array(), -})) - -/** -* Parameters for creating switch port settings. Switch port settings are the central data structure for setting up external networking. Switch port settings include link, interface, route, address and dynamic network protocol configuration. - */ -export const SwitchPortSettingsCreate = z.preprocess(processResponseBody,z.object({"addresses": AddressConfig.array(), -"bgpPeers": BgpPeerConfig.array().default([]).optional(), -"description": z.string(), -"groups": NameOrId.array().default([]).optional(), -"interfaces": SwitchInterfaceConfigCreate.array().default([]).optional(), -"links": LinkConfigCreate.array(), -"name": Name, -"portConfig": SwitchPortConfigCreate, -"routes": RouteConfig.array().default([]).optional(), -})) - -/** -* A switch port settings identity whose id may be used to view additional details. - */ -export const SwitchPortSettingsIdentity = z.preprocess(processResponseBody,z.object({"description": z.string(), -"id": z.uuid(), -"name": Name, -"timeCreated": z.coerce.date(), -"timeModified": z.coerce.date(), -})) - -/** -* A single page of results - */ -export const SwitchPortSettingsIdentityResultsPage = z.preprocess(processResponseBody,z.object({"items": SwitchPortSettingsIdentity.array(), -"nextPage": z.string().nullable().optional(), +export const SwitchPortSettingsGroups = z.preprocess(processResponseBody,z.object({"portSettingsGroupId": z.uuid(), +"portSettingsId": z.uuid(), })) /** * A single page of results */ -export const SwitchResultsPage = z.preprocess(processResponseBody,z.object({"items": Switch.array(), +export const SwitchPortSettingsResultsPage = z.preprocess(processResponseBody,z.object({"items": SwitchPortSettings.array(), "nextPage": z.string().nullable().optional(), })) /** -* View of a system software target release - */ -export const TargetRelease = z.preprocess(processResponseBody,z.object({"timeRequested": z.coerce.date(), -"version": z.string().regex(/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/), -})) - -/** -* Text descriptions for the target and metric of a timeseries. - */ -export const TimeseriesDescription = z.preprocess(processResponseBody,z.object({"metric": z.string(), -"target": z.string(), -})) - -/** -* The name of a timeseries -* -* Names are constructed by concatenating the target and metric names with ':'. Target and metric names must be lowercase alphanumeric characters with '_' separating words. - */ -export const TimeseriesName = z.preprocess(processResponseBody,z.string().regex(/^(([a-z]+[a-z0-9]*)(_([a-z0-9]+))*):(([a-z]+[a-z0-9]*)(_([a-z0-9]+))*)$/)) - -/** -* A timeseries query string, written in the Oximeter query language. - */ -export const TimeseriesQuery = z.preprocess(processResponseBody,z.object({"query": z.string(), -})) - -/** -* Measurement units for timeseries samples. - */ -export const Units = z.preprocess(processResponseBody,z.union([ -z.enum(["count","bytes","seconds","nanoseconds","volts","amps","watts","degrees_celsius"]), -z.enum(["none"]), -z.enum(["rpm"]), -]) -) - -/** -* The schema for a timeseries. -* -* This includes the name of the timeseries, as well as the datum type of its metric and the schema for each field. - */ -export const TimeseriesSchema = z.preprocess(processResponseBody,z.object({"authzScope": AuthzScope, -"created": z.coerce.date(), -"datumType": DatumType, -"description": TimeseriesDescription, -"fieldSchema": FieldSchema.array().refine(...uniqueItems), -"timeseriesName": TimeseriesName, -"units": Units, -"version": z.number().min(1).max(255), -})) - -/** -* A single page of results +* A switch port VLAN interface configuration for a port settings object. */ -export const TimeseriesSchemaResultsPage = z.preprocess(processResponseBody,z.object({"items": TimeseriesSchema.array(), -"nextPage": z.string().nullable().optional(), +export const SwitchVlanInterfaceConfig = z.preprocess(processResponseBody,z.object({"interfaceConfigId": z.uuid(), +"vlanId": z.number().min(0).max(65535), })) /** -* Metadata about a TUF repository +* 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. */ -export const TufRepo = z.preprocess(processResponseBody,z.object({"fileName": z.string(), -"hash": z.string(), -"systemVersion": z.string().regex(/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/), -"timeCreated": z.coerce.date(), +export const SwitchPortSettingsView = z.preprocess(processResponseBody,z.object({"addresses": SwitchPortAddressConfig.array(), +"bgpPeers": SwitchPortBgpPeerConfig.array(), +"groups": SwitchPortSettingsGroups.array(), +"interfaces": SwitchInterfaceConfig.array(), +"linkLldp": LldpServiceConfig.array(), +"links": SwitchPortLinkConfig.array(), +"port": SwitchPortConfig, +"routes": SwitchPortRouteConfig.array(), +"settings": SwitchPortSettings, +"vlanInterfaces": SwitchVlanInterfaceConfig.array(), })) /** * A single page of results */ -export const TufRepoResultsPage = z.preprocess(processResponseBody,z.object({"items": TufRepo.array(), +export const SwitchResultsPage = z.preprocess(processResponseBody,z.object({"items": Switch.array(), "nextPage": z.string().nullable().optional(), })) -/** -* Whether the uploaded TUF repo already existed or was new and had to be inserted. Part of `TufRepoUpload`. - */ -export const TufRepoUploadStatus = z.preprocess(processResponseBody,z.enum(["already_exists", "inserted"]) -) - -export const TufRepoUpload = z.preprocess(processResponseBody,z.object({"repo": TufRepo, -"status": TufRepoUploadStatus, -})) - /** * A sled that has not been added to an initialized rack yet */ @@ -3421,27 +2169,6 @@ export const UninitializedSledResultsPage = z.preprocess(processResponseBody,z.o "nextPage": z.string().nullable().optional(), })) -export const UpdateStatus = z.preprocess(processResponseBody,z.object({"componentsByReleaseVersion": z.record(z.string(),z.number().min(0)), -"suspended": SafeBoolean, -"targetRelease": TargetRelease.nullable(), -"timeLastStepPlanned": z.coerce.date(), -})) - -/** -* Trusted root role used by the update system to verify update repositories. - */ -export const UpdatesTrustRoot = z.preprocess(processResponseBody,z.object({"id": z.uuid(), -"rootRole": z.record(z.string(), z.unknown()), -"timeCreated": z.coerce.date(), -})) - -/** -* A single page of results - */ -export const UpdatesTrustRootResultsPage = z.preprocess(processResponseBody,z.object({"items": UpdatesTrustRoot.array(), -"nextPage": z.string().nullable().optional(), -})) - /** * View of a User */ @@ -3453,7 +2180,7 @@ export const User = z.preprocess(processResponseBody,z.object({"displayName": z. /** * View of a Built-in User * -* Built-in users are identities internal to the system, used when the control plane performs actions autonomously +* A Built-in User is explicitly created as opposed to being derived from an Identify Provider. */ export const UserBuiltin = z.preprocess(processResponseBody,z.object({"description": z.string(), "id": z.uuid(), @@ -3470,9 +2197,9 @@ export const UserBuiltinResultsPage = z.preprocess(processResponseBody,z.object( })) /** -* A username for a local-only user +* A name unique within the parent collection * -* Usernames must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'. Usernames cannot be a UUID, but they may contain a UUID. They can be at most 63 characters long. +* 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 though they may contain a UUID. */ export const UserId = z.preprocess(processResponseBody,z.string().min(1).max(63).regex(/^(?![0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)^[a-z]([a-zA-Z0-9-]*[a-zA-Z0-9]+)?$/)) @@ -3539,10 +2266,6 @@ export const VpcCreate = z.preprocess(processResponseBody,z.object({"description "name": Name, })) -export const VpcFirewallIcmpFilter = z.preprocess(processResponseBody,z.object({"code": IcmpParamRange.nullable().optional(), -"icmpType": z.number().min(0).max(255), -})) - export const VpcFirewallRuleAction = z.preprocess(processResponseBody,z.enum(["allow","deny"])) export const VpcFirewallRuleDirection = z.preprocess(processResponseBody,z.enum(["inbound","outbound"])) @@ -3572,19 +2295,10 @@ z.object({"type": z.enum(["ip_net"]), /** * The protocols that may be specified in a firewall rule's filter */ -export const VpcFirewallRuleProtocol = z.preprocess(processResponseBody,z.union([ -z.object({"type": z.enum(["tcp"]), -}), -z.object({"type": z.enum(["udp"]), -}), -z.object({"type": z.enum(["icmp"]), -"value": VpcFirewallIcmpFilter.nullable(), -}), -]) -) +export const VpcFirewallRuleProtocol = z.preprocess(processResponseBody,z.enum(["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. +* Filter for a firewall rule. A given packet must match every field that is present for the rule to apply to it. A packet matches a field if any entry in that field matches the packet. */ export const VpcFirewallRuleFilter = z.preprocess(processResponseBody,z.object({"hosts": VpcFirewallRuleHostFilter.array().nullable().optional(), "ports": L4PortRange.array().nullable().optional(), @@ -3594,7 +2308,7 @@ export const VpcFirewallRuleFilter = z.preprocess(processResponseBody,z.object({ export const VpcFirewallRuleStatus = z.preprocess(processResponseBody,z.enum(["disabled","enabled"])) /** -* A `VpcFirewallRuleTarget` is used to specify the set of instances to which a firewall rule applies. You can target instances directly by name, or specify a VPC, VPC subnet, IP, or IP subnet, which will apply the rule to traffic going to all matching instances. Targets are additive: the rule applies to instances matching ANY target. +* A `VpcFirewallRuleTarget` is used to specify the set of `Instance`s to which a firewall rule applies. */ export const VpcFirewallRuleTarget = z.preprocess(processResponseBody,z.union([ z.object({"type": z.enum(["vpc"]), @@ -3646,9 +2360,9 @@ export const VpcFirewallRuleUpdate = z.preprocess(processResponseBody,z.object({ })) /** -* Updated list of firewall rules. Will replace all existing rules. +* Updateable properties of a `Vpc`'s firewall Note that VpcFirewallRules are implicitly created along with a Vpc, so there is no explicit creation. */ -export const VpcFirewallRuleUpdateParams = z.preprocess(processResponseBody,z.object({"rules": VpcFirewallRuleUpdate.array().default([]).optional(), +export const VpcFirewallRuleUpdateParams = z.preprocess(processResponseBody,z.object({"rules": VpcFirewallRuleUpdate.array(), })) /** @@ -3664,46 +2378,10 @@ export const VpcResultsPage = z.preprocess(processResponseBody,z.object({"items" "nextPage": z.string().nullable().optional(), })) -export const VpcRouterKind = z.preprocess(processResponseBody,z.enum(["system","custom"])) - -/** -* A VPC router defines a series of rules that indicate where traffic should be sent depending on its destination. - */ -export const VpcRouter = z.preprocess(processResponseBody,z.object({"description": z.string(), -"id": z.uuid(), -"kind": VpcRouterKind, -"name": Name, -"timeCreated": z.coerce.date(), -"timeModified": z.coerce.date(), -"vpcId": z.uuid(), -})) - -/** -* Create-time parameters for a `VpcRouter` - */ -export const VpcRouterCreate = z.preprocess(processResponseBody,z.object({"description": z.string(), -"name": Name, -})) - -/** -* A single page of results - */ -export const VpcRouterResultsPage = z.preprocess(processResponseBody,z.object({"items": VpcRouter.array(), -"nextPage": z.string().nullable().optional(), -})) - -/** -* Updateable properties of a `VpcRouter` - */ -export const VpcRouterUpdate = z.preprocess(processResponseBody,z.object({"description": z.string().nullable().optional(), -"name": Name.nullable().optional(), -})) - /** -* A VPC subnet represents a logical grouping for instances that allows network traffic between them, within a IPv4 subnetwork or optionally an IPv6 subnetwork. +* A VPC subnet represents a logical grouping for instances that allows network traffic between them, within a IPv4 subnetwork or optionall an IPv6 subnetwork. */ -export const VpcSubnet = z.preprocess(processResponseBody,z.object({"customRouterId": z.uuid().nullable().optional(), -"description": z.string(), +export const VpcSubnet = z.preprocess(processResponseBody,z.object({"description": z.string(), "id": z.uuid(), "ipv4Block": Ipv4Net, "ipv6Block": Ipv6Net, @@ -3716,8 +2394,7 @@ export const VpcSubnet = z.preprocess(processResponseBody,z.object({"customRoute /** * Create-time parameters for a `VpcSubnet` */ -export const VpcSubnetCreate = z.preprocess(processResponseBody,z.object({"customRouter": NameOrId.nullable().optional(), -"description": z.string(), +export const VpcSubnetCreate = z.preprocess(processResponseBody,z.object({"description": z.string(), "ipv4Block": Ipv4Net, "ipv6Block": Ipv6Net.nullable().optional(), "name": Name, @@ -3733,8 +2410,7 @@ export const VpcSubnetResultsPage = z.preprocess(processResponseBody,z.object({" /** * Updateable properties of a `VpcSubnet` */ -export const VpcSubnetUpdate = z.preprocess(processResponseBody,z.object({"customRouter": NameOrId.nullable().optional(), -"description": z.string().nullable().optional(), +export const VpcSubnetUpdate = z.preprocess(processResponseBody,z.object({"description": z.string().nullable().optional(), "name": Name.nullable().optional(), })) @@ -3746,57 +2422,18 @@ export const VpcUpdate = z.preprocess(processResponseBody,z.object({"description "name": Name.nullable().optional(), })) -/** -* Create-time identity-related parameters - */ -export const WebhookCreate = z.preprocess(processResponseBody,z.object({"description": z.string(), -"endpoint": z.string(), -"name": Name, -"secrets": z.string().array(), -"subscriptions": AlertSubscription.array().default([]).optional(), -})) - -/** -* The configuration for a webhook alert receiver. - */ -export const WebhookReceiver = z.preprocess(processResponseBody,z.object({"description": z.string(), -"endpoint": z.string(), -"id": z.uuid(), -"name": Name, -"secrets": WebhookSecret.array(), -"subscriptions": AlertSubscription.array(), -"timeCreated": z.coerce.date(), -"timeModified": z.coerce.date(), -})) - -/** -* Parameters to update a webhook configuration. - */ -export const WebhookReceiverUpdate = z.preprocess(processResponseBody,z.object({"description": z.string().nullable().optional(), -"endpoint": z.string().nullable().optional(), -"name": Name.nullable().optional(), -})) - -export const WebhookSecretCreate = z.preprocess(processResponseBody,z.object({"secret": z.string(), -})) - -/** -* A list of the IDs of secrets associated with a webhook receiver. - */ -export const WebhookSecrets = z.preprocess(processResponseBody,z.object({"secrets": WebhookSecret.array(), -})) - /** * Supported set of sort modes for scanning by name or id */ export const NameOrIdSortMode = z.preprocess(processResponseBody,z.enum(["name_ascending", "name_descending", "id_ascending"]) ) +export const DiskMetricName = z.preprocess(processResponseBody,z.enum(["activated","flush","read","read_bytes","write","write_bytes"])) + /** -* Supported set of sort modes for scanning by timestamp and ID +* The order in which the client wants to page through the requested collection */ -export const TimeAndIdSortMode = z.preprocess(processResponseBody,z.enum(["time_and_id_ascending", "time_and_id_descending"]) -) +export const PaginationOrder = z.preprocess(processResponseBody,z.enum(["ascending","descending"])) /** * Supported set of sort modes for scanning by id only. @@ -3807,17 +2444,6 @@ export const IdSortMode = z.preprocess(processResponseBody,z.enum(["id_ascending export const SystemMetricName = z.preprocess(processResponseBody,z.enum(["virtual_disk_space_provisioned","cpus_provisioned","ram_provisioned"])) -/** -* The order in which the client wants to page through the requested collection - */ -export const PaginationOrder = z.preprocess(processResponseBody,z.enum(["ascending","descending"])) - -/** -* Supported sort modes when scanning by semantic version - */ -export const VersionSortMode = z.preprocess(processResponseBody,z.enum(["version_ascending", "version_descending"]) -) - /** * Supported set of sort modes for scanning by name only * @@ -3846,436 +2472,41 @@ export const DeviceAccessTokenParams = z.preprocess(processResponseBody, z.objec }), })) -export const ProbeListParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - }), - query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - project: NameOrId.optional(), - sortBy: NameOrIdSortMode.optional(), - }), -})) - -export const ProbeCreateParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - }), - query: z.object({ - project: NameOrId, - }), -})) - -export const ProbeViewParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - probe: NameOrId, - }), - query: z.object({ - project: NameOrId, - }), -})) - -export const ProbeDeleteParams = z.preprocess(processResponseBody, z.object({ +export const LoginSamlParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - probe: NameOrId, + providerName: Name, + siloName: Name, }), query: z.object({ - project: NameOrId, }), })) -export const SupportBundleListParams = z.preprocess(processResponseBody, z.object({ +export const CertificateListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ limit: z.number().min(1).max(4294967295).nullable().optional(), pageToken: z.string().nullable().optional(), - sortBy: TimeAndIdSortMode.optional(), - }), -})) - -export const SupportBundleCreateParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - }), - query: z.object({ - }), -})) - -export const SupportBundleViewParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - bundleId: z.uuid(), - }), - query: z.object({ - }), -})) - -export const SupportBundleUpdateParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - bundleId: z.uuid(), - }), - query: z.object({ - }), -})) - -export const SupportBundleDeleteParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - bundleId: z.uuid(), - }), - query: z.object({ - }), -})) - -export const SupportBundleDownloadParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - bundleId: z.uuid(), - }), - query: z.object({ - }), -})) - -export const SupportBundleHeadParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - bundleId: z.uuid(), - }), - query: z.object({ - }), -})) - -export const SupportBundleDownloadFileParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - bundleId: z.uuid(), - file: z.string(), - }), - query: z.object({ - }), -})) - -export const SupportBundleHeadFileParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - bundleId: z.uuid(), - file: z.string(), - }), - query: z.object({ + sortBy: NameOrIdSortMode.optional(), }), })) -export const SupportBundleIndexParams = z.preprocess(processResponseBody, z.object({ +export const CertificateCreateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - bundleId: z.uuid(), }), query: z.object({ }), })) -export const LoginSamlParams = z.preprocess(processResponseBody, z.object({ +export const CertificateViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - providerName: Name, - siloName: Name, + certificate: NameOrId, }), query: z.object({ }), })) -export const AffinityGroupListParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - }), - query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - project: NameOrId.optional(), - sortBy: NameOrIdSortMode.optional(), - }), -})) - -export const AffinityGroupCreateParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - }), - query: z.object({ - project: NameOrId, - }), -})) - -export const AffinityGroupViewParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - affinityGroup: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - -export const AffinityGroupUpdateParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - affinityGroup: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - -export const AffinityGroupDeleteParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - affinityGroup: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - -export const AffinityGroupMemberListParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - affinityGroup: NameOrId, - }), - query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - project: NameOrId.optional(), - sortBy: NameOrIdSortMode.optional(), - }), -})) - -export const AffinityGroupMemberInstanceViewParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - affinityGroup: NameOrId, - instance: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - -export const AffinityGroupMemberInstanceAddParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - affinityGroup: NameOrId, - instance: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - -export const AffinityGroupMemberInstanceDeleteParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - affinityGroup: NameOrId, - instance: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - -export const AlertClassListParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - }), - query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - filter: AlertSubscription.optional(), - }), -})) - -export const AlertReceiverListParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - }), - query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - sortBy: NameOrIdSortMode.optional(), - }), -})) - -export const AlertReceiverViewParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - receiver: NameOrId, - }), - query: z.object({ - }), -})) - -export const AlertReceiverDeleteParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - receiver: NameOrId, - }), - query: z.object({ - }), -})) - -export const AlertDeliveryListParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - receiver: NameOrId, - }), - query: z.object({ - delivered: SafeBoolean.nullable().optional(), - failed: SafeBoolean.nullable().optional(), - pending: SafeBoolean.nullable().optional(), - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - sortBy: TimeAndIdSortMode.optional(), - }), -})) - -export const AlertReceiverProbeParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - receiver: NameOrId, - }), - query: z.object({ - resend: SafeBoolean.optional(), - }), -})) - -export const AlertReceiverSubscriptionAddParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - receiver: NameOrId, - }), - query: z.object({ - }), -})) - -export const AlertReceiverSubscriptionRemoveParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - receiver: NameOrId, - subscription: AlertSubscription, - }), - query: z.object({ - }), -})) - -export const AlertDeliveryResendParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - alertId: z.uuid(), - }), - query: z.object({ - receiver: NameOrId, - }), -})) - -export const AntiAffinityGroupListParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - }), - query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - project: NameOrId.optional(), - sortBy: NameOrIdSortMode.optional(), - }), -})) - -export const AntiAffinityGroupCreateParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - }), - query: z.object({ - project: NameOrId, - }), -})) - -export const AntiAffinityGroupViewParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - antiAffinityGroup: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - -export const AntiAffinityGroupUpdateParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - antiAffinityGroup: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - -export const AntiAffinityGroupDeleteParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - antiAffinityGroup: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - -export const AntiAffinityGroupMemberListParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - antiAffinityGroup: NameOrId, - }), - query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - project: NameOrId.optional(), - sortBy: NameOrIdSortMode.optional(), - }), -})) - -export const AntiAffinityGroupMemberInstanceViewParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - antiAffinityGroup: NameOrId, - instance: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - -export const AntiAffinityGroupMemberInstanceAddParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - antiAffinityGroup: NameOrId, - instance: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - -export const AntiAffinityGroupMemberInstanceDeleteParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - antiAffinityGroup: NameOrId, - instance: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - -export const AuthSettingsViewParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - }), - query: z.object({ - }), -})) - -export const AuthSettingsUpdateParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - }), - query: z.object({ - }), -})) - -export const CertificateListParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - }), - query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - sortBy: NameOrIdSortMode.optional(), - }), -})) - -export const CertificateCreateParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - }), - query: z.object({ - }), -})) - -export const CertificateViewParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - certificate: NameOrId, - }), - query: z.object({ - }), -})) - -export const CertificateDeleteParams = z.preprocess(processResponseBody, z.object({ +export const CertificateDeleteParams = z.preprocess(processResponseBody, z.object({ path: z.object({ certificate: NameOrId, }), @@ -4283,620 +2514,83 @@ export const CertificateDeleteParams = z.preprocess(processResponseBody, z.objec }), })) -export const DiskListParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - }), - query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - project: NameOrId.optional(), - sortBy: NameOrIdSortMode.optional(), - }), -})) - -export const DiskCreateParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - }), - query: z.object({ - project: NameOrId, - }), -})) - -export const DiskViewParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - disk: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - -export const DiskDeleteParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - disk: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - -export const DiskBulkWriteImportParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - disk: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - -export const DiskBulkWriteImportStartParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - disk: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - -export const DiskBulkWriteImportStopParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - disk: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - -export const DiskFinalizeImportParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - disk: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - -export const FloatingIpListParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - }), - query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - project: NameOrId.optional(), - sortBy: NameOrIdSortMode.optional(), - }), -})) - -export const FloatingIpCreateParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - }), - query: z.object({ - project: NameOrId, - }), -})) - -export const FloatingIpViewParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - floatingIp: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - -export const FloatingIpUpdateParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - floatingIp: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - -export const FloatingIpDeleteParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - floatingIp: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - -export const FloatingIpAttachParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - floatingIp: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - -export const FloatingIpDetachParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - floatingIp: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - -export const GroupListParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - }), - query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - sortBy: IdSortMode.optional(), - }), -})) - -export const GroupViewParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - groupId: z.uuid(), - }), - query: z.object({ - }), -})) - -export const ImageListParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - }), - query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - project: NameOrId.optional(), - sortBy: NameOrIdSortMode.optional(), - }), -})) - -export const ImageCreateParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - -export const ImageViewParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - image: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - -export const ImageDeleteParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - image: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - -export const ImageDemoteParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - image: NameOrId, - }), - query: z.object({ - project: NameOrId, - }), -})) - -export const ImagePromoteParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - image: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - -export const InstanceListParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - }), - query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - project: NameOrId.optional(), - sortBy: NameOrIdSortMode.optional(), - }), -})) - -export const InstanceCreateParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - }), - query: z.object({ - project: NameOrId, - }), -})) - -export const InstanceViewParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - instance: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - -export const InstanceUpdateParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - instance: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - -export const InstanceDeleteParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - instance: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - -export const InstanceAffinityGroupListParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - instance: NameOrId, - }), - query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - project: NameOrId.optional(), - sortBy: NameOrIdSortMode.optional(), - }), -})) - -export const InstanceAntiAffinityGroupListParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - instance: NameOrId, - }), - query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - project: NameOrId.optional(), - sortBy: NameOrIdSortMode.optional(), - }), -})) - -export const InstanceDiskListParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - instance: NameOrId, - }), - query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - project: NameOrId.optional(), - sortBy: NameOrIdSortMode.optional(), - }), -})) - -export const InstanceDiskAttachParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - instance: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - -export const InstanceDiskDetachParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - instance: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - -export const InstanceExternalIpListParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - instance: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - -export const InstanceEphemeralIpAttachParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - instance: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - -export const InstanceEphemeralIpDetachParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - instance: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - -export const InstanceRebootParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - instance: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - -export const InstanceSerialConsoleParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - instance: NameOrId, - }), - query: z.object({ - fromStart: z.number().min(0).nullable().optional(), - maxBytes: z.number().min(0).nullable().optional(), - mostRecent: z.number().min(0).nullable().optional(), - project: NameOrId.optional(), - }), -})) - -export const InstanceSerialConsoleStreamParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - instance: NameOrId, - }), - query: z.object({ - mostRecent: z.number().min(0).nullable().optional(), - project: NameOrId.optional(), - }), -})) - -export const InstanceSshPublicKeyListParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - instance: NameOrId, - }), - query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - project: NameOrId.optional(), - sortBy: NameOrIdSortMode.optional(), - }), -})) - -export const InstanceStartParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - instance: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - -export const InstanceStopParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - instance: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - -export const InternetGatewayIpAddressListParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - }), - query: z.object({ - gateway: NameOrId.optional(), - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - project: NameOrId.optional(), - sortBy: NameOrIdSortMode.optional(), - vpc: NameOrId.optional(), - }), -})) - -export const InternetGatewayIpAddressCreateParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - }), - query: z.object({ - gateway: NameOrId, - project: NameOrId.optional(), - vpc: NameOrId.optional(), - }), -})) - -export const InternetGatewayIpAddressDeleteParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - address: NameOrId, - }), - query: z.object({ - cascade: SafeBoolean.optional(), - gateway: NameOrId.optional(), - project: NameOrId.optional(), - vpc: NameOrId.optional(), - }), -})) - -export const InternetGatewayIpPoolListParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - }), - query: z.object({ - gateway: NameOrId.optional(), - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - project: NameOrId.optional(), - sortBy: NameOrIdSortMode.optional(), - vpc: NameOrId.optional(), - }), -})) - -export const InternetGatewayIpPoolCreateParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - }), - query: z.object({ - gateway: NameOrId, - project: NameOrId.optional(), - vpc: NameOrId.optional(), - }), -})) - -export const InternetGatewayIpPoolDeleteParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - pool: NameOrId, - }), - query: z.object({ - cascade: SafeBoolean.optional(), - gateway: NameOrId.optional(), - project: NameOrId.optional(), - vpc: NameOrId.optional(), - }), -})) - -export const InternetGatewayListParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - }), - query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - project: NameOrId.optional(), - sortBy: NameOrIdSortMode.optional(), - vpc: NameOrId.optional(), - }), -})) - -export const InternetGatewayCreateParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - }), - query: z.object({ - project: NameOrId.optional(), - vpc: NameOrId, - }), -})) - -export const InternetGatewayViewParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - gateway: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - vpc: NameOrId.optional(), - }), -})) - -export const InternetGatewayDeleteParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - gateway: NameOrId, - }), - query: z.object({ - cascade: SafeBoolean.optional(), - project: NameOrId.optional(), - vpc: NameOrId.optional(), - }), -})) - -export const ProjectIpPoolListParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - }), - query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - sortBy: NameOrIdSortMode.optional(), - }), -})) - -export const ProjectIpPoolViewParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - pool: NameOrId, - }), - query: z.object({ - }), -})) - -export const LoginLocalParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - siloName: Name, - }), - query: z.object({ - }), -})) - -export const LogoutParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - }), - query: z.object({ - }), -})) - -export const CurrentUserViewParams = z.preprocess(processResponseBody, z.object({ +export const DiskListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + project: NameOrId.optional(), + sortBy: NameOrIdSortMode.optional(), }), })) -export const CurrentUserAccessTokenListParams = z.preprocess(processResponseBody, z.object({ +export const DiskCreateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - sortBy: IdSortMode.optional(), + project: NameOrId, }), })) -export const CurrentUserAccessTokenDeleteParams = z.preprocess(processResponseBody, z.object({ +export const DiskViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - tokenId: z.uuid(), + disk: NameOrId, }), query: z.object({ + project: NameOrId.optional(), }), })) -export const CurrentUserGroupsParams = z.preprocess(processResponseBody, z.object({ +export const DiskDeleteParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + disk: NameOrId, }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - sortBy: IdSortMode.optional(), + project: NameOrId.optional(), }), })) -export const CurrentUserSshKeyListParams = z.preprocess(processResponseBody, z.object({ +export const DiskBulkWriteImportParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + disk: NameOrId, }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - sortBy: NameOrIdSortMode.optional(), + project: NameOrId.optional(), }), })) -export const CurrentUserSshKeyCreateParams = z.preprocess(processResponseBody, z.object({ +export const DiskBulkWriteImportStartParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + disk: NameOrId, }), query: z.object({ + project: NameOrId.optional(), }), })) -export const CurrentUserSshKeyViewParams = z.preprocess(processResponseBody, z.object({ +export const DiskBulkWriteImportStopParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - sshKey: NameOrId, + disk: NameOrId, }), query: z.object({ + project: NameOrId.optional(), }), })) -export const CurrentUserSshKeyDeleteParams = z.preprocess(processResponseBody, z.object({ +export const DiskFinalizeImportParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - sshKey: NameOrId, + disk: NameOrId, }), query: z.object({ + project: NameOrId.optional(), }), })) -export const SiloMetricParams = z.preprocess(processResponseBody, z.object({ +export const DiskMetricsListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - metricName: SystemMetricName, + disk: NameOrId, + metric: DiskMetricName, }), query: z.object({ endTime: z.coerce.date().optional(), @@ -4908,11 +2602,10 @@ export const SiloMetricParams = z.preprocess(processResponseBody, z.object({ }), })) -export const InstanceNetworkInterfaceListParams = z.preprocess(processResponseBody, z.object({ +export const FloatingIpListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ - instance: NameOrId.optional(), limit: z.number().min(1).max(4294967295).nullable().optional(), pageToken: z.string().nullable().optional(), project: NameOrId.optional(), @@ -4920,124 +2613,133 @@ export const InstanceNetworkInterfaceListParams = z.preprocess(processResponseBo }), })) -export const InstanceNetworkInterfaceCreateParams = z.preprocess(processResponseBody, z.object({ +export const FloatingIpCreateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ - instance: NameOrId, - project: NameOrId.optional(), + project: NameOrId, }), })) -export const InstanceNetworkInterfaceViewParams = z.preprocess(processResponseBody, z.object({ +export const FloatingIpViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - interface: NameOrId, + floatingIp: NameOrId, }), query: z.object({ - instance: NameOrId.optional(), project: NameOrId.optional(), }), })) -export const InstanceNetworkInterfaceUpdateParams = z.preprocess(processResponseBody, z.object({ +export const FloatingIpUpdateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - interface: NameOrId, + floatingIp: NameOrId, }), query: z.object({ - instance: NameOrId.optional(), project: NameOrId.optional(), }), })) -export const InstanceNetworkInterfaceDeleteParams = z.preprocess(processResponseBody, z.object({ +export const FloatingIpDeleteParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - interface: NameOrId, + floatingIp: NameOrId, }), query: z.object({ - instance: NameOrId.optional(), project: NameOrId.optional(), }), })) -export const PingParams = z.preprocess(processResponseBody, z.object({ +export const FloatingIpAttachParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + floatingIp: NameOrId, }), query: z.object({ + project: NameOrId.optional(), }), })) -export const PolicyViewParams = z.preprocess(processResponseBody, z.object({ +export const FloatingIpDetachParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + floatingIp: NameOrId, }), query: z.object({ + project: NameOrId.optional(), }), })) -export const PolicyUpdateParams = z.preprocess(processResponseBody, z.object({ +export const GroupListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + sortBy: IdSortMode.optional(), }), })) -export const ProjectListParams = z.preprocess(processResponseBody, z.object({ +export const GroupViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + groupId: z.uuid(), }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - sortBy: NameOrIdSortMode.optional(), }), })) -export const ProjectCreateParams = z.preprocess(processResponseBody, z.object({ +export const ImageListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + project: NameOrId.optional(), + sortBy: NameOrIdSortMode.optional(), }), })) -export const ProjectViewParams = z.preprocess(processResponseBody, z.object({ +export const ImageCreateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - project: NameOrId, }), query: z.object({ + project: NameOrId.optional(), }), })) -export const ProjectUpdateParams = z.preprocess(processResponseBody, z.object({ +export const ImageViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - project: NameOrId, + image: NameOrId, }), query: z.object({ + project: NameOrId.optional(), }), })) -export const ProjectDeleteParams = z.preprocess(processResponseBody, z.object({ +export const ImageDeleteParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - project: NameOrId, + image: NameOrId, }), query: z.object({ + project: NameOrId.optional(), }), })) -export const ProjectPolicyViewParams = z.preprocess(processResponseBody, z.object({ +export const ImageDemoteParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - project: NameOrId, + image: NameOrId, }), query: z.object({ + project: NameOrId, }), })) -export const ProjectPolicyUpdateParams = z.preprocess(processResponseBody, z.object({ +export const ImagePromoteParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - project: NameOrId, + image: NameOrId, }), query: z.object({ + project: NameOrId.optional(), }), })) -export const SnapshotListParams = z.preprocess(processResponseBody, z.object({ +export const InstanceListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ @@ -5048,7 +2750,7 @@ export const SnapshotListParams = z.preprocess(processResponseBody, z.object({ }), })) -export const SnapshotCreateParams = z.preprocess(processResponseBody, z.object({ +export const InstanceCreateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ @@ -5056,740 +2758,758 @@ export const SnapshotCreateParams = z.preprocess(processResponseBody, z.object({ }), })) -export const SnapshotViewParams = z.preprocess(processResponseBody, z.object({ +export const InstanceViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - snapshot: NameOrId, + instance: NameOrId, }), query: z.object({ project: NameOrId.optional(), }), })) -export const SnapshotDeleteParams = z.preprocess(processResponseBody, z.object({ +export const InstanceDeleteParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - snapshot: NameOrId, + instance: NameOrId, }), query: z.object({ project: NameOrId.optional(), }), })) -export const AuditLogListParams = z.preprocess(processResponseBody, z.object({ +export const InstanceDiskListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + instance: NameOrId, }), query: z.object({ - endTime: z.coerce.date().nullable().optional(), limit: z.number().min(1).max(4294967295).nullable().optional(), pageToken: z.string().nullable().optional(), - sortBy: TimeAndIdSortMode.optional(), - startTime: z.coerce.date().optional(), + project: NameOrId.optional(), + sortBy: NameOrIdSortMode.optional(), }), })) -export const PhysicalDiskListParams = z.preprocess(processResponseBody, z.object({ +export const InstanceDiskAttachParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + instance: NameOrId, }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - sortBy: IdSortMode.optional(), + project: NameOrId.optional(), }), })) -export const PhysicalDiskViewParams = z.preprocess(processResponseBody, z.object({ +export const InstanceDiskDetachParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - diskId: z.uuid(), + instance: NameOrId, }), query: z.object({ + project: NameOrId.optional(), }), })) -export const NetworkingSwitchPortLldpNeighborsParams = z.preprocess(processResponseBody, z.object({ +export const InstanceExternalIpListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - port: Name, - rackId: z.uuid(), - switchLocation: Name, + instance: NameOrId, }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - sortBy: IdSortMode.optional(), + project: NameOrId.optional(), }), })) -export const RackListParams = z.preprocess(processResponseBody, z.object({ +export const InstanceEphemeralIpAttachParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + instance: NameOrId, }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - sortBy: IdSortMode.optional(), + project: NameOrId.optional(), }), })) -export const RackViewParams = z.preprocess(processResponseBody, z.object({ +export const InstanceEphemeralIpDetachParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - rackId: z.uuid(), + instance: NameOrId, }), query: z.object({ + project: NameOrId.optional(), }), })) -export const SledListParams = z.preprocess(processResponseBody, z.object({ +export const InstanceMigrateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + instance: NameOrId, }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - sortBy: IdSortMode.optional(), + project: NameOrId.optional(), }), })) -export const SledAddParams = z.preprocess(processResponseBody, z.object({ +export const InstanceRebootParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + instance: NameOrId, }), query: z.object({ + project: NameOrId.optional(), }), })) -export const SledViewParams = z.preprocess(processResponseBody, z.object({ +export const InstanceSerialConsoleParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - sledId: z.uuid(), + instance: NameOrId, }), query: z.object({ + fromStart: z.number().min(0).nullable().optional(), + maxBytes: z.number().min(0).nullable().optional(), + mostRecent: z.number().min(0).nullable().optional(), + project: NameOrId.optional(), }), })) -export const SledPhysicalDiskListParams = z.preprocess(processResponseBody, z.object({ +export const InstanceSerialConsoleStreamParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - sledId: z.uuid(), + instance: NameOrId, }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - sortBy: IdSortMode.optional(), + mostRecent: z.number().min(0).nullable().optional(), + project: NameOrId.optional(), }), })) -export const SledInstanceListParams = z.preprocess(processResponseBody, z.object({ +export const InstanceSshPublicKeyListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - sledId: z.uuid(), + instance: NameOrId, }), query: z.object({ limit: z.number().min(1).max(4294967295).nullable().optional(), pageToken: z.string().nullable().optional(), - sortBy: IdSortMode.optional(), + project: NameOrId.optional(), + sortBy: NameOrIdSortMode.optional(), }), })) -export const SledSetProvisionPolicyParams = z.preprocess(processResponseBody, z.object({ +export const InstanceStartParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - sledId: z.uuid(), + instance: NameOrId, }), query: z.object({ + project: NameOrId.optional(), }), })) -export const SledListUninitializedParams = z.preprocess(processResponseBody, z.object({ +export const InstanceStopParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + instance: NameOrId, }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), + project: NameOrId.optional(), }), })) -export const NetworkingSwitchPortListParams = z.preprocess(processResponseBody, z.object({ +export const ProjectIpPoolListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ limit: z.number().min(1).max(4294967295).nullable().optional(), pageToken: z.string().nullable().optional(), - sortBy: IdSortMode.optional(), - switchPortId: z.uuid().nullable().optional(), - }), -})) - -export const NetworkingSwitchPortLldpConfigViewParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - port: Name, - }), - query: z.object({ - rackId: z.uuid(), - switchLocation: Name, - }), -})) - -export const NetworkingSwitchPortLldpConfigUpdateParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - port: Name, - }), - query: z.object({ - rackId: z.uuid(), - switchLocation: Name, - }), -})) - -export const NetworkingSwitchPortApplySettingsParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - port: Name, - }), - query: z.object({ - rackId: z.uuid(), - switchLocation: Name, + sortBy: NameOrIdSortMode.optional(), }), })) -export const NetworkingSwitchPortClearSettingsParams = z.preprocess(processResponseBody, z.object({ +export const ProjectIpPoolViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - port: Name, + pool: NameOrId, }), query: z.object({ - rackId: z.uuid(), - switchLocation: Name, }), })) -export const NetworkingSwitchPortStatusParams = z.preprocess(processResponseBody, z.object({ +export const LoginLocalParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - port: Name, + siloName: Name, }), query: z.object({ - rackId: z.uuid(), - switchLocation: Name, }), })) -export const SwitchListParams = z.preprocess(processResponseBody, z.object({ +export const LogoutParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - sortBy: IdSortMode.optional(), }), })) -export const SwitchViewParams = z.preprocess(processResponseBody, z.object({ +export const CurrentUserViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - switchId: z.uuid(), }), query: z.object({ }), })) -export const SiloIdentityProviderListParams = z.preprocess(processResponseBody, z.object({ +export const CurrentUserGroupsParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ limit: z.number().min(1).max(4294967295).nullable().optional(), pageToken: z.string().nullable().optional(), - silo: NameOrId.optional(), - sortBy: NameOrIdSortMode.optional(), + sortBy: IdSortMode.optional(), }), })) -export const LocalIdpUserCreateParams = z.preprocess(processResponseBody, z.object({ +export const CurrentUserSshKeyListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ - silo: NameOrId, + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + sortBy: NameOrIdSortMode.optional(), }), })) -export const LocalIdpUserDeleteParams = z.preprocess(processResponseBody, z.object({ +export const CurrentUserSshKeyCreateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - userId: z.uuid(), }), query: z.object({ - silo: NameOrId, }), })) -export const LocalIdpUserSetPasswordParams = z.preprocess(processResponseBody, z.object({ +export const CurrentUserSshKeyViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - userId: z.uuid(), + sshKey: NameOrId, }), query: z.object({ - silo: NameOrId, }), })) -export const SamlIdentityProviderCreateParams = z.preprocess(processResponseBody, z.object({ +export const CurrentUserSshKeyDeleteParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + sshKey: NameOrId, }), query: z.object({ - silo: NameOrId, }), })) -export const SamlIdentityProviderViewParams = z.preprocess(processResponseBody, z.object({ +export const SiloMetricParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - provider: NameOrId, + metricName: SystemMetricName, }), query: z.object({ - silo: NameOrId.optional(), + endTime: z.coerce.date().optional(), + limit: z.number().min(1).max(4294967295).nullable().optional(), + order: PaginationOrder.optional(), + pageToken: z.string().nullable().optional(), + startTime: z.coerce.date().optional(), + project: NameOrId.optional(), }), })) -export const IpPoolListParams = z.preprocess(processResponseBody, z.object({ +export const InstanceNetworkInterfaceListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ + instance: NameOrId.optional(), limit: z.number().min(1).max(4294967295).nullable().optional(), pageToken: z.string().nullable().optional(), + project: NameOrId.optional(), sortBy: NameOrIdSortMode.optional(), }), })) -export const IpPoolCreateParams = z.preprocess(processResponseBody, z.object({ +export const InstanceNetworkInterfaceCreateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ + instance: NameOrId, + project: NameOrId.optional(), }), })) -export const IpPoolViewParams = z.preprocess(processResponseBody, z.object({ +export const InstanceNetworkInterfaceViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - pool: NameOrId, + interface: NameOrId, }), query: z.object({ + instance: NameOrId.optional(), + project: NameOrId.optional(), }), })) -export const IpPoolUpdateParams = z.preprocess(processResponseBody, z.object({ +export const InstanceNetworkInterfaceUpdateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - pool: NameOrId, + interface: NameOrId, }), query: z.object({ + instance: NameOrId.optional(), + project: NameOrId.optional(), }), })) -export const IpPoolDeleteParams = z.preprocess(processResponseBody, z.object({ +export const InstanceNetworkInterfaceDeleteParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - pool: NameOrId, + interface: NameOrId, }), query: z.object({ + instance: NameOrId.optional(), + project: NameOrId.optional(), }), })) -export const IpPoolRangeListParams = z.preprocess(processResponseBody, z.object({ +export const PingParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - pool: NameOrId, }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), }), })) -export const IpPoolRangeAddParams = z.preprocess(processResponseBody, z.object({ +export const PolicyViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - pool: NameOrId, }), query: z.object({ }), })) -export const IpPoolRangeRemoveParams = z.preprocess(processResponseBody, z.object({ +export const PolicyUpdateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - pool: NameOrId, }), query: z.object({ }), })) -export const IpPoolSiloListParams = z.preprocess(processResponseBody, z.object({ +export const ProjectListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - pool: NameOrId, }), query: z.object({ limit: z.number().min(1).max(4294967295).nullable().optional(), pageToken: z.string().nullable().optional(), - sortBy: IdSortMode.optional(), + sortBy: NameOrIdSortMode.optional(), }), })) -export const IpPoolSiloLinkParams = z.preprocess(processResponseBody, z.object({ +export const ProjectCreateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - pool: NameOrId, }), query: z.object({ }), })) -export const IpPoolSiloUpdateParams = z.preprocess(processResponseBody, z.object({ +export const ProjectViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - pool: NameOrId, - silo: NameOrId, + project: NameOrId, }), query: z.object({ }), })) -export const IpPoolSiloUnlinkParams = z.preprocess(processResponseBody, z.object({ +export const ProjectUpdateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - pool: NameOrId, - silo: NameOrId, + project: NameOrId, }), query: z.object({ }), })) -export const IpPoolUtilizationViewParams = z.preprocess(processResponseBody, z.object({ +export const ProjectDeleteParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - pool: NameOrId, + project: NameOrId, }), query: z.object({ }), })) -export const IpPoolServiceViewParams = z.preprocess(processResponseBody, z.object({ +export const ProjectPolicyViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + project: NameOrId, }), query: z.object({ }), })) -export const IpPoolServiceRangeListParams = z.preprocess(processResponseBody, z.object({ +export const ProjectPolicyUpdateParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + project: NameOrId, + }), + query: z.object({ + }), +})) + +export const SnapshotListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ limit: z.number().min(1).max(4294967295).nullable().optional(), pageToken: z.string().nullable().optional(), + project: NameOrId.optional(), + sortBy: NameOrIdSortMode.optional(), }), })) -export const IpPoolServiceRangeAddParams = z.preprocess(processResponseBody, z.object({ +export const SnapshotCreateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ + project: NameOrId, }), })) -export const IpPoolServiceRangeRemoveParams = z.preprocess(processResponseBody, z.object({ +export const SnapshotViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + snapshot: NameOrId, }), query: z.object({ + project: NameOrId.optional(), }), })) -export const SystemMetricParams = z.preprocess(processResponseBody, z.object({ +export const SnapshotDeleteParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - metricName: SystemMetricName, + snapshot: NameOrId, }), query: z.object({ - endTime: z.coerce.date().optional(), - limit: z.number().min(1).max(4294967295).nullable().optional(), - order: PaginationOrder.optional(), - pageToken: z.string().nullable().optional(), - startTime: z.coerce.date().optional(), - silo: NameOrId.optional(), + project: NameOrId.optional(), }), })) -export const NetworkingAddressLotListParams = z.preprocess(processResponseBody, z.object({ +export const PhysicalDiskListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ limit: z.number().min(1).max(4294967295).nullable().optional(), pageToken: z.string().nullable().optional(), - sortBy: NameOrIdSortMode.optional(), + sortBy: IdSortMode.optional(), }), })) -export const NetworkingAddressLotCreateParams = z.preprocess(processResponseBody, z.object({ +export const RackListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + sortBy: IdSortMode.optional(), }), })) -export const NetworkingAddressLotViewParams = z.preprocess(processResponseBody, z.object({ +export const RackViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - addressLot: NameOrId, + rackId: z.uuid(), }), query: z.object({ }), })) -export const NetworkingAddressLotDeleteParams = z.preprocess(processResponseBody, z.object({ +export const SledListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - addressLot: NameOrId, }), query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + sortBy: IdSortMode.optional(), }), })) -export const NetworkingAddressLotBlockListParams = z.preprocess(processResponseBody, z.object({ +export const SledAddParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - addressLot: NameOrId, }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - sortBy: IdSortMode.optional(), }), })) -export const NetworkingAllowListViewParams = z.preprocess(processResponseBody, z.object({ +export const SledViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + sledId: z.uuid(), }), query: z.object({ }), })) -export const NetworkingAllowListUpdateParams = z.preprocess(processResponseBody, z.object({ +export const SledPhysicalDiskListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + sledId: z.uuid(), }), query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + sortBy: IdSortMode.optional(), }), })) -export const NetworkingBfdDisableParams = z.preprocess(processResponseBody, z.object({ +export const SledInstanceListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + sledId: z.uuid(), }), query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + sortBy: IdSortMode.optional(), }), })) -export const NetworkingBfdEnableParams = z.preprocess(processResponseBody, z.object({ +export const SledSetProvisionPolicyParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + sledId: z.uuid(), }), query: z.object({ }), })) -export const NetworkingBfdStatusParams = z.preprocess(processResponseBody, z.object({ +export const SledListUninitializedParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), }), })) -export const NetworkingBgpConfigListParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingSwitchPortListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ limit: z.number().min(1).max(4294967295).nullable().optional(), pageToken: z.string().nullable().optional(), - sortBy: NameOrIdSortMode.optional(), + sortBy: IdSortMode.optional(), + switchPortId: z.uuid().nullable().optional(), }), })) -export const NetworkingBgpConfigCreateParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingSwitchPortApplySettingsParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + port: Name, }), query: z.object({ + rackId: z.uuid(), + switchLocation: Name, }), })) -export const NetworkingBgpConfigDeleteParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingSwitchPortClearSettingsParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + port: Name, }), query: z.object({ - nameOrId: NameOrId, + rackId: z.uuid(), + switchLocation: Name, }), })) -export const NetworkingBgpAnnounceSetListParams = z.preprocess(processResponseBody, z.object({ +export const SwitchListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ limit: z.number().min(1).max(4294967295).nullable().optional(), pageToken: z.string().nullable().optional(), - sortBy: NameOrIdSortMode.optional(), + sortBy: IdSortMode.optional(), }), })) -export const NetworkingBgpAnnounceSetUpdateParams = z.preprocess(processResponseBody, z.object({ +export const SwitchViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + switchId: z.uuid(), }), query: z.object({ }), })) -export const NetworkingBgpAnnounceSetDeleteParams = z.preprocess(processResponseBody, z.object({ +export const SiloIdentityProviderListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - announceSet: NameOrId, }), query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + silo: NameOrId.optional(), + sortBy: NameOrIdSortMode.optional(), }), })) -export const NetworkingBgpAnnouncementListParams = z.preprocess(processResponseBody, z.object({ +export const LocalIdpUserCreateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - announceSet: NameOrId, }), query: z.object({ + silo: NameOrId, }), })) -export const NetworkingBgpExportedParams = z.preprocess(processResponseBody, z.object({ +export const LocalIdpUserDeleteParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + userId: z.uuid(), }), query: z.object({ + silo: NameOrId, }), })) -export const NetworkingBgpMessageHistoryParams = z.preprocess(processResponseBody, z.object({ +export const LocalIdpUserSetPasswordParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + userId: z.uuid(), }), query: z.object({ - asn: z.number().min(0).max(4294967295), + silo: NameOrId, }), })) -export const NetworkingBgpImportedRoutesIpv4Params = z.preprocess(processResponseBody, z.object({ +export const SamlIdentityProviderCreateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ - asn: z.number().min(0).max(4294967295), + silo: NameOrId, }), })) -export const NetworkingBgpStatusParams = z.preprocess(processResponseBody, z.object({ +export const SamlIdentityProviderViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + provider: NameOrId, }), query: z.object({ + silo: NameOrId, }), })) -export const NetworkingInboundIcmpViewParams = z.preprocess(processResponseBody, z.object({ +export const IpPoolListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + sortBy: NameOrIdSortMode.optional(), }), })) -export const NetworkingInboundIcmpUpdateParams = z.preprocess(processResponseBody, z.object({ +export const IpPoolCreateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ }), })) -export const NetworkingLoopbackAddressListParams = z.preprocess(processResponseBody, z.object({ +export const IpPoolViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + pool: NameOrId, }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - sortBy: IdSortMode.optional(), }), })) -export const NetworkingLoopbackAddressCreateParams = z.preprocess(processResponseBody, z.object({ +export const IpPoolUpdateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + pool: NameOrId, }), query: z.object({ }), })) -export const NetworkingLoopbackAddressDeleteParams = z.preprocess(processResponseBody, z.object({ +export const IpPoolDeleteParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - address: z.ipv4(), - rackId: z.uuid(), - subnetMask: z.number().min(0).max(255), - switchLocation: Name, + pool: NameOrId, }), query: z.object({ }), })) -export const NetworkingSwitchPortSettingsListParams = z.preprocess(processResponseBody, z.object({ +export const IpPoolRangeListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + pool: NameOrId, }), query: z.object({ limit: z.number().min(1).max(4294967295).nullable().optional(), pageToken: z.string().nullable().optional(), - portSettings: NameOrId.optional(), - sortBy: NameOrIdSortMode.optional(), }), })) -export const NetworkingSwitchPortSettingsCreateParams = z.preprocess(processResponseBody, z.object({ +export const IpPoolRangeAddParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + pool: NameOrId, + }), + query: z.object({ + }), +})) + +export const IpPoolRangeRemoveParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + pool: NameOrId, }), query: z.object({ }), })) -export const NetworkingSwitchPortSettingsDeleteParams = z.preprocess(processResponseBody, z.object({ +export const IpPoolSiloListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + pool: NameOrId, }), query: z.object({ - portSettings: NameOrId.optional(), + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + sortBy: IdSortMode.optional(), }), })) -export const NetworkingSwitchPortSettingsViewParams = z.preprocess(processResponseBody, z.object({ +export const IpPoolSiloLinkParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - port: NameOrId, + pool: NameOrId, }), query: z.object({ }), })) -export const SystemPolicyViewParams = z.preprocess(processResponseBody, z.object({ +export const IpPoolSiloUpdateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + pool: NameOrId, + silo: NameOrId, }), query: z.object({ }), })) -export const SystemPolicyUpdateParams = z.preprocess(processResponseBody, z.object({ +export const IpPoolSiloUnlinkParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + pool: NameOrId, + silo: NameOrId, }), query: z.object({ }), })) -export const ScimTokenListParams = z.preprocess(processResponseBody, z.object({ +export const IpPoolServiceViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ - silo: NameOrId, }), })) -export const ScimTokenCreateParams = z.preprocess(processResponseBody, z.object({ +export const IpPoolServiceRangeListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ - silo: NameOrId, + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), }), })) -export const ScimTokenViewParams = z.preprocess(processResponseBody, z.object({ +export const IpPoolServiceRangeAddParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - tokenId: z.uuid(), }), query: z.object({ - silo: NameOrId, }), })) -export const ScimTokenDeleteParams = z.preprocess(processResponseBody, z.object({ +export const IpPoolServiceRangeRemoveParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - tokenId: z.uuid(), }), query: z.object({ - silo: NameOrId, }), })) -export const SystemQuotasListParams = z.preprocess(processResponseBody, z.object({ +export const SystemMetricParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + metricName: SystemMetricName, }), query: z.object({ + endTime: z.coerce.date().optional(), limit: z.number().min(1).max(4294967295).nullable().optional(), + order: PaginationOrder.optional(), pageToken: z.string().nullable().optional(), - sortBy: IdSortMode.optional(), + startTime: z.coerce.date().optional(), + silo: NameOrId.optional(), }), })) -export const SiloListParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingAddressLotListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ @@ -5799,403 +3519,385 @@ export const SiloListParams = z.preprocess(processResponseBody, z.object({ }), })) -export const SiloCreateParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingAddressLotCreateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ }), })) -export const SiloViewParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingAddressLotDeleteParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - silo: NameOrId, + addressLot: NameOrId, }), query: z.object({ }), })) -export const SiloDeleteParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingAddressLotBlockListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - silo: NameOrId, + addressLot: NameOrId, }), query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + sortBy: IdSortMode.optional(), }), })) -export const SiloIpPoolListParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingBfdDisableParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - silo: NameOrId, }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - sortBy: NameOrIdSortMode.optional(), }), })) -export const SiloPolicyViewParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingBfdEnableParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - silo: NameOrId, }), query: z.object({ }), })) -export const SiloPolicyUpdateParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingBfdStatusParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - silo: NameOrId, }), query: z.object({ }), })) -export const SiloQuotasViewParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingBgpConfigListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - silo: NameOrId, }), query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + nameOrId: NameOrId.optional(), + pageToken: z.string().nullable().optional(), + sortBy: NameOrIdSortMode.optional(), }), })) -export const SiloQuotasUpdateParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingBgpConfigCreateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - silo: NameOrId, }), query: z.object({ }), })) -export const SystemTimeseriesQueryParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingBgpConfigDeleteParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ + nameOrId: NameOrId, }), })) -export const SystemTimeseriesSchemaListParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingBgpAnnounceSetListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), + nameOrId: NameOrId, }), })) -export const SystemUpdateRepositoryListParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingBgpAnnounceSetCreateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - sortBy: VersionSortMode.optional(), }), })) -export const SystemUpdateRepositoryUploadParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingBgpAnnounceSetDeleteParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ - fileName: z.string(), + nameOrId: NameOrId, }), })) -export const SystemUpdateRepositoryViewParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingBgpImportedRoutesIpv4Params = z.preprocess(processResponseBody, z.object({ path: z.object({ - systemVersion: z.string().regex(/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/), }), query: z.object({ + asn: z.number().min(0).max(4294967295), }), })) -export const SystemUpdateStatusParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingBgpStatusParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ }), })) -export const TargetReleaseUpdateParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingLoopbackAddressListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + sortBy: IdSortMode.optional(), }), })) -export const SystemUpdateTrustRootListParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingLoopbackAddressCreateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - sortBy: IdSortMode.optional(), }), })) -export const SystemUpdateTrustRootCreateParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingLoopbackAddressDeleteParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + address: z.ipv4(), + rackId: z.uuid(), + subnetMask: z.number().min(0).max(255), + switchLocation: Name, }), query: z.object({ }), })) -export const SystemUpdateTrustRootViewParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingSwitchPortSettingsListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - trustRootId: z.uuid(), }), query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + portSettings: NameOrId.optional(), + sortBy: NameOrIdSortMode.optional(), }), })) -export const SystemUpdateTrustRootDeleteParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingSwitchPortSettingsCreateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - trustRootId: z.uuid(), }), query: z.object({ }), })) -export const SiloUserListParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingSwitchPortSettingsDeleteParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - silo: NameOrId.optional(), - sortBy: IdSortMode.optional(), + portSettings: NameOrId.optional(), }), })) -export const SiloUserViewParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingSwitchPortSettingsViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - userId: z.uuid(), + port: NameOrId, }), query: z.object({ - silo: NameOrId, }), })) -export const UserBuiltinListParams = z.preprocess(processResponseBody, z.object({ +export const SystemPolicyViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - sortBy: NameSortMode.optional(), }), })) -export const UserBuiltinViewParams = z.preprocess(processResponseBody, z.object({ +export const SystemPolicyUpdateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - user: NameOrId, }), query: z.object({ }), })) -export const SiloUtilizationListParams = z.preprocess(processResponseBody, z.object({ +export const RoleListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ limit: z.number().min(1).max(4294967295).nullable().optional(), pageToken: z.string().nullable().optional(), - sortBy: NameOrIdSortMode.optional(), }), })) -export const SiloUtilizationViewParams = z.preprocess(processResponseBody, z.object({ +export const RoleViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - silo: NameOrId, + roleName: z.string(), }), query: z.object({ }), })) -export const TimeseriesQueryParams = z.preprocess(processResponseBody, z.object({ +export const SystemQuotasListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ - project: NameOrId, + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + sortBy: IdSortMode.optional(), }), })) -export const UserListParams = z.preprocess(processResponseBody, z.object({ +export const SiloListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ - group: z.uuid().nullable().optional(), limit: z.number().min(1).max(4294967295).nullable().optional(), pageToken: z.string().nullable().optional(), - sortBy: IdSortMode.optional(), + sortBy: NameOrIdSortMode.optional(), }), })) -export const UserViewParams = z.preprocess(processResponseBody, z.object({ +export const SiloCreateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - userId: z.uuid(), }), query: z.object({ }), })) -export const UserTokenListParams = z.preprocess(processResponseBody, z.object({ +export const SiloViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - userId: z.uuid(), + silo: NameOrId, }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - sortBy: IdSortMode.optional(), }), })) -export const UserLogoutParams = z.preprocess(processResponseBody, z.object({ +export const SiloDeleteParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - userId: z.uuid(), + silo: NameOrId, }), query: z.object({ }), })) -export const UserSessionListParams = z.preprocess(processResponseBody, z.object({ +export const SiloIpPoolListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - userId: z.uuid(), + silo: NameOrId, }), query: z.object({ limit: z.number().min(1).max(4294967295).nullable().optional(), pageToken: z.string().nullable().optional(), - sortBy: IdSortMode.optional(), + sortBy: NameOrIdSortMode.optional(), }), })) -export const UtilizationViewParams = z.preprocess(processResponseBody, z.object({ +export const SiloPolicyViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + silo: NameOrId, }), query: z.object({ }), })) -export const VpcFirewallRulesViewParams = z.preprocess(processResponseBody, z.object({ +export const SiloPolicyUpdateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + silo: NameOrId, }), query: z.object({ - project: NameOrId.optional(), - vpc: NameOrId, }), })) -export const VpcFirewallRulesUpdateParams = z.preprocess(processResponseBody, z.object({ +export const SiloQuotasViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + silo: NameOrId, }), query: z.object({ - project: NameOrId.optional(), - vpc: NameOrId, }), })) -export const VpcRouterRouteListParams = z.preprocess(processResponseBody, z.object({ +export const SiloQuotasUpdateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + silo: NameOrId, }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - project: NameOrId.optional(), - router: NameOrId.optional(), - sortBy: NameOrIdSortMode.optional(), - vpc: NameOrId.optional(), }), })) -export const VpcRouterRouteCreateParams = z.preprocess(processResponseBody, z.object({ +export const SiloUserListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ - project: NameOrId.optional(), - router: NameOrId, - vpc: NameOrId.optional(), + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + silo: NameOrId.optional(), + sortBy: IdSortMode.optional(), }), })) -export const VpcRouterRouteViewParams = z.preprocess(processResponseBody, z.object({ +export const SiloUserViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - route: NameOrId, + userId: z.uuid(), }), query: z.object({ - project: NameOrId.optional(), - router: NameOrId.optional(), - vpc: NameOrId.optional(), + silo: NameOrId, }), })) -export const VpcRouterRouteUpdateParams = z.preprocess(processResponseBody, z.object({ +export const UserBuiltinListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - route: NameOrId, }), query: z.object({ - project: NameOrId.optional(), - router: NameOrId.optional(), - vpc: NameOrId.optional(), + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + sortBy: NameSortMode.optional(), }), })) -export const VpcRouterRouteDeleteParams = z.preprocess(processResponseBody, z.object({ +export const UserBuiltinViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - route: NameOrId, + user: NameOrId, }), query: z.object({ - project: NameOrId.optional(), - router: NameOrId.optional(), - vpc: NameOrId.optional(), }), })) -export const VpcRouterListParams = z.preprocess(processResponseBody, z.object({ +export const SiloUtilizationListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ limit: z.number().min(1).max(4294967295).nullable().optional(), pageToken: z.string().nullable().optional(), - project: NameOrId.optional(), sortBy: NameOrIdSortMode.optional(), - vpc: NameOrId.optional(), }), })) -export const VpcRouterCreateParams = z.preprocess(processResponseBody, z.object({ +export const SiloUtilizationViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + silo: NameOrId, }), query: z.object({ - project: NameOrId.optional(), - vpc: NameOrId, }), })) -export const VpcRouterViewParams = z.preprocess(processResponseBody, z.object({ +export const UserListParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + }), + query: z.object({ + group: z.uuid().nullable().optional(), + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + sortBy: IdSortMode.optional(), + }), +})) + +export const UtilizationViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - router: NameOrId, }), query: z.object({ - project: NameOrId.optional(), - vpc: NameOrId.optional(), }), })) -export const VpcRouterUpdateParams = z.preprocess(processResponseBody, z.object({ +export const VpcFirewallRulesViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - router: NameOrId, }), query: z.object({ project: NameOrId.optional(), - vpc: NameOrId.optional(), + vpc: NameOrId, }), })) -export const VpcRouterDeleteParams = z.preprocess(processResponseBody, z.object({ +export const VpcFirewallRulesUpdateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - router: NameOrId, }), query: z.object({ project: NameOrId.optional(), - vpc: NameOrId.optional(), + vpc: NameOrId, }), })) @@ -6309,42 +4011,3 @@ export const VpcDeleteParams = z.preprocess(processResponseBody, z.object({ }), })) -export const WebhookReceiverCreateParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - }), - query: z.object({ - }), -})) - -export const WebhookReceiverUpdateParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - receiver: NameOrId, - }), - query: z.object({ - }), -})) - -export const WebhookSecretsListParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - }), - query: z.object({ - receiver: NameOrId, - }), -})) - -export const WebhookSecretsAddParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - }), - query: z.object({ - receiver: NameOrId, - }), -})) - -export const WebhookSecretsDeleteParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - secretId: z.uuid(), - }), - query: z.object({ - }), -})) - diff --git a/oxide-openapi-gen-ts/src/schema/types.test.ts b/oxide-openapi-gen-ts/src/schema/types.test.ts index 000bd59..a658219 100644 --- a/oxide-openapi-gen-ts/src/schema/types.test.ts +++ b/oxide-openapi-gen-ts/src/schema/types.test.ts @@ -39,6 +39,7 @@ test("Disk", () => { /** human-readable free-form text about a resource */ description: string; devicePath: string; + diskType: DiskType; /** unique, immutable, system-controlled identifier for each resource */ id: string; /** ID of image from which disk was created, if any */ diff --git a/tools/gen.sh b/tools/gen.sh index 99bd85f..e3c8f62 100755 --- a/tools/gen.sh +++ b/tools/gen.sh @@ -25,10 +25,13 @@ ROOT_DIR="$(dirname "$0")/.." OMICRON_SHA=$(cat "$ROOT_DIR/OMICRON_VERSION") DEST_DIR="$ROOT_DIR/oxide-api/src" -SPEC_URL="https://raw.githubusercontent.com/oxidecomputer/omicron/$OMICRON_SHA/openapi/nexus.json" +SPEC_LATEST_URL="https://raw.githubusercontent.com/oxidecomputer/omicron/$OMICRON_SHA/openapi/nexus/nexus-latest.json" SPEC_FILE="./spec.json" # TODO: we could get rid of this DL if a test didn't rely on it +# nexus-latest.json is a symlink that contains the actual spec filename +SPEC_FILENAME=$(curl --fail "$SPEC_LATEST_URL") +SPEC_URL="https://raw.githubusercontent.com/oxidecomputer/omicron/$OMICRON_SHA/openapi/nexus/$SPEC_FILENAME" curl --fail "$SPEC_URL" -o $SPEC_FILE rm -f "$DEST_DIR/*" # remove after we add --clean flag to generator From c293fccb997c0181f1116027ecde9b4c4f6274b1 Mon Sep 17 00:00:00 2001 From: David Crespo Date: Thu, 8 Jan 2026 13:09:01 -0600 Subject: [PATCH 02/17] update snapshot --- oxide-openapi-gen-ts/src/__snapshots__/Api.ts | 7055 ++++++++++++++--- .../src/__snapshots__/msw-handlers.ts | 398 +- .../src/__snapshots__/type-test.ts | 194 +- .../src/__snapshots__/validate.ts | 6392 ++++++++++----- 4 files changed, 10956 insertions(+), 3083 deletions(-) diff --git a/oxide-openapi-gen-ts/src/__snapshots__/Api.ts b/oxide-openapi-gen-ts/src/__snapshots__/Api.ts index 14d8c98..b15ebb7 100644 --- a/oxide-openapi-gen-ts/src/__snapshots__/Api.ts +++ b/oxide-openapi-gen-ts/src/__snapshots__/Api.ts @@ -9,7 +9,7 @@ /** * An IPv4 subnet * -* An IPv4 subnet, including prefix and subnet mask +* An IPv4 subnet, including prefix and prefix length */ export type Ipv4Net = string; @@ -30,7 +30,7 @@ export type IpNet = /** * 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 though they may contain a UUID. +* 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; @@ -48,7 +48,9 @@ export type Address = /** The address and prefix length of this address. */ "address": IpNet, /** The address lot this address is drawn from. */ -"addressLot": NameOrId,}; +"addressLot": NameOrId, +/** Optional VLAN ID for this address */ +"vlanId"?: number | null,}; /** * A set of addresses associated with a port configuration. @@ -56,7 +58,9 @@ export type Address = export type AddressConfig = { /** The set of addresses assigned to the port configuration. */ -"addresses": (Address)[],}; +"addresses": (Address)[], +/** Link to assign the addresses to. On ports that are not broken out, this is always phy0. On a 2x breakout the options are phy0 and phy1, on 4x phy0-phy3, etc. */ +"linkName": Name,}; /** * The kind associated with an address lot. @@ -151,148 +155,182 @@ export type AddressLotResultsPage = "nextPage"?: string | null,}; /** -* Properties that uniquely identify an Oxide hardware component +* An address lot and associated blocks resulting from viewing an address lot. */ -export type Baseboard = -{"part": string,"revision": number,"serial": string,}; +export type AddressLotViewResponse = +{ +/** The address lot blocks. */ +"blocks": (AddressLotBlock)[], +/** The address lot. */ +"lot": AddressLot,}; -export type BfdMode = -"single_hop" -| "multi_hop" +/** +* The IP address version. + */ +export type IpVersion = +"v4" +| "v6" ; /** -* Information needed to disable a BFD session +* Specify which IP pool to allocate from. */ -export type BfdSessionDisable = -{ -/** Address of the remote peer to disable a BFD session for. */ -"remote": string, -/** The switch to enable this session on. Must be `switch0` or `switch1`. */ -"switch": Name,}; +export type PoolSelector = +(/** Use the specified pool by name or ID. */ +| { +/** The pool to allocate from. */ +"pool": NameOrId,"type": "explicit" +,} +/** Use the default pool for the silo. */ +| { +/** IP version to use when multiple default pools exist. Required if both IPv4 and IPv6 default pools are configured. */ +"ipVersion"?: IpVersion | null,"type": "auto" +,} +); /** -* Information about a bidirectional forwarding detection (BFD) session. +* Specify how to allocate a floating IP address. */ -export type BfdSessionEnable = -{ -/** The negotiated Control packet transmission interval, multiplied by this variable, will be the Detection Time for this session (as seen by the remote system) */ -"detectionThreshold": number, -/** Address the Oxide switch will listen on for BFD traffic. If `None` then the unspecified address (0.0.0.0 or ::) is used. */ -"local"?: string | null, -/** Select either single-hop (RFC 5881) or multi-hop (RFC 5883) */ -"mode": BfdMode, -/** Address of the remote peer to establish a BFD session with. */ -"remote": string, -/** The minimum interval, in microseconds, between received BFD Control packets that this system requires */ -"requiredRx": number, -/** The switch to enable this session on. Must be `switch0` or `switch1`. */ -"switch": Name,}; +export type AddressSelector = +(/** Reserve a specific IP address. */ +| { +/** The IP address to reserve. Must be available in the pool. */ +"ip": string, +/** The pool containing this address. If not specified, the default pool for the address's IP version is used. */ +"pool"?: NameOrId | null,"type": "explicit" +,} +/** Automatically allocate an IP address from a specified pool. */ +| { +/** Pool selection. -export type BfdState = -(/** A stable down state. Non-responsive to incoming messages. */ -| "admin_down" +If omitted, this field uses the silo's default pool. If the silo has default pools for both IPv4 and IPv6, the request will fail unless `ip_version` is specified in the pool selector. */ +"poolSelector"?: PoolSelector,"type": "auto" +,} +); -/** The initial state. */ -| "down" +/** +* Describes the scope of affinity for the purposes of co-location. + */ +export type FailureDomain = +"sled" +; -/** The peer has detected a remote peer in the down state. */ -| "init" +/** +* Affinity policy used to describe "what to do when a request cannot be satisfied" +* +* Used for both Affinity and Anti-Affinity Groups + */ +export type AffinityPolicy = +(/** If the affinity request cannot be satisfied, allow it anyway. -/** The peer has detected a remote peer in the up or init state while in the init state. */ -| "up" +This enables a "best-effort" attempt to satisfy the affinity policy. */ +| "allow" -); +/** If the affinity request cannot be satisfied, fail explicitly. */ +| "fail" -export type BfdStatus = -{"detectionThreshold": number,"local"?: string | null,"mode": BfdMode,"peer": string,"requiredRx": number,"state": BfdState,"switch": Name,}; +); /** -* Represents a BGP announce set by id. The id can be used with other API calls to view and manage the announce set. +* View of an Affinity Group */ -export type BgpAnnounceSet = +export type AffinityGroup = { /** human-readable free-form text about a resource */ -"description": string, +"description": string,"failureDomain": FailureDomain, /** unique, immutable, system-controlled identifier for each resource */ "id": string, /** unique, mutable, user-controlled identifier for each resource */ -"name": Name, +"name": Name,"policy": AffinityPolicy,"projectId": string, /** timestamp when this resource was created */ "timeCreated": Date, /** timestamp when this resource was last modified */ "timeModified": Date,}; /** -* A BGP announcement tied to a particular address lot block. +* Create-time parameters for an `AffinityGroup` */ -export type BgpAnnouncementCreate = -{ -/** Address lot this announcement is drawn from. */ -"addressLotBlock": NameOrId, -/** The network being announced. */ -"network": IpNet,}; +export type AffinityGroupCreate = +{"description": string,"failureDomain": FailureDomain,"name": Name,"policy": AffinityPolicy,}; /** -* Parameters for creating a named set of BGP announcements. +* 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 BgpAnnounceSetCreate = -{ -/** The announcements in this set. */ -"announcement": (BgpAnnouncementCreate)[],"description": string,"name": Name,}; +export type InstanceState = +(/** The instance is being created. */ +| "creating" -/** -* A BGP announcement tied to an address lot block. - */ -export type BgpAnnouncement = -{ -/** The address block the IP network being announced is drawn from. */ -"addressLotBlockId": string, -/** The id of the set this announcement is a part of. */ -"announceSetId": string, -/** The IP network being announced. */ -"network": IpNet,}; +/** 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" + +); /** -* A base BGP configuration. +* A member of an Affinity Group +* +* Membership in a group is not exclusive - members may belong to multiple affinity / anti-affinity groups. +* +* Affinity Groups can contain up to 32 members. */ -export type BgpConfig = -{ -/** The autonomous system number of this BGP configuration. */ -"asn": number, -/** human-readable free-form text about a resource */ -"description": string, -/** unique, immutable, system-controlled identifier for each resource */ -"id": string, -/** unique, mutable, user-controlled identifier for each resource */ -"name": Name, -/** timestamp when this resource was created */ -"timeCreated": Date, -/** timestamp when this resource was last modified */ -"timeModified": Date, -/** Optional virtual routing and forwarding identifier for this BGP configuration. */ -"vrf"?: string | null,}; +export type AffinityGroupMember = +{"type": "instance" +,"value": {"id": string,"name": Name,"runState": InstanceState,},}; /** -* Parameters for creating a BGP configuration. This includes and autonomous system number (ASN) and a virtual routing and forwarding (VRF) identifier. +* A single page of results */ -export type BgpConfigCreate = +export type AffinityGroupMemberResultsPage = { -/** The autonomous system number of this BGP configuration. */ -"asn": number,"bgpAnnounceSetId": NameOrId,"description": string,"name": Name, -/** Optional virtual routing and forwarding identifier for this BGP configuration. */ -"vrf"?: Name | null,}; +/** list of items on this page of results */ +"items": (AffinityGroupMember)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; /** * A single page of results */ -export type BgpConfigResultsPage = +export type AffinityGroupResultsPage = { /** list of items on this page of results */ -"items": (BgpConfig)[], +"items": (AffinityGroup)[], /** token used to fetch the next page of results (if any) */ "nextPage"?: string | null,}; +/** +* Updateable properties of an `AffinityGroup` + */ +export type AffinityGroupUpdate = +{"description"?: string | null,"name"?: Name | null,}; + +export type BgpMessageHistory = +Record; + /** * Identifies switch physical location */ @@ -306,603 +344,1469 @@ export type SwitchLocation = ); /** -* A route imported from a BGP peer. +* BGP message history for a particular switch. */ -export type BgpImportedRouteIpv4 = +export type SwitchBgpHistory = { -/** BGP identifier of the originating router. */ -"id": number, -/** The nexthop the prefix is reachable through. */ -"nexthop": string, -/** The destination network prefix. */ -"prefix": Ipv4Net, -/** Switch the route is imported into. */ +/** Message history indexed by peer address. */ +"history": Record, +/** Switch this message history is associated with. */ "switch": SwitchLocation,}; /** -* 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. +* BGP message history for rack switches. */ -export type BgpPeer = +export type AggregateBgpMessageHistory = { -/** The address of the host to peer with. */ -"addr": string, -/** The set of announcements advertised by the peer. */ -"bgpAnnounceSet": NameOrId, -/** The global BGP configuration used for establishing a session with this peer. */ -"bgpConfig": NameOrId, -/** How long to to wait between TCP connection retries (seconds). */ -"connectRetry": number, -/** How long to delay sending an open request after establishing a TCP session (seconds). */ -"delayOpen": number, -/** How long to hold peer connections between keppalives (seconds). */ -"holdTime": number, -/** How long to hold a peer in idle before attempting a new session (seconds). */ -"idleHoldTime": number, -/** The name of interface to peer on. This is relative to the port configuration this BGP peer configuration is a part of. For example this value could be phy0 to refer to a primary physical interface. Or it could be vlan47 to refer to a VLAN interface. */ -"interfaceName": string, -/** How often to send keepalive requests (seconds). */ -"keepalive": number,}; - -export type BgpPeerConfig = -{"peers": (BgpPeer)[],}; +/** BGP history organized by switch. */ +"switchHistories": (SwitchBgpHistory)[],}; /** -* The current state of a BGP peer. +* An alert class. */ -export type BgpPeerState = -(/** Initial state. Refuse all incomming BGP connections. No resources allocated to peer. */ -| "idle" +export type AlertClass = +{ +/** A description of what this alert class represents. */ +"description": string, +/** The name of the alert class. */ +"name": string,}; -/** Waiting for the TCP connection to be completed. */ -| "connect" +/** +* A single page of results + */ +export type AlertClassResultsPage = +{ +/** list of items on this page of results */ +"items": (AlertClass)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; -/** Trying to acquire peer by listening for and accepting a TCP connection. */ -| "active" +/** +* The response received from a webhook receiver endpoint. + */ +export type WebhookDeliveryResponse = +{ +/** The response time of the webhook endpoint, in milliseconds. */ +"durationMs": number, +/** The HTTP status code returned from the webhook endpoint. */ +"status": number,}; -/** Waiting for open message from peer. */ -| "open_sent" +export type WebhookDeliveryAttemptResult = +(/** The webhook event has been delivered successfully. */ +| "succeeded" -/** Waiting for keepaliave or notification from peer. */ -| "open_confirm" +/** A webhook request was sent to the endpoint, and it returned a HTTP error status code indicating an error. */ +| "failed_http_error" -/** Synchronizing with peer. */ -| "session_setup" +/** The webhook request could not be sent to the receiver endpoint. */ +| "failed_unreachable" -/** Session established. Able to exchange update, notification and keepliave messages with peers. */ -| "established" +/** A connection to the receiver endpoint was successfully established, but no response was received within the delivery timeout. */ +| "failed_timeout" ); /** -* The current status of a BGP peer. +* An individual delivery attempt for a webhook event. +* +* This represents a single HTTP request that was sent to the receiver, and its outcome. */ -export type BgpPeerStatus = +export type WebhookDeliveryAttempt = { -/** IP address of the peer. */ -"addr": string, -/** Local autonomous system number. */ -"localAsn": number, -/** Remote autonomous system number. */ -"remoteAsn": number, -/** State of the peer. */ -"state": BgpPeerState, -/** Time of last state change. */ -"stateDurationMillis": number, -/** Switch with the peer session. */ -"switch": SwitchLocation,}; +/** The attempt number. */ +"attempt": number,"response"?: WebhookDeliveryResponse | null, +/** The outcome of this delivery attempt: either the event was delivered successfully, or the request failed for one of several reasons. */ +"result": WebhookDeliveryAttemptResult, +/** The time at which the webhook delivery was attempted. */ +"timeSent": Date,}; /** -* A type storing a range over `T`. +* A list of attempts to deliver an alert to a receiver. * -* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. +* The type of the delivery attempt model depends on the receiver type, as it may contain information specific to that delivery mechanism. For example, webhook delivery attempts contain the HTTP status code of the webhook request. */ -export type BinRangedouble = -(/** A range unbounded below and exclusively above, `..end`. */ -| {"end": number,"type": "range_to" -,} -/** A range bounded inclusively below and exclusively above, `start..end`. */ -| {"end": number,"start": number,"type": "range" -,} -/** A range bounded inclusively below and unbounded above, `start..`. */ -| {"start": number,"type": "range_from" -,} -); +export type AlertDeliveryAttempts = +{"webhook": (WebhookDeliveryAttempt)[],}; /** -* A type storing a range over `T`. -* -* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. +* The state of a webhook delivery attempt. */ -export type BinRangefloat = -(/** A range unbounded below and exclusively above, `..end`. */ -| {"end": number,"type": "range_to" -,} -/** A range bounded inclusively below and exclusively above, `start..end`. */ -| {"end": number,"start": number,"type": "range" -,} -/** A range bounded inclusively below and unbounded above, `start..`. */ -| {"start": number,"type": "range_from" -,} -); +export type AlertDeliveryState = +(/** The webhook event has not yet been delivered successfully. -/** -* A type storing a range over `T`. -* -* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. - */ -export type BinRangeint16 = -(/** A range unbounded below and exclusively above, `..end`. */ -| {"end": number,"type": "range_to" -,} -/** A range bounded inclusively below and exclusively above, `start..end`. */ -| {"end": number,"start": number,"type": "range" -,} -/** A range bounded inclusively below and unbounded above, `start..`. */ -| {"start": number,"type": "range_from" -,} -); +Either no delivery attempts have yet been performed, or the delivery has failed at least once but has retries remaining. */ +| "pending" -/** -* A type storing a range over `T`. -* -* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. - */ -export type BinRangeint32 = -(/** A range unbounded below and exclusively above, `..end`. */ -| {"end": number,"type": "range_to" -,} -/** A range bounded inclusively below and exclusively above, `start..end`. */ -| {"end": number,"start": number,"type": "range" -,} -/** A range bounded inclusively below and unbounded above, `start..`. */ -| {"start": number,"type": "range_from" -,} -); +/** The webhook event has been delivered successfully. */ +| "delivered" -/** -* A type storing a range over `T`. -* -* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. - */ -export type BinRangeint64 = -(/** A range unbounded below and exclusively above, `..end`. */ -| {"end": number,"type": "range_to" -,} -/** A range bounded inclusively below and exclusively above, `start..end`. */ -| {"end": number,"start": number,"type": "range" -,} -/** A range bounded inclusively below and unbounded above, `start..`. */ -| {"start": number,"type": "range_from" -,} -); +/** The webhook delivery attempt has failed permanently and will not be retried again. */ +| "failed" -/** -* A type storing a range over `T`. -* -* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. - */ -export type BinRangeint8 = -(/** A range unbounded below and exclusively above, `..end`. */ -| {"end": number,"type": "range_to" -,} -/** A range bounded inclusively below and exclusively above, `start..end`. */ -| {"end": number,"start": number,"type": "range" -,} -/** A range bounded inclusively below and unbounded above, `start..`. */ -| {"start": number,"type": "range_from" -,} ); /** -* A type storing a range over `T`. -* -* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. +* The reason an alert was delivered */ -export type BinRangeuint16 = -(/** A range unbounded below and exclusively above, `..end`. */ -| {"end": number,"type": "range_to" -,} -/** A range bounded inclusively below and exclusively above, `start..end`. */ -| {"end": number,"start": number,"type": "range" -,} -/** A range bounded inclusively below and unbounded above, `start..`. */ -| {"start": number,"type": "range_from" -,} -); +export type AlertDeliveryTrigger = +(/** Delivery was triggered by the alert itself. */ +| "alert" -/** -* A type storing a range over `T`. -* -* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. - */ -export type BinRangeuint32 = -(/** A range unbounded below and exclusively above, `..end`. */ -| {"end": number,"type": "range_to" -,} -/** A range bounded inclusively below and exclusively above, `start..end`. */ -| {"end": number,"start": number,"type": "range" -,} -/** A range bounded inclusively below and unbounded above, `start..`. */ -| {"start": number,"type": "range_from" -,} -); +/** Delivery was triggered by a request to resend the alert. */ +| "resend" -/** -* A type storing a range over `T`. -* -* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. - */ -export type BinRangeuint64 = -(/** A range unbounded below and exclusively above, `..end`. */ -| {"end": number,"type": "range_to" -,} -/** A range bounded inclusively below and exclusively above, `start..end`. */ -| {"end": number,"start": number,"type": "range" -,} -/** A range bounded inclusively below and unbounded above, `start..`. */ -| {"start": number,"type": "range_from" -,} -); +/** This delivery is a liveness probe. */ +| "probe" -/** -* A type storing a range over `T`. -* -* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. - */ -export type BinRangeuint8 = -(/** A range unbounded below and exclusively above, `..end`. */ -| {"end": number,"type": "range_to" -,} -/** A range bounded inclusively below and exclusively above, `start..end`. */ -| {"end": number,"start": number,"type": "range" -,} -/** A range bounded inclusively below and unbounded above, `start..`. */ -| {"start": number,"type": "range_from" -,} ); /** -* Type storing bin edges and a count of samples within it. +* A delivery of a webhook event. */ -export type Bindouble = +export type AlertDelivery = { -/** The total count of samples in this bin. */ -"count": number, -/** The range of the support covered by this bin. */ -"range": BinRangedouble,}; +/** The event class. */ +"alertClass": string, +/** The UUID of the event. */ +"alertId": string, +/** Individual attempts to deliver this webhook event, and their outcomes. */ +"attempts": AlertDeliveryAttempts, +/** The UUID of this delivery attempt. */ +"id": string, +/** The UUID of the alert receiver that this event was delivered to. */ +"receiverId": string, +/** The state of this delivery. */ +"state": AlertDeliveryState, +/** The time at which this delivery began (i.e. the event was dispatched to the receiver). */ +"timeStarted": Date, +/** Why this delivery was performed. */ +"trigger": AlertDeliveryTrigger,}; + +export type AlertDeliveryId = +{"deliveryId": string,}; /** -* Type storing bin edges and a count of samples within it. +* A single page of results */ -export type Binfloat = +export type AlertDeliveryResultsPage = { -/** The total count of samples in this bin. */ -"count": number, -/** The range of the support covered by this bin. */ -"range": BinRangefloat,}; +/** list of items on this page of results */ +"items": (AlertDelivery)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; /** -* Type storing bin edges and a count of samples within it. +* Data describing the result of an alert receiver liveness probe attempt. */ -export type Binint16 = +export type AlertProbeResult = { -/** The total count of samples in this bin. */ -"count": number, -/** The range of the support covered by this bin. */ -"range": BinRangeint16,}; +/** The outcome of the probe delivery. */ +"probe": AlertDelivery, +/** If the probe request succeeded, and resending failed deliveries on success was requested, the number of new delivery attempts started. Otherwise, if the probe did not succeed, or resending failed deliveries was not requested, this is null. + +Note that this may be 0, if there were no events found which had not been delivered successfully to this receiver. */ +"resendsStarted"?: number | null,}; /** -* Type storing bin edges and a count of samples within it. +* A view of a shared secret key assigned to a webhook receiver. +* +* Once a secret is created, the value of the secret is not available in the API, as it must remain secret. Instead, secrets are referenced by their unique IDs assigned when they are created. */ -export type Binint32 = +export type WebhookSecret = { -/** The total count of samples in this bin. */ -"count": number, -/** The range of the support covered by this bin. */ -"range": BinRangeint32,}; +/** The public unique ID of the secret. */ +"id": string, +/** The UTC timestamp at which this secret was created. */ +"timeCreated": Date,}; /** -* Type storing bin edges and a count of samples within it. +* The possible alert delivery mechanisms for an alert receiver. */ -export type Binint64 = +export type AlertReceiverKind = { -/** The total count of samples in this bin. */ -"count": number, -/** The range of the support covered by this bin. */ -"range": BinRangeint64,}; +/** The URL that webhook notification requests are sent to. */ +"endpoint": string,"kind": "webhook" +,"secrets": (WebhookSecret)[],}; /** -* Type storing bin edges and a count of samples within it. +* A webhook event class subscription +* +* A webhook event class subscription matches either a single event class exactly, or a glob pattern including wildcards that may match multiple event classes */ -export type Binint8 = -{ -/** The total count of samples in this bin. */ -"count": number, -/** The range of the support covered by this bin. */ -"range": BinRangeint8,}; +export type AlertSubscription = +string; /** -* Type storing bin edges and a count of samples within it. +* The configuration for an alert receiver. */ -export type Binuint16 = +export type AlertReceiver = { -/** The total count of samples in this bin. */ -"count": number, -/** The range of the support covered by this bin. */ -"range": BinRangeuint16,}; +/** human-readable free-form text about a resource */ +"description": string, +/** unique, immutable, system-controlled identifier for each resource */ +"id": string, +/** Configuration specific to the kind of alert receiver that this is. */ +"kind": AlertReceiverKind, +/** unique, mutable, user-controlled identifier for each resource */ +"name": Name, +/** The list of alert classes to which this receiver is subscribed. */ +"subscriptions": (AlertSubscription)[], +/** timestamp when this resource was created */ +"timeCreated": Date, +/** timestamp when this resource was last modified */ +"timeModified": Date,}; /** -* Type storing bin edges and a count of samples within it. +* A single page of results */ -export type Binuint32 = +export type AlertReceiverResultsPage = { -/** The total count of samples in this bin. */ -"count": number, -/** The range of the support covered by this bin. */ -"range": BinRangeuint32,}; +/** list of items on this page of results */ +"items": (AlertReceiver)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; -/** -* Type storing bin edges and a count of samples within it. - */ -export type Binuint64 = +export type AlertSubscriptionCreate = { -/** The total count of samples in this bin. */ -"count": number, -/** The range of the support covered by this bin. */ -"range": BinRangeuint64,}; +/** The event class pattern to subscribe to. */ +"subscription": AlertSubscription,}; -/** -* Type storing bin edges and a count of samples within it. - */ -export type Binuint8 = +export type AlertSubscriptionCreated = { -/** The total count of samples in this bin. */ -"count": number, -/** The range of the support covered by this bin. */ -"range": BinRangeuint8,}; +/** The new subscription added to the receiver. */ +"subscription": AlertSubscription,}; /** -* disk block size in bytes +* Description of source IPs allowed to reach rack services. */ -export type BlockSize = -512 -| 2048 -| 4096 -; +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)[],} +); /** -* Byte count to express memory or storage capacity. +* Allowlist of IPs or subnets that can make requests to user-facing services. */ -export type ByteCount = -number; +export type AllowList = +{ +/** The allowlist of IPs or subnets. */ +"allowedIps": AllowedSourceIps, +/** Time the list was created. */ +"timeCreated": Date, +/** Time the list was last modified. */ +"timeModified": Date,}; /** -* The service intended to use this certificate. +* Parameters for updating allowed source IPs */ -export type ServiceUsingCertificate = -"external_api" -; +export type AllowListUpdate = +{ +/** The new list of allowed source IPs. */ +"allowedIps": AllowedSourceIps,}; /** -* View of a Certificate +* View of an Anti-Affinity Group */ -export type Certificate = +export type AntiAffinityGroup = { /** human-readable free-form text about a resource */ -"description": string, +"description": string,"failureDomain": FailureDomain, /** unique, immutable, system-controlled identifier for each resource */ "id": string, /** unique, mutable, user-controlled identifier for each resource */ -"name": Name,"service": ServiceUsingCertificate, +"name": Name,"policy": AffinityPolicy,"projectId": string, /** timestamp when this resource was created */ "timeCreated": Date, /** timestamp when this resource was last modified */ "timeModified": Date,}; /** -* Create-time parameters for a `Certificate` +* Create-time parameters for an `AntiAffinityGroup` */ -export type CertificateCreate = -{ -/** PEM-formatted string containing public certificate chain */ -"cert": string,"description": string, -/** PEM-formatted string containing private key */ -"key": string,"name": Name, -/** The service using this certificate */ -"service": ServiceUsingCertificate,}; +export type AntiAffinityGroupCreate = +{"description": string,"failureDomain": FailureDomain,"name": Name,"policy": AffinityPolicy,}; + +/** +* A member of an Anti-Affinity Group +* +* Membership in a group is not exclusive - members may belong to multiple affinity / anti-affinity groups. +* +* Anti-Affinity Groups can contain up to 32 members. + */ +export type AntiAffinityGroupMember = +{"type": "instance" +,"value": {"id": string,"name": Name,"runState": InstanceState,},}; /** * A single page of results */ -export type CertificateResultsPage = +export type AntiAffinityGroupMemberResultsPage = { /** list of items on this page of results */ -"items": (Certificate)[], +"items": (AntiAffinityGroupMember)[], /** token used to fetch the next page of results (if any) */ "nextPage"?: string | null,}; /** -* A cumulative or counter data type. +* A single page of results */ -export type Cumulativedouble = -{"startTime": Date,"value": number,}; +export type AntiAffinityGroupResultsPage = +{ +/** list of items on this page of results */ +"items": (AntiAffinityGroup)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; /** -* A cumulative or counter data type. +* Updateable properties of an `AntiAffinityGroup` */ -export type Cumulativefloat = -{"startTime": Date,"value": number,}; +export type AntiAffinityGroupUpdate = +{"description"?: string | null,"name"?: Name | null,}; + +export type AuditLogEntryActor = +(| {"kind": "user_builtin" +,"userBuiltinId": string,} +| {"kind": "silo_user" +,"siloId": string,"siloUserId": string,} +| {"kind": "scim" +,"siloId": string,} +| {"kind": "unauthenticated" +,} +); /** -* A cumulative or counter data type. +* Result of an audit log entry */ -export type Cumulativeint64 = -{"startTime": Date,"value": number,}; +export type AuditLogEntryResult = +(/** The operation completed successfully */ +| { +/** HTTP status code */ +"httpStatusCode": number,"kind": "success" +,} +/** The operation failed */ +| {"errorCode"?: string | null,"errorMessage": string, +/** HTTP status code */ +"httpStatusCode": number,"kind": "error" +,} +/** After the logged operation completed, our attempt to write the result to the audit log failed, so it was automatically marked completed later by a background job. This does not imply that the operation itself timed out or failed, only our attempts to log its result. */ +| {"kind": "unknown" +,} +); /** -* A cumulative or counter data type. +* Audit log entry */ -export type Cumulativeuint64 = -{"startTime": Date,"value": number,}; +export type AuditLogEntry = +{"actor": AuditLogEntryActor, +/** How the user authenticated the request. Possible values are "session_cookie" and "access_token". Optional because it will not be defined on unauthenticated requests like login attempts. */ +"authMethod"?: string | null, +/** Unique identifier for the audit log entry */ +"id": string, +/** API endpoint ID, e.g., `project_create` */ +"operationId": string, +/** Request ID for tracing requests through the system */ +"requestId": string, +/** URI of the request, truncated to 512 characters. Will only include host and scheme for HTTP/2 requests. For HTTP/1.1, the URI will consist of only the path and query. */ +"requestUri": string, +/** Result of the operation */ +"result": AuditLogEntryResult, +/** IP address that made the request */ +"sourceIp": string, +/** Time operation completed */ +"timeCompleted": Date, +/** When the request was received */ +"timeStarted": Date, +/** User agent string from the request, truncated to 256 characters. */ +"userAgent"?: string | null,}; /** -* Info about the current user +* A single page of results */ -export type CurrentUser = +export type AuditLogEntryResultsPage = { -/** Human-readable name that can identify the user */ -"displayName": string,"id": string, -/** Uuid of the silo to which this user belongs */ -"siloId": string, -/** Name of the silo to which this user belongs. */ -"siloName": Name,}; +/** list of items on this page of results */ +"items": (AuditLogEntry)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; /** -* 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. +* Authorization scope for a timeseries. * -* Note that any gaps, unsorted bins, or non-finite values will result in an error. +* This describes the level at which a user must be authorized to read data from a timeseries. For example, fleet-scoping means the data is only visible to an operator or fleet reader. Project-scoped, on the other hand, indicates that a user will see data limited to the projects on which they have read permissions. */ -export type Histogramint8 = -{"bins": (Binint8)[],"nSamples": number,"startTime": Date,}; +export type AuthzScope = +(/** Timeseries data is limited to fleet readers. */ +| "fleet" + +/** Timeseries data is limited to the authorized silo for a user. */ +| "silo" + +/** Timeseries data is limited to the authorized projects for a user. */ +| "project" + +/** The timeseries is viewable to all without limitation. */ +| "viewable_to_all" + +); /** -* 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. +* Properties that uniquely identify an Oxide hardware component */ -export type Histogramuint8 = -{"bins": (Binuint8)[],"nSamples": number,"startTime": Date,}; +export type Baseboard = +{"part": string,"revision": number,"serial": 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. +* BFD connection mode. */ -export type Histogramint16 = -{"bins": (Binint16)[],"nSamples": number,"startTime": Date,}; +export type BfdMode = +"single_hop" +| "multi_hop" +; /** -* 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. +* Information needed to disable a BFD session */ -export type Histogramuint16 = -{"bins": (Binuint16)[],"nSamples": number,"startTime": Date,}; +export type BfdSessionDisable = +{ +/** Address of the remote peer to disable a BFD session for. */ +"remote": string, +/** The switch to enable this session on. Must be `switch0` or `switch1`. */ +"switch": Name,}; /** -* 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. +* Information about a bidirectional forwarding detection (BFD) session. */ -export type Histogramint32 = -{"bins": (Binint32)[],"nSamples": number,"startTime": Date,}; +export type BfdSessionEnable = +{ +/** The negotiated Control packet transmission interval, multiplied by this variable, will be the Detection Time for this session (as seen by the remote system) */ +"detectionThreshold": number, +/** Address the Oxide switch will listen on for BFD traffic. If `None` then the unspecified address (0.0.0.0 or ::) is used. */ +"local"?: string | null, +/** Select either single-hop (RFC 5881) or multi-hop (RFC 5883) */ +"mode": BfdMode, +/** Address of the remote peer to establish a BFD session with. */ +"remote": string, +/** The minimum interval, in microseconds, between received BFD Control packets that this system requires */ +"requiredRx": number, +/** The switch to enable this session on. Must be `switch0` or `switch1`. */ +"switch": Name,}; + +export type BfdState = +(/** A stable down state. Non-responsive to incoming messages. */ +| "admin_down" + +/** The initial state. */ +| "down" + +/** The peer has detected a remote peer in the down state. */ +| "init" + +/** The peer has detected a remote peer in the up or init state while in the init state. */ +| "up" + +); + +export type BfdStatus = +{"detectionThreshold": number,"local"?: string | null,"mode": BfdMode,"peer": string,"requiredRx": number,"state": BfdState,"switch": Name,}; /** -* 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. +* Represents a BGP announce set by id. The id can be used with other API calls to view and manage the announce set. */ -export type Histogramuint32 = -{"bins": (Binuint32)[],"nSamples": number,"startTime": Date,}; +export type BgpAnnounceSet = +{ +/** human-readable free-form text about a resource */ +"description": string, +/** unique, immutable, system-controlled identifier for each resource */ +"id": string, +/** unique, mutable, user-controlled identifier for each resource */ +"name": Name, +/** timestamp when this resource was created */ +"timeCreated": Date, +/** timestamp when this resource was last modified */ +"timeModified": Date,}; /** -* 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. +* A BGP announcement tied to a particular address lot block. */ -export type Histogramint64 = -{"bins": (Binint64)[],"nSamples": number,"startTime": Date,}; +export type BgpAnnouncementCreate = +{ +/** Address lot this announcement is drawn from. */ +"addressLotBlock": NameOrId, +/** The network being announced. */ +"network": IpNet,}; /** -* 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. +* Parameters for creating a named set of BGP announcements. */ -export type Histogramuint64 = -{"bins": (Binuint64)[],"nSamples": number,"startTime": Date,}; +export type BgpAnnounceSetCreate = +{ +/** The announcements in this set. */ +"announcement": (BgpAnnouncementCreate)[],"description": string,"name": Name,}; /** -* 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. +* A BGP announcement tied to an address lot block. */ -export type Histogramfloat = -{"bins": (Binfloat)[],"nSamples": number,"startTime": Date,}; +export type BgpAnnouncement = +{ +/** The address block the IP network being announced is drawn from. */ +"addressLotBlockId": string, +/** The id of the set this announcement is a part of. */ +"announceSetId": string, +/** The IP network being announced. */ +"network": IpNet,}; /** -* 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. +* A base BGP configuration. */ -export type Histogramdouble = -{"bins": (Bindouble)[],"nSamples": number,"startTime": Date,}; +export type BgpConfig = +{ +/** The autonomous system number of this BGP configuration. */ +"asn": number, +/** human-readable free-form text about a resource */ +"description": string, +/** unique, immutable, system-controlled identifier for each resource */ +"id": string, +/** unique, mutable, user-controlled identifier for each resource */ +"name": Name, +/** timestamp when this resource was created */ +"timeCreated": Date, +/** timestamp when this resource was last modified */ +"timeModified": Date, +/** Optional virtual routing and forwarding identifier for this BGP configuration. */ +"vrf"?: string | null,}; /** -* The type of an individual datum of a metric. +* Parameters for creating a BGP configuration. This includes and autonomous system number (ASN) and a virtual routing and forwarding (VRF) identifier. */ -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 BgpConfigCreate = +{ +/** The autonomous system number of this BGP configuration. */ +"asn": number,"bgpAnnounceSetId": NameOrId,"description": string,"name": Name, +/** Optional virtual routing and forwarding identifier for this BGP configuration. */ +"vrf"?: Name | null,}; -export type MissingDatum = -{"datumType": DatumType,"startTime"?: Date | null,}; +/** +* A single page of results + */ +export type BgpConfigResultsPage = +{ +/** list of items on this page of results */ +"items": (BgpConfig)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; /** -* A `Datum` is a single sampled data point from a metric. +* The current status of a BGP peer. */ -export type Datum = -(| {"datum": boolean,"type": "bool" -,} -| {"datum": number,"type": "i8" -,} -| {"datum": number,"type": "u8" -,} +export type BgpExported = +{ +/** Exported routes indexed by peer address. */ +"exports": Record,}; + +/** +* A route imported from a BGP peer. + */ +export type BgpImportedRouteIpv4 = +{ +/** BGP identifier of the originating router. */ +"id": number, +/** The nexthop the prefix is reachable through. */ +"nexthop": string, +/** The destination network prefix. */ +"prefix": Ipv4Net, +/** Switch the route is imported into. */ +"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)[],} +); + +/** +* 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. + */ +export type BgpPeer = +{ +/** The address of the host to peer with. */ +"addr": string, +/** Define export policy for a peer. */ +"allowedExport": ImportExportPolicy, +/** Define import policy for a peer. */ +"allowedImport": ImportExportPolicy, +/** The global BGP configuration used for establishing a session with this peer. */ +"bgpConfig": NameOrId, +/** Include the provided communities in updates sent to the peer. */ +"communities": (number)[], +/** How long to to wait between TCP connection retries (seconds). */ +"connectRetry": number, +/** How long to delay sending an open request after establishing a TCP session (seconds). */ +"delayOpen": number, +/** Enforce that the first AS in paths received from this peer is the peer's AS. */ +"enforceFirstAs": boolean, +/** How long to hold peer connections between keepalives (seconds). */ +"holdTime": number, +/** How long to hold a peer in idle before attempting a new session (seconds). */ +"idleHoldTime": number, +/** The name of interface to peer on. This is relative to the port configuration this BGP peer configuration is a part of. For example this value could be phy0 to refer to a primary physical interface. Or it could be vlan47 to refer to a VLAN interface. */ +"interfaceName": Name, +/** How often to send keepalive requests (seconds). */ +"keepalive": number, +/** Apply a local preference to routes received from this peer. */ +"localPref"?: number | null, +/** Use the given key for TCP-MD5 authentication with the peer. */ +"md5AuthKey"?: string | null, +/** Require messages from a peer have a minimum IP time to live field. */ +"minTtl"?: number | null, +/** Apply the provided multi-exit discriminator (MED) updates sent to the peer. */ +"multiExitDiscriminator"?: number | null, +/** Require that a peer has a specified ASN. */ +"remoteAsn"?: number | null, +/** Associate a VLAN ID with a peer. */ +"vlanId"?: number | null,}; + +export type BgpPeerConfig = +{ +/** Link that the peer is reachable on. On ports that are not broken out, this is always phy0. On a 2x breakout the options are phy0 and phy1, on 4x phy0-phy3, etc. */ +"linkName": Name,"peers": (BgpPeer)[],}; + +/** +* The current state of a BGP peer. + */ +export type BgpPeerState = +(/** Initial state. Refuse all incoming BGP connections. No resources allocated to peer. */ +| "idle" + +/** Waiting for the TCP connection to be completed. */ +| "connect" + +/** Trying to acquire peer by listening for and accepting a TCP connection. */ +| "active" + +/** Waiting for open message from peer. */ +| "open_sent" + +/** Waiting for keepaliave or notification from peer. */ +| "open_confirm" + +/** There is an ongoing Connection Collision that hasn't yet been resolved. Two connections are maintained until one connection receives an Open or is able to progress into Established. */ +| "connection_collision" + +/** Synchronizing with peer. */ +| "session_setup" + +/** Session established. Able to exchange update, notification and keepalive messages with peers. */ +| "established" + +); + +/** +* The current status of a BGP peer. + */ +export type BgpPeerStatus = +{ +/** IP address of the peer. */ +"addr": string, +/** Local autonomous system number. */ +"localAsn": number, +/** Remote autonomous system number. */ +"remoteAsn": number, +/** State of the peer. */ +"state": BgpPeerState, +/** Time of last state change. */ +"stateDurationMillis": number, +/** Switch with the peer session. */ +"switch": SwitchLocation,}; + +/** +* A type storing a range over `T`. +* +* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. + */ +export type BinRangedouble = +(/** A range unbounded below and exclusively above, `..end`. */ +| {"end": number,"type": "range_to" +,} +/** A range bounded inclusively below and exclusively above, `start..end`. */ +| {"end": number,"start": number,"type": "range" +,} +/** A range bounded inclusively below and unbounded above, `start..`. */ +| {"start": number,"type": "range_from" +,} +); + +/** +* A type storing a range over `T`. +* +* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. + */ +export type BinRangefloat = +(/** A range unbounded below and exclusively above, `..end`. */ +| {"end": number,"type": "range_to" +,} +/** A range bounded inclusively below and exclusively above, `start..end`. */ +| {"end": number,"start": number,"type": "range" +,} +/** A range bounded inclusively below and unbounded above, `start..`. */ +| {"start": number,"type": "range_from" +,} +); + +/** +* A type storing a range over `T`. +* +* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. + */ +export type BinRangeint16 = +(/** A range unbounded below and exclusively above, `..end`. */ +| {"end": number,"type": "range_to" +,} +/** A range bounded inclusively below and exclusively above, `start..end`. */ +| {"end": number,"start": number,"type": "range" +,} +/** A range bounded inclusively below and unbounded above, `start..`. */ +| {"start": number,"type": "range_from" +,} +); + +/** +* A type storing a range over `T`. +* +* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. + */ +export type BinRangeint32 = +(/** A range unbounded below and exclusively above, `..end`. */ +| {"end": number,"type": "range_to" +,} +/** A range bounded inclusively below and exclusively above, `start..end`. */ +| {"end": number,"start": number,"type": "range" +,} +/** A range bounded inclusively below and unbounded above, `start..`. */ +| {"start": number,"type": "range_from" +,} +); + +/** +* A type storing a range over `T`. +* +* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. + */ +export type BinRangeint64 = +(/** A range unbounded below and exclusively above, `..end`. */ +| {"end": number,"type": "range_to" +,} +/** A range bounded inclusively below and exclusively above, `start..end`. */ +| {"end": number,"start": number,"type": "range" +,} +/** A range bounded inclusively below and unbounded above, `start..`. */ +| {"start": number,"type": "range_from" +,} +); + +/** +* A type storing a range over `T`. +* +* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. + */ +export type BinRangeint8 = +(/** A range unbounded below and exclusively above, `..end`. */ +| {"end": number,"type": "range_to" +,} +/** A range bounded inclusively below and exclusively above, `start..end`. */ +| {"end": number,"start": number,"type": "range" +,} +/** A range bounded inclusively below and unbounded above, `start..`. */ +| {"start": number,"type": "range_from" +,} +); + +/** +* A type storing a range over `T`. +* +* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. + */ +export type BinRangeuint16 = +(/** A range unbounded below and exclusively above, `..end`. */ +| {"end": number,"type": "range_to" +,} +/** A range bounded inclusively below and exclusively above, `start..end`. */ +| {"end": number,"start": number,"type": "range" +,} +/** A range bounded inclusively below and unbounded above, `start..`. */ +| {"start": number,"type": "range_from" +,} +); + +/** +* A type storing a range over `T`. +* +* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. + */ +export type BinRangeuint32 = +(/** A range unbounded below and exclusively above, `..end`. */ +| {"end": number,"type": "range_to" +,} +/** A range bounded inclusively below and exclusively above, `start..end`. */ +| {"end": number,"start": number,"type": "range" +,} +/** A range bounded inclusively below and unbounded above, `start..`. */ +| {"start": number,"type": "range_from" +,} +); + +/** +* A type storing a range over `T`. +* +* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. + */ +export type BinRangeuint64 = +(/** A range unbounded below and exclusively above, `..end`. */ +| {"end": number,"type": "range_to" +,} +/** A range bounded inclusively below and exclusively above, `start..end`. */ +| {"end": number,"start": number,"type": "range" +,} +/** A range bounded inclusively below and unbounded above, `start..`. */ +| {"start": number,"type": "range_from" +,} +); + +/** +* A type storing a range over `T`. +* +* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. + */ +export type BinRangeuint8 = +(/** A range unbounded below and exclusively above, `..end`. */ +| {"end": number,"type": "range_to" +,} +/** A range bounded inclusively below and exclusively above, `start..end`. */ +| {"end": number,"start": number,"type": "range" +,} +/** A range bounded inclusively below and unbounded above, `start..`. */ +| {"start": number,"type": "range_from" +,} +); + +/** +* Type storing bin edges and a count of samples within it. + */ +export type Bindouble = +{ +/** The total count of samples in this bin. */ +"count": number, +/** The range of the support covered by this bin. */ +"range": BinRangedouble,}; + +/** +* Type storing bin edges and a count of samples within it. + */ +export type Binfloat = +{ +/** The total count of samples in this bin. */ +"count": number, +/** The range of the support covered by this bin. */ +"range": BinRangefloat,}; + +/** +* Type storing bin edges and a count of samples within it. + */ +export type Binint16 = +{ +/** The total count of samples in this bin. */ +"count": number, +/** The range of the support covered by this bin. */ +"range": BinRangeint16,}; + +/** +* Type storing bin edges and a count of samples within it. + */ +export type Binint32 = +{ +/** The total count of samples in this bin. */ +"count": number, +/** The range of the support covered by this bin. */ +"range": BinRangeint32,}; + +/** +* Type storing bin edges and a count of samples within it. + */ +export type Binint64 = +{ +/** The total count of samples in this bin. */ +"count": number, +/** The range of the support covered by this bin. */ +"range": BinRangeint64,}; + +/** +* Type storing bin edges and a count of samples within it. + */ +export type Binint8 = +{ +/** The total count of samples in this bin. */ +"count": number, +/** The range of the support covered by this bin. */ +"range": BinRangeint8,}; + +/** +* Type storing bin edges and a count of samples within it. + */ +export type Binuint16 = +{ +/** The total count of samples in this bin. */ +"count": number, +/** The range of the support covered by this bin. */ +"range": BinRangeuint16,}; + +/** +* Type storing bin edges and a count of samples within it. + */ +export type Binuint32 = +{ +/** The total count of samples in this bin. */ +"count": number, +/** The range of the support covered by this bin. */ +"range": BinRangeuint32,}; + +/** +* Type storing bin edges and a count of samples within it. + */ +export type Binuint64 = +{ +/** The total count of samples in this bin. */ +"count": number, +/** The range of the support covered by this bin. */ +"range": BinRangeuint64,}; + +/** +* Type storing bin edges and a count of samples within it. + */ +export type Binuint8 = +{ +/** The total count of samples in this bin. */ +"count": number, +/** The range of the support covered by this bin. */ +"range": BinRangeuint8,}; + +/** +* disk block size in bytes + */ +export type BlockSize = +512 +| 2048 +| 4096 +; + +/** +* Byte count to express memory or storage capacity. + */ +export type ByteCount = +number; + +/** +* The service intended to use this certificate. + */ +export type ServiceUsingCertificate = +"external_api" +; + +/** +* View of a Certificate + */ +export type Certificate = +{ +/** PEM-formatted string containing public certificate chain */ +"cert": string, +/** human-readable free-form text about a resource */ +"description": string, +/** unique, immutable, system-controlled identifier for each resource */ +"id": string, +/** unique, mutable, user-controlled identifier for each resource */ +"name": Name, +/** The service using this certificate */ +"service": ServiceUsingCertificate, +/** timestamp when this resource was created */ +"timeCreated": Date, +/** timestamp when this resource was last modified */ +"timeModified": Date,}; + +/** +* Create-time parameters for a `Certificate` + */ +export type CertificateCreate = +{ +/** PEM-formatted string containing public certificate chain */ +"cert": string,"description": string, +/** PEM-formatted string containing private key */ +"key": string,"name": Name, +/** The service using this certificate */ +"service": ServiceUsingCertificate,}; + +/** +* A single page of results + */ +export type CertificateResultsPage = +{ +/** list of items on this page of results */ +"items": (Certificate)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; + +/** +* View of a console session + */ +export type ConsoleSession = +{ +/** A unique, immutable, system-controlled identifier for the session */ +"id": string,"timeCreated": Date,"timeLastUsed": Date,}; + +/** +* A single page of results + */ +export type ConsoleSessionResultsPage = +{ +/** list of items on this page of results */ +"items": (ConsoleSession)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; + +/** +* A cumulative or counter data type. + */ +export type Cumulativedouble = +{"startTime": Date,"value": number,}; + +/** +* A cumulative or counter data type. + */ +export type Cumulativefloat = +{"startTime": Date,"value": number,}; + +/** +* A cumulative or counter data type. + */ +export type Cumulativeint64 = +{"startTime": Date,"value": number,}; + +/** +* A cumulative or counter data type. + */ +export type Cumulativeuint64 = +{"startTime": Date,"value": number,}; + +/** +* Info about the current user + */ +export type CurrentUser = +{ +/** Human-readable name that can identify the user */ +"displayName": string, +/** Whether this user has the viewer role on the fleet. Used by the web console to determine whether to show system-level UI. */ +"fleetViewer": boolean,"id": string, +/** Whether this user has the admin role on their silo. Used by the web console to determine whether to show admin-only UI elements. */ +"siloAdmin": boolean, +/** Uuid of the silo to which this user belongs */ +"siloId": string, +/** Name of the silo to which this user belongs. */ +"siloName": Name,}; + +/** +* 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 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,}; + +/** +* 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 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 | null,}; + +/** +* 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" @@ -957,16 +1861,42 @@ export type Datum = export type DerEncodedKeyPair = { -/** request signing private key (base64 encoded der file) */ +/** request signing RSA private key in PKCS#1 format (base64 encoded der file) */ "privateKey": string, /** request signing public certificate (base64 encoded der file) */ "publicCert": string,}; +/** +* View of a device access token + */ +export type DeviceAccessToken = +{ +/** A unique, immutable, system-controlled identifier for the token. Note that this ID is not the bearer token itself, which starts with "oxide-token-" */ +"id": string,"timeCreated": Date, +/** Expiration timestamp. A null value means the token does not automatically expire. */ +"timeExpires"?: Date | null,}; + export type DeviceAccessTokenRequest = {"clientId": string,"deviceCode": string,"grantType": string,}; +/** +* A single page of results + */ +export type DeviceAccessTokenResultsPage = +{ +/** list of items on this page of results */ +"items": (DeviceAccessToken)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; + export type DeviceAuthRequest = -{"clientId": string,}; +{"clientId": string, +/** Optional lifetime for the access token in seconds. + +This value will be validated during the confirmation step. If not specified, it defaults to the silo's max TTL, which can be seen at `/v1/auth-settings`. If specified, must not exceed the silo's max TTL. + +Some special logic applies when authenticating the confirmation request with an existing device token: the requested TTL must not produce an expiration time later than the authenticating token's expiration. If no TTL is specified, the expiration will be the lesser of the silo max and the authenticating token's expiration time. To get the longest allowed lifetime, omit the TTL and authenticate with a web console session. */ +"ttlSeconds"?: number | null,}; export type DeviceAuthVerify = {"userCode": string,}; @@ -975,6 +1905,11 @@ export type Digest = {"type": "sha256" ,"value": string,}; +export type DiskType = +"distributed" +| "local" +; + /** * State of a Disk */ @@ -1023,7 +1958,7 @@ export type DiskState = export type Disk = {"blockSize": ByteCount, /** human-readable free-form text about a resource */ -"description": string,"devicePath": string, +"description": string,"devicePath": string,"diskType": DiskType, /** unique, immutable, system-controlled identifier for each resource */ "id": string, /** ID of image from which disk was created, if any */ @@ -1038,7 +1973,7 @@ export type Disk = "timeModified": Date,}; /** -* Different sources for a disk +* Different sources for a Distributed Disk */ export type DiskSource = (/** Create a blank disk */ @@ -1057,14 +1992,26 @@ export type DiskSource = ,} ); +/** +* The source of a `Disk`'s blocks + */ +export type DiskBackend = +(| {"type": "local" +,} +| { +/** The initial source for this disk */ +"diskSource": DiskSource,"type": "distributed" +,} +); + /** * Create-time parameters for a `Disk` */ export type DiskCreate = {"description": string, -/** initial source for this disk */ -"diskSource": DiskSource,"name": Name, -/** total size of the Disk in bytes */ +/** The source for this `Disk`'s blocks */ +"diskBackend": DiskBackend,"name": Name, +/** The total size of the Disk (in bytes) */ "size": ByteCount,}; export type DiskPath = @@ -1082,16 +2029,45 @@ export type DiskResultsPage = /** token used to fetch the next page of results (if any) */ "nextPage"?: string | null,}; +/** +* 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. +* +* Min, max, and the p-* quantiles are treated as optional due to the possibility of distribution operations, like subtraction. + */ +export type Distributiondouble = +{"bins": (number)[],"counts": (number)[],"max"?: number | null,"min"?: number | null,"p50"?: number | null,"p90"?: number | null,"p99"?: number | null,"squaredMean": number,"sumOfSamples": number,}; + +/** +* 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. +* +* Min, max, and the p-* quantiles are treated as optional due to the possibility of distribution operations, like subtraction. + */ +export type Distributionint64 = +{"bins": (number)[],"counts": (number)[],"max"?: number | null,"min"?: number | null,"p50"?: number | null,"p90"?: number | null,"p99"?: number | null,"squaredMean": number,"sumOfSamples": number,}; + /** * Parameters for creating an ephemeral IP address for an instance. */ export type EphemeralIpCreate = { -/** Name or ID of the IP pool used to allocate an address */ -"pool"?: NameOrId | null,}; +/** Pool to allocate from. */ +"poolSelector"?: PoolSelector,}; export type ExternalIp = -(| {"ip": string,"kind": "ephemeral" +(/** A source NAT IP address. + +SNAT addresses are ephemeral addresses used only for outbound connectivity. */ +| { +/** The first usable port within the IP address. */ +"firstPort": number, +/** The IP address. */ +"ip": string, +/** ID of the IP Pool from which the address is taken. */ +"ipPoolId": string,"kind": "snat" +, +/** The last usable port within the IP address. */ +"lastPort": number,} +| {"ip": string,"ipPoolId": string,"kind": "ephemeral" ,} /** A Floating IP is a well-known IP address which can be attached and detached from instances. */ | { @@ -1102,7 +2078,9 @@ export type ExternalIp = /** The ID of the instance that this Floating IP is attached to, if it is presently in use. */ "instanceId"?: string | null, /** The IP address held by this resource. */ -"ip": string,"kind": "floating" +"ip": string, +/** The ID of the IP pool this resource belongs to. */ +"ipPoolId": string,"kind": "floating" , /** unique, mutable, user-controlled identifier for each resource */ "name": Name, @@ -1118,8 +2096,10 @@ export type ExternalIp = * Parameters for creating an external IP address for instances. */ export type ExternalIpCreate = -(/** An IP address providing both inbound and outbound access. The address is automatically-assigned from the provided IP Pool, or the current silo's default pool if not specified. */ -| {"pool"?: NameOrId | null,"type": "ephemeral" +(/** An IP address providing both inbound and outbound access. The address is automatically assigned from a pool. */ +| { +/** Pool to allocate from. */ +"poolSelector"?: PoolSelector,"type": "ephemeral" ,} /** An IP address providing both inbound and outbound access. The address is an existing floating IP object assigned to the current project. @@ -1138,6 +2118,68 @@ export type ExternalIpResultsPage = /** token used to fetch the next page of results (if any) */ "nextPage"?: string | null,}; +/** +* The `FieldType` identifies the data type of a target or metric field. + */ +export type FieldType = +"string" +| "i8" +| "u8" +| "i16" +| "u16" +| "i32" +| "u32" +| "i64" +| "u64" +| "ip_addr" +| "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. + */ +export type FieldValue = +(| {"type": "string" +,"value": string,} +| {"type": "i8" +,"value": number,} +| {"type": "u8" +,"value": number,} +| {"type": "i16" +,"value": number,} +| {"type": "u16" +,"value": number,} +| {"type": "i32" +,"value": number,} +| {"type": "u32" +,"value": number,} +| {"type": "i64" +,"value": number,} +| {"type": "u64" +,"value": number,} +| {"type": "ip_addr" +,"value": string,} +| {"type": "uuid" +,"value": string,} +| {"type": "bool" +,"value": boolean,} +); + /** * Parameters for finalizing a disk */ @@ -1191,6 +2233,8 @@ export type FloatingIp = "instanceId"?: string | null, /** The IP address held by this resource. */ "ip": string, +/** The ID of the IP pool this resource belongs to. */ +"ipPoolId": string, /** unique, mutable, user-controlled identifier for each resource */ "name": Name, /** The project this resource exists within. */ @@ -1221,11 +2265,9 @@ export type FloatingIpAttach = * 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 | null,"name": Name, -/** The parent IP pool that a floating IP is pulled from. If unset, the default pool is selected. */ -"pool"?: NameOrId | null,}; +{ +/** IP address allocation method. */ +"addressSelector"?: AddressSelector,"description": string,"name": Name,}; /** * A single page of results @@ -1271,6 +2313,14 @@ export type GroupResultsPage = export type Hostname = string; +/** +* A range of ICMP(v6) types or codes +* +* An inclusive-inclusive range of ICMP(v6) types or codes. The second value may be omitted to represent a single parameter. + */ +export type IcmpParamRange = +string; + export type IdentityProviderType = "saml" ; @@ -1344,12 +2394,8 @@ export type Image = * 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" -,} -); +{"id": string,"type": "snapshot" +,}; /** * Create-time parameters for an `Image` @@ -1380,54 +2426,64 @@ export type ImportBlocksBulkWrite = {"base64EncodedData": string,"offset": number,}; /** -* The number of CPUs in an Instance +* A policy determining when an instance should be automatically restarted by the control plane. */ -export type InstanceCpuCount = -number; +export type InstanceAutoRestartPolicy = +(/** The instance should not be automatically restarted by the control plane if it fails. */ +| "never" + +/** If this instance is running and unexpectedly fails (e.g. due to a host software crash or unexpected host reboot), the control plane will make a best-effort attempt to restart it. The control plane may choose not to restart the instance to preserve the overall availability of the system. */ +| "best_effort" + +); /** -* Running state of an Instance (primarily: booted or stopped) +* A required CPU platform for an instance. * -* This typically reflects whether it's starting, running, stopping, or stopped, but also includes states related to the Instance's lifecycle +* When an instance specifies a required CPU platform: +* +* - The system may expose (to the VM) new CPU features that are only present on that platform (or on newer platforms of the same lineage that also support those features). - The instance must run on hosts that have CPUs that support all the features of the supplied platform. +* +* That is, the instance is restricted to hosts that have the CPUs which support all features of the required platform, but in exchange the CPU features exposed by the platform are available for the guest to use. Note that this may prevent an instance from starting (if the hosts that could run it are full but there is capacity on other incompatible hosts). +* +* If an instance does not specify a required CPU platform, then when it starts, the control plane selects a host for the instance and then supplies the guest with the "minimum" CPU platform supported by that host. This maximizes the number of hosts that can run the VM if it later needs to migrate to another host. +* +* In all cases, the CPU features presented by a given CPU platform are a subset of what the corresponding hardware may actually support; features which cannot be used from a virtual environment or do not have full hypervisor support may be masked off. See RFD 314 for specific CPU features in a CPU platform. */ -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" +export type InstanceCpuPlatform = +(/** An AMD Milan-like CPU platform. */ +| "amd_milan" -/** The instance has been deleted. */ -| "destroyed" +/** An AMD Turin-like CPU platform. */ +| "amd_turin" ); +/** +* The number of CPUs in an Instance + */ +export type InstanceCpuCount = +number; + /** * View of an Instance */ export type Instance = { +/** The time at which the auto-restart cooldown period for this instance completes, permitting it to be automatically restarted again. If the instance enters the `Failed` state, it will not be restarted until after this time. + +If this is not present, then either the instance has never been automatically restarted, or the cooldown period has already expired, allowing the instance to be restarted immediately if it fails. */ +"autoRestartCooldownExpiration"?: Date | null, +/** `true` if this instance's auto-restart policy will permit the control plane to automatically restart it if it enters the `Failed` state. */ +"autoRestartEnabled": boolean, +/** The auto-restart policy configured for this instance, or `null` if no explicit policy has been configured. + +This policy determines whether the instance should be automatically restarted by the control plane on failure. If this is `null`, the control plane will use the default policy when determining whether or not to automatically restart this instance, which may or may not allow it to be restarted. The value of the `auto_restart_enabled` field indicates whether the instance will be auto-restarted, based on its current policy or the default if it has no configured policy. */ +"autoRestartPolicy"?: InstanceAutoRestartPolicy | null, +/** the ID of the disk used to boot this Instance, if a specific one is assigned. */ +"bootDiskId"?: string | null, +/** The CPU platform for this instance. If this is `null`, the instance requires no particular CPU platform. */ +"cpuPlatform"?: InstanceCpuPlatform | null, /** human-readable free-form text about a resource */ "description": string, /** RFC1035-compliant hostname for the Instance. */ @@ -1444,6 +2500,10 @@ export type Instance = "projectId": string,"runState": InstanceState, /** timestamp when this resource was created */ "timeCreated": Date, +/** The timestamp of the most recent time this instance was automatically restarted by the control plane. + +If this is not present, then this instance has not been automatically restarted. */ +"timeLastAutoRestarted"?: Date | null, /** timestamp when this resource was last modified */ "timeModified": Date,"timeRunStateUpdated": Date,}; @@ -1453,9 +2513,9 @@ export type Instance = 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 */ +/** The source for this `Disk`'s blocks */ +"diskBackend": DiskBackend,"name": Name, +/** The total size of the Disk (in bytes) */ "size": ByteCount,"type": "create" ,} /** During instance creation, attach this disk */ @@ -1465,13 +2525,74 @@ export type InstanceDiskAttachment = ,} ); +/** +* How a VPC-private IP address is assigned to a network interface. + */ +export type Ipv4Assignment = +(/** Automatically assign an IP address from the VPC Subnet. */ +| {"type": "auto" +,} +/** Explicitly assign a specific address, if available. */ +| {"type": "explicit" +,"value": string,} +); + +/** +* Configuration for a network interface's IPv4 addressing. + */ +export type PrivateIpv4StackCreate = +{ +/** The VPC-private address to assign to the interface. */ +"ip": Ipv4Assignment, +/** Additional IP networks the interface can send / receive on. */ +"transitIps"?: (Ipv4Net)[],}; + +/** +* How a VPC-private IP address is assigned to a network interface. + */ +export type Ipv6Assignment = +(/** Automatically assign an IP address from the VPC Subnet. */ +| {"type": "auto" +,} +/** Explicitly assign a specific address, if available. */ +| {"type": "explicit" +,"value": string,} +); + +/** +* Configuration for a network interface's IPv6 addressing. + */ +export type PrivateIpv6StackCreate = +{ +/** The VPC-private address to assign to the interface. */ +"ip": Ipv6Assignment, +/** Additional IP networks the interface can send / receive on. */ +"transitIps"?: (Ipv6Net)[],}; + +/** +* Create parameters for a network interface's IP stack. + */ +export type PrivateIpStackCreate = +(/** The interface has only an IPv4 stack. */ +| {"type": "v4" +,"value": PrivateIpv4StackCreate,} +/** The interface has only an IPv6 stack. */ +| {"type": "v6" +,"value": PrivateIpv6StackCreate,} +/** The interface has both an IPv4 and IPv6 stack. */ +| {"type": "dual_stack" +,"value": {"v4": PrivateIpv4StackCreate,"v6": PrivateIpv6StackCreate,},} +); + /** * 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 | null,"name": Name, +/** The IP stack configuration for this interface. + +If not provided, a default configuration will be used, which creates a dual-stack IPv4 / IPv6 interface. */ +"ipConfig"?: PrivateIpStackCreate,"name": Name, /** The VPC Subnet in which to create the interface. */ "subnetName": Name, /** The VPC in which to create the interface. */ @@ -1486,8 +2607,20 @@ export type InstanceNetworkInterfaceAttachment = 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" +/** Create a single primary interface with an automatically-assigned IPv4 address. + +The IP will be pulled from the Project's default VPC / VPC Subnet. */ +| {"type": "default_ipv4" +,} +/** Create a single primary interface with an automatically-assigned IPv6 address. + +The IP will be pulled from the Project's default VPC / VPC Subnet. */ +| {"type": "default_ipv6" +,} +/** Create a single primary interface with automatically-assigned IPv4 and IPv6 addresses. + +The IPs will be pulled from the Project's default VPC / VPC Subnet. */ +| {"type": "default_dual_stack" ,} /** No network interfaces at all will be created for the instance. */ | {"type": "none" @@ -1498,13 +2631,45 @@ If more than one interface is provided, then the first will be designated the pr * Create-time parameters for an `Instance` */ export type InstanceCreate = -{"description": string, -/** The disks to be created or attached for this instance. */ +{ +/** Anti-Affinity groups which this instance should be added. */ +"antiAffinityGroups"?: (NameOrId)[], +/** The auto-restart policy for this instance. + +This policy determines whether the instance should be automatically restarted by the control plane on failure. If this is `null`, no auto-restart policy will be explicitly configured for this instance, and the control plane will select the default policy when determining whether the instance can be automatically restarted. + +Currently, the global default auto-restart policy is "best-effort", so instances with `null` auto-restart policies will be automatically restarted. However, in the future, the default policy may be configurable through other mechanisms, such as on a per-project basis. In that case, any configured default policy will be used if this is `null`. */ +"autoRestartPolicy"?: InstanceAutoRestartPolicy | null, +/** The disk the instance is configured to boot from. + +This disk can either be attached if it already exists or created along with the instance. + +Specifying a boot disk is optional but recommended to ensure predictable boot behavior. The boot disk can be set during instance creation or later if the instance is stopped. The boot disk counts against the disk attachment limit. + +An instance that does not have a boot disk set will use the boot options specified in its UEFI settings, which are controlled by both the instance's UEFI firmware and the guest operating system. Boot options can change as disks are attached and detached, which may result in an instance that only boots to the EFI shell until a boot disk is set. */ +"bootDisk"?: InstanceDiskAttachment | null, +/** The CPU platform to be used for this instance. If this is `null`, the instance requires no particular CPU platform; when it is started the instance will have the most general CPU platform supported by the sled it is initially placed on. */ +"cpuPlatform"?: InstanceCpuPlatform | null,"description": string, +/** A list of disks to be attached to the instance. + +Disk attachments of type "create" will be created, while those of type "attach" must already exist. + +The order of this list does not guarantee a boot order for the instance. Use the boot_disk attribute to specify a boot disk. When boot_disk is specified it will count against the disk attachment limit. */ "disks"?: (InstanceDiskAttachment)[], /** The external IP addresses provided to this instance. By default, all instances have outbound connectivity, but no inbound connectivity. These external addresses can be used to provide a fixed, known IP address for making inbound connections to the instance. */ -"externalIps"?: (ExternalIpCreate)[],"hostname": Hostname,"memory": ByteCount,"name": Name,"ncpus": InstanceCpuCount, +"externalIps"?: (ExternalIpCreate)[], +/** The hostname to be assigned to the instance */ +"hostname": Hostname, +/** The amount of RAM (in bytes) to be allocated to the instance */ +"memory": ByteCount, +/** The multicast groups this instance should join. + +The instance will be automatically added as a member of the specified multicast groups during creation, enabling it to send and receive multicast traffic for those groups. */ +"multicastGroups"?: (NameOrId)[],"name": Name, +/** The number of vCPUs to be allocated to the instance */ +"ncpus": InstanceCpuCount, /** The network interfaces to be created for this instance. */ "networkInterfaces"?: InstanceNetworkInterfaceAttachment, /** An allowlist of SSH public keys to be transferred to the instance via cloud-init during instance creation. @@ -1517,10 +2682,39 @@ If not provided, all SSH public keys from the user's profile will be sent. If an "userData"?: string,}; /** -* Migration parameters for an `Instance` +* The VPC-private IPv4 stack for a network interface + */ +export type PrivateIpv4Stack = +{ +/** The VPC-private IPv4 address for the interface. */ +"ip": string, +/** A set of additional IPv4 networks that this interface may send and receive traffic on. */ +"transitIps": (Ipv4Net)[],}; + +/** +* The VPC-private IPv6 stack for a network interface */ -export type InstanceMigrate = -{"dstSledId": string,}; +export type PrivateIpv6Stack = +{ +/** The VPC-private IPv6 address for the interface. */ +"ip": string, +/** A set of additional IPv6 networks that this interface may send and receive traffic on. */ +"transitIps": (Ipv6Net)[],}; + +/** +* The VPC-private IP stack for a network interface. + */ +export type PrivateIpStack = +(/** The interface has only an IPv4 stack. */ +| {"type": "v4" +,"value": PrivateIpv4Stack,} +/** The interface has only an IPv6 stack. */ +| {"type": "v6" +,"value": PrivateIpv6Stack,} +/** The interface is dual-stack IPv4 and IPv6. */ +| {"type": "dual_stack" +,"value": {"v4": PrivateIpv4Stack,"v6": PrivateIpv6Stack,},} +); /** * A MAC address @@ -1541,8 +2735,8 @@ export type InstanceNetworkInterface = "id": string, /** The Instance to which the interface belongs. */ "instanceId": string, -/** The IP address assigned to this interface. */ -"ip": string, +/** The VPC-private IP stack for this interface. */ +"ipStack": PrivateIpStack, /** The MAC address assigned to this interface. */ "mac": MacAddr, /** unique, mutable, user-controlled identifier for each resource */ @@ -1580,7 +2774,9 @@ export type InstanceNetworkInterfaceUpdate = If applied to a secondary interface, that interface will become the primary on the next reboot of the instance. Note that this may have implications for routing between instances, as the new primary interface will be on a distinct subnet from the previous primary interface. Note that this can only be used to select a new primary interface for an instance. Requests to change the primary interface into a secondary will return an error. */ -"primary"?: boolean,}; +"primary"?: boolean, +/** A set of additional networks that this interface may send and receive traffic on */ +"transitIps"?: (IpNet)[],}; /** * A single page of results @@ -1602,6 +2798,162 @@ export type InstanceSerialConsoleData = /** The absolute offset since boot (suitable for use as `byte_offset` in a subsequent request) of the last byte returned in `data`. */ "lastByteOffset": number,}; +/** +* Parameters of an `Instance` that can be reconfigured after creation. + */ +export type InstanceUpdate = +{ +/** The auto-restart policy for this instance. + +This policy determines whether the instance should be automatically restarted by the control plane on failure. If this is `null`, any explicitly configured auto-restart policy will be unset, and the control plane will select the default policy when determining whether the instance can be automatically restarted. + +Currently, the global default auto-restart policy is "best-effort", so instances with `null` auto-restart policies will be automatically restarted. However, in the future, the default policy may be configurable through other mechanisms, such as on a per-project basis. In that case, any configured default policy will be used if this is `null`. */ +"autoRestartPolicy": InstanceAutoRestartPolicy | null, +/** The disk the instance is configured to boot from. + +Setting a boot disk is optional but recommended to ensure predictable boot behavior. The boot disk can be set during instance creation or later if the instance is stopped. The boot disk counts against the disk attachment limit. + +An instance that does not have a boot disk set will use the boot options specified in its UEFI settings, which are controlled by both the instance's UEFI firmware and the guest operating system. Boot options can change as disks are attached and detached, which may result in an instance that only boots to the EFI shell until a boot disk is set. */ +"bootDisk": NameOrId | null, +/** The CPU platform to be used for this instance. If this is `null`, the instance requires no particular CPU platform; when it is started the instance will have the most general CPU platform supported by the sled it is initially placed on. */ +"cpuPlatform": InstanceCpuPlatform | null, +/** The amount of RAM (in bytes) to be allocated to the instance */ +"memory": ByteCount, +/** Multicast groups this instance should join. + +When specified, this replaces the instance's current multicast group membership with the new set of groups. The instance will leave any groups not listed here and join any new groups that are specified. + +If not provided (None), the instance's multicast group membership will not be changed. */ +"multicastGroups"?: (NameOrId)[] | null, +/** The number of vCPUs to be allocated to the instance */ +"ncpus": InstanceCpuCount,}; + +export type InterfaceNum = +(| {"unknown": number,} +| {"ifIndex": number,} +| {"portNumber": number,} +); + +/** +* An internet gateway provides a path between VPC networks and external networks. + */ +export type InternetGateway = +{ +/** human-readable free-form text about a resource */ +"description": string, +/** unique, immutable, system-controlled identifier for each resource */ +"id": string, +/** unique, mutable, user-controlled identifier for each resource */ +"name": Name, +/** timestamp when this resource was created */ +"timeCreated": Date, +/** timestamp when this resource was last modified */ +"timeModified": Date, +/** The VPC to which the gateway belongs. */ +"vpcId": string,}; + +/** +* Create-time parameters for an `InternetGateway` + */ +export type InternetGatewayCreate = +{"description": string,"name": Name,}; + +/** +* An IP address that is attached to an internet gateway + */ +export type InternetGatewayIpAddress = +{ +/** The associated IP address, */ +"address": string, +/** human-readable free-form text about a resource */ +"description": string, +/** unique, immutable, system-controlled identifier for each resource */ +"id": string, +/** The associated internet gateway. */ +"internetGatewayId": string, +/** unique, mutable, user-controlled identifier for each resource */ +"name": Name, +/** timestamp when this resource was created */ +"timeCreated": Date, +/** timestamp when this resource was last modified */ +"timeModified": Date,}; + +/** +* Create-time identity-related parameters + */ +export type InternetGatewayIpAddressCreate = +{"address": string,"description": string,"name": Name,}; + +/** +* A single page of results + */ +export type InternetGatewayIpAddressResultsPage = +{ +/** list of items on this page of results */ +"items": (InternetGatewayIpAddress)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; + +/** +* An IP pool that is attached to an internet gateway + */ +export type InternetGatewayIpPool = +{ +/** human-readable free-form text about a resource */ +"description": string, +/** unique, immutable, system-controlled identifier for each resource */ +"id": string, +/** The associated internet gateway. */ +"internetGatewayId": string, +/** The associated IP pool. */ +"ipPoolId": string, +/** unique, mutable, user-controlled identifier for each resource */ +"name": Name, +/** timestamp when this resource was created */ +"timeCreated": Date, +/** timestamp when this resource was last modified */ +"timeModified": Date,}; + +/** +* Create-time identity-related parameters + */ +export type InternetGatewayIpPoolCreate = +{"description": string,"ipPool": NameOrId,"name": Name,}; + +/** +* A single page of results + */ +export type InternetGatewayIpPoolResultsPage = +{ +/** list of items on this page of results */ +"items": (InternetGatewayIpPool)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; + +/** +* A single page of results + */ +export type InternetGatewayResultsPage = +{ +/** list of items on this page of results */ +"items": (InternetGateway)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; + +/** +* Type of IP pool. + */ +export type IpPoolType = +(/** Unicast IP pool for standard IP allocations. */ +| "unicast" + +/** Multicast IP pool for multicast group allocations. + +All ranges in a multicast pool must be either ASM or SSM (not mixed). */ +| "multicast" + +); + /** * A collection of IP ranges. If a pool is linked to a silo, IP addresses from the pool can be allocated within that silo */ @@ -1611,22 +2963,38 @@ export type IpPool = "description": string, /** unique, immutable, system-controlled identifier for each resource */ "id": string, +/** The IP version for the pool. */ +"ipVersion": IpVersion, /** unique, mutable, user-controlled identifier for each resource */ "name": Name, +/** Type of IP pool (unicast or multicast). */ +"poolType": IpPoolType, /** timestamp when this resource was created */ "timeCreated": Date, /** timestamp when this resource was last modified */ "timeModified": Date,}; /** -* Create-time parameters for an `IpPool` +* Create-time parameters for an `IpPool`. +* +* For multicast pools, all ranges must be either Any-Source Multicast (ASM) or Source-Specific Multicast (SSM), but not both. Mixing ASM and SSM ranges in the same pool is not allowed. +* +* ASM: IPv4 addresses outside 232.0.0.0/8, IPv6 addresses with flag field != 3 SSM: IPv4 addresses in 232.0.0.0/8, IPv6 addresses with flag field = 3 */ export type IpPoolCreate = -{"description": string,"name": Name,}; +{"description": string, +/** The IP version of the pool. + +The default is IPv4. */ +"ipVersion"?: IpVersion,"name": Name, +/** Type of IP pool (defaults to Unicast) */ +"poolType"?: IpPoolType,}; export type IpPoolLinkSilo = { -/** When a pool is the default for a silo, floating IPs and instance ephemeral IPs will come from that pool when no other pool is specified. There can be at most one default for a given silo. */ +/** When a pool is the default for a silo, floating IPs and instance ephemeral IPs will come from that pool when no other pool is specified. + +A silo can have at most one default pool per combination of pool type (unicast or multicast) and IP version (IPv4 or IPv6), allowing up to 4 default pools total. */ "isDefault": boolean,"silo": NameOrId,}; /** @@ -1678,7 +3046,9 @@ export type IpPoolResultsPage = */ export type IpPoolSiloLink = {"ipPoolId": string, -/** When a pool is the default for a silo, floating IPs and instance ephemeral IPs will come from that pool when no other pool is specified. There can be at most one default for a given silo. */ +/** When a pool is the default for a silo, floating IPs and instance ephemeral IPs will come from that pool when no other pool is specified. + +A silo can have at most one default pool per combination of pool type (unicast or multicast) and IP version (IPv4 or IPv6), allowing up to 4 default pools total. */ "isDefault": boolean,"siloId": string,}; /** @@ -1693,7 +3063,9 @@ export type IpPoolSiloLinkResultsPage = export type IpPoolSiloUpdate = { -/** When a pool is the default for a silo, floating IPs and instance ephemeral IPs will come from that pool when no other pool is specified. There can be at most one default for a given silo, so when a pool is made default, an existing default will remain linked but will no longer be the default. */ +/** When a pool is the default for a silo, floating IPs and instance ephemeral IPs will come from that pool when no other pool is specified. + +A silo can have at most one default pool per combination of pool type (unicast or multicast) and IP version (IPv4 or IPv6), allowing up to 4 default pools total. When a pool is made default, an existing default of the same type and version will remain linked but will no longer be the default. */ "isDefault": boolean,}; /** @@ -1702,10 +3074,22 @@ export type IpPoolSiloUpdate = export type IpPoolUpdate = {"description"?: string | null,"name"?: Name | null,}; +/** +* The utilization of IP addresses in a pool. +* +* Note that both the count of remaining addresses and the total capacity are integers, reported as floating point numbers. This accommodates allocations larger than a 64-bit integer, which is common with IPv6 address spaces. With very large IP Pools (> 2**53 addresses), integer precision will be lost, in exchange for representing the entire range. In such a case the pool still has many available addresses. + */ +export type IpPoolUtilization = +{ +/** The total number of addresses in the pool. */ +"capacity": number, +/** The number of remaining addresses in the pool. */ +"remaining": number,}; + /** * A range of IP ports * -* An inclusive-inclusive range of IP ports. The second port may be omitted to represent a single port +* An inclusive-inclusive range of IP ports. The second port may be omitted to represent a single port. */ export type L4PortRange = string; @@ -1714,7 +3098,7 @@ string; * The forward error correction mode of a link. */ export type LinkFec = -(/** Firecode foward error correction. */ +(/** Firecode forward error correction. */ | "firecode" /** No forward error correction. */ @@ -1726,14 +3110,24 @@ export type LinkFec = ); /** -* The LLDP configuration associated with a port. LLDP may be either enabled or disabled, if enabled, an LLDP configuration must be provided by name or id. +* The LLDP configuration associated with a port. */ -export type LldpServiceConfigCreate = +export type LldpLinkConfigCreate = { +/** The LLDP chassis identifier TLV. */ +"chassisId"?: string | null, /** Whether or not LLDP is enabled. */ "enabled": boolean, -/** A reference to the LLDP configuration used. Must not be `None` when `enabled` is `true`. */ -"lldpConfig"?: NameOrId | null,}; +/** The LLDP link description TLV. */ +"linkDescription"?: string | null, +/** The LLDP link name TLV. */ +"linkName"?: string | null, +/** The LLDP management IP TLV. */ +"managementIp"?: string | null, +/** The LLDP system description TLV. */ +"systemDescription"?: string | null, +/** The LLDP system name TLV. */ +"systemName"?: string | null,}; /** * The speed of a link. @@ -1768,33 +3162,105 @@ export type LinkSpeed = ); +/** +* Per-port tx-eq overrides. This can be used to fine-tune the transceiver equalization settings to improve signal integrity. + */ +export type TxEqConfig = +{ +/** Main tap */ +"main"?: number | null, +/** Post-cursor tap1 */ +"post1"?: number | null, +/** Post-cursor tap2 */ +"post2"?: number | null, +/** Pre-cursor tap1 */ +"pre1"?: number | null, +/** Pre-cursor tap2 */ +"pre2"?: number | null,}; + /** * Switch link configuration. */ export type LinkConfigCreate = { -/** Whether or not to set autonegotiation */ +/** Whether or not to set autonegotiation. */ "autoneg": boolean, -/** The forward error correction mode of the link. */ -"fec": LinkFec, +/** The requested forward-error correction method. If this is not specified, the standard FEC for the underlying media will be applied if it can be determined. */ +"fec"?: LinkFec | null, +/** Link name. On ports that are not broken out, this is always phy0. On a 2x breakout the options are phy0 and phy1, on 4x phy0-phy3, etc. */ +"linkName": Name, /** The link-layer discovery protocol (LLDP) configuration for the link. */ -"lldp": LldpServiceConfigCreate, +"lldp": LldpLinkConfigCreate, /** Maximum transmission unit for the link. */ "mtu": number, /** The speed of the link. */ -"speed": LinkSpeed,}; +"speed": LinkSpeed, +/** Optional tx_eq settings. */ +"txEq"?: TxEqConfig | null,}; /** * A link layer discovery protocol (LLDP) service configuration. */ -export type LldpServiceConfig = +export type LldpLinkConfig = { +/** The LLDP chassis identifier TLV. */ +"chassisId"?: string | null, /** Whether or not the LLDP service is enabled. */ "enabled": boolean, /** The id of this LLDP service instance. */ "id": string, -/** The link-layer discovery protocol configuration for this service. */ -"lldpConfigId"?: string | null,}; +/** The LLDP link description TLV. */ +"linkDescription"?: string | null, +/** The LLDP link name TLV. */ +"linkName"?: string | null, +/** The LLDP management IP TLV. */ +"managementIp"?: string | null, +/** The LLDP system description TLV. */ +"systemDescription"?: string | null, +/** The LLDP system name TLV. */ +"systemName"?: string | null,}; + +export type NetworkAddress = +(| {"ipAddr": string,} +| {"iEEE802": (number)[],} +); + +export type ManagementAddress = +{"addr": NetworkAddress,"interfaceNum": InterfaceNum,"oid"?: (number)[] | null,}; + +/** +* Information about LLDP advertisements from other network entities directly connected to a switch port. This structure contains both metadata about when and where the neighbor was seen, as well as the specific information the neighbor was advertising. + */ +export type LldpNeighbor = +{ +/** The LLDP chassis identifier advertised by the neighbor */ +"chassisId": string, +/** Initial sighting of this LldpNeighbor */ +"firstSeen": Date, +/** Most recent sighting of this LldpNeighbor */ +"lastSeen": Date, +/** The LLDP link description advertised by the neighbor */ +"linkDescription"?: string | null, +/** The LLDP link name advertised by the neighbor */ +"linkName": string, +/** The port on which the neighbor was seen */ +"localPort": string, +/** The LLDP management IP(s) advertised by the neighbor */ +"managementIp": (ManagementAddress)[], +/** The LLDP system description advertised by the neighbor */ +"systemDescription"?: string | null, +/** The LLDP system name advertised by the neighbor */ +"systemName"?: string | null,}; + +/** +* A single page of results + */ +export type LldpNeighborResultsPage = +{ +/** list of items on this page of results */ +"items": (LldpNeighbor)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; /** * A loopback address is an address that is assigned to a rack switch but is not associated with any particular port. @@ -1825,7 +3291,7 @@ export type LoopbackAddressCreate = "anycast": boolean, /** The subnet mask to use for the address. */ "mask": number, -/** The containing the switch this loopback address will be configured on. */ +/** The rack containing the switch this loopback address will be configured on. */ "rackId": string, /** The location of the switch within the rack this loopback address will be configured on. */ "switchLocation": Name,}; @@ -1856,6 +3322,257 @@ export type MeasurementResultsPage = /** token used to fetch the next page of results (if any) */ "nextPage"?: string | null,}; +/** +* The type of the metric itself, indicating what its values represent. + */ +export type MetricType = +(/** The value represents an instantaneous measurement in time. */ +| "gauge" + +/** The value represents a difference between two points in time. */ +| "delta" + +/** The value represents an accumulation between two points in time. */ +| "cumulative" + +); + +/** +* View of a Multicast Group + */ +export type MulticastGroup = +{ +/** human-readable free-form text about a resource */ +"description": string, +/** unique, immutable, system-controlled identifier for each resource */ +"id": string, +/** The ID of the IP pool this resource belongs to. */ +"ipPoolId": string, +/** The multicast IP address held by this resource. */ +"multicastIp": string, +/** Multicast VLAN (MVLAN) for egress multicast traffic to upstream networks. None means no VLAN tagging on egress. */ +"mvlan"?: number | null, +/** unique, mutable, user-controlled identifier for each resource */ +"name": Name, +/** Source IP addresses for Source-Specific Multicast (SSM). Empty array means any source is allowed. */ +"sourceIps": (string)[], +/** Current state of the multicast group. */ +"state": string, +/** timestamp when this resource was created */ +"timeCreated": Date, +/** timestamp when this resource was last modified */ +"timeModified": Date,}; + +/** +* Create-time parameters for a multicast group. + */ +export type MulticastGroupCreate = +{"description": string, +/** The multicast IP address to allocate. If None, one will be allocated from the default pool. */ +"multicastIp"?: string | null, +/** Multicast VLAN (MVLAN) for egress multicast traffic to upstream networks. Tags packets leaving the rack to traverse VLAN-segmented upstream networks. + +Valid range: 2-4094 (VLAN IDs 0-1 are reserved by IEEE 802.1Q standard). */ +"mvlan"?: number | null,"name": Name, +/** Name or ID of the IP pool to allocate from. If None, uses the default multicast pool. */ +"pool"?: NameOrId | null, +/** Source IP addresses for Source-Specific Multicast (SSM). + +None uses default behavior (Any-Source Multicast). Empty list explicitly allows any source (Any-Source Multicast). Non-empty list restricts to specific sources (SSM). */ +"sourceIps"?: (string)[] | null,}; + +/** +* View of a Multicast Group Member (instance belonging to a multicast group) + */ +export type MulticastGroupMember = +{ +/** human-readable free-form text about a resource */ +"description": string, +/** unique, immutable, system-controlled identifier for each resource */ +"id": string, +/** The ID of the instance that is a member of this group. */ +"instanceId": string, +/** The ID of the multicast group this member belongs to. */ +"multicastGroupId": string, +/** unique, mutable, user-controlled identifier for each resource */ +"name": Name, +/** Current state of the multicast group membership. */ +"state": string, +/** timestamp when this resource was created */ +"timeCreated": Date, +/** timestamp when this resource was last modified */ +"timeModified": Date,}; + +/** +* Parameters for adding an instance to a multicast group. + */ +export type MulticastGroupMemberAdd = +{ +/** Name or ID of the instance to add to the multicast group */ +"instance": NameOrId,}; + +/** +* A single page of results + */ +export type MulticastGroupMemberResultsPage = +{ +/** list of items on this page of results */ +"items": (MulticastGroupMember)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; + +/** +* A single page of results + */ +export type MulticastGroupResultsPage = +{ +/** list of items on this page of results */ +"items": (MulticastGroup)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; + +/** +* Update-time parameters for a multicast group. + */ +export type MulticastGroupUpdate = +{"description"?: string | null, +/** Multicast VLAN (MVLAN) for egress multicast traffic to upstream networks. Set to null to clear the MVLAN. Valid range: 2-4094 when provided. Omit the field to leave mvlan unchanged. */ +"mvlan"?: number | null,"name"?: Name | null,"sourceIps"?: (string)[] | null,}; + +/** +* VPC-private IPv4 configuration for a network interface. + */ +export type PrivateIpv4Config = +{ +/** VPC-private IP address. */ +"ip": string, +/** The IP subnet. */ +"subnet": Ipv4Net, +/** Additional networks on which the interface can send / receive traffic. */ +"transitIps"?: (Ipv4Net)[],}; + +/** +* VPC-private IPv6 configuration for a network interface. + */ +export type PrivateIpv6Config = +{ +/** VPC-private IP address. */ +"ip": string, +/** The IP subnet. */ +"subnet": Ipv6Net, +/** Additional networks on which the interface can send / receive traffic. */ +"transitIps": (Ipv6Net)[],}; + +/** +* VPC-private IP address configuration for a network interface. + */ +export type PrivateIpConfig = +(/** The interface has only an IPv4 configuration. */ +| {"type": "v4" +,"value": PrivateIpv4Config,} +/** The interface has only an IPv6 configuration. */ +| {"type": "v6" +,"value": PrivateIpv6Config,} +/** The interface is dual-stack. */ +| {"type": "dual_stack" +,"value": { +/** The interface's IPv4 configuration. */ +"v4": PrivateIpv4Config, +/** The interface's IPv6 configuration. */ +"v6": PrivateIpv6Config,},} +); + +/** +* 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" +,} +); + +/** +* A Geneve Virtual Network Identifier + */ +export type Vni = +number; + +/** +* Information required to construct a virtual network interface + */ +export type NetworkInterface = +{"id": string,"ipConfig": PrivateIpConfig,"kind": NetworkInterfaceKind,"mac": MacAddr,"name": Name,"primary": boolean,"slot": number,"vni": Vni,}; + +/** +* 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 | null)[],} +| {"type": "double" +,"values": (number | null)[],} +| {"type": "boolean" +,"values": (boolean | null)[],} +| {"type": "string" +,"values": (string | null)[],} +| {"type": "integer_distribution" +,"values": (Distributionint64 | null)[],} +| {"type": "double_distribution" +,"values": (Distributiondouble | null)[],} +); + +/** +* 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)[] | null,"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. + */ +export type OxqlTable = +{ +/** The name of the table. */ +"name": string, +/** The set of timeseries in the table, ordered by key. */ +"timeseries": (Timeseries)[],}; + +/** +* The result of a successful OxQL query. + */ +export type OxqlQueryResult = +{ +/** Tables resulting from the query, each containing timeseries. */ +"tables": (OxqlTable)[],}; + /** * A password used to authenticate a user * @@ -1872,6 +3589,36 @@ export type PhysicalDiskKind = | "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 * @@ -1880,9 +3627,13 @@ export type PhysicalDiskKind = export type PhysicalDisk = {"formFactor": PhysicalDiskKind, /** unique, immutable, system-controlled identifier for each resource */ -"id": string,"model": string,"serial": string, +"id": string,"model": string, +/** The operator-defined policy for a physical disk. */ +"policy": PhysicalDiskPolicy,"serial": string, /** The sled to which this disk is attached, if any. */ "sledId"?: string | null, +/** The current state Nexus believes the disk to be in. */ +"state": PhysicalDiskState, /** timestamp when this resource was created */ "timeCreated": Date, /** timestamp when this resource was last modified */ @@ -1907,6 +3658,52 @@ export type Ping = /** Whether the external API is reachable. Will always be Ok if the endpoint returns anything at all. */ "status": PingStatus,}; +/** +* Identity-related metadata that's included in nearly all public API objects + */ +export type Probe = +{ +/** human-readable free-form text about a resource */ +"description": string, +/** unique, immutable, system-controlled identifier for each resource */ +"id": string, +/** unique, mutable, user-controlled identifier for each resource */ +"name": Name,"sled": string, +/** timestamp when this resource was created */ +"timeCreated": Date, +/** timestamp when this resource was last modified */ +"timeModified": Date,}; + +/** +* Create time parameters for probes. + */ +export type ProbeCreate = +{"description": string,"name": Name, +/** Pool to allocate from. */ +"poolSelector"?: PoolSelector,"sled": string,}; + +export type ProbeExternalIpKind = +"snat" +| "floating" +| "ephemeral" +; + +export type ProbeExternalIp = +{"firstPort": number,"ip": string,"kind": ProbeExternalIpKind,"lastPort": number,}; + +export type ProbeInfo = +{"externalIps": (ProbeExternalIp)[],"id": string,"interface": NetworkInterface,"name": Name,"sled": string,}; + +/** +* A single page of results + */ +export type ProbeInfoResultsPage = +{ +/** list of items on this page of results */ +"items": (ProbeInfo)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; + /** * View of a Project */ @@ -1942,98 +3739,205 @@ export type ProjectResultsPage = export type ProjectRole = "admin" | "collaborator" +| "limited_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. +* 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 ProjectRoleRoleAssignment = +{"identityId": string,"identityType": IdentityType,"roleName": ProjectRole,}; + +/** +* 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)[],}; + +/** +* Updateable properties of a `Project` + */ +export type ProjectUpdate = +{"description"?: string | null,"name"?: Name | null,}; + +/** +* View of an Rack + */ +export type Rack = +{ +/** unique, immutable, system-controlled identifier for each resource */ +"id": string, +/** timestamp when this resource was created */ +"timeCreated": Date, +/** timestamp when this resource was last modified */ +"timeModified": Date,}; + +/** +* A single page of results + */ +export type RackResultsPage = +{ +/** list of items on this page of results */ +"items": (Rack)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; + +/** +* A route to a destination network through a gateway address. + */ +export type Route = +{ +/** The route destination. */ +"dst": IpNet, +/** The route gateway. */ +"gw": string, +/** Route RIB priority. Higher priority indicates precedence within and across protocols. */ +"ribPriority"?: number | null, +/** VLAN id the gateway is reachable over. */ +"vid"?: number | null,}; + +/** +* Route configuration data associated with a switch port configuration. + */ +export type RouteConfig = +{ +/** Link name. On ports that are not broken out, this is always phy0. On a 2x breakout the options are phy0 and phy1, on 4x phy0-phy3, etc. */ +"linkName": Name, +/** The set of routes assigned to a switch port. */ +"routes": (Route)[],}; + +/** +* A `RouteDestination` is used to match traffic with a routing rule based on the destination of that traffic. +* +* When traffic is to be sent to a destination that is within a given `RouteDestination`, the corresponding `RouterRoute` applies, and traffic will be forward to the `RouteTarget` for that rule. + */ +export type RouteDestination = +(/** Route applies to traffic destined for the specified IP address */ +| {"type": "ip" +,"value": string,} +/** Route applies to traffic destined for the specified IP subnet */ +| {"type": "ip_net" +,"value": IpNet,} +/** Route applies to traffic destined for the specified VPC */ +| {"type": "vpc" +,"value": Name,} +/** Route applies to traffic destined for the specified VPC subnet */ +| {"type": "subnet" +,"value": Name,} +); + +/** +* A `RouteTarget` describes the possible locations that traffic matching a route destination can be sent. */ -export type ProjectRoleRoleAssignment = -{"identityId": string,"identityType": IdentityType,"roleName": ProjectRole,}; +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" +,} +); /** -* Policy for a particular resource +* The kind of a `RouterRoute` * -* 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 kind determines certain attributes such as if the route is modifiable and describes how or where the route was created. */ -export type ProjectRolePolicy = -{ -/** Roles directly assigned on this resource */ -"roleAssignments": (ProjectRoleRoleAssignment)[],}; +export type RouterRouteKind = +(/** Determines the default destination of traffic, such as whether it goes to the internet or not. -/** -* Updateable properties of a `Project` - */ -export type ProjectUpdate = -{"description"?: string | null,"name"?: Name | null,}; +`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" + +); /** -* View of an Rack +* A route defines a rule that governs where traffic should be sent based on its destination. */ -export type Rack = +export type RouterRoute = { +/** human-readable free-form text about a resource */ +"description": string, +/** Selects which traffic this routing rule will apply to */ +"destination": RouteDestination, /** unique, immutable, system-controlled identifier for each resource */ "id": string, +/** Describes the kind of router. Set at creation. `read-only` */ +"kind": RouterRouteKind, +/** unique, mutable, user-controlled identifier for each resource */ +"name": Name, +/** The location that matched packets should be forwarded to */ +"target": RouteTarget, /** timestamp when this resource was created */ "timeCreated": Date, /** timestamp when this resource was last modified */ -"timeModified": Date,}; - -/** -* A single page of results - */ -export type RackResultsPage = -{ -/** list of items on this page of results */ -"items": (Rack)[], -/** token used to fetch the next page of results (if any) */ -"nextPage"?: string | null,}; - -/** -* A name for a built-in role -* -* Role names consist of two string components separated by dot ("."). - */ -export type RoleName = -string; +"timeModified": Date, +/** The ID of the VPC Router to which the route belongs */ +"vpcRouterId": string,}; /** -* View of a Role +* Create-time parameters for a `RouterRoute` */ -export type Role = -{"description": string,"name": RoleName,}; +export type RouterRouteCreate = +{"description": string, +/** Selects which traffic this routing rule will apply to. */ +"destination": RouteDestination,"name": Name, +/** The location that matched packets should be forwarded to. */ +"target": RouteTarget,}; /** * A single page of results */ -export type RoleResultsPage = +export type RouterRouteResultsPage = { /** list of items on this page of results */ -"items": (Role)[], +"items": (RouterRoute)[], /** token used to fetch the next page of results (if any) */ "nextPage"?: string | null,}; /** -* A route to a destination network through a gateway address. - */ -export type Route = -{ -/** The route destination. */ -"dst": IpNet, -/** The route gateway. */ -"gw": string, -/** VLAN id the gateway is reachable over. */ -"vid"?: number | null,}; - -/** -* Route configuration data associated with a switch port configuration. +* Updateable properties of a `RouterRoute` */ -export type RouteConfig = -{ -/** The set of routes assigned to a switch port. */ -"routes": (Route)[],}; +export type RouterRouteUpdate = +{"description"?: string | null, +/** Selects which traffic this routing rule will apply to. */ +"destination": RouteDestination,"name"?: Name | null, +/** The location that matched packets should be forwarded to. */ +"target": RouteTarget,}; /** * Identity-related metadata that's included in nearly all public API objects @@ -2087,6 +3991,31 @@ export type SamlIdentityProviderCreate = /** customer's technical contact for saml configuration */ "technicalContactEmail": string,}; +export type ScimClientBearerToken = +{"id": string,"timeCreated": Date,"timeExpires"?: Date | null,}; + +/** +* The POST response is the only time the generated bearer token is returned to the client. + */ +export type ScimClientBearerTokenValue = +{"bearerToken": string,"id": string,"timeCreated": Date,"timeExpires"?: Date | null,}; + +/** +* Configuration of inbound ICMP allowed by API services. + */ +export type ServiceIcmpConfig = +{ +/** When enabled, Nexus is able to receive ICMP Destination Unreachable type 3 (port unreachable) and type 4 (fragmentation needed), Redirect, and Time Exceeded messages. These enable Nexus to perform Path MTU discovery and better cope with fragmentation issues. Otherwise all inbound ICMP traffic will be dropped. */ +"enabled": boolean,}; + +/** +* Parameters for PUT requests to `/v1/system/update/target-release`. + */ +export type SetTargetReleaseParams = +{ +/** Version of the system software to make the target release. */ +"systemVersion": string,}; + /** * Describes how identities are managed and users are authenticated in this Silo */ @@ -2097,6 +4026,9 @@ export type SiloIdentityMode = /** The system is the source of truth about users. There is no linkage to an external authentication provider or identity provider. */ | "local_only" +/** Users are authenticated with SAML using an external authentication provider. Users and groups are managed with SCIM API calls, likely from the same authentication provider. */ +| "saml_scim" + ); /** @@ -2106,6 +4038,8 @@ export type SiloIdentityMode = */ export type Silo = { +/** Optionally, silos can have a group name that is automatically granted the silo admin role. */ +"adminGroupName"?: string | null, /** human-readable free-form text about a resource */ "description": string, /** A silo where discoverable is false can be retrieved only by its id - it will not be part of the "list all silos" output. */ @@ -2125,6 +4059,22 @@ The default is that no Fleet roles are conferred by any Silo roles unless there' /** timestamp when this resource was last modified */ "timeModified": Date,}; +/** +* View of silo authentication settings + */ +export type SiloAuthSettings = +{ +/** Maximum lifetime of a device token in seconds. If set to null, users will be able to create tokens that do not expire. */ +"deviceTokenMaxTtlSeconds"?: number | null,"siloId": string,}; + +/** +* Updateable properties of a silo's settings. + */ +export type SiloAuthSettingsUpdate = +{ +/** Maximum lifetime of a device token in seconds. If set to null, users will be able to create tokens that do not expire. */ +"deviceTokenMaxTtlSeconds": number | null,}; + /** * The amount of provisionable resources for a Silo */ @@ -2164,10 +4114,16 @@ export type SiloIpPool = "description": string, /** unique, immutable, system-controlled identifier for each resource */ "id": string, -/** When a pool is the default for a silo, floating IPs and instance ephemeral IPs will come from that pool when no other pool is specified. There can be at most one default for a given silo. */ +/** The IP version for the pool. */ +"ipVersion": IpVersion, +/** When a pool is the default for a silo, floating IPs and instance ephemeral IPs will come from that pool when no other pool is specified. + +A silo can have at most one default pool per combination of pool type (unicast or multicast) and IP version (IPv4 or IPv6), allowing up to 4 default pools total. */ "isDefault": boolean, /** unique, mutable, user-controlled identifier for each resource */ "name": Name, +/** Type of IP pool (unicast or multicast). */ +"poolType": IpPoolType, /** timestamp when this resource was created */ "timeCreated": Date, /** timestamp when this resource was last modified */ @@ -2230,6 +4186,7 @@ export type SiloResultsPage = export type SiloRole = "admin" | "collaborator" +| "limited_collaborator" | "viewer" ; @@ -2316,7 +4273,7 @@ An expunged sled is always non-provisionable. */ ); /** -* The current state of the sled, as determined by Nexus. +* The current state of the sled. */ export type SledState = (/** The sled is currently active, and has resources allocated on it. */ @@ -2340,7 +4297,7 @@ export type Sled = "policy": SledPolicy, /** The rack to which this Sled is currently attached */ "rackId": string, -/** The current state Nexus believes the sled to be in. */ +/** The current state of the sled. */ "state": SledState, /** timestamp when this resource was created */ "timeCreated": Date, @@ -2351,6 +4308,12 @@ export type Sled = /** Amount of RAM which may be used by the Sled's OS */ "usablePhysicalRam": ByteCount,}; +/** +* The unique ID of a sled. + */ +export type SledId = +{"id": string,}; + /** * An operator's view of an instance running on a given sled */ @@ -2480,6 +4443,52 @@ export type SshKeyResultsPage = /** token used to fetch the next page of results (if any) */ "nextPage"?: string | null,}; +export type SupportBundleCreate = +{ +/** User comment for the support bundle */ +"userComment"?: string | null,}; + +export type SupportBundleState = +(/** Support Bundle still actively being collected. + +This is the initial state for a Support Bundle, and it will automatically transition to either "Failing" or "Active". + +If a user no longer wants to access a Support Bundle, they can request cancellation, which will transition to the "Destroying" state. */ +| "collecting" + +/** Support Bundle is being destroyed. + +Once backing storage has been freed, this bundle is destroyed. */ +| "destroying" + +/** Support Bundle was not created successfully, or was created and has lost backing storage. + +The record of the bundle still exists for readability, but the only valid operation on these bundles is to destroy them. */ +| "failed" + +/** Support Bundle has been processed, and is ready for usage. */ +| "active" + +); + +export type SupportBundleInfo = +{"id": string,"reasonForCreation": string,"reasonForFailure"?: string | null,"state": SupportBundleState,"timeCreated": Date,"userComment"?: string | null,}; + +/** +* A single page of results + */ +export type SupportBundleInfoResultsPage = +{ +/** list of items on this page of results */ +"items": (SupportBundleInfo)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; + +export type SupportBundleUpdate = +{ +/** User comment for the support bundle */ +"userComment"?: string | null,}; + /** * An operator's view of a Switch. */ @@ -2517,7 +4526,7 @@ export type SwitchInterfaceConfig = /** A unique identifier for this switch interface. */ "id": string, /** The name of this switch interface. */ -"interfaceName": string, +"interfaceName": Name, /** The switch interface kind. */ "kind": SwitchInterfaceKind2, /** The port settings object this switch interface configuration belongs to. */ @@ -2549,9 +4558,14 @@ export type SwitchInterfaceConfigCreate = { /** What kind of switch interface this configuration represents. */ "kind": SwitchInterfaceKind, +/** Link name. On ports that are not broken out, this is always phy0. On a 2x breakout the options are phy0 and phy1, on 4x phy0-phy3, etc. */ +"linkName": Name, /** Whether or not IPv6 is enabled. */ "v6Enabled": boolean,}; +export type SwitchLinkState = +Record; + /** * A switch port represents a physical external port on a rack switch. */ @@ -2560,7 +4574,7 @@ export type SwitchPort = /** The id of the switch port. */ "id": string, /** The name of this switch port. */ -"portName": string, +"portName": Name, /** The primary settings group of this switch port. Will be `None` until this switch port is configured. */ "portSettingsId"?: string | null, /** The rack this switch port belongs to. */ @@ -2571,16 +4585,22 @@ export type SwitchPort = /** * An IP address configuration for a port settings object. */ -export type SwitchPortAddressConfig = +export type SwitchPortAddressView = { /** The IP address and prefix. */ "address": IpNet, /** The id of the address lot block this address is drawn from. */ "addressLotBlockId": string, +/** The id of the address lot this address is drawn from. */ +"addressLotId": string, +/** The name of the address lot this address is drawn from. */ +"addressLotName": Name, /** The interface name this address belongs to. */ -"interfaceName": string, +"interfaceName": Name, /** The port settings object this address configuration belongs to. */ -"portSettingsId": string,}; +"portSettingsId": string, +/** An optional VLAN ID */ +"vlanId"?: number | null,}; /** * Parameters for applying settings to switch ports. @@ -2590,20 +4610,6 @@ export type SwitchPortApplySettings = /** A name or id to use when applying switch port settings. */ "portSettings": NameOrId,}; -/** -* A BGP peer configuration for a port settings object. - */ -export type SwitchPortBgpPeerConfig = -{ -/** The address of the peer. */ -"addr": string, -/** The id of the global BGP configuration referenced by this peer configuration. */ -"bgpConfigId": string, -/** The interface name used to establish a peer session. */ -"interfaceName": string, -/** The port settings object this BGP configuration belongs to. */ -"portSettingsId": string,}; - /** * The link geometry associated with a switch port. */ @@ -2652,19 +4658,43 @@ export type SwitchPortConfigCreate = /** Link geometry for the switch port. */ "geometry": SwitchPortGeometry,}; +/** +* Per-port tx-eq overrides. This can be used to fine-tune the transceiver equalization settings to improve signal integrity. + */ +export type TxEqConfig2 = +{ +/** Main tap */ +"main"?: number | null, +/** Post-cursor tap1 */ +"post1"?: number | null, +/** Post-cursor tap2 */ +"post2"?: number | null, +/** Pre-cursor tap1 */ +"pre1"?: number | null, +/** Pre-cursor tap2 */ +"pre2"?: number | null,}; + /** * A link configuration for a port settings object. */ export type SwitchPortLinkConfig = { +/** Whether or not the link has autonegotiation enabled. */ +"autoneg": boolean, +/** The requested forward-error correction method. If this is not specified, the standard FEC for the underlying media will be applied if it can be determined. */ +"fec"?: LinkFec | null, /** The name of this link. */ -"linkName": string, -/** The link-layer discovery protocol service configuration id for this link. */ -"lldpServiceConfigId": string, +"linkName": Name, +/** The link-layer discovery protocol service configuration for this link. */ +"lldpLinkConfig"?: LldpLinkConfig | null, /** The maximum transmission unit for this link. */ "mtu": number, /** The port settings this link configuration belongs to. */ -"portSettingsId": string,}; +"portSettingsId": string, +/** The configured speed of the link. */ +"speed": LinkSpeed, +/** The tx_eq configuration for this link. */ +"txEqConfig"?: TxEqConfig2 | null,}; /** * A single page of results @@ -2677,119 +4707,241 @@ export type SwitchPortResultsPage = "nextPage"?: string | null,}; /** -* A route configuration for a port settings object. +* A route configuration for a port settings object. + */ +export type SwitchPortRouteConfig = +{ +/** The route's destination network. */ +"dst": IpNet, +/** The route's gateway address. */ +"gw": string, +/** The interface name this route configuration is assigned to. */ +"interfaceName": Name, +/** The port settings object this route configuration belongs to. */ +"portSettingsId": string, +/** Route RIB priority. Higher priority indicates precedence within and across protocols. */ +"ribPriority"?: number | null, +/** The VLAN identifier for the route. Use this if the gateway is reachable over an 802.1Q tagged L2 segment. */ +"vlanId"?: number | null,}; + +/** +* This structure maps a port settings object to a port settings groups. Port settings objects may inherit settings from groups. This mapping defines the relationship between settings objects and the groups they reference. + */ +export type SwitchPortSettingsGroups = +{ +/** The id of a port settings group being referenced by a port settings object. */ +"portSettingsGroupId": string, +/** The id of a port settings object referencing a port settings group. */ +"portSettingsId": 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. + */ +export type SwitchPortSettings = +{ +/** Layer 3 IP address settings. */ +"addresses": (SwitchPortAddressView)[], +/** BGP peer settings. */ +"bgpPeers": (BgpPeer)[], +/** human-readable free-form text about a resource */ +"description": string, +/** Switch port settings included from other switch port settings groups. */ +"groups": (SwitchPortSettingsGroups)[], +/** unique, immutable, system-controlled identifier for each resource */ +"id": string, +/** Layer 3 interface settings. */ +"interfaces": (SwitchInterfaceConfig)[], +/** Layer 2 link settings. */ +"links": (SwitchPortLinkConfig)[], +/** unique, mutable, user-controlled identifier for each resource */ +"name": Name, +/** Layer 1 physical port settings. */ +"port": SwitchPortConfig, +/** IP route settings. */ +"routes": (SwitchPortRouteConfig)[], +/** timestamp when this resource was created */ +"timeCreated": Date, +/** timestamp when this resource was last modified */ +"timeModified": Date, +/** Vlan interface settings. */ +"vlanInterfaces": (SwitchVlanInterfaceConfig)[],}; + +/** +* Parameters for creating switch port settings. Switch port settings are the central data structure for setting up external networking. Switch port settings include link, interface, route, address and dynamic network protocol configuration. + */ +export type SwitchPortSettingsCreate = +{ +/** Address configurations. */ +"addresses": (AddressConfig)[], +/** BGP peer configurations. */ +"bgpPeers"?: (BgpPeerConfig)[],"description": string,"groups"?: (NameOrId)[], +/** Interface configurations. */ +"interfaces"?: (SwitchInterfaceConfigCreate)[], +/** Link configurations. */ +"links": (LinkConfigCreate)[],"name": Name,"portConfig": SwitchPortConfigCreate, +/** Route configurations. */ +"routes"?: (RouteConfig)[],}; + +/** +* A switch port settings identity whose id may be used to view additional details. + */ +export type SwitchPortSettingsIdentity = +{ +/** human-readable free-form text about a resource */ +"description": string, +/** unique, immutable, system-controlled identifier for each resource */ +"id": string, +/** unique, mutable, user-controlled identifier for each resource */ +"name": Name, +/** timestamp when this resource was created */ +"timeCreated": Date, +/** timestamp when this resource was last modified */ +"timeModified": Date,}; + +/** +* A single page of results + */ +export type SwitchPortSettingsIdentityResultsPage = +{ +/** list of items on this page of results */ +"items": (SwitchPortSettingsIdentity)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; + +/** +* A single page of results + */ +export type SwitchResultsPage = +{ +/** list of items on this page of results */ +"items": (Switch)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; + +/** +* View of a system software target release + */ +export type TargetRelease = +{ +/** Time this was set as the target release */ +"timeRequested": Date, +/** The specified release of the rack's system software */ +"version": string,}; + +/** +* Text descriptions for the target and metric of a timeseries. + */ +export type TimeseriesDescription = +{"metric": string,"target": string,}; + +/** +* The name of a timeseries +* +* Names are constructed by concatenating the target and metric names with ':'. Target and metric names must be lowercase alphanumeric characters with '_' separating words. */ -export type SwitchPortRouteConfig = -{ -/** The route's destination network. */ -"dst": IpNet, -/** The route's gateway address. */ -"gw": IpNet, -/** The interface name this route configuration is assigned to. */ -"interfaceName": string, -/** The port settings object this route configuration belongs to. */ -"portSettingsId": string, -/** The VLAN identifier for the route. Use this if the gateway is reachable over an 802.1Q tagged L2 segment. */ -"vlanId"?: number | null,}; +export type TimeseriesName = +string; /** -* A switch port settings identity whose id may be used to view additional details. +* A timeseries query string, written in the Oximeter query language. */ -export type SwitchPortSettings = +export type TimeseriesQuery = { -/** human-readable free-form text about a resource */ -"description": string, -/** unique, immutable, system-controlled identifier for each resource */ -"id": string, -/** unique, mutable, user-controlled identifier for each resource */ -"name": Name, -/** timestamp when this resource was created */ -"timeCreated": Date, -/** timestamp when this resource was last modified */ -"timeModified": Date,}; +/** A timeseries query string, written in the Oximeter query language. */ +"query": string,}; /** -* Parameters for creating switch port settings. Switch port settings are the central data structure for setting up external networking. Switch port settings include link, interface, route, address and dynamic network protocol configuration. +* Measurement units for timeseries samples. */ -export type SwitchPortSettingsCreate = -{ -/** Addresses indexed by interface name. */ -"addresses": Record, -/** BGP peers indexed by interface name. */ -"bgpPeers": Record,"description": string,"groups": (NameOrId)[], -/** Interfaces indexed by link name. */ -"interfaces": Record, -/** Links indexed by phy name. On ports that are not broken out, this is always phy0. On a 2x breakout the options are phy0 and phy1, on 4x phy0-phy3, etc. */ -"links": Record,"name": Name,"portConfig": SwitchPortConfigCreate, -/** Routes indexed by interface name. */ -"routes": Record,}; +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" + +); /** -* This structure maps a port settings object to a port settings groups. Port settings objects may inherit settings from groups. This mapping defines the relationship between settings objects and the groups they reference. +* The schema for a timeseries. +* +* This includes the name of the timeseries, as well as the datum type of its metric and the schema for each field. */ -export type SwitchPortSettingsGroups = -{ -/** The id of a port settings group being referenced by a port settings object. */ -"portSettingsGroupId": string, -/** The id of a port settings object referencing a port settings group. */ -"portSettingsId": string,}; +export type TimeseriesSchema = +{"authzScope": AuthzScope,"created": Date,"datumType": DatumType,"description": TimeseriesDescription,"fieldSchema": (FieldSchema)[],"timeseriesName": TimeseriesName,"units": Units,"version": number,}; /** * A single page of results */ -export type SwitchPortSettingsResultsPage = +export type TimeseriesSchemaResultsPage = { /** list of items on this page of results */ -"items": (SwitchPortSettings)[], +"items": (TimeseriesSchema)[], /** token used to fetch the next page of results (if any) */ "nextPage"?: string | null,}; /** -* A switch port VLAN interface configuration for a port settings object. +* Metadata about a TUF repository */ -export type SwitchVlanInterfaceConfig = +export type TufRepo = { -/** 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,}; +/** The file name of the repository, as reported by the client that uploaded it -/** -* 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. - */ -export type SwitchPortSettingsView = -{ -/** Layer 3 IP address settings. */ -"addresses": (SwitchPortAddressConfig)[], -/** BGP peer settings. */ -"bgpPeers": (SwitchPortBgpPeerConfig)[], -/** Switch port settings included from other switch port settings groups. */ -"groups": (SwitchPortSettingsGroups)[], -/** Layer 3 interface settings. */ -"interfaces": (SwitchInterfaceConfig)[], -/** Link-layer discovery protocol (LLDP) settings. */ -"linkLldp": (LldpServiceConfig)[], -/** Layer 2 link settings. */ -"links": (SwitchPortLinkConfig)[], -/** Layer 1 physical port settings. */ -"port": SwitchPortConfig, -/** IP route settings. */ -"routes": (SwitchPortRouteConfig)[], -/** The primary switch port settings handle. */ -"settings": SwitchPortSettings, -/** Vlan interface settings. */ -"vlanInterfaces": (SwitchVlanInterfaceConfig)[],}; +This is intended for debugging. The file name may not match any particular pattern, and even if it does, it may not be accurate since it's just what the client reported. */ +"fileName": string, +/** The hash of the repository */ +"hash": string, +/** The system version for this repository + +The system version is a top-level version number applied to all the software in the repository. */ +"systemVersion": string, +/** Time the repository was uploaded */ +"timeCreated": Date,}; /** * A single page of results */ -export type SwitchResultsPage = +export type TufRepoResultsPage = { /** list of items on this page of results */ -"items": (Switch)[], +"items": (TufRepo)[], /** token used to fetch the next page of results (if any) */ "nextPage"?: string | null,}; +/** +* Whether the uploaded TUF repo already existed or was new and had to be inserted. Part of `TufRepoUpload`. + */ +export type TufRepoUploadStatus = +(/** The repository already existed in the database */ +| "already_exists" + +/** The repository did not exist, and was inserted into the database */ +| "inserted" + +); + +export type TufRepoUpload = +{"repo": TufRepo,"status": TufRepoUploadStatus,}; + /** * A sled that has not been added to an initialized rack yet */ @@ -2812,6 +4964,51 @@ export type UninitializedSledResultsPage = /** token used to fetch the next page of results (if any) */ "nextPage"?: string | null,}; +export type UpdateStatus = +{ +/** Count of components running each release version + +Keys will be either: + +* Semver-like release version strings * "install dataset", representing the initial rack software before any updates * "unknown", which means there is no TUF repo uploaded that matches the software running on the component) */ +"componentsByReleaseVersion": Record, +/** Whether automatic update is suspended due to manual update activity + +After a manual support procedure that changes the system software, automatic update activity is suspended to avoid undoing the change. To resume automatic update, first upload the TUF repository matching the manually applied update, then set that as the target release. */ +"suspended": boolean, +/** Current target release of the system software + +This may not correspond to the actual system software running at the time of request; it is instead the release that the system should be moving towards as a goal state. The system asynchronously updates software to match this target release. + +Will only be null if a target release has never been set. In that case, the system is not automatically attempting to manage software versions. */ +"targetRelease": TargetRelease | null, +/** Time of most recent update planning activity + +This is intended as a rough indicator of the last time something happened in the update planner. */ +"timeLastStepPlanned": Date,}; + +/** +* Trusted root role used by the update system to verify update repositories. + */ +export type UpdatesTrustRoot = +{ +/** The UUID of this trusted root role. */ +"id": string, +/** The trusted root role itself, a JSON document as described by The Update Framework. */ +"rootRole": Record, +/** Time the trusted root role was added. */ +"timeCreated": Date,}; + +/** +* A single page of results + */ +export type UpdatesTrustRootResultsPage = +{ +/** list of items on this page of results */ +"items": (UpdatesTrustRoot)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; + /** * View of a User */ @@ -2825,7 +5022,7 @@ export type User = /** * View of a Built-in User * -* A Built-in User is explicitly created as opposed to being derived from an Identify Provider. +* Built-in users are identities internal to the system, used when the control plane performs actions autonomously */ export type UserBuiltin = { @@ -2851,9 +5048,9 @@ export type UserBuiltinResultsPage = "nextPage"?: string | null,}; /** -* A name unique within the parent collection +* A username for a local-only user * -* 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 though they may contain a UUID. +* Usernames must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'. Usernames cannot be a UUID, but they may contain a UUID. They can be at most 63 characters long. */ export type UserId = string; @@ -2940,6 +5137,9 @@ export type VpcCreate = All IPv6 subnets created from this VPC must be taken from this range, which should be a Unique Local Address in the range `fd00::/48`. The default VPC Subnet will have the first `/64` range from this prefix. */ "ipv6Prefix"?: Ipv6Net | null,"name": Name,}; +export type VpcFirewallIcmpFilter = +{"code"?: IcmpParamRange | null,"icmpType": number,}; + export type VpcFirewallRuleAction = "allow" | "deny" @@ -2972,243 +5172,638 @@ export type VpcFirewallRuleHostFilter = ); /** -* The protocols that may be specified in a firewall rule's filter +* The protocols that may be specified in a firewall rule's filter + */ +export type VpcFirewallRuleProtocol = +(| {"type": "tcp" +,} +| {"type": "udp" +,} +| {"type": "icmp" +,"value": VpcFirewallIcmpFilter | null,} +); + +/** +* 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)[] | null, +/** If present, the destination ports or port ranges this rule applies to. */ +"ports"?: (L4PortRange)[] | null, +/** If present, the networking protocols this rule applies to. */ +"protocols"?: (VpcFirewallRuleProtocol)[] | null,}; + +export type VpcFirewallRuleStatus = +"disabled" +| "enabled" +; + +/** +* A `VpcFirewallRuleTarget` is used to specify the set of instances to which a firewall rule applies. You can target instances directly by name, or specify a VPC, VPC subnet, IP, or IP subnet, which will apply the rule to traffic going to all matching instances. Targets are additive: the rule applies to instances matching ANY target. + */ +export type VpcFirewallRuleTarget = +(/** The rule applies to all instances in the VPC */ +| {"type": "vpc" +,"value": Name,} +/** The rule applies to all instances in the VPC Subnet */ +| {"type": "subnet" +,"value": Name,} +/** The rule applies to this specific instance */ +| {"type": "instance" +,"value": Name,} +/** The rule applies to a specific IP address */ +| {"type": "ip" +,"value": string,} +/** 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 + */ +export type VpcFirewallRuleUpdate = +{ +/** 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, +/** Name of the rule, unique to this VPC */ +"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)[],}; + +/** +* Updated list of firewall rules. Will replace all existing rules. + */ +export type VpcFirewallRuleUpdateParams = +{"rules"?: (VpcFirewallRuleUpdate)[],}; + +/** +* Collection of a Vpc's firewall rules + */ +export type VpcFirewallRules = +{"rules": (VpcFirewallRule)[],}; + +/** +* A single page of results + */ +export type VpcResultsPage = +{ +/** list of items on this page of results */ +"items": (Vpc)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; + +export type VpcRouterKind = +"system" +| "custom" +; + +/** +* A VPC router defines a series of rules that indicate where traffic should be sent depending on its destination. + */ +export type VpcRouter = +{ +/** human-readable free-form text about a resource */ +"description": string, +/** unique, immutable, system-controlled identifier for each resource */ +"id": string,"kind": VpcRouterKind, +/** unique, mutable, user-controlled identifier for each resource */ +"name": Name, +/** timestamp when this resource was created */ +"timeCreated": Date, +/** timestamp when this resource was last modified */ +"timeModified": Date, +/** The VPC to which the router belongs. */ +"vpcId": string,}; + +/** +* Create-time parameters for a `VpcRouter` + */ +export type VpcRouterCreate = +{"description": string,"name": Name,}; + +/** +* A single page of results + */ +export type VpcRouterResultsPage = +{ +/** list of items on this page of results */ +"items": (VpcRouter)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; + +/** +* Updateable properties of a `VpcRouter` + */ +export type VpcRouterUpdate = +{"description"?: string | null,"name"?: Name | null,}; + +/** +* A VPC subnet represents a logical grouping for instances that allows network traffic between them, within a IPv4 subnetwork or optionally an IPv6 subnetwork. + */ +export type VpcSubnet = +{ +/** ID for an attached custom router. */ +"customRouterId"?: string | null, +/** human-readable free-form text about a resource */ +"description": string, +/** unique, immutable, system-controlled identifier for each resource */ +"id": string, +/** The IPv4 subnet CIDR block. */ +"ipv4Block": Ipv4Net, +/** The IPv6 subnet CIDR block. */ +"ipv6Block": Ipv6Net, +/** unique, mutable, user-controlled identifier for each resource */ +"name": Name, +/** timestamp when this resource was created */ +"timeCreated": Date, +/** timestamp when this resource was last modified */ +"timeModified": Date, +/** The VPC to which the subnet belongs. */ +"vpcId": string,}; + +/** +* Create-time parameters for a `VpcSubnet` + */ +export type VpcSubnetCreate = +{ +/** An optional router, used to direct packets sent from hosts in this subnet to any destination address. + +Custom routers apply in addition to the VPC-wide *system* router, and have higher priority than the system router for an otherwise equal-prefix-length match. */ +"customRouter"?: NameOrId | null,"description": string, +/** The IPv4 address range for this subnet. + +It must be allocated from an RFC 1918 private address range, and must not overlap with any other existing subnet in the VPC. */ +"ipv4Block": Ipv4Net, +/** The IPv6 address range for this subnet. + +It must be allocated from the RFC 4193 Unique Local Address range, with the prefix equal to the parent VPC's prefix. A random `/64` block will be assigned if one is not provided. It must not overlap with any existing subnet in the VPC. */ +"ipv6Block"?: Ipv6Net | null,"name": Name,}; + +/** +* A single page of results */ -export type VpcFirewallRuleProtocol = -"TCP" -| "UDP" -| "ICMP" -; +export type VpcSubnetResultsPage = +{ +/** list of items on this page of results */ +"items": (VpcSubnet)[], +/** token used to fetch the next page of results (if any) */ +"nextPage"?: string | null,}; /** -* Filter for a firewall rule. A given packet must match every field that is present for the rule to apply to it. A packet matches a field if any entry in that field matches the packet. +* Updateable properties of a `VpcSubnet` */ -export type VpcFirewallRuleFilter = +export type VpcSubnetUpdate = { -/** If present, the sources (if incoming) or destinations (if outgoing) this rule applies to. */ -"hosts"?: (VpcFirewallRuleHostFilter)[] | null, -/** If present, the destination ports this rule applies to. */ -"ports"?: (L4PortRange)[] | null, -/** If present, the networking protocols this rule applies to. */ -"protocols"?: (VpcFirewallRuleProtocol)[] | null,}; +/** An optional router, used to direct packets sent from hosts in this subnet to any destination address. */ +"customRouter"?: NameOrId | null,"description"?: string | null,"name"?: Name | null,}; -export type VpcFirewallRuleStatus = -"disabled" -| "enabled" -; +/** +* Updateable properties of a `Vpc` + */ +export type VpcUpdate = +{"description"?: string | null,"dnsName"?: Name | null,"name"?: Name | null,}; /** -* A `VpcFirewallRuleTarget` is used to specify the set of `Instance`s to which a firewall rule applies. +* Create-time identity-related parameters */ -export type VpcFirewallRuleTarget = -(/** The rule applies to all instances in the VPC */ -| {"type": "vpc" -,"value": Name,} -/** The rule applies to all instances in the VPC Subnet */ -| {"type": "subnet" -,"value": Name,} -/** The rule applies to this specific instance */ -| {"type": "instance" -,"value": Name,} -/** The rule applies to a specific IP address */ -| {"type": "ip" -,"value": string,} -/** The rule applies to a specific IP subnet */ -| {"type": "ip_net" -,"value": IpNet,} -); +export type WebhookCreate = +{"description": string, +/** The URL that webhook notification requests should be sent to */ +"endpoint": string,"name": Name, +/** A non-empty list of secret keys used to sign webhook payloads. */ +"secrets": (string)[], +/** A list of webhook event class subscriptions. + +If this list is empty or is not included in the request body, the webhook will not be subscribed to any events. */ +"subscriptions"?: (AlertSubscription)[],}; /** -* A single rule in a VPC firewall +* The configuration for a webhook alert receiver. */ -export type VpcFirewallRule = +export type WebhookReceiver = { -/** 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, +/** The URL that webhook notification requests are sent to. */ +"endpoint": string, /** 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, -/** list of sets of instances that the rule applies to */ -"targets": (VpcFirewallRuleTarget)[], +"name": Name,"secrets": (WebhookSecret)[], +/** The list of alert classes to which this receiver is subscribed. */ +"subscriptions": (AlertSubscription)[], /** 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,}; +"timeModified": Date,}; /** -* A single rule in a VPC firewall +* Parameters to update a webhook configuration. */ -export type VpcFirewallRuleUpdate = +export type WebhookReceiverUpdate = +{"description"?: string | null, +/** The URL that webhook notification requests should be sent to */ +"endpoint"?: string | null,"name"?: Name | null,}; + +export type WebhookSecretCreate = { -/** 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, -/** name of the rule, unique to this VPC */ -"name": Name, -/** the relative priority of this rule */ -"priority": number, -/** whether this rule is in effect */ -"status": VpcFirewallRuleStatus, -/** list of sets of instances that the rule applies to */ -"targets": (VpcFirewallRuleTarget)[],}; +/** The value of the shared secret key. */ +"secret": string,}; /** -* Updateable properties of a `Vpc`'s firewall Note that VpcFirewallRules are implicitly created along with a Vpc, so there is no explicit creation. +* A list of the IDs of secrets associated with a webhook receiver. */ -export type VpcFirewallRuleUpdateParams = -{"rules": (VpcFirewallRuleUpdate)[],}; +export type WebhookSecrets = +{"secrets": (WebhookSecret)[],}; /** -* Collection of a Vpc's firewall rules +* Supported set of sort modes for scanning by name or id */ -export type VpcFirewallRules = -{"rules": (VpcFirewallRule)[],}; +export type NameOrIdSortMode = +(/** sort in increasing order of "name" */ +| "name_ascending" + +/** sort in decreasing order of "name" */ +| "name_descending" + +/** sort in increasing order of "id" */ +| "id_ascending" + +); + +/** +* Supported set of sort modes for scanning by timestamp and ID + */ +export type TimeAndIdSortMode = +(/** sort in increasing order of timestamp and ID, i.e., earliest first */ +| "time_and_id_ascending" + +/** sort in increasing order of timestamp and ID, i.e., most recent first */ +| "time_and_id_descending" + +); + +/** +* Supported set of sort modes for scanning by id only. +* +* Currently, we only support scanning in ascending order. + */ +export type IdSortMode = +"id_ascending" +; + +export type SystemMetricName = +"virtual_disk_space_provisioned" +| "cpus_provisioned" +| "ram_provisioned" +; + +/** +* The order in which the client wants to page through the requested collection + */ +export type PaginationOrder = +"ascending" +| "descending" +; + +/** +* Supported sort modes when scanning by semantic version + */ +export type VersionSortMode = +(/** Sort in increasing semantic version order (oldest first) */ +| "version_ascending" + +/** Sort in decreasing semantic version order (newest first) */ +| "version_descending" + +); + +/** +* Supported set of sort modes for scanning by name only +* +* Currently, we only support scanning in ascending order. + */ +export type NameSortMode = +"name_ascending" +; + +export interface ProbeListQueryParams { + limit?: number | null, + pageToken?: string | null, + project?: NameOrId, + sortBy?: NameOrIdSortMode, +} + +export interface ProbeCreateQueryParams { + project: NameOrId, +} + +export interface ProbeViewPathParams { + probe: NameOrId, +} + +export interface ProbeViewQueryParams { + project: NameOrId, +} + +export interface ProbeDeletePathParams { + probe: NameOrId, +} + +export interface ProbeDeleteQueryParams { + project: NameOrId, +} + +export interface SupportBundleListQueryParams { + limit?: number | null, + pageToken?: string | null, + sortBy?: TimeAndIdSortMode, +} + +export interface SupportBundleViewPathParams { + bundleId: string, +} + +export interface SupportBundleUpdatePathParams { + bundleId: string, +} + +export interface SupportBundleDeletePathParams { + bundleId: string, +} + +export interface SupportBundleDownloadPathParams { + bundleId: string, +} + +export interface SupportBundleHeadPathParams { + bundleId: string, +} + +export interface SupportBundleDownloadFilePathParams { + bundleId: string, + file: string, +} + +export interface SupportBundleHeadFilePathParams { + bundleId: string, + file: string, +} + +export interface SupportBundleIndexPathParams { + bundleId: string, +} + +export interface LoginSamlPathParams { + providerName: Name, + siloName: Name, +} + +export interface AffinityGroupListQueryParams { + limit?: number | null, + pageToken?: string | null, + project?: NameOrId, + sortBy?: NameOrIdSortMode, +} + +export interface AffinityGroupCreateQueryParams { + project: NameOrId, +} + +export interface AffinityGroupViewPathParams { + affinityGroup: NameOrId, +} + +export interface AffinityGroupViewQueryParams { + project?: NameOrId, +} + +export interface AffinityGroupUpdatePathParams { + affinityGroup: NameOrId, +} + +export interface AffinityGroupUpdateQueryParams { + project?: NameOrId, +} + +export interface AffinityGroupDeletePathParams { + affinityGroup: NameOrId, +} + +export interface AffinityGroupDeleteQueryParams { + project?: NameOrId, +} + +export interface AffinityGroupMemberListPathParams { + affinityGroup: NameOrId, +} + +export interface AffinityGroupMemberListQueryParams { + limit?: number | null, + pageToken?: string | null, + project?: NameOrId, + sortBy?: NameOrIdSortMode, +} + +export interface AffinityGroupMemberInstanceViewPathParams { + affinityGroup: NameOrId, + instance: NameOrId, +} + +export interface AffinityGroupMemberInstanceViewQueryParams { + project?: NameOrId, +} + +export interface AffinityGroupMemberInstanceAddPathParams { + affinityGroup: NameOrId, + instance: NameOrId, +} + +export interface AffinityGroupMemberInstanceAddQueryParams { + project?: NameOrId, +} + +export interface AffinityGroupMemberInstanceDeletePathParams { + affinityGroup: NameOrId, + instance: NameOrId, +} + +export interface AffinityGroupMemberInstanceDeleteQueryParams { + project?: NameOrId, +} + +export interface AlertClassListQueryParams { + limit?: number | null, + pageToken?: string | null, + filter?: AlertSubscription, +} + +export interface AlertReceiverListQueryParams { + limit?: number | null, + pageToken?: string | null, + sortBy?: NameOrIdSortMode, +} + +export interface AlertReceiverViewPathParams { + receiver: NameOrId, +} + +export interface AlertReceiverDeletePathParams { + receiver: NameOrId, +} + +export interface AlertDeliveryListPathParams { + receiver: NameOrId, +} + +export interface AlertDeliveryListQueryParams { + delivered?: boolean | null, + failed?: boolean | null, + pending?: boolean | null, + limit?: number | null, + pageToken?: string | null, + sortBy?: TimeAndIdSortMode, +} + +export interface AlertReceiverProbePathParams { + receiver: NameOrId, +} + +export interface AlertReceiverProbeQueryParams { + resend?: boolean, +} -/** -* A single page of results - */ -export type VpcResultsPage = -{ -/** list of items on this page of results */ -"items": (Vpc)[], -/** token used to fetch the next page of results (if any) */ -"nextPage"?: string | null,}; +export interface AlertReceiverSubscriptionAddPathParams { + receiver: NameOrId, +} -/** -* A VPC subnet represents a logical grouping for instances that allows network traffic between them, within a IPv4 subnetwork or optionall an IPv6 subnetwork. - */ -export type VpcSubnet = -{ -/** human-readable free-form text about a resource */ -"description": string, -/** unique, immutable, system-controlled identifier for each resource */ -"id": string, -/** The IPv4 subnet CIDR block. */ -"ipv4Block": Ipv4Net, -/** The IPv6 subnet CIDR block. */ -"ipv6Block": Ipv6Net, -/** unique, mutable, user-controlled identifier for each resource */ -"name": Name, -/** timestamp when this resource was created */ -"timeCreated": Date, -/** timestamp when this resource was last modified */ -"timeModified": Date, -/** The VPC to which the subnet belongs. */ -"vpcId": string,}; +export interface AlertReceiverSubscriptionRemovePathParams { + receiver: NameOrId, + subscription: AlertSubscription, +} -/** -* Create-time parameters for a `VpcSubnet` - */ -export type VpcSubnetCreate = -{"description": string, -/** The IPv4 address range for this subnet. +export interface AlertDeliveryResendPathParams { + alertId: string, +} -It must be allocated from an RFC 1918 private address range, and must not overlap with any other existing subnet in the VPC. */ -"ipv4Block": Ipv4Net, -/** The IPv6 address range for this subnet. +export interface AlertDeliveryResendQueryParams { + receiver: NameOrId, +} -It must be allocated from the RFC 4193 Unique Local Address range, with the prefix equal to the parent VPC's prefix. A random `/64` block will be assigned if one is not provided. It must not overlap with any existing subnet in the VPC. */ -"ipv6Block"?: Ipv6Net | null,"name": Name,}; +export interface AntiAffinityGroupListQueryParams { + limit?: number | null, + pageToken?: string | null, + project?: NameOrId, + sortBy?: NameOrIdSortMode, +} -/** -* A single page of results - */ -export type VpcSubnetResultsPage = -{ -/** list of items on this page of results */ -"items": (VpcSubnet)[], -/** token used to fetch the next page of results (if any) */ -"nextPage"?: string | null,}; +export interface AntiAffinityGroupCreateQueryParams { + project: NameOrId, +} -/** -* Updateable properties of a `VpcSubnet` - */ -export type VpcSubnetUpdate = -{"description"?: string | null,"name"?: Name | null,}; +export interface AntiAffinityGroupViewPathParams { + antiAffinityGroup: NameOrId, +} -/** -* Updateable properties of a `Vpc` - */ -export type VpcUpdate = -{"description"?: string | null,"dnsName"?: Name | null,"name"?: Name | null,}; +export interface AntiAffinityGroupViewQueryParams { + project?: NameOrId, +} -/** -* Supported set of sort modes for scanning by name or id - */ -export type NameOrIdSortMode = -(/** sort in increasing order of "name" */ -| "name_ascending" +export interface AntiAffinityGroupUpdatePathParams { + antiAffinityGroup: NameOrId, +} -/** sort in decreasing order of "name" */ -| "name_descending" +export interface AntiAffinityGroupUpdateQueryParams { + project?: NameOrId, +} -/** sort in increasing order of "id" */ -| "id_ascending" +export interface AntiAffinityGroupDeletePathParams { + antiAffinityGroup: NameOrId, +} -); +export interface AntiAffinityGroupDeleteQueryParams { + project?: NameOrId, +} -export type DiskMetricName = -"activated" -| "flush" -| "read" -| "read_bytes" -| "write" -| "write_bytes" -; +export interface AntiAffinityGroupMemberListPathParams { + antiAffinityGroup: NameOrId, +} -/** -* The order in which the client wants to page through the requested collection - */ -export type PaginationOrder = -"ascending" -| "descending" -; +export interface AntiAffinityGroupMemberListQueryParams { + limit?: number | null, + pageToken?: string | null, + project?: NameOrId, + sortBy?: NameOrIdSortMode, +} -/** -* Supported set of sort modes for scanning by id only. -* -* Currently, we only support scanning in ascending order. - */ -export type IdSortMode = -"id_ascending" -; +export interface AntiAffinityGroupMemberInstanceViewPathParams { + antiAffinityGroup: NameOrId, + instance: NameOrId, +} -export type SystemMetricName = -"virtual_disk_space_provisioned" -| "cpus_provisioned" -| "ram_provisioned" -; +export interface AntiAffinityGroupMemberInstanceViewQueryParams { + project?: NameOrId, +} -/** -* Supported set of sort modes for scanning by name only -* -* Currently, we only support scanning in ascending order. - */ -export type NameSortMode = -"name_ascending" -; +export interface AntiAffinityGroupMemberInstanceAddPathParams { + antiAffinityGroup: NameOrId, + instance: NameOrId, +} -export interface LoginSamlPathParams { - providerName: Name, - siloName: Name, +export interface AntiAffinityGroupMemberInstanceAddQueryParams { + project?: NameOrId, +} + +export interface AntiAffinityGroupMemberInstanceDeletePathParams { + antiAffinityGroup: NameOrId, + instance: NameOrId, +} + +export interface AntiAffinityGroupMemberInstanceDeleteQueryParams { + project?: NameOrId, } export interface CertificateListQueryParams { @@ -3284,20 +5879,6 @@ export interface DiskFinalizeImportQueryParams { project?: NameOrId, } -export interface DiskMetricsListPathParams { - disk: NameOrId, - metric: DiskMetricName, -} - -export interface DiskMetricsListQueryParams { - endTime?: Date, - limit?: number | null, - order?: PaginationOrder, - pageToken?: string | null, - startTime?: Date, - project?: NameOrId, -} - export interface FloatingIpListQueryParams { limit?: number | null, pageToken?: string | null, @@ -3421,6 +6002,14 @@ export interface InstanceViewQueryParams { project?: NameOrId, } +export interface InstanceUpdatePathParams { + instance: NameOrId, +} + +export interface InstanceUpdateQueryParams { + project?: NameOrId, +} + export interface InstanceDeletePathParams { instance: NameOrId, } @@ -3429,6 +6018,28 @@ export interface InstanceDeleteQueryParams { project?: NameOrId, } +export interface InstanceAffinityGroupListPathParams { + instance: NameOrId, +} + +export interface InstanceAffinityGroupListQueryParams { + limit?: number | null, + pageToken?: string | null, + project?: NameOrId, + sortBy?: NameOrIdSortMode, +} + +export interface InstanceAntiAffinityGroupListPathParams { + instance: NameOrId, +} + +export interface InstanceAntiAffinityGroupListQueryParams { + limit?: number | null, + pageToken?: string | null, + project?: NameOrId, + sortBy?: NameOrIdSortMode, +} + export interface InstanceDiskListPathParams { instance: NameOrId, } @@ -3480,11 +6091,29 @@ export interface InstanceEphemeralIpDetachQueryParams { project?: NameOrId, } -export interface InstanceMigratePathParams { +export interface InstanceMulticastGroupListPathParams { + instance: NameOrId, +} + +export interface InstanceMulticastGroupListQueryParams { + project?: NameOrId, +} + +export interface InstanceMulticastGroupJoinPathParams { + instance: NameOrId, + multicastGroup: NameOrId, +} + +export interface InstanceMulticastGroupJoinQueryParams { + project?: NameOrId, +} + +export interface InstanceMulticastGroupLeavePathParams { instance: NameOrId, + multicastGroup: NameOrId, } -export interface InstanceMigrateQueryParams { +export interface InstanceMulticastGroupLeaveQueryParams { project?: NameOrId, } @@ -3500,47 +6129,131 @@ export interface InstanceSerialConsolePathParams { instance: NameOrId, } -export interface InstanceSerialConsoleQueryParams { - fromStart?: number | null, - maxBytes?: number | null, - mostRecent?: number | null, +export interface InstanceSerialConsoleQueryParams { + fromStart?: number | null, + maxBytes?: number | null, + mostRecent?: number | null, + project?: NameOrId, +} + +export interface InstanceSerialConsoleStreamPathParams { + instance: NameOrId, +} + +export interface InstanceSerialConsoleStreamQueryParams { + mostRecent?: number | null, + project?: NameOrId, +} + +export interface InstanceSshPublicKeyListPathParams { + instance: NameOrId, +} + +export interface InstanceSshPublicKeyListQueryParams { + limit?: number | null, + pageToken?: string | null, + project?: NameOrId, + sortBy?: NameOrIdSortMode, +} + +export interface InstanceStartPathParams { + instance: NameOrId, +} + +export interface InstanceStartQueryParams { + project?: NameOrId, +} + +export interface InstanceStopPathParams { + instance: NameOrId, +} + +export interface InstanceStopQueryParams { + project?: NameOrId, +} + +export interface InternetGatewayIpAddressListQueryParams { + gateway?: NameOrId, + limit?: number | null, + pageToken?: string | null, + project?: NameOrId, + sortBy?: NameOrIdSortMode, + vpc?: NameOrId, +} + +export interface InternetGatewayIpAddressCreateQueryParams { + gateway: NameOrId, + project?: NameOrId, + vpc?: NameOrId, +} + +export interface InternetGatewayIpAddressDeletePathParams { + address: NameOrId, +} + +export interface InternetGatewayIpAddressDeleteQueryParams { + cascade?: boolean, + gateway?: NameOrId, + project?: NameOrId, + vpc?: NameOrId, +} + +export interface InternetGatewayIpPoolListQueryParams { + gateway?: NameOrId, + limit?: number | null, + pageToken?: string | null, + project?: NameOrId, + sortBy?: NameOrIdSortMode, + vpc?: NameOrId, +} + +export interface InternetGatewayIpPoolCreateQueryParams { + gateway: NameOrId, project?: NameOrId, + vpc?: NameOrId, } -export interface InstanceSerialConsoleStreamPathParams { - instance: NameOrId, +export interface InternetGatewayIpPoolDeletePathParams { + pool: NameOrId, } -export interface InstanceSerialConsoleStreamQueryParams { - mostRecent?: number | null, +export interface InternetGatewayIpPoolDeleteQueryParams { + cascade?: boolean, + gateway?: NameOrId, project?: NameOrId, + vpc?: NameOrId, } -export interface InstanceSshPublicKeyListPathParams { - instance: NameOrId, -} - -export interface InstanceSshPublicKeyListQueryParams { +export interface InternetGatewayListQueryParams { limit?: number | null, pageToken?: string | null, project?: NameOrId, sortBy?: NameOrIdSortMode, + vpc?: NameOrId, } -export interface InstanceStartPathParams { - instance: NameOrId, +export interface InternetGatewayCreateQueryParams { + project?: NameOrId, + vpc: NameOrId, } -export interface InstanceStartQueryParams { +export interface InternetGatewayViewPathParams { + gateway: NameOrId, +} + +export interface InternetGatewayViewQueryParams { project?: NameOrId, + vpc?: NameOrId, } -export interface InstanceStopPathParams { - instance: NameOrId, +export interface InternetGatewayDeletePathParams { + gateway: NameOrId, } -export interface InstanceStopQueryParams { +export interface InternetGatewayDeleteQueryParams { + cascade?: boolean, project?: NameOrId, + vpc?: NameOrId, } export interface ProjectIpPoolListQueryParams { @@ -3557,6 +6270,16 @@ export interface LoginLocalPathParams { siloName: Name, } +export interface CurrentUserAccessTokenListQueryParams { + limit?: number | null, + pageToken?: string | null, + sortBy?: IdSortMode, +} + +export interface CurrentUserAccessTokenDeletePathParams { + tokenId: string, +} + export interface CurrentUserGroupsQueryParams { limit?: number | null, pageToken?: string | null, @@ -3590,6 +6313,51 @@ export interface SiloMetricQueryParams { project?: NameOrId, } +export interface MulticastGroupListQueryParams { + limit?: number | null, + pageToken?: string | null, + sortBy?: NameOrIdSortMode, +} + +export interface MulticastGroupViewPathParams { + multicastGroup: NameOrId, +} + +export interface MulticastGroupUpdatePathParams { + multicastGroup: NameOrId, +} + +export interface MulticastGroupDeletePathParams { + multicastGroup: NameOrId, +} + +export interface MulticastGroupMemberListPathParams { + multicastGroup: NameOrId, +} + +export interface MulticastGroupMemberListQueryParams { + limit?: number | null, + pageToken?: string | null, + sortBy?: IdSortMode, +} + +export interface MulticastGroupMemberAddPathParams { + multicastGroup: NameOrId, +} + +export interface MulticastGroupMemberAddQueryParams { + project?: NameOrId, +} + +export interface MulticastGroupMemberRemovePathParams { + instance: NameOrId, + multicastGroup: NameOrId, +} + +export interface MulticastGroupMemberRemoveQueryParams { + project?: NameOrId, +} + export interface InstanceNetworkInterfaceListQueryParams { instance?: NameOrId, limit?: number | null, @@ -3683,12 +6451,36 @@ export interface SnapshotDeleteQueryParams { project?: NameOrId, } +export interface AuditLogListQueryParams { + endTime?: Date | null, + limit?: number | null, + pageToken?: string | null, + sortBy?: TimeAndIdSortMode, + startTime?: Date, +} + export interface PhysicalDiskListQueryParams { limit?: number | null, pageToken?: string | null, sortBy?: IdSortMode, } +export interface PhysicalDiskViewPathParams { + diskId: string, +} + +export interface NetworkingSwitchPortLldpNeighborsPathParams { + port: Name, + rackId: string, + switchLocation: Name, +} + +export interface NetworkingSwitchPortLldpNeighborsQueryParams { + limit?: number | null, + pageToken?: string | null, + sortBy?: IdSortMode, +} + export interface RackListQueryParams { limit?: number | null, pageToken?: string | null, @@ -3745,6 +6537,24 @@ export interface NetworkingSwitchPortListQueryParams { switchPortId?: string | null, } +export interface NetworkingSwitchPortLldpConfigViewPathParams { + port: Name, +} + +export interface NetworkingSwitchPortLldpConfigViewQueryParams { + rackId: string, + switchLocation: Name, +} + +export interface NetworkingSwitchPortLldpConfigUpdatePathParams { + port: Name, +} + +export interface NetworkingSwitchPortLldpConfigUpdateQueryParams { + rackId: string, + switchLocation: Name, +} + export interface NetworkingSwitchPortApplySettingsPathParams { port: Name, } @@ -3763,6 +6573,15 @@ export interface NetworkingSwitchPortClearSettingsQueryParams { switchLocation: Name, } +export interface NetworkingSwitchPortStatusPathParams { + port: Name, +} + +export interface NetworkingSwitchPortStatusQueryParams { + rackId: string, + switchLocation: Name, +} + export interface SwitchListQueryParams { limit?: number | null, pageToken?: string | null, @@ -3809,7 +6628,7 @@ export interface SamlIdentityProviderViewPathParams { } export interface SamlIdentityProviderViewQueryParams { - silo: NameOrId, + silo?: NameOrId, } export interface IpPoolListQueryParams { @@ -3871,6 +6690,10 @@ export interface IpPoolSiloUnlinkPathParams { silo: NameOrId, } +export interface IpPoolUtilizationViewPathParams { + pool: NameOrId, +} + export interface IpPoolServiceRangeListQueryParams { limit?: number | null, pageToken?: string | null, @@ -3889,12 +6712,20 @@ export interface SystemMetricQueryParams { silo?: NameOrId, } +export interface LookupMulticastGroupByIpPathParams { + address: string, +} + export interface NetworkingAddressLotListQueryParams { limit?: number | null, pageToken?: string | null, sortBy?: NameOrIdSortMode, } +export interface NetworkingAddressLotViewPathParams { + addressLot: NameOrId, +} + export interface NetworkingAddressLotDeletePathParams { addressLot: NameOrId, } @@ -3911,7 +6742,6 @@ export interface NetworkingAddressLotBlockListQueryParams { export interface NetworkingBgpConfigListQueryParams { limit?: number | null, - nameOrId?: NameOrId, pageToken?: string | null, sortBy?: NameOrIdSortMode, } @@ -3921,11 +6751,21 @@ export interface NetworkingBgpConfigDeleteQueryParams { } export interface NetworkingBgpAnnounceSetListQueryParams { - nameOrId: NameOrId, + limit?: number | null, + pageToken?: string | null, + sortBy?: NameOrIdSortMode, } -export interface NetworkingBgpAnnounceSetDeleteQueryParams { - nameOrId: NameOrId, +export interface NetworkingBgpAnnounceSetDeletePathParams { + announceSet: NameOrId, +} + +export interface NetworkingBgpAnnouncementListPathParams { + announceSet: NameOrId, +} + +export interface NetworkingBgpMessageHistoryQueryParams { + asn: number, } export interface NetworkingBgpImportedRoutesIpv4QueryParams { @@ -3960,13 +6800,28 @@ export interface NetworkingSwitchPortSettingsViewPathParams { port: NameOrId, } -export interface RoleListQueryParams { - limit?: number | null, - pageToken?: string | null, +export interface ScimTokenListQueryParams { + silo: NameOrId, +} + +export interface ScimTokenCreateQueryParams { + silo: NameOrId, +} + +export interface ScimTokenViewPathParams { + tokenId: string, +} + +export interface ScimTokenViewQueryParams { + silo: NameOrId, +} + +export interface ScimTokenDeletePathParams { + tokenId: string, } -export interface RoleViewPathParams { - roleName: string, +export interface ScimTokenDeleteQueryParams { + silo: NameOrId, } export interface SystemQuotasListQueryParams { @@ -4011,60 +6866,210 @@ export interface SiloQuotasViewPathParams { silo: NameOrId, } -export interface SiloQuotasUpdatePathParams { - silo: NameOrId, +export interface SiloQuotasUpdatePathParams { + silo: NameOrId, +} + +export interface SystemTimeseriesSchemaListQueryParams { + limit?: number | null, + pageToken?: string | null, +} + +export interface SystemUpdateRepositoryListQueryParams { + limit?: number | null, + pageToken?: string | null, + sortBy?: VersionSortMode, +} + +export interface SystemUpdateRepositoryUploadQueryParams { + fileName: string, +} + +export interface SystemUpdateRepositoryViewPathParams { + systemVersion: string, +} + +export interface SystemUpdateTrustRootListQueryParams { + limit?: number | null, + pageToken?: string | null, + sortBy?: IdSortMode, +} + +export interface SystemUpdateTrustRootViewPathParams { + trustRootId: string, +} + +export interface SystemUpdateTrustRootDeletePathParams { + trustRootId: string, +} + +export interface SiloUserListQueryParams { + limit?: number | null, + pageToken?: string | null, + silo?: NameOrId, + sortBy?: IdSortMode, +} + +export interface SiloUserViewPathParams { + userId: string, +} + +export interface SiloUserViewQueryParams { + silo: NameOrId, +} + +export interface UserBuiltinListQueryParams { + limit?: number | null, + pageToken?: string | null, + sortBy?: NameSortMode, +} + +export interface UserBuiltinViewPathParams { + user: NameOrId, +} + +export interface SiloUtilizationListQueryParams { + limit?: number | null, + pageToken?: string | null, + sortBy?: NameOrIdSortMode, +} + +export interface SiloUtilizationViewPathParams { + silo: NameOrId, +} + +export interface TimeseriesQueryQueryParams { + project: NameOrId, +} + +export interface UserListQueryParams { + group?: string | null, + limit?: number | null, + pageToken?: string | null, + sortBy?: IdSortMode, +} + +export interface UserViewPathParams { + userId: string, +} + +export interface UserTokenListPathParams { + userId: string, +} + +export interface UserTokenListQueryParams { + limit?: number | null, + pageToken?: string | null, + sortBy?: IdSortMode, +} + +export interface UserLogoutPathParams { + userId: string, +} + +export interface UserSessionListPathParams { + userId: string, +} + +export interface UserSessionListQueryParams { + limit?: number | null, + pageToken?: string | null, + sortBy?: IdSortMode, +} + +export interface VpcFirewallRulesViewQueryParams { + project?: NameOrId, + vpc: NameOrId, +} + +export interface VpcFirewallRulesUpdateQueryParams { + project?: NameOrId, + vpc: NameOrId, +} + +export interface VpcRouterRouteListQueryParams { + limit?: number | null, + pageToken?: string | null, + project?: NameOrId, + router?: NameOrId, + sortBy?: NameOrIdSortMode, + vpc?: NameOrId, +} + +export interface VpcRouterRouteCreateQueryParams { + project?: NameOrId, + router: NameOrId, + vpc?: NameOrId, +} + +export interface VpcRouterRouteViewPathParams { + route: NameOrId, +} + +export interface VpcRouterRouteViewQueryParams { + project?: NameOrId, + router?: NameOrId, + vpc?: NameOrId, +} + +export interface VpcRouterRouteUpdatePathParams { + route: NameOrId, } -export interface SiloUserListQueryParams { - limit?: number | null, - pageToken?: string | null, - silo?: NameOrId, - sortBy?: IdSortMode, +export interface VpcRouterRouteUpdateQueryParams { + project?: NameOrId, + router?: NameOrId, + vpc?: NameOrId, } -export interface SiloUserViewPathParams { - userId: string, +export interface VpcRouterRouteDeletePathParams { + route: NameOrId, } -export interface SiloUserViewQueryParams { - silo: NameOrId, +export interface VpcRouterRouteDeleteQueryParams { + project?: NameOrId, + router?: NameOrId, + vpc?: NameOrId, } -export interface UserBuiltinListQueryParams { +export interface VpcRouterListQueryParams { limit?: number | null, pageToken?: string | null, - sortBy?: NameSortMode, + project?: NameOrId, + sortBy?: NameOrIdSortMode, + vpc?: NameOrId, } -export interface UserBuiltinViewPathParams { - user: NameOrId, +export interface VpcRouterCreateQueryParams { + project?: NameOrId, + vpc: NameOrId, } -export interface SiloUtilizationListQueryParams { - limit?: number | null, - pageToken?: string | null, - sortBy?: NameOrIdSortMode, +export interface VpcRouterViewPathParams { + router: NameOrId, } -export interface SiloUtilizationViewPathParams { - silo: NameOrId, +export interface VpcRouterViewQueryParams { + project?: NameOrId, + vpc?: NameOrId, } -export interface UserListQueryParams { - group?: string | null, - limit?: number | null, - pageToken?: string | null, - sortBy?: IdSortMode, +export interface VpcRouterUpdatePathParams { + router: NameOrId, } -export interface VpcFirewallRulesViewQueryParams { +export interface VpcRouterUpdateQueryParams { project?: NameOrId, - vpc: NameOrId, + vpc?: NameOrId, } -export interface VpcFirewallRulesUpdateQueryParams { +export interface VpcRouterDeletePathParams { + router: NameOrId, +} + +export interface VpcRouterDeleteQueryParams { project?: NameOrId, - vpc: NameOrId, + vpc?: NameOrId, } export interface VpcSubnetListQueryParams { @@ -4154,6 +7159,22 @@ export interface VpcDeleteQueryParams { project?: NameOrId, } +export interface WebhookReceiverUpdatePathParams { + receiver: NameOrId, +} + +export interface WebhookSecretsListQueryParams { + receiver: NameOrId, +} + +export interface WebhookSecretsAddQueryParams { + receiver: NameOrId, +} + +export interface WebhookSecretsDeletePathParams { + secretId: string, +} + type EmptyObj = Record; export interface ApiConfig { /** @@ -4173,7 +7194,7 @@ export interface ApiConfig { * Pulled from info.version in the OpenAPI schema. Sent in the * `api-version` header on all requests. */ - apiVersion = "0.0.6"; + apiVersion = "2026010500.0.0"; constructor({ host = "", baseParams = {}, token }: ApiConfig = {}) { this.host = host; @@ -4206,51 +7227,671 @@ export interface ApiConfig { methods = { /** -* Start an OAuth 2.0 Device Authorization Grant +* Start an OAuth 2.0 Device Authorization Grant + */ +deviceAuthRequest: (_: EmptyObj, +params: FetchParams = {}) => { + return this.request({ + path: `/device/auth`, + method: "POST", + ...params, + }) + }, +/** +* Confirm an OAuth 2.0 Device Authorization Grant + */ +deviceAuthConfirm: ({ +body, }: {body: DeviceAuthVerify, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/device/confirm`, + method: "POST", + body, + ...params, + }) + }, +/** +* Request a device access token + */ +deviceAccessToken: (_: EmptyObj, +params: FetchParams = {}) => { + return this.request({ + path: `/device/token`, + method: "POST", + ...params, + }) + }, +/** +* List instrumentation probes + */ +probeList: ({ +query = {}, }: {query?: ProbeListQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/experimental/v1/probes`, + method: "GET", + query, + ...params, + }) + }, +/** +* Create instrumentation probe + */ +probeCreate: ({ +query, body, }: {query: ProbeCreateQueryParams, +body: ProbeCreate, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/experimental/v1/probes`, + method: "POST", + body, + query, + ...params, + }) + }, +/** +* View instrumentation probe + */ +probeView: ({ +path, query, }: {path: ProbeViewPathParams, +query: ProbeViewQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/experimental/v1/probes/${path.probe}`, + method: "GET", + query, + ...params, + }) + }, +/** +* Delete instrumentation probe + */ +probeDelete: ({ +path, query, }: {path: ProbeDeletePathParams, +query: ProbeDeleteQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/experimental/v1/probes/${path.probe}`, + method: "DELETE", + query, + ...params, + }) + }, +/** +* List all support bundles + */ +supportBundleList: ({ +query = {}, }: {query?: SupportBundleListQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/experimental/v1/system/support-bundles`, + method: "GET", + query, + ...params, + }) + }, +/** +* Create a new support bundle + */ +supportBundleCreate: ({ +body, }: {body: SupportBundleCreate, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/experimental/v1/system/support-bundles`, + method: "POST", + body, + ...params, + }) + }, +/** +* View a support bundle + */ +supportBundleView: ({ +path, }: {path: SupportBundleViewPathParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/experimental/v1/system/support-bundles/${path.bundleId}`, + method: "GET", + ...params, + }) + }, +/** +* Update a support bundle + */ +supportBundleUpdate: ({ +path, body, }: {path: SupportBundleUpdatePathParams, +body: SupportBundleUpdate, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/experimental/v1/system/support-bundles/${path.bundleId}`, + method: "PUT", + body, + ...params, + }) + }, +/** +* Delete an existing support bundle + */ +supportBundleDelete: ({ +path, }: {path: SupportBundleDeletePathParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/experimental/v1/system/support-bundles/${path.bundleId}`, + method: "DELETE", + ...params, + }) + }, +/** +* Download the contents of a support bundle + */ +supportBundleDownload: ({ +path, }: {path: SupportBundleDownloadPathParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/experimental/v1/system/support-bundles/${path.bundleId}/download`, + method: "GET", + ...params, + }) + }, +/** +* Download the metadata of a support bundle + */ +supportBundleHead: ({ +path, }: {path: SupportBundleHeadPathParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/experimental/v1/system/support-bundles/${path.bundleId}/download`, + method: "HEAD", + ...params, + }) + }, +/** +* Download a file within a support bundle + */ +supportBundleDownloadFile: ({ +path, }: {path: SupportBundleDownloadFilePathParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/experimental/v1/system/support-bundles/${path.bundleId}/download/${path.file}`, + method: "GET", + ...params, + }) + }, +/** +* Download the metadata of a file within the support bundle + */ +supportBundleHeadFile: ({ +path, }: {path: SupportBundleHeadFilePathParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/experimental/v1/system/support-bundles/${path.bundleId}/download/${path.file}`, + method: "HEAD", + ...params, + }) + }, +/** +* Download the index of a support bundle + */ +supportBundleIndex: ({ +path, }: {path: SupportBundleIndexPathParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/experimental/v1/system/support-bundles/${path.bundleId}/index`, + method: "GET", + ...params, + }) + }, +/** +* Authenticate a user via SAML + */ +loginSaml: ({ +path, }: {path: LoginSamlPathParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/login/${path.siloName}/saml/${path.providerName}`, + method: "POST", + ...params, + }) + }, +/** +* List affinity groups + */ +affinityGroupList: ({ +query = {}, }: {query?: AffinityGroupListQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/affinity-groups`, + method: "GET", + query, + ...params, + }) + }, +/** +* Create affinity group + */ +affinityGroupCreate: ({ +query, body, }: {query: AffinityGroupCreateQueryParams, +body: AffinityGroupCreate, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/affinity-groups`, + method: "POST", + body, + query, + ...params, + }) + }, +/** +* Fetch affinity group + */ +affinityGroupView: ({ +path, query = {}, }: {path: AffinityGroupViewPathParams, +query?: AffinityGroupViewQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/affinity-groups/${path.affinityGroup}`, + method: "GET", + query, + ...params, + }) + }, +/** +* Update affinity group */ -deviceAuthRequest: (_: EmptyObj, +affinityGroupUpdate: ({ +path, query = {}, body, }: {path: AffinityGroupUpdatePathParams, +query?: AffinityGroupUpdateQueryParams, +body: AffinityGroupUpdate, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/affinity-groups/${path.affinityGroup}`, + method: "PUT", + body, + query, + ...params, + }) + }, +/** +* Delete affinity group + */ +affinityGroupDelete: ({ +path, query = {}, }: {path: AffinityGroupDeletePathParams, +query?: AffinityGroupDeleteQueryParams, +}, params: FetchParams = {}) => { return this.request({ - path: `/device/auth`, + path: `/v1/affinity-groups/${path.affinityGroup}`, + method: "DELETE", + query, + ...params, + }) + }, +/** +* List affinity group members + */ +affinityGroupMemberList: ({ +path, query = {}, }: {path: AffinityGroupMemberListPathParams, +query?: AffinityGroupMemberListQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/affinity-groups/${path.affinityGroup}/members`, + method: "GET", + query, + ...params, + }) + }, +/** +* Fetch affinity group member + */ +affinityGroupMemberInstanceView: ({ +path, query = {}, }: {path: AffinityGroupMemberInstanceViewPathParams, +query?: AffinityGroupMemberInstanceViewQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/affinity-groups/${path.affinityGroup}/members/instance/${path.instance}`, + method: "GET", + query, + ...params, + }) + }, +/** +* Add member to affinity group + */ +affinityGroupMemberInstanceAdd: ({ +path, query = {}, }: {path: AffinityGroupMemberInstanceAddPathParams, +query?: AffinityGroupMemberInstanceAddQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/affinity-groups/${path.affinityGroup}/members/instance/${path.instance}`, method: "POST", + query, ...params, }) }, /** -* Confirm an OAuth 2.0 Device Authorization Grant +* Remove member from affinity group */ -deviceAuthConfirm: ({ -body, }: {body: DeviceAuthVerify, +affinityGroupMemberInstanceDelete: ({ +path, query = {}, }: {path: AffinityGroupMemberInstanceDeletePathParams, +query?: AffinityGroupMemberInstanceDeleteQueryParams, }, params: FetchParams = {}) => { return this.request({ - path: `/device/confirm`, + path: `/v1/affinity-groups/${path.affinityGroup}/members/instance/${path.instance}`, + method: "DELETE", + query, + ...params, + }) + }, +/** +* List alert classes + */ +alertClassList: ({ +query = {}, }: {query?: AlertClassListQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/alert-classes`, + method: "GET", + query, + ...params, + }) + }, +/** +* List alert receivers + */ +alertReceiverList: ({ +query = {}, }: {query?: AlertReceiverListQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/alert-receivers`, + method: "GET", + query, + ...params, + }) + }, +/** +* Fetch alert receiver + */ +alertReceiverView: ({ +path, }: {path: AlertReceiverViewPathParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/alert-receivers/${path.receiver}`, + method: "GET", + ...params, + }) + }, +/** +* Delete alert receiver + */ +alertReceiverDelete: ({ +path, }: {path: AlertReceiverDeletePathParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/alert-receivers/${path.receiver}`, + method: "DELETE", + ...params, + }) + }, +/** +* List delivery attempts to alert receiver + */ +alertDeliveryList: ({ +path, query = {}, }: {path: AlertDeliveryListPathParams, +query?: AlertDeliveryListQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/alert-receivers/${path.receiver}/deliveries`, + method: "GET", + query, + ...params, + }) + }, +/** +* Send liveness probe to alert receiver + */ +alertReceiverProbe: ({ +path, query = {}, }: {path: AlertReceiverProbePathParams, +query?: AlertReceiverProbeQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/alert-receivers/${path.receiver}/probe`, + method: "POST", + query, + ...params, + }) + }, +/** +* Add alert receiver subscription + */ +alertReceiverSubscriptionAdd: ({ +path, body, }: {path: AlertReceiverSubscriptionAddPathParams, +body: AlertSubscriptionCreate, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/alert-receivers/${path.receiver}/subscriptions`, method: "POST", body, ...params, }) }, /** -* Request a device access token +* Remove alert receiver subscription */ -deviceAccessToken: (_: EmptyObj, +alertReceiverSubscriptionRemove: ({ +path, }: {path: AlertReceiverSubscriptionRemovePathParams, +}, params: FetchParams = {}) => { return this.request({ - path: `/device/token`, + path: `/v1/alert-receivers/${path.receiver}/subscriptions/${path.subscription}`, + method: "DELETE", + ...params, + }) + }, +/** +* Request re-delivery of alert + */ +alertDeliveryResend: ({ +path, query, }: {path: AlertDeliveryResendPathParams, +query: AlertDeliveryResendQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/alerts/${path.alertId}/resend`, method: "POST", + query, ...params, }) }, /** -* Authenticate a user via SAML +* List anti-affinity groups */ -loginSaml: ({ -path, }: {path: LoginSamlPathParams, +antiAffinityGroupList: ({ +query = {}, }: {query?: AntiAffinityGroupListQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/anti-affinity-groups`, + method: "GET", + query, + ...params, + }) + }, +/** +* Create anti-affinity group + */ +antiAffinityGroupCreate: ({ +query, body, }: {query: AntiAffinityGroupCreateQueryParams, +body: AntiAffinityGroupCreate, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/anti-affinity-groups`, + method: "POST", + body, + query, + ...params, + }) + }, +/** +* Fetch anti-affinity group + */ +antiAffinityGroupView: ({ +path, query = {}, }: {path: AntiAffinityGroupViewPathParams, +query?: AntiAffinityGroupViewQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/anti-affinity-groups/${path.antiAffinityGroup}`, + method: "GET", + query, + ...params, + }) + }, +/** +* Update anti-affinity group + */ +antiAffinityGroupUpdate: ({ +path, query = {}, body, }: {path: AntiAffinityGroupUpdatePathParams, +query?: AntiAffinityGroupUpdateQueryParams, +body: AntiAffinityGroupUpdate, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/anti-affinity-groups/${path.antiAffinityGroup}`, + method: "PUT", + body, + query, + ...params, + }) + }, +/** +* Delete anti-affinity group + */ +antiAffinityGroupDelete: ({ +path, query = {}, }: {path: AntiAffinityGroupDeletePathParams, +query?: AntiAffinityGroupDeleteQueryParams, }, params: FetchParams = {}) => { return this.request({ - path: `/login/${path.siloName}/saml/${path.providerName}`, + path: `/v1/anti-affinity-groups/${path.antiAffinityGroup}`, + method: "DELETE", + query, + ...params, + }) + }, +/** +* List anti-affinity group members + */ +antiAffinityGroupMemberList: ({ +path, query = {}, }: {path: AntiAffinityGroupMemberListPathParams, +query?: AntiAffinityGroupMemberListQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/anti-affinity-groups/${path.antiAffinityGroup}/members`, + method: "GET", + query, + ...params, + }) + }, +/** +* Fetch anti-affinity group member + */ +antiAffinityGroupMemberInstanceView: ({ +path, query = {}, }: {path: AntiAffinityGroupMemberInstanceViewPathParams, +query?: AntiAffinityGroupMemberInstanceViewQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/anti-affinity-groups/${path.antiAffinityGroup}/members/instance/${path.instance}`, + method: "GET", + query, + ...params, + }) + }, +/** +* Add member to anti-affinity group + */ +antiAffinityGroupMemberInstanceAdd: ({ +path, query = {}, }: {path: AntiAffinityGroupMemberInstanceAddPathParams, +query?: AntiAffinityGroupMemberInstanceAddQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/anti-affinity-groups/${path.antiAffinityGroup}/members/instance/${path.instance}`, method: "POST", + query, + ...params, + }) + }, +/** +* Remove member from anti-affinity group + */ +antiAffinityGroupMemberInstanceDelete: ({ +path, query = {}, }: {path: AntiAffinityGroupMemberInstanceDeletePathParams, +query?: AntiAffinityGroupMemberInstanceDeleteQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/anti-affinity-groups/${path.antiAffinityGroup}/members/instance/${path.instance}`, + method: "DELETE", + query, + ...params, + }) + }, +/** +* Fetch current silo's auth settings + */ +authSettingsView: (_: EmptyObj, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/auth-settings`, + method: "GET", + ...params, + }) + }, +/** +* Update current silo's auth settings + */ +authSettingsUpdate: ({ +body, }: {body: SiloAuthSettingsUpdate, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/auth-settings`, + method: "PUT", + body, ...params, }) }, @@ -4433,22 +8074,7 @@ params: FetchParams = {}) => { }) }, /** -* Fetch disk metrics - */ -diskMetricsList: ({ -path, query = {}, }: {path: DiskMetricsListPathParams, -query?: DiskMetricsListQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/disks/${path.disk}/metrics/${path.metric}`, - method: "GET", - query, - ...params, - }) - }, -/** -* List all floating IPs +* List floating IPs */ floatingIpList: ({ query = {}, }: {query?: FloatingIpListQueryParams, @@ -4719,6 +8345,23 @@ params: FetchParams = {}) => { }) }, /** +* Update instance + */ +instanceUpdate: ({ +path, query = {}, body, }: {path: InstanceUpdatePathParams, +query?: InstanceUpdateQueryParams, +body: InstanceUpdate, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/instances/${path.instance}`, + method: "PUT", + body, + query, + ...params, + }) + }, +/** * Delete instance */ instanceDelete: ({ @@ -4734,6 +8377,36 @@ params: FetchParams = {}) => { }) }, /** +* List affinity groups containing instance + */ +instanceAffinityGroupList: ({ +path, query = {}, }: {path: InstanceAffinityGroupListPathParams, +query?: InstanceAffinityGroupListQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/instances/${path.instance}/affinity-groups`, + method: "GET", + query, + ...params, + }) + }, +/** +* List anti-affinity groups containing instance + */ +instanceAntiAffinityGroupList: ({ +path, query = {}, }: {path: InstanceAntiAffinityGroupListPathParams, +query?: InstanceAntiAffinityGroupListQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/instances/${path.instance}/anti-affinity-groups`, + method: "GET", + query, + ...params, + }) + }, +/** * List disks for instance */ instanceDiskList: ({ @@ -4830,18 +8503,46 @@ params: FetchParams = {}) => { }) }, /** -* Migrate an instance +* List multicast groups for instance */ -instanceMigrate: ({ -path, query = {}, body, }: {path: InstanceMigratePathParams, -query?: InstanceMigrateQueryParams, -body: InstanceMigrate, +instanceMulticastGroupList: ({ +path, query = {}, }: {path: InstanceMulticastGroupListPathParams, +query?: InstanceMulticastGroupListQueryParams, }, params: FetchParams = {}) => { - return this.request({ - path: `/v1/instances/${path.instance}/migrate`, - method: "POST", - body, + return this.request({ + path: `/v1/instances/${path.instance}/multicast-groups`, + method: "GET", + query, + ...params, + }) + }, +/** +* Join multicast group. + */ +instanceMulticastGroupJoin: ({ +path, query = {}, }: {path: InstanceMulticastGroupJoinPathParams, +query?: InstanceMulticastGroupJoinQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/instances/${path.instance}/multicast-groups/${path.multicastGroup}`, + method: "PUT", + query, + ...params, + }) + }, +/** +* Leave multicast group. + */ +instanceMulticastGroupLeave: ({ +path, query = {}, }: {path: InstanceMulticastGroupLeavePathParams, +query?: InstanceMulticastGroupLeaveQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/instances/${path.instance}/multicast-groups/${path.multicastGroup}`, + method: "DELETE", query, ...params, }) @@ -4922,7 +8623,157 @@ params: FetchParams = {}) => { }) }, /** -* List all IP pools +* List IP addresses attached to internet gateway + */ +internetGatewayIpAddressList: ({ +query = {}, }: {query?: InternetGatewayIpAddressListQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/internet-gateway-ip-addresses`, + method: "GET", + query, + ...params, + }) + }, +/** +* Attach IP address to internet gateway + */ +internetGatewayIpAddressCreate: ({ +query, body, }: {query: InternetGatewayIpAddressCreateQueryParams, +body: InternetGatewayIpAddressCreate, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/internet-gateway-ip-addresses`, + method: "POST", + body, + query, + ...params, + }) + }, +/** +* Detach IP address from internet gateway + */ +internetGatewayIpAddressDelete: ({ +path, query = {}, }: {path: InternetGatewayIpAddressDeletePathParams, +query?: InternetGatewayIpAddressDeleteQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/internet-gateway-ip-addresses/${path.address}`, + method: "DELETE", + query, + ...params, + }) + }, +/** +* List IP pools attached to internet gateway + */ +internetGatewayIpPoolList: ({ +query = {}, }: {query?: InternetGatewayIpPoolListQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/internet-gateway-ip-pools`, + method: "GET", + query, + ...params, + }) + }, +/** +* Attach IP pool to internet gateway + */ +internetGatewayIpPoolCreate: ({ +query, body, }: {query: InternetGatewayIpPoolCreateQueryParams, +body: InternetGatewayIpPoolCreate, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/internet-gateway-ip-pools`, + method: "POST", + body, + query, + ...params, + }) + }, +/** +* Detach IP pool from internet gateway + */ +internetGatewayIpPoolDelete: ({ +path, query = {}, }: {path: InternetGatewayIpPoolDeletePathParams, +query?: InternetGatewayIpPoolDeleteQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/internet-gateway-ip-pools/${path.pool}`, + method: "DELETE", + query, + ...params, + }) + }, +/** +* List internet gateways + */ +internetGatewayList: ({ +query = {}, }: {query?: InternetGatewayListQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/internet-gateways`, + method: "GET", + query, + ...params, + }) + }, +/** +* Create VPC internet gateway + */ +internetGatewayCreate: ({ +query, body, }: {query: InternetGatewayCreateQueryParams, +body: InternetGatewayCreate, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/internet-gateways`, + method: "POST", + body, + query, + ...params, + }) + }, +/** +* Fetch internet gateway + */ +internetGatewayView: ({ +path, query = {}, }: {path: InternetGatewayViewPathParams, +query?: InternetGatewayViewQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/internet-gateways/${path.gateway}`, + method: "GET", + query, + ...params, + }) + }, +/** +* Delete internet gateway + */ +internetGatewayDelete: ({ +path, query = {}, }: {path: InternetGatewayDeletePathParams, +query?: InternetGatewayDeleteQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/internet-gateways/${path.gateway}`, + method: "DELETE", + query, + ...params, + }) + }, +/** +* List IP pools */ projectIpPoolList: ({ query = {}, }: {query?: ProjectIpPoolListQueryParams, @@ -4986,6 +8837,33 @@ params: FetchParams = {}) => { }) }, /** +* List access tokens + */ +currentUserAccessTokenList: ({ +query = {}, }: {query?: CurrentUserAccessTokenListQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/me/access-tokens`, + method: "GET", + query, + ...params, + }) + }, +/** +* Delete access token + */ +currentUserAccessTokenDelete: ({ +path, }: {path: CurrentUserAccessTokenDeletePathParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/me/access-tokens/${path.tokenId}`, + method: "DELETE", + ...params, + }) + }, +/** * Fetch current user's groups */ currentUserGroups: ({ @@ -5054,7 +8932,7 @@ params: FetchParams = {}) => { }) }, /** -* Access metrics data +* View metrics */ siloMetric: ({ path, query = {}, }: {path: SiloMetricPathParams, @@ -5069,6 +8947,122 @@ params: FetchParams = {}) => { }) }, /** +* List all multicast groups. + */ +multicastGroupList: ({ +query = {}, }: {query?: MulticastGroupListQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/multicast-groups`, + method: "GET", + query, + ...params, + }) + }, +/** +* Create a multicast group. + */ +multicastGroupCreate: ({ +body, }: {body: MulticastGroupCreate, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/multicast-groups`, + method: "POST", + body, + ...params, + }) + }, +/** +* Fetch a multicast group. + */ +multicastGroupView: ({ +path, }: {path: MulticastGroupViewPathParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/multicast-groups/${path.multicastGroup}`, + method: "GET", + ...params, + }) + }, +/** +* Update a multicast group. + */ +multicastGroupUpdate: ({ +path, body, }: {path: MulticastGroupUpdatePathParams, +body: MulticastGroupUpdate, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/multicast-groups/${path.multicastGroup}`, + method: "PUT", + body, + ...params, + }) + }, +/** +* Delete a multicast group. + */ +multicastGroupDelete: ({ +path, }: {path: MulticastGroupDeletePathParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/multicast-groups/${path.multicastGroup}`, + method: "DELETE", + ...params, + }) + }, +/** +* List members of a multicast group. + */ +multicastGroupMemberList: ({ +path, query = {}, }: {path: MulticastGroupMemberListPathParams, +query?: MulticastGroupMemberListQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/multicast-groups/${path.multicastGroup}/members`, + method: "GET", + query, + ...params, + }) + }, +/** +* Add instance to a multicast group. + */ +multicastGroupMemberAdd: ({ +path, query = {}, body, }: {path: MulticastGroupMemberAddPathParams, +query?: MulticastGroupMemberAddQueryParams, +body: MulticastGroupMemberAdd, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/multicast-groups/${path.multicastGroup}/members`, + method: "POST", + body, + query, + ...params, + }) + }, +/** +* Remove instance from a multicast group. + */ +multicastGroupMemberRemove: ({ +path, query = {}, }: {path: MulticastGroupMemberRemovePathParams, +query?: MulticastGroupMemberRemoveQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/multicast-groups/${path.multicastGroup}/members/${path.instance}`, + method: "DELETE", + query, + ...params, + }) + }, +/** * List network interfaces */ instanceNetworkInterfaceList: ({ @@ -5339,6 +9333,20 @@ params: FetchParams = {}) => { }) }, /** +* View audit log + */ +auditLogList: ({ +query = {}, }: {query?: AuditLogListQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/system/audit-log`, + method: "GET", + query, + ...params, + }) + }, +/** * List physical disks */ physicalDiskList: ({ @@ -5353,6 +9361,34 @@ params: FetchParams = {}) => { }) }, /** +* Get a physical disk + */ +physicalDiskView: ({ +path, }: {path: PhysicalDiskViewPathParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/system/hardware/disks/${path.diskId}`, + method: "GET", + ...params, + }) + }, +/** +* Fetch the LLDP neighbors seen on a switch port + */ +networkingSwitchPortLldpNeighbors: ({ +path, query = {}, }: {path: NetworkingSwitchPortLldpNeighborsPathParams, +query?: NetworkingSwitchPortLldpNeighborsQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/system/hardware/rack-switch-port/${path.rackId}/${path.switchLocation}/${path.port}/lldp/neighbors`, + method: "GET", + query, + ...params, + }) + }, +/** * List racks */ rackList: ({ @@ -5400,7 +9436,7 @@ sledAdd: ({ body, }: {body: UninitializedSledId, }, params: FetchParams = {}) => { - return this.request({ + return this.request({ path: `/v1/system/hardware/sleds`, method: "POST", body, @@ -5494,6 +9530,38 @@ params: FetchParams = {}) => { }) }, /** +* Fetch the LLDP configuration for a switch port + */ +networkingSwitchPortLldpConfigView: ({ +path, query, }: {path: NetworkingSwitchPortLldpConfigViewPathParams, +query: NetworkingSwitchPortLldpConfigViewQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/system/hardware/switch-port/${path.port}/lldp/config`, + method: "GET", + query, + ...params, + }) + }, +/** +* Update the LLDP configuration for a switch port + */ +networkingSwitchPortLldpConfigUpdate: ({ +path, query, body, }: {path: NetworkingSwitchPortLldpConfigUpdatePathParams, +query: NetworkingSwitchPortLldpConfigUpdateQueryParams, +body: LldpLinkConfig, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/system/hardware/switch-port/${path.port}/lldp/config`, + method: "POST", + body, + query, + ...params, + }) + }, +/** * Apply switch port settings */ networkingSwitchPortApplySettings: ({ @@ -5526,6 +9594,21 @@ params: FetchParams = {}) => { }) }, /** +* Get switch port status + */ +networkingSwitchPortStatus: ({ +path, query, }: {path: NetworkingSwitchPortStatusPathParams, +query: NetworkingSwitchPortStatusQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/system/hardware/switch-port/${path.port}/status`, + method: "GET", + query, + ...params, + }) + }, +/** * List switches */ switchList: ({ @@ -5553,7 +9636,7 @@ params: FetchParams = {}) => { }) }, /** -* List a silo's IdP's name +* List identity providers for silo */ siloIdentityProviderList: ({ query = {}, }: {query?: SiloIdentityProviderListQueryParams, @@ -5615,7 +9698,7 @@ params: FetchParams = {}) => { }) }, /** -* Create SAML IdP +* Create SAML identity provider */ samlIdentityProviderCreate: ({ query, body, }: {query: SamlIdentityProviderCreateQueryParams, @@ -5631,11 +9714,11 @@ params: FetchParams = {}) => { }) }, /** -* Fetch SAML IdP +* Fetch SAML identity provider */ samlIdentityProviderView: ({ -path, query, }: {path: SamlIdentityProviderViewPathParams, -query: SamlIdentityProviderViewQueryParams, +path, query = {}, }: {path: SamlIdentityProviderViewPathParams, +query?: SamlIdentityProviderViewQueryParams, }, params: FetchParams = {}) => { return this.request({ @@ -5730,7 +9813,7 @@ params: FetchParams = {}) => { }) }, /** -* Add range to IP pool +* Add range to IP pool. */ ipPoolRangeAdd: ({ path, body, }: {path: IpPoolRangeAddPathParams, @@ -5818,6 +9901,19 @@ params: FetchParams = {}) => { }) }, /** +* Fetch IP pool utilization + */ +ipPoolUtilizationView: ({ +path, }: {path: IpPoolUtilizationViewPathParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/system/ip-pools/${path.pool}/utilization`, + method: "GET", + ...params, + }) + }, +/** * Fetch Oxide service IP pool */ ipPoolServiceView: (_: EmptyObj, @@ -5871,7 +9967,7 @@ params: FetchParams = {}) => { }) }, /** -* Access metrics data +* View metrics */ systemMetric: ({ path, query = {}, }: {path: SystemMetricPathParams, @@ -5886,6 +9982,19 @@ params: FetchParams = {}) => { }) }, /** +* Look up multicast group by IP address. + */ +lookupMulticastGroupByIp: ({ +path, }: {path: LookupMulticastGroupByIpPathParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/system/multicast-groups/by-ip/${path.address}`, + method: "GET", + ...params, + }) + }, +/** * List address lots */ networkingAddressLotList: ({ @@ -5914,6 +10023,19 @@ params: FetchParams = {}) => { }) }, /** +* Fetch address lot + */ +networkingAddressLotView: ({ +path, }: {path: NetworkingAddressLotViewPathParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/system/networking/address-lot/${path.addressLot}`, + method: "GET", + ...params, + }) + }, +/** * Delete address lot */ networkingAddressLotDelete: ({ @@ -5942,6 +10064,31 @@ params: FetchParams = {}) => { }) }, /** +* Get user-facing services IP allowlist + */ +networkingAllowListView: (_: EmptyObj, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/system/networking/allow-list`, + method: "GET", + ...params, + }) + }, +/** +* Update user-facing services IP allowlist + */ +networkingAllowListUpdate: ({ +body, }: {body: AllowListUpdate, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/system/networking/allow-list`, + method: "PUT", + body, + ...params, + }) + }, +/** * Disable a BFD session */ networkingBfdDisable: ({ @@ -6023,29 +10170,29 @@ params: FetchParams = {}) => { }) }, /** -* Get originated routes for a BGP configuration +* List BGP announce sets */ networkingBgpAnnounceSetList: ({ -query, }: {query: NetworkingBgpAnnounceSetListQueryParams, +query = {}, }: {query?: NetworkingBgpAnnounceSetListQueryParams, }, params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/networking/bgp-announce`, + return this.request({ + path: `/v1/system/networking/bgp-announce-set`, method: "GET", query, ...params, }) }, /** -* Create new BGP announce set +* Update BGP announce set */ -networkingBgpAnnounceSetCreate: ({ +networkingBgpAnnounceSetUpdate: ({ body, }: {body: BgpAnnounceSetCreate, }, params: FetchParams = {}) => { return this.request({ - path: `/v1/system/networking/bgp-announce`, - method: "POST", + path: `/v1/system/networking/bgp-announce-set`, + method: "PUT", body, ...params, }) @@ -6054,12 +10201,49 @@ params: FetchParams = {}) => { * Delete BGP announce set */ networkingBgpAnnounceSetDelete: ({ -query, }: {query: NetworkingBgpAnnounceSetDeleteQueryParams, +path, }: {path: NetworkingBgpAnnounceSetDeletePathParams, }, params: FetchParams = {}) => { return this.request({ - path: `/v1/system/networking/bgp-announce`, + path: `/v1/system/networking/bgp-announce-set/${path.announceSet}`, method: "DELETE", + ...params, + }) + }, +/** +* Get originated routes for a specified BGP announce set + */ +networkingBgpAnnouncementList: ({ +path, }: {path: NetworkingBgpAnnouncementListPathParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/system/networking/bgp-announce-set/${path.announceSet}/announcement`, + method: "GET", + ...params, + }) + }, +/** +* Get BGP exported routes + */ +networkingBgpExported: (_: EmptyObj, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/system/networking/bgp-exported`, + method: "GET", + ...params, + }) + }, +/** +* Get BGP router message history + */ +networkingBgpMessageHistory: ({ +query, }: {query: NetworkingBgpMessageHistoryQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/system/networking/bgp-message-history`, + method: "GET", query, ...params, }) @@ -6090,6 +10274,31 @@ params: FetchParams = {}) => { }) }, /** +* Return whether API services can receive limited ICMP traffic + */ +networkingInboundIcmpView: (_: EmptyObj, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/system/networking/inbound-icmp`, + method: "GET", + ...params, + }) + }, +/** +* Set whether API services can receive limited ICMP traffic + */ +networkingInboundIcmpUpdate: ({ +body, }: {body: ServiceIcmpConfig, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/system/networking/inbound-icmp`, + method: "PUT", + body, + ...params, + }) + }, +/** * List loopback addresses */ networkingLoopbackAddressList: ({ @@ -6137,7 +10346,7 @@ networkingSwitchPortSettingsList: ({ query = {}, }: {query?: NetworkingSwitchPortSettingsListQueryParams, }, params: FetchParams = {}) => { - return this.request({ + return this.request({ path: `/v1/system/networking/switch-port-settings`, method: "GET", query, @@ -6151,7 +10360,7 @@ networkingSwitchPortSettingsCreate: ({ body, }: {body: SwitchPortSettingsCreate, }, params: FetchParams = {}) => { - return this.request({ + return this.request({ path: `/v1/system/networking/switch-port-settings`, method: "POST", body, @@ -6179,7 +10388,7 @@ networkingSwitchPortSettingsView: ({ path, }: {path: NetworkingSwitchPortSettingsViewPathParams, }, params: FetchParams = {}) => { - return this.request({ + return this.request({ path: `/v1/system/networking/switch-port-settings/${path.port}`, method: "GET", ...params, @@ -6211,29 +10420,60 @@ params: FetchParams = {}) => { }) }, /** -* List built-in roles +* List SCIM tokens */ -roleList: ({ -query = {}, }: {query?: RoleListQueryParams, +scimTokenList: ({ +query, }: {query: ScimTokenListQueryParams, }, params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/roles`, + return this.request({ + path: `/v1/system/scim/tokens`, method: "GET", query, ...params, }) }, /** -* Fetch built-in role +* Create SCIM token + */ +scimTokenCreate: ({ +query, }: {query: ScimTokenCreateQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/system/scim/tokens`, + method: "POST", + query, + ...params, + }) + }, +/** +* Fetch SCIM token */ -roleView: ({ -path, }: {path: RoleViewPathParams, +scimTokenView: ({ +path, query, }: {path: ScimTokenViewPathParams, +query: ScimTokenViewQueryParams, }, params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/roles/${path.roleName}`, + return this.request({ + path: `/v1/system/scim/tokens/${path.tokenId}`, method: "GET", + query, + ...params, + }) + }, +/** +* Delete SCIM token + */ +scimTokenDelete: ({ +path, query, }: {path: ScimTokenDeletePathParams, +query: ScimTokenDeleteQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/system/scim/tokens/${path.tokenId}`, + method: "DELETE", + query, ...params, }) }, @@ -6258,121 +10498,266 @@ siloList: ({ query = {}, }: {query?: SiloListQueryParams, }, params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/silos`, + return this.request({ + path: `/v1/system/silos`, + method: "GET", + query, + ...params, + }) + }, +/** +* Create a silo + */ +siloCreate: ({ +body, }: {body: SiloCreate, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/system/silos`, + method: "POST", + body, + ...params, + }) + }, +/** +* Fetch silo + */ +siloView: ({ +path, }: {path: SiloViewPathParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/system/silos/${path.silo}`, + method: "GET", + ...params, + }) + }, +/** +* Delete a silo + */ +siloDelete: ({ +path, }: {path: SiloDeletePathParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/system/silos/${path.silo}`, + method: "DELETE", + ...params, + }) + }, +/** +* List IP pools linked to silo + */ +siloIpPoolList: ({ +path, query = {}, }: {path: SiloIpPoolListPathParams, +query?: SiloIpPoolListQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/system/silos/${path.silo}/ip-pools`, + method: "GET", + query, + ...params, + }) + }, +/** +* Fetch silo IAM policy + */ +siloPolicyView: ({ +path, }: {path: SiloPolicyViewPathParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/system/silos/${path.silo}/policy`, + method: "GET", + ...params, + }) + }, +/** +* Update silo IAM policy + */ +siloPolicyUpdate: ({ +path, body, }: {path: SiloPolicyUpdatePathParams, +body: SiloRolePolicy, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/system/silos/${path.silo}/policy`, + method: "PUT", + body, + ...params, + }) + }, +/** +* Fetch resource quotas for silo + */ +siloQuotasView: ({ +path, }: {path: SiloQuotasViewPathParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/system/silos/${path.silo}/quotas`, + method: "GET", + ...params, + }) + }, +/** +* Update resource quotas for silo + */ +siloQuotasUpdate: ({ +path, body, }: {path: SiloQuotasUpdatePathParams, +body: SiloQuotasUpdate, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/system/silos/${path.silo}/quotas`, + method: "PUT", + body, + ...params, + }) + }, +/** +* Run timeseries query + */ +systemTimeseriesQuery: ({ +body, }: {body: TimeseriesQuery, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/system/timeseries/query`, + method: "POST", + body, + ...params, + }) + }, +/** +* List timeseries schemas + */ +systemTimeseriesSchemaList: ({ +query = {}, }: {query?: SystemTimeseriesSchemaListQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/system/timeseries/schemas`, + method: "GET", + query, + ...params, + }) + }, +/** +* List all TUF repositories + */ +systemUpdateRepositoryList: ({ +query = {}, }: {query?: SystemUpdateRepositoryListQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/system/update/repositories`, method: "GET", query, ...params, }) }, /** -* Create a silo +* Upload system release repository */ -siloCreate: ({ -body, }: {body: SiloCreate, +systemUpdateRepositoryUpload: ({ +query, }: {query: SystemUpdateRepositoryUploadQueryParams, }, params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/silos`, - method: "POST", - body, + return this.request({ + path: `/v1/system/update/repositories`, + method: "PUT", + query, ...params, }) }, /** -* Fetch silo +* Fetch system release repository by version */ -siloView: ({ -path, }: {path: SiloViewPathParams, +systemUpdateRepositoryView: ({ +path, }: {path: SystemUpdateRepositoryViewPathParams, }, params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/silos/${path.silo}`, + return this.request({ + path: `/v1/system/update/repositories/${path.systemVersion}`, method: "GET", ...params, }) }, /** -* Delete a silo +* Fetch system update status */ -siloDelete: ({ -path, }: {path: SiloDeletePathParams, -}, +systemUpdateStatus: (_: EmptyObj, params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/silos/${path.silo}`, - method: "DELETE", + return this.request({ + path: `/v1/system/update/status`, + method: "GET", ...params, }) }, /** -* List IP pools linked to silo +* Set target release */ -siloIpPoolList: ({ -path, query = {}, }: {path: SiloIpPoolListPathParams, -query?: SiloIpPoolListQueryParams, +targetReleaseUpdate: ({ +body, }: {body: SetTargetReleaseParams, }, params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/silos/${path.silo}/ip-pools`, - method: "GET", - query, + return this.request({ + path: `/v1/system/update/target-release`, + method: "PUT", + body, ...params, }) }, /** -* Fetch silo IAM policy +* List root roles in the updates trust store */ -siloPolicyView: ({ -path, }: {path: SiloPolicyViewPathParams, +systemUpdateTrustRootList: ({ +query = {}, }: {query?: SystemUpdateTrustRootListQueryParams, }, params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/silos/${path.silo}/policy`, + return this.request({ + path: `/v1/system/update/trust-roots`, method: "GET", + query, ...params, }) }, /** -* Update silo IAM policy +* Add trusted root role to updates trust store */ -siloPolicyUpdate: ({ -path, body, }: {path: SiloPolicyUpdatePathParams, -body: SiloRolePolicy, -}, +systemUpdateTrustRootCreate: (_: EmptyObj, params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/silos/${path.silo}/policy`, - method: "PUT", - body, + return this.request({ + path: `/v1/system/update/trust-roots`, + method: "POST", ...params, }) }, /** -* Fetch resource quotas for silo +* Fetch trusted root role */ -siloQuotasView: ({ -path, }: {path: SiloQuotasViewPathParams, +systemUpdateTrustRootView: ({ +path, }: {path: SystemUpdateTrustRootViewPathParams, }, params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/silos/${path.silo}/quotas`, + return this.request({ + path: `/v1/system/update/trust-roots/${path.trustRootId}`, method: "GET", ...params, }) }, /** -* Update resource quotas for silo +* Delete trusted root role */ -siloQuotasUpdate: ({ -path, body, }: {path: SiloQuotasUpdatePathParams, -body: SiloQuotasUpdate, +systemUpdateTrustRootDelete: ({ +path, }: {path: SystemUpdateTrustRootDeletePathParams, }, params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/silos/${path.silo}/quotas`, - method: "PUT", - body, + return this.request({ + path: `/v1/system/update/trust-roots/${path.trustRootId}`, + method: "DELETE", ...params, }) }, @@ -6460,6 +10845,22 @@ params: FetchParams = {}) => { }) }, /** +* Run project-scoped timeseries query + */ +timeseriesQuery: ({ +query, body, }: {query: TimeseriesQueryQueryParams, +body: TimeseriesQuery, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/timeseries/query`, + method: "POST", + body, + query, + ...params, + }) + }, +/** * List users */ userList: ({ @@ -6474,6 +10875,62 @@ params: FetchParams = {}) => { }) }, /** +* Fetch user + */ +userView: ({ +path, }: {path: UserViewPathParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/users/${path.userId}`, + method: "GET", + ...params, + }) + }, +/** +* List user's access tokens + */ +userTokenList: ({ +path, query = {}, }: {path: UserTokenListPathParams, +query?: UserTokenListQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/users/${path.userId}/access-tokens`, + method: "GET", + query, + ...params, + }) + }, +/** +* Log user out + */ +userLogout: ({ +path, }: {path: UserLogoutPathParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/users/${path.userId}/logout`, + method: "POST", + ...params, + }) + }, +/** +* List user's console sessions + */ +userSessionList: ({ +path, query = {}, }: {path: UserSessionListPathParams, +query?: UserSessionListQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/users/${path.userId}/sessions`, + method: "GET", + query, + ...params, + }) + }, +/** * Fetch resource utilization for user's current silo */ utilizationView: (_: EmptyObj, @@ -6515,6 +10972,160 @@ params: FetchParams = {}) => { }) }, /** +* List routes + */ +vpcRouterRouteList: ({ +query = {}, }: {query?: VpcRouterRouteListQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/vpc-router-routes`, + method: "GET", + query, + ...params, + }) + }, +/** +* Create route + */ +vpcRouterRouteCreate: ({ +query, body, }: {query: VpcRouterRouteCreateQueryParams, +body: RouterRouteCreate, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/vpc-router-routes`, + method: "POST", + body, + query, + ...params, + }) + }, +/** +* Fetch route + */ +vpcRouterRouteView: ({ +path, query = {}, }: {path: VpcRouterRouteViewPathParams, +query?: VpcRouterRouteViewQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/vpc-router-routes/${path.route}`, + method: "GET", + query, + ...params, + }) + }, +/** +* Update route + */ +vpcRouterRouteUpdate: ({ +path, query = {}, body, }: {path: VpcRouterRouteUpdatePathParams, +query?: VpcRouterRouteUpdateQueryParams, +body: RouterRouteUpdate, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/vpc-router-routes/${path.route}`, + method: "PUT", + body, + query, + ...params, + }) + }, +/** +* Delete route + */ +vpcRouterRouteDelete: ({ +path, query = {}, }: {path: VpcRouterRouteDeletePathParams, +query?: VpcRouterRouteDeleteQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/vpc-router-routes/${path.route}`, + method: "DELETE", + query, + ...params, + }) + }, +/** +* List routers + */ +vpcRouterList: ({ +query = {}, }: {query?: VpcRouterListQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/vpc-routers`, + method: "GET", + query, + ...params, + }) + }, +/** +* Create VPC router + */ +vpcRouterCreate: ({ +query, body, }: {query: VpcRouterCreateQueryParams, +body: VpcRouterCreate, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/vpc-routers`, + method: "POST", + body, + query, + ...params, + }) + }, +/** +* Fetch router + */ +vpcRouterView: ({ +path, query = {}, }: {path: VpcRouterViewPathParams, +query?: VpcRouterViewQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/vpc-routers/${path.router}`, + method: "GET", + query, + ...params, + }) + }, +/** +* Update router + */ +vpcRouterUpdate: ({ +path, query = {}, body, }: {path: VpcRouterUpdatePathParams, +query?: VpcRouterUpdateQueryParams, +body: VpcRouterUpdate, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/vpc-routers/${path.router}`, + method: "PUT", + body, + query, + ...params, + }) + }, +/** +* Delete router + */ +vpcRouterDelete: ({ +path, query = {}, }: {path: VpcRouterDeletePathParams, +query?: VpcRouterDeleteQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/vpc-routers/${path.router}`, + method: "DELETE", + query, + ...params, + }) + }, +/** * List subnets */ vpcSubnetList: ({ @@ -6683,6 +11294,78 @@ params: FetchParams = {}) => { ...params, }) }, +/** +* Create webhook receiver + */ +webhookReceiverCreate: ({ +body, }: {body: WebhookCreate, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/webhook-receivers`, + method: "POST", + body, + ...params, + }) + }, +/** +* Update webhook receiver + */ +webhookReceiverUpdate: ({ +path, body, }: {path: WebhookReceiverUpdatePathParams, +body: WebhookReceiverUpdate, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/webhook-receivers/${path.receiver}`, + method: "PUT", + body, + ...params, + }) + }, +/** +* List webhook receiver secret IDs + */ +webhookSecretsList: ({ +query, }: {query: WebhookSecretsListQueryParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/webhook-secrets`, + method: "GET", + query, + ...params, + }) + }, +/** +* Add secret to webhook receiver + */ +webhookSecretsAdd: ({ +query, body, }: {query: WebhookSecretsAddQueryParams, +body: WebhookSecretCreate, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/webhook-secrets`, + method: "POST", + body, + query, + ...params, + }) + }, +/** +* Remove secret from webhook receiver + */ +webhookSecretsDelete: ({ +path, }: {path: WebhookSecretsDeletePathParams, +}, +params: FetchParams = {}) => { + return this.request({ + path: `/v1/webhook-secrets/${path.secretId}`, + method: "DELETE", + ...params, + }) + }, } ws = { /** diff --git a/oxide-openapi-gen-ts/src/__snapshots__/msw-handlers.ts b/oxide-openapi-gen-ts/src/__snapshots__/msw-handlers.ts index 527c8dd..0f4dfd9 100644 --- a/oxide-openapi-gen-ts/src/__snapshots__/msw-handlers.ts +++ b/oxide-openapi-gen-ts/src/__snapshots__/msw-handlers.ts @@ -44,8 +44,94 @@ export interface MSWHandlers { deviceAuthConfirm: (params: { body: Json, req: Request, cookies: Record }) => Promisable, /** `POST /device/token` */ deviceAccessToken: (params: { req: Request, cookies: Record }) => Promisable, +/** `GET /experimental/v1/probes` */ + probeList: (params: { query: Api.ProbeListQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `POST /experimental/v1/probes` */ + probeCreate: (params: { query: Api.ProbeCreateQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, +/** `GET /experimental/v1/probes/:probe` */ + probeView: (params: { path: Api.ProbeViewPathParams, query: Api.ProbeViewQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `DELETE /experimental/v1/probes/:probe` */ + probeDelete: (params: { path: Api.ProbeDeletePathParams, query: Api.ProbeDeleteQueryParams, req: Request, cookies: Record }) => Promisable, +/** `GET /experimental/v1/system/support-bundles` */ + supportBundleList: (params: { query: Api.SupportBundleListQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `POST /experimental/v1/system/support-bundles` */ + supportBundleCreate: (params: { body: Json, req: Request, cookies: Record }) => Promisable>, +/** `GET /experimental/v1/system/support-bundles/:bundleId` */ + supportBundleView: (params: { path: Api.SupportBundleViewPathParams, req: Request, cookies: Record }) => Promisable>, +/** `PUT /experimental/v1/system/support-bundles/:bundleId` */ + supportBundleUpdate: (params: { path: Api.SupportBundleUpdatePathParams, body: Json, req: Request, cookies: Record }) => Promisable>, +/** `DELETE /experimental/v1/system/support-bundles/:bundleId` */ + supportBundleDelete: (params: { path: Api.SupportBundleDeletePathParams, req: Request, cookies: Record }) => Promisable, +/** `GET /experimental/v1/system/support-bundles/:bundleId/download` */ + supportBundleDownload: (params: { path: Api.SupportBundleDownloadPathParams, req: Request, cookies: Record }) => Promisable, +/** `HEAD /experimental/v1/system/support-bundles/:bundleId/download` */ + supportBundleHead: (params: { path: Api.SupportBundleHeadPathParams, req: Request, cookies: Record }) => Promisable, +/** `GET /experimental/v1/system/support-bundles/:bundleId/download/:file` */ + supportBundleDownloadFile: (params: { path: Api.SupportBundleDownloadFilePathParams, req: Request, cookies: Record }) => Promisable, +/** `HEAD /experimental/v1/system/support-bundles/:bundleId/download/:file` */ + supportBundleHeadFile: (params: { path: Api.SupportBundleHeadFilePathParams, req: Request, cookies: Record }) => Promisable, +/** `GET /experimental/v1/system/support-bundles/:bundleId/index` */ + supportBundleIndex: (params: { path: Api.SupportBundleIndexPathParams, req: Request, cookies: Record }) => Promisable, /** `POST /login/:siloName/saml/:providerName` */ loginSaml: (params: { path: Api.LoginSamlPathParams, req: Request, cookies: Record }) => Promisable, +/** `GET /v1/affinity-groups` */ + affinityGroupList: (params: { query: Api.AffinityGroupListQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `POST /v1/affinity-groups` */ + affinityGroupCreate: (params: { query: Api.AffinityGroupCreateQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, +/** `GET /v1/affinity-groups/:affinityGroup` */ + affinityGroupView: (params: { path: Api.AffinityGroupViewPathParams, query: Api.AffinityGroupViewQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `PUT /v1/affinity-groups/:affinityGroup` */ + affinityGroupUpdate: (params: { path: Api.AffinityGroupUpdatePathParams, query: Api.AffinityGroupUpdateQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, +/** `DELETE /v1/affinity-groups/:affinityGroup` */ + affinityGroupDelete: (params: { path: Api.AffinityGroupDeletePathParams, query: Api.AffinityGroupDeleteQueryParams, req: Request, cookies: Record }) => Promisable, +/** `GET /v1/affinity-groups/:affinityGroup/members` */ + affinityGroupMemberList: (params: { path: Api.AffinityGroupMemberListPathParams, query: Api.AffinityGroupMemberListQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `GET /v1/affinity-groups/:affinityGroup/members/instance/:instance` */ + affinityGroupMemberInstanceView: (params: { path: Api.AffinityGroupMemberInstanceViewPathParams, query: Api.AffinityGroupMemberInstanceViewQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `POST /v1/affinity-groups/:affinityGroup/members/instance/:instance` */ + affinityGroupMemberInstanceAdd: (params: { path: Api.AffinityGroupMemberInstanceAddPathParams, query: Api.AffinityGroupMemberInstanceAddQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `DELETE /v1/affinity-groups/:affinityGroup/members/instance/:instance` */ + affinityGroupMemberInstanceDelete: (params: { path: Api.AffinityGroupMemberInstanceDeletePathParams, query: Api.AffinityGroupMemberInstanceDeleteQueryParams, req: Request, cookies: Record }) => Promisable, +/** `GET /v1/alert-classes` */ + alertClassList: (params: { query: Api.AlertClassListQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `GET /v1/alert-receivers` */ + alertReceiverList: (params: { query: Api.AlertReceiverListQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `GET /v1/alert-receivers/:receiver` */ + alertReceiverView: (params: { path: Api.AlertReceiverViewPathParams, req: Request, cookies: Record }) => Promisable>, +/** `DELETE /v1/alert-receivers/:receiver` */ + alertReceiverDelete: (params: { path: Api.AlertReceiverDeletePathParams, req: Request, cookies: Record }) => Promisable, +/** `GET /v1/alert-receivers/:receiver/deliveries` */ + alertDeliveryList: (params: { path: Api.AlertDeliveryListPathParams, query: Api.AlertDeliveryListQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `POST /v1/alert-receivers/:receiver/probe` */ + alertReceiverProbe: (params: { path: Api.AlertReceiverProbePathParams, query: Api.AlertReceiverProbeQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `POST /v1/alert-receivers/:receiver/subscriptions` */ + alertReceiverSubscriptionAdd: (params: { path: Api.AlertReceiverSubscriptionAddPathParams, body: Json, req: Request, cookies: Record }) => Promisable>, +/** `DELETE /v1/alert-receivers/:receiver/subscriptions/:subscription` */ + alertReceiverSubscriptionRemove: (params: { path: Api.AlertReceiverSubscriptionRemovePathParams, req: Request, cookies: Record }) => Promisable, +/** `POST /v1/alerts/:alertId/resend` */ + alertDeliveryResend: (params: { path: Api.AlertDeliveryResendPathParams, query: Api.AlertDeliveryResendQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `GET /v1/anti-affinity-groups` */ + antiAffinityGroupList: (params: { query: Api.AntiAffinityGroupListQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `POST /v1/anti-affinity-groups` */ + antiAffinityGroupCreate: (params: { query: Api.AntiAffinityGroupCreateQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, +/** `GET /v1/anti-affinity-groups/:antiAffinityGroup` */ + antiAffinityGroupView: (params: { path: Api.AntiAffinityGroupViewPathParams, query: Api.AntiAffinityGroupViewQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `PUT /v1/anti-affinity-groups/:antiAffinityGroup` */ + antiAffinityGroupUpdate: (params: { path: Api.AntiAffinityGroupUpdatePathParams, query: Api.AntiAffinityGroupUpdateQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, +/** `DELETE /v1/anti-affinity-groups/:antiAffinityGroup` */ + antiAffinityGroupDelete: (params: { path: Api.AntiAffinityGroupDeletePathParams, query: Api.AntiAffinityGroupDeleteQueryParams, req: Request, cookies: Record }) => Promisable, +/** `GET /v1/anti-affinity-groups/:antiAffinityGroup/members` */ + antiAffinityGroupMemberList: (params: { path: Api.AntiAffinityGroupMemberListPathParams, query: Api.AntiAffinityGroupMemberListQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `GET /v1/anti-affinity-groups/:antiAffinityGroup/members/instance/:instance` */ + antiAffinityGroupMemberInstanceView: (params: { path: Api.AntiAffinityGroupMemberInstanceViewPathParams, query: Api.AntiAffinityGroupMemberInstanceViewQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `POST /v1/anti-affinity-groups/:antiAffinityGroup/members/instance/:instance` */ + antiAffinityGroupMemberInstanceAdd: (params: { path: Api.AntiAffinityGroupMemberInstanceAddPathParams, query: Api.AntiAffinityGroupMemberInstanceAddQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `DELETE /v1/anti-affinity-groups/:antiAffinityGroup/members/instance/:instance` */ + antiAffinityGroupMemberInstanceDelete: (params: { path: Api.AntiAffinityGroupMemberInstanceDeletePathParams, query: Api.AntiAffinityGroupMemberInstanceDeleteQueryParams, req: Request, cookies: Record }) => Promisable, +/** `GET /v1/auth-settings` */ + authSettingsView: (params: { req: Request, cookies: Record }) => Promisable>, +/** `PUT /v1/auth-settings` */ + authSettingsUpdate: (params: { body: Json, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/certificates` */ certificateList: (params: { query: Api.CertificateListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `POST /v1/certificates` */ @@ -70,8 +156,6 @@ export interface MSWHandlers { diskBulkWriteImportStop: (params: { path: Api.DiskBulkWriteImportStopPathParams, query: Api.DiskBulkWriteImportStopQueryParams, req: Request, cookies: Record }) => Promisable, /** `POST /v1/disks/:disk/finalize` */ diskFinalizeImport: (params: { path: Api.DiskFinalizeImportPathParams, query: Api.DiskFinalizeImportQueryParams, body: Json, req: Request, cookies: Record }) => Promisable, -/** `GET /v1/disks/:disk/metrics/:metric` */ - diskMetricsList: (params: { path: Api.DiskMetricsListPathParams, query: Api.DiskMetricsListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/floating-ips` */ floatingIpList: (params: { query: Api.FloatingIpListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `POST /v1/floating-ips` */ @@ -108,8 +192,14 @@ export interface MSWHandlers { instanceCreate: (params: { query: Api.InstanceCreateQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/instances/:instance` */ instanceView: (params: { path: Api.InstanceViewPathParams, query: Api.InstanceViewQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `PUT /v1/instances/:instance` */ + instanceUpdate: (params: { path: Api.InstanceUpdatePathParams, query: Api.InstanceUpdateQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, /** `DELETE /v1/instances/:instance` */ instanceDelete: (params: { path: Api.InstanceDeletePathParams, query: Api.InstanceDeleteQueryParams, req: Request, cookies: Record }) => Promisable, +/** `GET /v1/instances/:instance/affinity-groups` */ + instanceAffinityGroupList: (params: { path: Api.InstanceAffinityGroupListPathParams, query: Api.InstanceAffinityGroupListQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `GET /v1/instances/:instance/anti-affinity-groups` */ + instanceAntiAffinityGroupList: (params: { path: Api.InstanceAntiAffinityGroupListPathParams, query: Api.InstanceAntiAffinityGroupListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/instances/:instance/disks` */ instanceDiskList: (params: { path: Api.InstanceDiskListPathParams, query: Api.InstanceDiskListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `POST /v1/instances/:instance/disks/attach` */ @@ -122,8 +212,12 @@ export interface MSWHandlers { instanceEphemeralIpAttach: (params: { path: Api.InstanceEphemeralIpAttachPathParams, query: Api.InstanceEphemeralIpAttachQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, /** `DELETE /v1/instances/:instance/external-ips/ephemeral` */ instanceEphemeralIpDetach: (params: { path: Api.InstanceEphemeralIpDetachPathParams, query: Api.InstanceEphemeralIpDetachQueryParams, req: Request, cookies: Record }) => Promisable, -/** `POST /v1/instances/:instance/migrate` */ - instanceMigrate: (params: { path: Api.InstanceMigratePathParams, query: Api.InstanceMigrateQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, +/** `GET /v1/instances/:instance/multicast-groups` */ + instanceMulticastGroupList: (params: { path: Api.InstanceMulticastGroupListPathParams, query: Api.InstanceMulticastGroupListQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `PUT /v1/instances/:instance/multicast-groups/:multicastGroup` */ + instanceMulticastGroupJoin: (params: { path: Api.InstanceMulticastGroupJoinPathParams, query: Api.InstanceMulticastGroupJoinQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `DELETE /v1/instances/:instance/multicast-groups/:multicastGroup` */ + instanceMulticastGroupLeave: (params: { path: Api.InstanceMulticastGroupLeavePathParams, query: Api.InstanceMulticastGroupLeaveQueryParams, req: Request, cookies: Record }) => Promisable, /** `POST /v1/instances/:instance/reboot` */ instanceReboot: (params: { path: Api.InstanceRebootPathParams, query: Api.InstanceRebootQueryParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/instances/:instance/serial-console` */ @@ -136,6 +230,26 @@ export interface MSWHandlers { instanceStart: (params: { path: Api.InstanceStartPathParams, query: Api.InstanceStartQueryParams, req: Request, cookies: Record }) => Promisable>, /** `POST /v1/instances/:instance/stop` */ instanceStop: (params: { path: Api.InstanceStopPathParams, query: Api.InstanceStopQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `GET /v1/internet-gateway-ip-addresses` */ + internetGatewayIpAddressList: (params: { query: Api.InternetGatewayIpAddressListQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `POST /v1/internet-gateway-ip-addresses` */ + internetGatewayIpAddressCreate: (params: { query: Api.InternetGatewayIpAddressCreateQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, +/** `DELETE /v1/internet-gateway-ip-addresses/:address` */ + internetGatewayIpAddressDelete: (params: { path: Api.InternetGatewayIpAddressDeletePathParams, query: Api.InternetGatewayIpAddressDeleteQueryParams, req: Request, cookies: Record }) => Promisable, +/** `GET /v1/internet-gateway-ip-pools` */ + internetGatewayIpPoolList: (params: { query: Api.InternetGatewayIpPoolListQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `POST /v1/internet-gateway-ip-pools` */ + internetGatewayIpPoolCreate: (params: { query: Api.InternetGatewayIpPoolCreateQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, +/** `DELETE /v1/internet-gateway-ip-pools/:pool` */ + internetGatewayIpPoolDelete: (params: { path: Api.InternetGatewayIpPoolDeletePathParams, query: Api.InternetGatewayIpPoolDeleteQueryParams, req: Request, cookies: Record }) => Promisable, +/** `GET /v1/internet-gateways` */ + internetGatewayList: (params: { query: Api.InternetGatewayListQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `POST /v1/internet-gateways` */ + internetGatewayCreate: (params: { query: Api.InternetGatewayCreateQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, +/** `GET /v1/internet-gateways/:gateway` */ + internetGatewayView: (params: { path: Api.InternetGatewayViewPathParams, query: Api.InternetGatewayViewQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `DELETE /v1/internet-gateways/:gateway` */ + internetGatewayDelete: (params: { path: Api.InternetGatewayDeletePathParams, query: Api.InternetGatewayDeleteQueryParams, req: Request, cookies: Record }) => Promisable, /** `GET /v1/ip-pools` */ projectIpPoolList: (params: { query: Api.ProjectIpPoolListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/ip-pools/:pool` */ @@ -146,6 +260,10 @@ export interface MSWHandlers { logout: (params: { req: Request, cookies: Record }) => Promisable, /** `GET /v1/me` */ currentUserView: (params: { req: Request, cookies: Record }) => Promisable>, +/** `GET /v1/me/access-tokens` */ + currentUserAccessTokenList: (params: { query: Api.CurrentUserAccessTokenListQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `DELETE /v1/me/access-tokens/:tokenId` */ + currentUserAccessTokenDelete: (params: { path: Api.CurrentUserAccessTokenDeletePathParams, req: Request, cookies: Record }) => Promisable, /** `GET /v1/me/groups` */ currentUserGroups: (params: { query: Api.CurrentUserGroupsQueryParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/me/ssh-keys` */ @@ -158,6 +276,22 @@ export interface MSWHandlers { currentUserSshKeyDelete: (params: { path: Api.CurrentUserSshKeyDeletePathParams, req: Request, cookies: Record }) => Promisable, /** `GET /v1/metrics/:metricName` */ siloMetric: (params: { path: Api.SiloMetricPathParams, query: Api.SiloMetricQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `GET /v1/multicast-groups` */ + multicastGroupList: (params: { query: Api.MulticastGroupListQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `POST /v1/multicast-groups` */ + multicastGroupCreate: (params: { body: Json, req: Request, cookies: Record }) => Promisable>, +/** `GET /v1/multicast-groups/:multicastGroup` */ + multicastGroupView: (params: { path: Api.MulticastGroupViewPathParams, req: Request, cookies: Record }) => Promisable>, +/** `PUT /v1/multicast-groups/:multicastGroup` */ + multicastGroupUpdate: (params: { path: Api.MulticastGroupUpdatePathParams, body: Json, req: Request, cookies: Record }) => Promisable>, +/** `DELETE /v1/multicast-groups/:multicastGroup` */ + multicastGroupDelete: (params: { path: Api.MulticastGroupDeletePathParams, req: Request, cookies: Record }) => Promisable, +/** `GET /v1/multicast-groups/:multicastGroup/members` */ + multicastGroupMemberList: (params: { path: Api.MulticastGroupMemberListPathParams, query: Api.MulticastGroupMemberListQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `POST /v1/multicast-groups/:multicastGroup/members` */ + multicastGroupMemberAdd: (params: { path: Api.MulticastGroupMemberAddPathParams, query: Api.MulticastGroupMemberAddQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, +/** `DELETE /v1/multicast-groups/:multicastGroup/members/:instance` */ + multicastGroupMemberRemove: (params: { path: Api.MulticastGroupMemberRemovePathParams, query: Api.MulticastGroupMemberRemoveQueryParams, req: Request, cookies: Record }) => Promisable, /** `GET /v1/network-interfaces` */ instanceNetworkInterfaceList: (params: { query: Api.InstanceNetworkInterfaceListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `POST /v1/network-interfaces` */ @@ -196,8 +330,14 @@ export interface MSWHandlers { snapshotView: (params: { path: Api.SnapshotViewPathParams, query: Api.SnapshotViewQueryParams, req: Request, cookies: Record }) => Promisable>, /** `DELETE /v1/snapshots/:snapshot` */ snapshotDelete: (params: { path: Api.SnapshotDeletePathParams, query: Api.SnapshotDeleteQueryParams, req: Request, cookies: Record }) => Promisable, +/** `GET /v1/system/audit-log` */ + auditLogList: (params: { query: Api.AuditLogListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/system/hardware/disks` */ physicalDiskList: (params: { query: Api.PhysicalDiskListQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `GET /v1/system/hardware/disks/:diskId` */ + physicalDiskView: (params: { path: Api.PhysicalDiskViewPathParams, req: Request, cookies: Record }) => Promisable>, +/** `GET /v1/system/hardware/rack-switch-port/:rackId/:switchLocation/:port/lldp/neighbors` */ + networkingSwitchPortLldpNeighbors: (params: { path: Api.NetworkingSwitchPortLldpNeighborsPathParams, query: Api.NetworkingSwitchPortLldpNeighborsQueryParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/system/hardware/racks` */ rackList: (params: { query: Api.RackListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/system/hardware/racks/:rackId` */ @@ -205,7 +345,7 @@ export interface MSWHandlers { /** `GET /v1/system/hardware/sleds` */ sledList: (params: { query: Api.SledListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `POST /v1/system/hardware/sleds` */ - sledAdd: (params: { body: Json, req: Request, cookies: Record }) => Promisable, + sledAdd: (params: { body: Json, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/system/hardware/sleds/:sledId` */ sledView: (params: { path: Api.SledViewPathParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/system/hardware/sleds/:sledId/disks` */ @@ -218,10 +358,16 @@ export interface MSWHandlers { sledListUninitialized: (params: { query: Api.SledListUninitializedQueryParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/system/hardware/switch-port` */ networkingSwitchPortList: (params: { query: Api.NetworkingSwitchPortListQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `GET /v1/system/hardware/switch-port/:port/lldp/config` */ + networkingSwitchPortLldpConfigView: (params: { path: Api.NetworkingSwitchPortLldpConfigViewPathParams, query: Api.NetworkingSwitchPortLldpConfigViewQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `POST /v1/system/hardware/switch-port/:port/lldp/config` */ + networkingSwitchPortLldpConfigUpdate: (params: { path: Api.NetworkingSwitchPortLldpConfigUpdatePathParams, query: Api.NetworkingSwitchPortLldpConfigUpdateQueryParams, body: Json, req: Request, cookies: Record }) => Promisable, /** `POST /v1/system/hardware/switch-port/:port/settings` */ networkingSwitchPortApplySettings: (params: { path: Api.NetworkingSwitchPortApplySettingsPathParams, query: Api.NetworkingSwitchPortApplySettingsQueryParams, body: Json, req: Request, cookies: Record }) => Promisable, /** `DELETE /v1/system/hardware/switch-port/:port/settings` */ networkingSwitchPortClearSettings: (params: { path: Api.NetworkingSwitchPortClearSettingsPathParams, query: Api.NetworkingSwitchPortClearSettingsQueryParams, req: Request, cookies: Record }) => Promisable, +/** `GET /v1/system/hardware/switch-port/:port/status` */ + networkingSwitchPortStatus: (params: { path: Api.NetworkingSwitchPortStatusPathParams, query: Api.NetworkingSwitchPortStatusQueryParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/system/hardware/switches` */ switchList: (params: { query: Api.SwitchListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/system/hardware/switches/:switchId` */ @@ -262,6 +408,8 @@ export interface MSWHandlers { ipPoolSiloUpdate: (params: { path: Api.IpPoolSiloUpdatePathParams, body: Json, req: Request, cookies: Record }) => Promisable>, /** `DELETE /v1/system/ip-pools/:pool/silos/:silo` */ ipPoolSiloUnlink: (params: { path: Api.IpPoolSiloUnlinkPathParams, req: Request, cookies: Record }) => Promisable, +/** `GET /v1/system/ip-pools/:pool/utilization` */ + ipPoolUtilizationView: (params: { path: Api.IpPoolUtilizationViewPathParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/system/ip-pools-service` */ ipPoolServiceView: (params: { req: Request, cookies: Record }) => Promisable>, /** `GET /v1/system/ip-pools-service/ranges` */ @@ -272,14 +420,22 @@ export interface MSWHandlers { ipPoolServiceRangeRemove: (params: { body: Json, req: Request, cookies: Record }) => Promisable, /** `GET /v1/system/metrics/:metricName` */ systemMetric: (params: { path: Api.SystemMetricPathParams, query: Api.SystemMetricQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `GET /v1/system/multicast-groups/by-ip/:address` */ + lookupMulticastGroupByIp: (params: { path: Api.LookupMulticastGroupByIpPathParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/system/networking/address-lot` */ networkingAddressLotList: (params: { query: Api.NetworkingAddressLotListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `POST /v1/system/networking/address-lot` */ networkingAddressLotCreate: (params: { body: Json, req: Request, cookies: Record }) => Promisable>, +/** `GET /v1/system/networking/address-lot/:addressLot` */ + networkingAddressLotView: (params: { path: Api.NetworkingAddressLotViewPathParams, req: Request, cookies: Record }) => Promisable>, /** `DELETE /v1/system/networking/address-lot/:addressLot` */ networkingAddressLotDelete: (params: { path: Api.NetworkingAddressLotDeletePathParams, req: Request, cookies: Record }) => Promisable, /** `GET /v1/system/networking/address-lot/:addressLot/blocks` */ networkingAddressLotBlockList: (params: { path: Api.NetworkingAddressLotBlockListPathParams, query: Api.NetworkingAddressLotBlockListQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `GET /v1/system/networking/allow-list` */ + networkingAllowListView: (params: { req: Request, cookies: Record }) => Promisable>, +/** `PUT /v1/system/networking/allow-list` */ + networkingAllowListUpdate: (params: { body: Json, req: Request, cookies: Record }) => Promisable>, /** `POST /v1/system/networking/bfd-disable` */ networkingBfdDisable: (params: { body: Json, req: Request, cookies: Record }) => Promisable, /** `POST /v1/system/networking/bfd-enable` */ @@ -292,16 +448,26 @@ export interface MSWHandlers { networkingBgpConfigCreate: (params: { body: Json, req: Request, cookies: Record }) => Promisable>, /** `DELETE /v1/system/networking/bgp` */ networkingBgpConfigDelete: (params: { query: Api.NetworkingBgpConfigDeleteQueryParams, req: Request, cookies: Record }) => Promisable, -/** `GET /v1/system/networking/bgp-announce` */ - networkingBgpAnnounceSetList: (params: { query: Api.NetworkingBgpAnnounceSetListQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `POST /v1/system/networking/bgp-announce` */ - networkingBgpAnnounceSetCreate: (params: { body: Json, req: Request, cookies: Record }) => Promisable>, -/** `DELETE /v1/system/networking/bgp-announce` */ - networkingBgpAnnounceSetDelete: (params: { query: Api.NetworkingBgpAnnounceSetDeleteQueryParams, req: Request, cookies: Record }) => Promisable, +/** `GET /v1/system/networking/bgp-announce-set` */ + networkingBgpAnnounceSetList: (params: { query: Api.NetworkingBgpAnnounceSetListQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `PUT /v1/system/networking/bgp-announce-set` */ + networkingBgpAnnounceSetUpdate: (params: { body: Json, req: Request, cookies: Record }) => Promisable>, +/** `DELETE /v1/system/networking/bgp-announce-set/:announceSet` */ + networkingBgpAnnounceSetDelete: (params: { path: Api.NetworkingBgpAnnounceSetDeletePathParams, req: Request, cookies: Record }) => Promisable, +/** `GET /v1/system/networking/bgp-announce-set/:announceSet/announcement` */ + networkingBgpAnnouncementList: (params: { path: Api.NetworkingBgpAnnouncementListPathParams, req: Request, cookies: Record }) => Promisable>, +/** `GET /v1/system/networking/bgp-exported` */ + networkingBgpExported: (params: { req: Request, cookies: Record }) => Promisable>, +/** `GET /v1/system/networking/bgp-message-history` */ + networkingBgpMessageHistory: (params: { query: Api.NetworkingBgpMessageHistoryQueryParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/system/networking/bgp-routes-ipv4` */ networkingBgpImportedRoutesIpv4: (params: { query: Api.NetworkingBgpImportedRoutesIpv4QueryParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/system/networking/bgp-status` */ networkingBgpStatus: (params: { req: Request, cookies: Record }) => Promisable>, +/** `GET /v1/system/networking/inbound-icmp` */ + networkingInboundIcmpView: (params: { req: Request, cookies: Record }) => Promisable>, +/** `PUT /v1/system/networking/inbound-icmp` */ + networkingInboundIcmpUpdate: (params: { body: Json, req: Request, cookies: Record }) => Promisable, /** `GET /v1/system/networking/loopback-address` */ networkingLoopbackAddressList: (params: { query: Api.NetworkingLoopbackAddressListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `POST /v1/system/networking/loopback-address` */ @@ -309,21 +475,25 @@ export interface MSWHandlers { /** `DELETE /v1/system/networking/loopback-address/:rackId/:switchLocation/:address/:subnetMask` */ networkingLoopbackAddressDelete: (params: { path: Api.NetworkingLoopbackAddressDeletePathParams, req: Request, cookies: Record }) => Promisable, /** `GET /v1/system/networking/switch-port-settings` */ - networkingSwitchPortSettingsList: (params: { query: Api.NetworkingSwitchPortSettingsListQueryParams, req: Request, cookies: Record }) => Promisable>, + networkingSwitchPortSettingsList: (params: { query: Api.NetworkingSwitchPortSettingsListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `POST /v1/system/networking/switch-port-settings` */ - networkingSwitchPortSettingsCreate: (params: { body: Json, req: Request, cookies: Record }) => Promisable>, + networkingSwitchPortSettingsCreate: (params: { body: Json, req: Request, cookies: Record }) => Promisable>, /** `DELETE /v1/system/networking/switch-port-settings` */ networkingSwitchPortSettingsDelete: (params: { query: Api.NetworkingSwitchPortSettingsDeleteQueryParams, req: Request, cookies: Record }) => Promisable, /** `GET /v1/system/networking/switch-port-settings/:port` */ - networkingSwitchPortSettingsView: (params: { path: Api.NetworkingSwitchPortSettingsViewPathParams, req: Request, cookies: Record }) => Promisable>, + networkingSwitchPortSettingsView: (params: { path: Api.NetworkingSwitchPortSettingsViewPathParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/system/policy` */ systemPolicyView: (params: { req: Request, cookies: Record }) => Promisable>, /** `PUT /v1/system/policy` */ systemPolicyUpdate: (params: { body: Json, req: Request, cookies: Record }) => Promisable>, -/** `GET /v1/system/roles` */ - roleList: (params: { query: Api.RoleListQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `GET /v1/system/roles/:roleName` */ - roleView: (params: { path: Api.RoleViewPathParams, req: Request, cookies: Record }) => Promisable>, +/** `GET /v1/system/scim/tokens` */ + scimTokenList: (params: { query: Api.ScimTokenListQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `POST /v1/system/scim/tokens` */ + scimTokenCreate: (params: { query: Api.ScimTokenCreateQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `GET /v1/system/scim/tokens/:tokenId` */ + scimTokenView: (params: { path: Api.ScimTokenViewPathParams, query: Api.ScimTokenViewQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `DELETE /v1/system/scim/tokens/:tokenId` */ + scimTokenDelete: (params: { path: Api.ScimTokenDeletePathParams, query: Api.ScimTokenDeleteQueryParams, req: Request, cookies: Record }) => Promisable, /** `GET /v1/system/silo-quotas` */ systemQuotasList: (params: { query: Api.SystemQuotasListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/system/silos` */ @@ -344,6 +514,28 @@ export interface MSWHandlers { siloQuotasView: (params: { path: Api.SiloQuotasViewPathParams, req: Request, cookies: Record }) => Promisable>, /** `PUT /v1/system/silos/:silo/quotas` */ siloQuotasUpdate: (params: { path: Api.SiloQuotasUpdatePathParams, body: Json, req: Request, cookies: Record }) => Promisable>, +/** `POST /v1/system/timeseries/query` */ + systemTimeseriesQuery: (params: { body: Json, req: Request, cookies: Record }) => Promisable>, +/** `GET /v1/system/timeseries/schemas` */ + systemTimeseriesSchemaList: (params: { query: Api.SystemTimeseriesSchemaListQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `GET /v1/system/update/repositories` */ + systemUpdateRepositoryList: (params: { query: Api.SystemUpdateRepositoryListQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `PUT /v1/system/update/repositories` */ + systemUpdateRepositoryUpload: (params: { query: Api.SystemUpdateRepositoryUploadQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `GET /v1/system/update/repositories/:systemVersion` */ + systemUpdateRepositoryView: (params: { path: Api.SystemUpdateRepositoryViewPathParams, req: Request, cookies: Record }) => Promisable>, +/** `GET /v1/system/update/status` */ + systemUpdateStatus: (params: { req: Request, cookies: Record }) => Promisable>, +/** `PUT /v1/system/update/target-release` */ + targetReleaseUpdate: (params: { body: Json, req: Request, cookies: Record }) => Promisable, +/** `GET /v1/system/update/trust-roots` */ + systemUpdateTrustRootList: (params: { query: Api.SystemUpdateTrustRootListQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `POST /v1/system/update/trust-roots` */ + systemUpdateTrustRootCreate: (params: { req: Request, cookies: Record }) => Promisable>, +/** `GET /v1/system/update/trust-roots/:trustRootId` */ + systemUpdateTrustRootView: (params: { path: Api.SystemUpdateTrustRootViewPathParams, req: Request, cookies: Record }) => Promisable>, +/** `DELETE /v1/system/update/trust-roots/:trustRootId` */ + systemUpdateTrustRootDelete: (params: { path: Api.SystemUpdateTrustRootDeletePathParams, req: Request, cookies: Record }) => Promisable, /** `GET /v1/system/users` */ siloUserList: (params: { query: Api.SiloUserListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/system/users/:userId` */ @@ -356,14 +548,44 @@ export interface MSWHandlers { siloUtilizationList: (params: { query: Api.SiloUtilizationListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/system/utilization/silos/:silo` */ siloUtilizationView: (params: { path: Api.SiloUtilizationViewPathParams, req: Request, cookies: Record }) => Promisable>, +/** `POST /v1/timeseries/query` */ + timeseriesQuery: (params: { query: Api.TimeseriesQueryQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/users` */ userList: (params: { query: Api.UserListQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `GET /v1/users/:userId` */ + userView: (params: { path: Api.UserViewPathParams, req: Request, cookies: Record }) => Promisable>, +/** `GET /v1/users/:userId/access-tokens` */ + userTokenList: (params: { path: Api.UserTokenListPathParams, query: Api.UserTokenListQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `POST /v1/users/:userId/logout` */ + userLogout: (params: { path: Api.UserLogoutPathParams, req: Request, cookies: Record }) => Promisable, +/** `GET /v1/users/:userId/sessions` */ + userSessionList: (params: { path: Api.UserSessionListPathParams, query: Api.UserSessionListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/utilization` */ utilizationView: (params: { req: Request, cookies: Record }) => Promisable>, /** `GET /v1/vpc-firewall-rules` */ vpcFirewallRulesView: (params: { query: Api.VpcFirewallRulesViewQueryParams, req: Request, cookies: Record }) => Promisable>, /** `PUT /v1/vpc-firewall-rules` */ vpcFirewallRulesUpdate: (params: { query: Api.VpcFirewallRulesUpdateQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, +/** `GET /v1/vpc-router-routes` */ + vpcRouterRouteList: (params: { query: Api.VpcRouterRouteListQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `POST /v1/vpc-router-routes` */ + vpcRouterRouteCreate: (params: { query: Api.VpcRouterRouteCreateQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, +/** `GET /v1/vpc-router-routes/:route` */ + vpcRouterRouteView: (params: { path: Api.VpcRouterRouteViewPathParams, query: Api.VpcRouterRouteViewQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `PUT /v1/vpc-router-routes/:route` */ + vpcRouterRouteUpdate: (params: { path: Api.VpcRouterRouteUpdatePathParams, query: Api.VpcRouterRouteUpdateQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, +/** `DELETE /v1/vpc-router-routes/:route` */ + vpcRouterRouteDelete: (params: { path: Api.VpcRouterRouteDeletePathParams, query: Api.VpcRouterRouteDeleteQueryParams, req: Request, cookies: Record }) => Promisable, +/** `GET /v1/vpc-routers` */ + vpcRouterList: (params: { query: Api.VpcRouterListQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `POST /v1/vpc-routers` */ + vpcRouterCreate: (params: { query: Api.VpcRouterCreateQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, +/** `GET /v1/vpc-routers/:router` */ + vpcRouterView: (params: { path: Api.VpcRouterViewPathParams, query: Api.VpcRouterViewQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `PUT /v1/vpc-routers/:router` */ + vpcRouterUpdate: (params: { path: Api.VpcRouterUpdatePathParams, query: Api.VpcRouterUpdateQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, +/** `DELETE /v1/vpc-routers/:router` */ + vpcRouterDelete: (params: { path: Api.VpcRouterDeletePathParams, query: Api.VpcRouterDeleteQueryParams, req: Request, cookies: Record }) => Promisable, /** `GET /v1/vpc-subnets` */ vpcSubnetList: (params: { query: Api.VpcSubnetListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `POST /v1/vpc-subnets` */ @@ -386,6 +608,16 @@ export interface MSWHandlers { vpcUpdate: (params: { path: Api.VpcUpdatePathParams, query: Api.VpcUpdateQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, /** `DELETE /v1/vpcs/:vpc` */ vpcDelete: (params: { path: Api.VpcDeletePathParams, query: Api.VpcDeleteQueryParams, req: Request, cookies: Record }) => Promisable, +/** `POST /v1/webhook-receivers` */ + webhookReceiverCreate: (params: { body: Json, req: Request, cookies: Record }) => Promisable>, +/** `PUT /v1/webhook-receivers/:receiver` */ + webhookReceiverUpdate: (params: { path: Api.WebhookReceiverUpdatePathParams, body: Json, req: Request, cookies: Record }) => Promisable, +/** `GET /v1/webhook-secrets` */ + webhookSecretsList: (params: { query: Api.WebhookSecretsListQueryParams, req: Request, cookies: Record }) => Promisable>, +/** `POST /v1/webhook-secrets` */ + webhookSecretsAdd: (params: { query: Api.WebhookSecretsAddQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, +/** `DELETE /v1/webhook-secrets/:secretId` */ + webhookSecretsDelete: (params: { path: Api.WebhookSecretsDeletePathParams, req: Request, cookies: Record }) => Promisable, } function validateParams(schema: S, req: Request, pathParams: PathParams) { @@ -489,7 +721,50 @@ export interface MSWHandlers { http.post('/device/auth', handler(handlers['deviceAuthRequest'], null, null)), http.post('/device/confirm', handler(handlers['deviceAuthConfirm'], null, schema.DeviceAuthVerify)), http.post('/device/token', handler(handlers['deviceAccessToken'], null, null)), +http.get('/experimental/v1/probes', handler(handlers['probeList'], schema.ProbeListParams, null)), +http.post('/experimental/v1/probes', handler(handlers['probeCreate'], schema.ProbeCreateParams, schema.ProbeCreate)), +http.get('/experimental/v1/probes/:probe', handler(handlers['probeView'], schema.ProbeViewParams, null)), +http.delete('/experimental/v1/probes/:probe', handler(handlers['probeDelete'], schema.ProbeDeleteParams, null)), +http.get('/experimental/v1/system/support-bundles', handler(handlers['supportBundleList'], schema.SupportBundleListParams, null)), +http.post('/experimental/v1/system/support-bundles', handler(handlers['supportBundleCreate'], null, schema.SupportBundleCreate)), +http.get('/experimental/v1/system/support-bundles/:bundleId', handler(handlers['supportBundleView'], schema.SupportBundleViewParams, null)), +http.put('/experimental/v1/system/support-bundles/:bundleId', handler(handlers['supportBundleUpdate'], schema.SupportBundleUpdateParams, schema.SupportBundleUpdate)), +http.delete('/experimental/v1/system/support-bundles/:bundleId', handler(handlers['supportBundleDelete'], schema.SupportBundleDeleteParams, null)), +http.get('/experimental/v1/system/support-bundles/:bundleId/download', handler(handlers['supportBundleDownload'], schema.SupportBundleDownloadParams, null)), +http.head('/experimental/v1/system/support-bundles/:bundleId/download', handler(handlers['supportBundleHead'], schema.SupportBundleHeadParams, null)), +http.get('/experimental/v1/system/support-bundles/:bundleId/download/:file', handler(handlers['supportBundleDownloadFile'], schema.SupportBundleDownloadFileParams, null)), +http.head('/experimental/v1/system/support-bundles/:bundleId/download/:file', handler(handlers['supportBundleHeadFile'], schema.SupportBundleHeadFileParams, null)), +http.get('/experimental/v1/system/support-bundles/:bundleId/index', handler(handlers['supportBundleIndex'], schema.SupportBundleIndexParams, null)), http.post('/login/:siloName/saml/:providerName', handler(handlers['loginSaml'], schema.LoginSamlParams, null)), +http.get('/v1/affinity-groups', handler(handlers['affinityGroupList'], schema.AffinityGroupListParams, null)), +http.post('/v1/affinity-groups', handler(handlers['affinityGroupCreate'], schema.AffinityGroupCreateParams, schema.AffinityGroupCreate)), +http.get('/v1/affinity-groups/:affinityGroup', handler(handlers['affinityGroupView'], schema.AffinityGroupViewParams, null)), +http.put('/v1/affinity-groups/:affinityGroup', handler(handlers['affinityGroupUpdate'], schema.AffinityGroupUpdateParams, schema.AffinityGroupUpdate)), +http.delete('/v1/affinity-groups/:affinityGroup', handler(handlers['affinityGroupDelete'], schema.AffinityGroupDeleteParams, null)), +http.get('/v1/affinity-groups/:affinityGroup/members', handler(handlers['affinityGroupMemberList'], schema.AffinityGroupMemberListParams, null)), +http.get('/v1/affinity-groups/:affinityGroup/members/instance/:instance', handler(handlers['affinityGroupMemberInstanceView'], schema.AffinityGroupMemberInstanceViewParams, null)), +http.post('/v1/affinity-groups/:affinityGroup/members/instance/:instance', handler(handlers['affinityGroupMemberInstanceAdd'], schema.AffinityGroupMemberInstanceAddParams, null)), +http.delete('/v1/affinity-groups/:affinityGroup/members/instance/:instance', handler(handlers['affinityGroupMemberInstanceDelete'], schema.AffinityGroupMemberInstanceDeleteParams, null)), +http.get('/v1/alert-classes', handler(handlers['alertClassList'], schema.AlertClassListParams, null)), +http.get('/v1/alert-receivers', handler(handlers['alertReceiverList'], schema.AlertReceiverListParams, null)), +http.get('/v1/alert-receivers/:receiver', handler(handlers['alertReceiverView'], schema.AlertReceiverViewParams, null)), +http.delete('/v1/alert-receivers/:receiver', handler(handlers['alertReceiverDelete'], schema.AlertReceiverDeleteParams, null)), +http.get('/v1/alert-receivers/:receiver/deliveries', handler(handlers['alertDeliveryList'], schema.AlertDeliveryListParams, null)), +http.post('/v1/alert-receivers/:receiver/probe', handler(handlers['alertReceiverProbe'], schema.AlertReceiverProbeParams, null)), +http.post('/v1/alert-receivers/:receiver/subscriptions', handler(handlers['alertReceiverSubscriptionAdd'], schema.AlertReceiverSubscriptionAddParams, schema.AlertSubscriptionCreate)), +http.delete('/v1/alert-receivers/:receiver/subscriptions/:subscription', handler(handlers['alertReceiverSubscriptionRemove'], schema.AlertReceiverSubscriptionRemoveParams, null)), +http.post('/v1/alerts/:alertId/resend', handler(handlers['alertDeliveryResend'], schema.AlertDeliveryResendParams, null)), +http.get('/v1/anti-affinity-groups', handler(handlers['antiAffinityGroupList'], schema.AntiAffinityGroupListParams, null)), +http.post('/v1/anti-affinity-groups', handler(handlers['antiAffinityGroupCreate'], schema.AntiAffinityGroupCreateParams, schema.AntiAffinityGroupCreate)), +http.get('/v1/anti-affinity-groups/:antiAffinityGroup', handler(handlers['antiAffinityGroupView'], schema.AntiAffinityGroupViewParams, null)), +http.put('/v1/anti-affinity-groups/:antiAffinityGroup', handler(handlers['antiAffinityGroupUpdate'], schema.AntiAffinityGroupUpdateParams, schema.AntiAffinityGroupUpdate)), +http.delete('/v1/anti-affinity-groups/:antiAffinityGroup', handler(handlers['antiAffinityGroupDelete'], schema.AntiAffinityGroupDeleteParams, null)), +http.get('/v1/anti-affinity-groups/:antiAffinityGroup/members', handler(handlers['antiAffinityGroupMemberList'], schema.AntiAffinityGroupMemberListParams, null)), +http.get('/v1/anti-affinity-groups/:antiAffinityGroup/members/instance/:instance', handler(handlers['antiAffinityGroupMemberInstanceView'], schema.AntiAffinityGroupMemberInstanceViewParams, null)), +http.post('/v1/anti-affinity-groups/:antiAffinityGroup/members/instance/:instance', handler(handlers['antiAffinityGroupMemberInstanceAdd'], schema.AntiAffinityGroupMemberInstanceAddParams, null)), +http.delete('/v1/anti-affinity-groups/:antiAffinityGroup/members/instance/:instance', handler(handlers['antiAffinityGroupMemberInstanceDelete'], schema.AntiAffinityGroupMemberInstanceDeleteParams, null)), +http.get('/v1/auth-settings', handler(handlers['authSettingsView'], null, null)), +http.put('/v1/auth-settings', handler(handlers['authSettingsUpdate'], null, schema.SiloAuthSettingsUpdate)), http.get('/v1/certificates', handler(handlers['certificateList'], schema.CertificateListParams, null)), http.post('/v1/certificates', handler(handlers['certificateCreate'], null, schema.CertificateCreate)), http.get('/v1/certificates/:certificate', handler(handlers['certificateView'], schema.CertificateViewParams, null)), @@ -502,7 +777,6 @@ http.post('/v1/disks/:disk/bulk-write', handler(handlers['diskBulkWriteImport'], http.post('/v1/disks/:disk/bulk-write-start', handler(handlers['diskBulkWriteImportStart'], schema.DiskBulkWriteImportStartParams, null)), http.post('/v1/disks/:disk/bulk-write-stop', handler(handlers['diskBulkWriteImportStop'], schema.DiskBulkWriteImportStopParams, null)), http.post('/v1/disks/:disk/finalize', handler(handlers['diskFinalizeImport'], schema.DiskFinalizeImportParams, schema.FinalizeDisk)), -http.get('/v1/disks/:disk/metrics/:metric', handler(handlers['diskMetricsList'], schema.DiskMetricsListParams, null)), http.get('/v1/floating-ips', handler(handlers['floatingIpList'], schema.FloatingIpListParams, null)), http.post('/v1/floating-ips', handler(handlers['floatingIpCreate'], schema.FloatingIpCreateParams, schema.FloatingIpCreate)), http.get('/v1/floating-ips/:floatingIp', handler(handlers['floatingIpView'], schema.FloatingIpViewParams, null)), @@ -521,31 +795,56 @@ http.post('/v1/images/:image/promote', handler(handlers['imagePromote'], schema. http.get('/v1/instances', handler(handlers['instanceList'], schema.InstanceListParams, null)), http.post('/v1/instances', handler(handlers['instanceCreate'], schema.InstanceCreateParams, schema.InstanceCreate)), http.get('/v1/instances/:instance', handler(handlers['instanceView'], schema.InstanceViewParams, null)), +http.put('/v1/instances/:instance', handler(handlers['instanceUpdate'], schema.InstanceUpdateParams, schema.InstanceUpdate)), http.delete('/v1/instances/:instance', handler(handlers['instanceDelete'], schema.InstanceDeleteParams, null)), +http.get('/v1/instances/:instance/affinity-groups', handler(handlers['instanceAffinityGroupList'], schema.InstanceAffinityGroupListParams, null)), +http.get('/v1/instances/:instance/anti-affinity-groups', handler(handlers['instanceAntiAffinityGroupList'], schema.InstanceAntiAffinityGroupListParams, null)), http.get('/v1/instances/:instance/disks', handler(handlers['instanceDiskList'], schema.InstanceDiskListParams, null)), http.post('/v1/instances/:instance/disks/attach', handler(handlers['instanceDiskAttach'], schema.InstanceDiskAttachParams, schema.DiskPath)), http.post('/v1/instances/:instance/disks/detach', handler(handlers['instanceDiskDetach'], schema.InstanceDiskDetachParams, schema.DiskPath)), http.get('/v1/instances/:instance/external-ips', handler(handlers['instanceExternalIpList'], schema.InstanceExternalIpListParams, null)), http.post('/v1/instances/:instance/external-ips/ephemeral', handler(handlers['instanceEphemeralIpAttach'], schema.InstanceEphemeralIpAttachParams, schema.EphemeralIpCreate)), http.delete('/v1/instances/:instance/external-ips/ephemeral', handler(handlers['instanceEphemeralIpDetach'], schema.InstanceEphemeralIpDetachParams, null)), -http.post('/v1/instances/:instance/migrate', handler(handlers['instanceMigrate'], schema.InstanceMigrateParams, schema.InstanceMigrate)), +http.get('/v1/instances/:instance/multicast-groups', handler(handlers['instanceMulticastGroupList'], schema.InstanceMulticastGroupListParams, null)), +http.put('/v1/instances/:instance/multicast-groups/:multicastGroup', handler(handlers['instanceMulticastGroupJoin'], schema.InstanceMulticastGroupJoinParams, null)), +http.delete('/v1/instances/:instance/multicast-groups/:multicastGroup', handler(handlers['instanceMulticastGroupLeave'], schema.InstanceMulticastGroupLeaveParams, null)), http.post('/v1/instances/:instance/reboot', handler(handlers['instanceReboot'], schema.InstanceRebootParams, null)), http.get('/v1/instances/:instance/serial-console', handler(handlers['instanceSerialConsole'], schema.InstanceSerialConsoleParams, null)), http.get('/v1/instances/:instance/serial-console/stream', handler(handlers['instanceSerialConsoleStream'], schema.InstanceSerialConsoleStreamParams, null)), http.get('/v1/instances/:instance/ssh-public-keys', handler(handlers['instanceSshPublicKeyList'], schema.InstanceSshPublicKeyListParams, null)), http.post('/v1/instances/:instance/start', handler(handlers['instanceStart'], schema.InstanceStartParams, null)), http.post('/v1/instances/:instance/stop', handler(handlers['instanceStop'], schema.InstanceStopParams, null)), +http.get('/v1/internet-gateway-ip-addresses', handler(handlers['internetGatewayIpAddressList'], schema.InternetGatewayIpAddressListParams, null)), +http.post('/v1/internet-gateway-ip-addresses', handler(handlers['internetGatewayIpAddressCreate'], schema.InternetGatewayIpAddressCreateParams, schema.InternetGatewayIpAddressCreate)), +http.delete('/v1/internet-gateway-ip-addresses/:address', handler(handlers['internetGatewayIpAddressDelete'], schema.InternetGatewayIpAddressDeleteParams, null)), +http.get('/v1/internet-gateway-ip-pools', handler(handlers['internetGatewayIpPoolList'], schema.InternetGatewayIpPoolListParams, null)), +http.post('/v1/internet-gateway-ip-pools', handler(handlers['internetGatewayIpPoolCreate'], schema.InternetGatewayIpPoolCreateParams, schema.InternetGatewayIpPoolCreate)), +http.delete('/v1/internet-gateway-ip-pools/:pool', handler(handlers['internetGatewayIpPoolDelete'], schema.InternetGatewayIpPoolDeleteParams, null)), +http.get('/v1/internet-gateways', handler(handlers['internetGatewayList'], schema.InternetGatewayListParams, null)), +http.post('/v1/internet-gateways', handler(handlers['internetGatewayCreate'], schema.InternetGatewayCreateParams, schema.InternetGatewayCreate)), +http.get('/v1/internet-gateways/:gateway', handler(handlers['internetGatewayView'], schema.InternetGatewayViewParams, null)), +http.delete('/v1/internet-gateways/:gateway', handler(handlers['internetGatewayDelete'], schema.InternetGatewayDeleteParams, null)), http.get('/v1/ip-pools', handler(handlers['projectIpPoolList'], schema.ProjectIpPoolListParams, null)), http.get('/v1/ip-pools/:pool', handler(handlers['projectIpPoolView'], schema.ProjectIpPoolViewParams, null)), http.post('/v1/login/:siloName/local', handler(handlers['loginLocal'], schema.LoginLocalParams, schema.UsernamePasswordCredentials)), http.post('/v1/logout', handler(handlers['logout'], null, null)), http.get('/v1/me', handler(handlers['currentUserView'], null, null)), +http.get('/v1/me/access-tokens', handler(handlers['currentUserAccessTokenList'], schema.CurrentUserAccessTokenListParams, null)), +http.delete('/v1/me/access-tokens/:tokenId', handler(handlers['currentUserAccessTokenDelete'], schema.CurrentUserAccessTokenDeleteParams, null)), http.get('/v1/me/groups', handler(handlers['currentUserGroups'], schema.CurrentUserGroupsParams, null)), http.get('/v1/me/ssh-keys', handler(handlers['currentUserSshKeyList'], schema.CurrentUserSshKeyListParams, null)), http.post('/v1/me/ssh-keys', handler(handlers['currentUserSshKeyCreate'], null, schema.SshKeyCreate)), http.get('/v1/me/ssh-keys/:sshKey', handler(handlers['currentUserSshKeyView'], schema.CurrentUserSshKeyViewParams, null)), http.delete('/v1/me/ssh-keys/:sshKey', handler(handlers['currentUserSshKeyDelete'], schema.CurrentUserSshKeyDeleteParams, null)), http.get('/v1/metrics/:metricName', handler(handlers['siloMetric'], schema.SiloMetricParams, null)), +http.get('/v1/multicast-groups', handler(handlers['multicastGroupList'], schema.MulticastGroupListParams, null)), +http.post('/v1/multicast-groups', handler(handlers['multicastGroupCreate'], null, schema.MulticastGroupCreate)), +http.get('/v1/multicast-groups/:multicastGroup', handler(handlers['multicastGroupView'], schema.MulticastGroupViewParams, null)), +http.put('/v1/multicast-groups/:multicastGroup', handler(handlers['multicastGroupUpdate'], schema.MulticastGroupUpdateParams, schema.MulticastGroupUpdate)), +http.delete('/v1/multicast-groups/:multicastGroup', handler(handlers['multicastGroupDelete'], schema.MulticastGroupDeleteParams, null)), +http.get('/v1/multicast-groups/:multicastGroup/members', handler(handlers['multicastGroupMemberList'], schema.MulticastGroupMemberListParams, null)), +http.post('/v1/multicast-groups/:multicastGroup/members', handler(handlers['multicastGroupMemberAdd'], schema.MulticastGroupMemberAddParams, schema.MulticastGroupMemberAdd)), +http.delete('/v1/multicast-groups/:multicastGroup/members/:instance', handler(handlers['multicastGroupMemberRemove'], schema.MulticastGroupMemberRemoveParams, null)), http.get('/v1/network-interfaces', handler(handlers['instanceNetworkInterfaceList'], schema.InstanceNetworkInterfaceListParams, null)), http.post('/v1/network-interfaces', handler(handlers['instanceNetworkInterfaceCreate'], schema.InstanceNetworkInterfaceCreateParams, schema.InstanceNetworkInterfaceCreate)), http.get('/v1/network-interfaces/:interface', handler(handlers['instanceNetworkInterfaceView'], schema.InstanceNetworkInterfaceViewParams, null)), @@ -565,7 +864,10 @@ http.get('/v1/snapshots', handler(handlers['snapshotList'], schema.SnapshotListP http.post('/v1/snapshots', handler(handlers['snapshotCreate'], schema.SnapshotCreateParams, schema.SnapshotCreate)), http.get('/v1/snapshots/:snapshot', handler(handlers['snapshotView'], schema.SnapshotViewParams, null)), http.delete('/v1/snapshots/:snapshot', handler(handlers['snapshotDelete'], schema.SnapshotDeleteParams, null)), +http.get('/v1/system/audit-log', handler(handlers['auditLogList'], schema.AuditLogListParams, null)), http.get('/v1/system/hardware/disks', handler(handlers['physicalDiskList'], schema.PhysicalDiskListParams, null)), +http.get('/v1/system/hardware/disks/:diskId', handler(handlers['physicalDiskView'], schema.PhysicalDiskViewParams, null)), +http.get('/v1/system/hardware/rack-switch-port/:rackId/:switchLocation/:port/lldp/neighbors', handler(handlers['networkingSwitchPortLldpNeighbors'], schema.NetworkingSwitchPortLldpNeighborsParams, null)), http.get('/v1/system/hardware/racks', handler(handlers['rackList'], schema.RackListParams, null)), http.get('/v1/system/hardware/racks/:rackId', handler(handlers['rackView'], schema.RackViewParams, null)), http.get('/v1/system/hardware/sleds', handler(handlers['sledList'], schema.SledListParams, null)), @@ -576,8 +878,11 @@ http.get('/v1/system/hardware/sleds/:sledId/instances', handler(handlers['sledIn http.put('/v1/system/hardware/sleds/:sledId/provision-policy', handler(handlers['sledSetProvisionPolicy'], schema.SledSetProvisionPolicyParams, schema.SledProvisionPolicyParams)), http.get('/v1/system/hardware/sleds-uninitialized', handler(handlers['sledListUninitialized'], schema.SledListUninitializedParams, null)), http.get('/v1/system/hardware/switch-port', handler(handlers['networkingSwitchPortList'], schema.NetworkingSwitchPortListParams, null)), +http.get('/v1/system/hardware/switch-port/:port/lldp/config', handler(handlers['networkingSwitchPortLldpConfigView'], schema.NetworkingSwitchPortLldpConfigViewParams, null)), +http.post('/v1/system/hardware/switch-port/:port/lldp/config', handler(handlers['networkingSwitchPortLldpConfigUpdate'], schema.NetworkingSwitchPortLldpConfigUpdateParams, schema.LldpLinkConfig)), http.post('/v1/system/hardware/switch-port/:port/settings', handler(handlers['networkingSwitchPortApplySettings'], schema.NetworkingSwitchPortApplySettingsParams, schema.SwitchPortApplySettings)), http.delete('/v1/system/hardware/switch-port/:port/settings', handler(handlers['networkingSwitchPortClearSettings'], schema.NetworkingSwitchPortClearSettingsParams, null)), +http.get('/v1/system/hardware/switch-port/:port/status', handler(handlers['networkingSwitchPortStatus'], schema.NetworkingSwitchPortStatusParams, null)), http.get('/v1/system/hardware/switches', handler(handlers['switchList'], schema.SwitchListParams, null)), http.get('/v1/system/hardware/switches/:switchId', handler(handlers['switchView'], schema.SwitchViewParams, null)), http.get('/v1/system/identity-providers', handler(handlers['siloIdentityProviderList'], schema.SiloIdentityProviderListParams, null)), @@ -598,26 +903,36 @@ http.get('/v1/system/ip-pools/:pool/silos', handler(handlers['ipPoolSiloList'], http.post('/v1/system/ip-pools/:pool/silos', handler(handlers['ipPoolSiloLink'], schema.IpPoolSiloLinkParams, schema.IpPoolLinkSilo)), http.put('/v1/system/ip-pools/:pool/silos/:silo', handler(handlers['ipPoolSiloUpdate'], schema.IpPoolSiloUpdateParams, schema.IpPoolSiloUpdate)), http.delete('/v1/system/ip-pools/:pool/silos/:silo', handler(handlers['ipPoolSiloUnlink'], schema.IpPoolSiloUnlinkParams, null)), +http.get('/v1/system/ip-pools/:pool/utilization', handler(handlers['ipPoolUtilizationView'], schema.IpPoolUtilizationViewParams, null)), http.get('/v1/system/ip-pools-service', handler(handlers['ipPoolServiceView'], null, null)), http.get('/v1/system/ip-pools-service/ranges', handler(handlers['ipPoolServiceRangeList'], schema.IpPoolServiceRangeListParams, null)), http.post('/v1/system/ip-pools-service/ranges/add', handler(handlers['ipPoolServiceRangeAdd'], null, schema.IpRange)), http.post('/v1/system/ip-pools-service/ranges/remove', handler(handlers['ipPoolServiceRangeRemove'], null, schema.IpRange)), http.get('/v1/system/metrics/:metricName', handler(handlers['systemMetric'], schema.SystemMetricParams, null)), +http.get('/v1/system/multicast-groups/by-ip/:address', handler(handlers['lookupMulticastGroupByIp'], schema.LookupMulticastGroupByIpParams, null)), http.get('/v1/system/networking/address-lot', handler(handlers['networkingAddressLotList'], schema.NetworkingAddressLotListParams, null)), http.post('/v1/system/networking/address-lot', handler(handlers['networkingAddressLotCreate'], null, schema.AddressLotCreate)), +http.get('/v1/system/networking/address-lot/:addressLot', handler(handlers['networkingAddressLotView'], schema.NetworkingAddressLotViewParams, null)), http.delete('/v1/system/networking/address-lot/:addressLot', handler(handlers['networkingAddressLotDelete'], schema.NetworkingAddressLotDeleteParams, null)), http.get('/v1/system/networking/address-lot/:addressLot/blocks', handler(handlers['networkingAddressLotBlockList'], schema.NetworkingAddressLotBlockListParams, null)), +http.get('/v1/system/networking/allow-list', handler(handlers['networkingAllowListView'], null, null)), +http.put('/v1/system/networking/allow-list', handler(handlers['networkingAllowListUpdate'], null, schema.AllowListUpdate)), http.post('/v1/system/networking/bfd-disable', handler(handlers['networkingBfdDisable'], null, schema.BfdSessionDisable)), http.post('/v1/system/networking/bfd-enable', handler(handlers['networkingBfdEnable'], null, schema.BfdSessionEnable)), http.get('/v1/system/networking/bfd-status', handler(handlers['networkingBfdStatus'], null, null)), http.get('/v1/system/networking/bgp', handler(handlers['networkingBgpConfigList'], schema.NetworkingBgpConfigListParams, null)), http.post('/v1/system/networking/bgp', handler(handlers['networkingBgpConfigCreate'], null, schema.BgpConfigCreate)), http.delete('/v1/system/networking/bgp', handler(handlers['networkingBgpConfigDelete'], schema.NetworkingBgpConfigDeleteParams, null)), -http.get('/v1/system/networking/bgp-announce', handler(handlers['networkingBgpAnnounceSetList'], schema.NetworkingBgpAnnounceSetListParams, null)), -http.post('/v1/system/networking/bgp-announce', handler(handlers['networkingBgpAnnounceSetCreate'], null, schema.BgpAnnounceSetCreate)), -http.delete('/v1/system/networking/bgp-announce', handler(handlers['networkingBgpAnnounceSetDelete'], schema.NetworkingBgpAnnounceSetDeleteParams, null)), +http.get('/v1/system/networking/bgp-announce-set', handler(handlers['networkingBgpAnnounceSetList'], schema.NetworkingBgpAnnounceSetListParams, null)), +http.put('/v1/system/networking/bgp-announce-set', handler(handlers['networkingBgpAnnounceSetUpdate'], null, schema.BgpAnnounceSetCreate)), +http.delete('/v1/system/networking/bgp-announce-set/:announceSet', handler(handlers['networkingBgpAnnounceSetDelete'], schema.NetworkingBgpAnnounceSetDeleteParams, null)), +http.get('/v1/system/networking/bgp-announce-set/:announceSet/announcement', handler(handlers['networkingBgpAnnouncementList'], schema.NetworkingBgpAnnouncementListParams, null)), +http.get('/v1/system/networking/bgp-exported', handler(handlers['networkingBgpExported'], null, null)), +http.get('/v1/system/networking/bgp-message-history', handler(handlers['networkingBgpMessageHistory'], schema.NetworkingBgpMessageHistoryParams, null)), http.get('/v1/system/networking/bgp-routes-ipv4', handler(handlers['networkingBgpImportedRoutesIpv4'], schema.NetworkingBgpImportedRoutesIpv4Params, null)), http.get('/v1/system/networking/bgp-status', handler(handlers['networkingBgpStatus'], null, null)), +http.get('/v1/system/networking/inbound-icmp', handler(handlers['networkingInboundIcmpView'], null, null)), +http.put('/v1/system/networking/inbound-icmp', handler(handlers['networkingInboundIcmpUpdate'], null, schema.ServiceIcmpConfig)), http.get('/v1/system/networking/loopback-address', handler(handlers['networkingLoopbackAddressList'], schema.NetworkingLoopbackAddressListParams, null)), http.post('/v1/system/networking/loopback-address', handler(handlers['networkingLoopbackAddressCreate'], null, schema.LoopbackAddressCreate)), http.delete('/v1/system/networking/loopback-address/:rackId/:switchLocation/:address/:subnetMask', handler(handlers['networkingLoopbackAddressDelete'], schema.NetworkingLoopbackAddressDeleteParams, null)), @@ -627,8 +942,10 @@ http.delete('/v1/system/networking/switch-port-settings', handler(handlers['netw http.get('/v1/system/networking/switch-port-settings/:port', handler(handlers['networkingSwitchPortSettingsView'], schema.NetworkingSwitchPortSettingsViewParams, null)), http.get('/v1/system/policy', handler(handlers['systemPolicyView'], null, null)), http.put('/v1/system/policy', handler(handlers['systemPolicyUpdate'], null, schema.FleetRolePolicy)), -http.get('/v1/system/roles', handler(handlers['roleList'], schema.RoleListParams, null)), -http.get('/v1/system/roles/:roleName', handler(handlers['roleView'], schema.RoleViewParams, null)), +http.get('/v1/system/scim/tokens', handler(handlers['scimTokenList'], schema.ScimTokenListParams, null)), +http.post('/v1/system/scim/tokens', handler(handlers['scimTokenCreate'], schema.ScimTokenCreateParams, null)), +http.get('/v1/system/scim/tokens/:tokenId', handler(handlers['scimTokenView'], schema.ScimTokenViewParams, null)), +http.delete('/v1/system/scim/tokens/:tokenId', handler(handlers['scimTokenDelete'], schema.ScimTokenDeleteParams, null)), http.get('/v1/system/silo-quotas', handler(handlers['systemQuotasList'], schema.SystemQuotasListParams, null)), http.get('/v1/system/silos', handler(handlers['siloList'], schema.SiloListParams, null)), http.post('/v1/system/silos', handler(handlers['siloCreate'], null, schema.SiloCreate)), @@ -639,16 +956,42 @@ http.get('/v1/system/silos/:silo/policy', handler(handlers['siloPolicyView'], sc http.put('/v1/system/silos/:silo/policy', handler(handlers['siloPolicyUpdate'], schema.SiloPolicyUpdateParams, schema.SiloRolePolicy)), http.get('/v1/system/silos/:silo/quotas', handler(handlers['siloQuotasView'], schema.SiloQuotasViewParams, null)), http.put('/v1/system/silos/:silo/quotas', handler(handlers['siloQuotasUpdate'], schema.SiloQuotasUpdateParams, schema.SiloQuotasUpdate)), +http.post('/v1/system/timeseries/query', handler(handlers['systemTimeseriesQuery'], null, schema.TimeseriesQuery)), +http.get('/v1/system/timeseries/schemas', handler(handlers['systemTimeseriesSchemaList'], schema.SystemTimeseriesSchemaListParams, null)), +http.get('/v1/system/update/repositories', handler(handlers['systemUpdateRepositoryList'], schema.SystemUpdateRepositoryListParams, null)), +http.put('/v1/system/update/repositories', handler(handlers['systemUpdateRepositoryUpload'], schema.SystemUpdateRepositoryUploadParams, null)), +http.get('/v1/system/update/repositories/:systemVersion', handler(handlers['systemUpdateRepositoryView'], schema.SystemUpdateRepositoryViewParams, null)), +http.get('/v1/system/update/status', handler(handlers['systemUpdateStatus'], null, null)), +http.put('/v1/system/update/target-release', handler(handlers['targetReleaseUpdate'], null, schema.SetTargetReleaseParams)), +http.get('/v1/system/update/trust-roots', handler(handlers['systemUpdateTrustRootList'], schema.SystemUpdateTrustRootListParams, null)), +http.post('/v1/system/update/trust-roots', handler(handlers['systemUpdateTrustRootCreate'], null, null)), +http.get('/v1/system/update/trust-roots/:trustRootId', handler(handlers['systemUpdateTrustRootView'], schema.SystemUpdateTrustRootViewParams, null)), +http.delete('/v1/system/update/trust-roots/:trustRootId', handler(handlers['systemUpdateTrustRootDelete'], schema.SystemUpdateTrustRootDeleteParams, null)), http.get('/v1/system/users', handler(handlers['siloUserList'], schema.SiloUserListParams, null)), http.get('/v1/system/users/:userId', handler(handlers['siloUserView'], schema.SiloUserViewParams, null)), http.get('/v1/system/users-builtin', handler(handlers['userBuiltinList'], schema.UserBuiltinListParams, null)), http.get('/v1/system/users-builtin/:user', handler(handlers['userBuiltinView'], schema.UserBuiltinViewParams, null)), http.get('/v1/system/utilization/silos', handler(handlers['siloUtilizationList'], schema.SiloUtilizationListParams, null)), http.get('/v1/system/utilization/silos/:silo', handler(handlers['siloUtilizationView'], schema.SiloUtilizationViewParams, null)), +http.post('/v1/timeseries/query', handler(handlers['timeseriesQuery'], schema.TimeseriesQueryParams, schema.TimeseriesQuery)), http.get('/v1/users', handler(handlers['userList'], schema.UserListParams, null)), +http.get('/v1/users/:userId', handler(handlers['userView'], schema.UserViewParams, null)), +http.get('/v1/users/:userId/access-tokens', handler(handlers['userTokenList'], schema.UserTokenListParams, null)), +http.post('/v1/users/:userId/logout', handler(handlers['userLogout'], schema.UserLogoutParams, null)), +http.get('/v1/users/:userId/sessions', handler(handlers['userSessionList'], schema.UserSessionListParams, null)), http.get('/v1/utilization', handler(handlers['utilizationView'], null, null)), http.get('/v1/vpc-firewall-rules', handler(handlers['vpcFirewallRulesView'], schema.VpcFirewallRulesViewParams, null)), http.put('/v1/vpc-firewall-rules', handler(handlers['vpcFirewallRulesUpdate'], schema.VpcFirewallRulesUpdateParams, schema.VpcFirewallRuleUpdateParams)), +http.get('/v1/vpc-router-routes', handler(handlers['vpcRouterRouteList'], schema.VpcRouterRouteListParams, null)), +http.post('/v1/vpc-router-routes', handler(handlers['vpcRouterRouteCreate'], schema.VpcRouterRouteCreateParams, schema.RouterRouteCreate)), +http.get('/v1/vpc-router-routes/:route', handler(handlers['vpcRouterRouteView'], schema.VpcRouterRouteViewParams, null)), +http.put('/v1/vpc-router-routes/:route', handler(handlers['vpcRouterRouteUpdate'], schema.VpcRouterRouteUpdateParams, schema.RouterRouteUpdate)), +http.delete('/v1/vpc-router-routes/:route', handler(handlers['vpcRouterRouteDelete'], schema.VpcRouterRouteDeleteParams, null)), +http.get('/v1/vpc-routers', handler(handlers['vpcRouterList'], schema.VpcRouterListParams, null)), +http.post('/v1/vpc-routers', handler(handlers['vpcRouterCreate'], schema.VpcRouterCreateParams, schema.VpcRouterCreate)), +http.get('/v1/vpc-routers/:router', handler(handlers['vpcRouterView'], schema.VpcRouterViewParams, null)), +http.put('/v1/vpc-routers/:router', handler(handlers['vpcRouterUpdate'], schema.VpcRouterUpdateParams, schema.VpcRouterUpdate)), +http.delete('/v1/vpc-routers/:router', handler(handlers['vpcRouterDelete'], schema.VpcRouterDeleteParams, null)), http.get('/v1/vpc-subnets', handler(handlers['vpcSubnetList'], schema.VpcSubnetListParams, null)), http.post('/v1/vpc-subnets', handler(handlers['vpcSubnetCreate'], schema.VpcSubnetCreateParams, schema.VpcSubnetCreate)), http.get('/v1/vpc-subnets/:subnet', handler(handlers['vpcSubnetView'], schema.VpcSubnetViewParams, null)), @@ -660,4 +1003,9 @@ http.post('/v1/vpcs', handler(handlers['vpcCreate'], schema.VpcCreateParams, sch http.get('/v1/vpcs/:vpc', handler(handlers['vpcView'], schema.VpcViewParams, null)), http.put('/v1/vpcs/:vpc', handler(handlers['vpcUpdate'], schema.VpcUpdateParams, schema.VpcUpdate)), http.delete('/v1/vpcs/:vpc', handler(handlers['vpcDelete'], schema.VpcDeleteParams, null)), +http.post('/v1/webhook-receivers', handler(handlers['webhookReceiverCreate'], null, schema.WebhookCreate)), +http.put('/v1/webhook-receivers/:receiver', handler(handlers['webhookReceiverUpdate'], schema.WebhookReceiverUpdateParams, schema.WebhookReceiverUpdate)), +http.get('/v1/webhook-secrets', handler(handlers['webhookSecretsList'], schema.WebhookSecretsListParams, null)), +http.post('/v1/webhook-secrets', handler(handlers['webhookSecretsAdd'], schema.WebhookSecretsAddParams, schema.WebhookSecretCreate)), +http.delete('/v1/webhook-secrets/:secretId', handler(handlers['webhookSecretsDelete'], schema.WebhookSecretsDeleteParams, null)), ]} diff --git a/oxide-openapi-gen-ts/src/__snapshots__/type-test.ts b/oxide-openapi-gen-ts/src/__snapshots__/type-test.ts index 06d19c0..afb328f 100644 --- a/oxide-openapi-gen-ts/src/__snapshots__/type-test.ts +++ b/oxide-openapi-gen-ts/src/__snapshots__/type-test.ts @@ -19,6 +19,56 @@ assert>>(); assert>>(); assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); assert>>(); assert>>(); assert>>(); @@ -32,8 +82,9 @@ assert>>(); assert>>(); assert>>(); assert>>(); -assert>>(); +assert>>(); assert>>(); +assert>>(); assert>>(); assert>>(); assert>>(); @@ -64,11 +115,14 @@ assert>>(); assert>>(); assert>>(); +assert>>(); +assert>>(); assert>>(); assert>>(); assert>>(); assert>>(); assert>>(); +assert>>(); assert>>(); assert>>(); assert>>(); @@ -83,20 +137,30 @@ assert>>(); assert>>(); assert>>(); assert>>(); +assert>>(); assert>>(); +assert>>(); assert>>(); assert>>(); assert>>(); +assert>>(); assert>>(); assert>>(); assert>>(); +assert>>(); assert>>(); assert>>(); assert>>(); +assert>>(); +assert>>(); assert>>(); assert>>(); assert>>(); assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); assert>>(); assert>>(); assert>>(); @@ -111,6 +175,7 @@ assert>>(); assert>>(); assert>>(); assert>>(); +assert>>(); assert>>(); assert>>(); assert>>(); @@ -120,20 +185,40 @@ assert>>(); assert>>(); assert>>(); assert>>(); +assert>>(); +assert>>(); assert>>(); -assert>>(); assert>>(); assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); assert>>(); assert>>(); assert>>(); -assert>>(); +assert>>(); +assert>>(); +assert>>(); assert>>(); assert>>(); assert>>(); assert>>(); assert>>(); assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); assert>>(); assert>>(); assert>>(); @@ -147,23 +232,57 @@ assert>>(); assert>>(); assert>>(); assert>>(); +assert>>(); assert>>(); assert>>(); -assert>>(); +assert>>(); assert>>(); +assert>>(); assert>>(); -assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); assert>>(); assert>>(); assert>>(); assert>>(); assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); assert>>(); assert>>(); +assert>>(); +assert>>(); assert>>(); assert>>(); assert>>(); assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); assert>>(); assert>>(); assert>>(); @@ -173,15 +292,25 @@ assert>>(); assert>>(); assert>>(); assert>>(); -assert>>(); -assert>>(); -assert>>(); assert>>(); assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); assert>>(); assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); assert>>(); assert>>(); +assert>>(); +assert>>(); assert>>(); assert>>(); assert>>(); @@ -200,6 +329,7 @@ assert>>(); assert>>(); assert>>(); assert>>(); +assert>>(); assert>>(); assert>>(); assert>>(); @@ -212,32 +342,52 @@ assert>>(); assert>>(); assert>>(); assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); assert>>(); assert>>(); assert>>(); assert>>(); assert>>(); +assert>>(); assert>>(); -assert>>(); +assert>>(); assert>>(); -assert>>(); assert>>(); assert>>(); assert>>(); assert>>(); +assert>>(); assert>>(); assert>>(); assert>>(); -assert>>(); -assert>>(); assert>>(); -assert>>(); assert>>(); -assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); assert>>(); assert>>(); assert>>(); +assert>>(); +assert>>(); +assert>>(); assert>>(); assert>>(); assert>>(); @@ -249,6 +399,7 @@ assert>>(); assert>>(); assert>>(); +assert>>(); assert>>(); assert>>(); assert>>(); @@ -261,14 +412,25 @@ assert>> assert>>(); assert>>(); assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); assert>>(); assert>>(); assert>>(); assert>>(); assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); +assert>>(); assert>>(); -assert>>(); -assert>>(); +assert>>(); assert>>(); assert>>(); +assert>>(); +assert>>(); assert>>(); diff --git a/oxide-openapi-gen-ts/src/__snapshots__/validate.ts b/oxide-openapi-gen-ts/src/__snapshots__/validate.ts index 3658401..9afa03a 100644 --- a/oxide-openapi-gen-ts/src/__snapshots__/validate.ts +++ b/oxide-openapi-gen-ts/src/__snapshots__/validate.ts @@ -19,7 +19,7 @@ /** * An IPv4 subnet * -* An IPv4 subnet, including prefix and subnet mask +* An IPv4 subnet, including prefix and prefix length */ export const Ipv4Net = z.preprocess(processResponseBody,z.string().regex(/^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\/([0-9]|1[0-9]|2[0-9]|3[0-2])$/)) @@ -28,7 +28,7 @@ export const Ipv4Net = z.preprocess(processResponseBody,z.string().regex(/^(([0- * * An IPv6 subnet, including prefix and subnet mask */ -export const Ipv6Net = z.preprocess(processResponseBody,z.string().regex(/^([fF][dD])[0-9a-fA-F]{2}:(([0-9a-fA-F]{1,4}:){6}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,6}:)([0-9a-fA-F]{1,4})?\/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8])$/)) +export const Ipv6Net = z.preprocess(processResponseBody,z.string().regex(/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8])$/)) export const IpNet = z.preprocess(processResponseBody,z.union([ Ipv4Net, @@ -39,7 +39,7 @@ 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 though they may contain a UUID. +* 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 const Name = z.preprocess(processResponseBody,z.string().min(1).max(63).regex(/^(?![0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)^[a-z]([a-zA-Z0-9-]*[a-zA-Z0-9]+)?$/)) @@ -54,12 +54,14 @@ Name, */ export const Address = z.preprocess(processResponseBody,z.object({"address": IpNet, "addressLot": NameOrId, +"vlanId": z.number().min(0).max(65535).nullable().optional(), })) /** * A set of addresses associated with a port configuration. */ export const AddressConfig = z.preprocess(processResponseBody,z.object({"addresses": Address.array(), +"linkName": Name, })) /** @@ -125,107 +127,124 @@ export const AddressLotResultsPage = z.preprocess(processResponseBody,z.object({ })) /** -* Properties that uniquely identify an Oxide hardware component +* An address lot and associated blocks resulting from viewing an address lot. */ -export const Baseboard = z.preprocess(processResponseBody,z.object({"part": z.string(), -"revision": z.number(), -"serial": z.string(), +export const AddressLotViewResponse = z.preprocess(processResponseBody,z.object({"blocks": AddressLotBlock.array(), +"lot": AddressLot, })) -export const BfdMode = z.preprocess(processResponseBody,z.enum(["single_hop","multi_hop"])) - /** -* Information needed to disable a BFD session +* The IP address version. */ -export const BfdSessionDisable = z.preprocess(processResponseBody,z.object({"remote": z.ipv4(), -"switch": Name, -})) +export const IpVersion = z.preprocess(processResponseBody,z.enum(["v4","v6"])) /** -* Information about a bidirectional forwarding detection (BFD) session. +* Specify which IP pool to allocate from. */ -export const BfdSessionEnable = z.preprocess(processResponseBody,z.object({"detectionThreshold": z.number().min(0).max(255), -"local": z.ipv4().nullable().optional(), -"mode": BfdMode, -"remote": z.ipv4(), -"requiredRx": z.number().min(0), -"switch": Name, -})) +export const PoolSelector = z.preprocess(processResponseBody,z.union([ +z.object({"pool": NameOrId, +"type": z.enum(["explicit"]), +}), +z.object({"ipVersion": IpVersion.nullable().default(null).optional(), +"type": z.enum(["auto"]), +}), +]) +) -export const BfdState = z.preprocess(processResponseBody,z.enum(["admin_down", "down", "init", "up"]) +/** +* Specify how to allocate a floating IP address. + */ +export const AddressSelector = z.preprocess(processResponseBody,z.union([ +z.object({"ip": z.ipv4(), +"pool": NameOrId.nullable().optional(), +"type": z.enum(["explicit"]), +}), +z.object({"poolSelector": PoolSelector.default({"ip_version":null,"type":"auto"}).optional(), +"type": z.enum(["auto"]), +}), +]) ) -export const BfdStatus = z.preprocess(processResponseBody,z.object({"detectionThreshold": z.number().min(0).max(255), -"local": z.ipv4().nullable().optional(), -"mode": BfdMode, -"peer": z.ipv4(), -"requiredRx": z.number().min(0), -"state": BfdState, -"switch": Name, -})) +/** +* Describes the scope of affinity for the purposes of co-location. + */ +export const FailureDomain = z.preprocess(processResponseBody,z.enum(["sled"])) /** -* Represents a BGP announce set by id. The id can be used with other API calls to view and manage the announce set. +* Affinity policy used to describe "what to do when a request cannot be satisfied" +* +* Used for both Affinity and Anti-Affinity Groups */ -export const BgpAnnounceSet = z.preprocess(processResponseBody,z.object({"description": z.string(), +export const AffinityPolicy = z.preprocess(processResponseBody,z.enum(["allow", "fail"]) +) + +/** +* View of an Affinity Group + */ +export const AffinityGroup = z.preprocess(processResponseBody,z.object({"description": z.string(), +"failureDomain": FailureDomain, "id": z.uuid(), "name": Name, +"policy": AffinityPolicy, +"projectId": z.uuid(), "timeCreated": z.coerce.date(), "timeModified": z.coerce.date(), })) /** -* A BGP announcement tied to a particular address lot block. - */ -export const BgpAnnouncementCreate = z.preprocess(processResponseBody,z.object({"addressLotBlock": NameOrId, -"network": IpNet, -})) - -/** -* Parameters for creating a named set of BGP announcements. +* Create-time parameters for an `AffinityGroup` */ -export const BgpAnnounceSetCreate = z.preprocess(processResponseBody,z.object({"announcement": BgpAnnouncementCreate.array(), -"description": z.string(), +export const AffinityGroupCreate = z.preprocess(processResponseBody,z.object({"description": z.string(), +"failureDomain": FailureDomain, "name": Name, +"policy": AffinityPolicy, })) /** -* A BGP announcement tied to an address lot block. +* 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 const BgpAnnouncement = z.preprocess(processResponseBody,z.object({"addressLotBlockId": z.uuid(), -"announceSetId": z.uuid(), -"network": IpNet, -})) +export const InstanceState = z.preprocess(processResponseBody,z.enum(["creating", "starting", "running", "stopping", "stopped", "rebooting", "migrating", "repairing", "failed", "destroyed"]) +) /** -* A base BGP configuration. +* A member of an Affinity Group +* +* Membership in a group is not exclusive - members may belong to multiple affinity / anti-affinity groups. +* +* Affinity Groups can contain up to 32 members. */ -export const BgpConfig = z.preprocess(processResponseBody,z.object({"asn": z.number().min(0).max(4294967295), -"description": z.string(), -"id": z.uuid(), +export const AffinityGroupMember = z.preprocess(processResponseBody,z.object({"type": z.enum(["instance"]), +"value": z.object({"id": z.uuid(), "name": Name, -"timeCreated": z.coerce.date(), -"timeModified": z.coerce.date(), -"vrf": z.string().nullable().optional(), +"runState": InstanceState, +}), })) /** -* Parameters for creating a BGP configuration. This includes and autonomous system number (ASN) and a virtual routing and forwarding (VRF) identifier. +* A single page of results */ -export const BgpConfigCreate = z.preprocess(processResponseBody,z.object({"asn": z.number().min(0).max(4294967295), -"bgpAnnounceSetId": NameOrId, -"description": z.string(), -"name": Name, -"vrf": Name.nullable().optional(), +export const AffinityGroupMemberResultsPage = z.preprocess(processResponseBody,z.object({"items": AffinityGroupMember.array(), +"nextPage": z.string().nullable().optional(), })) /** * A single page of results */ -export const BgpConfigResultsPage = z.preprocess(processResponseBody,z.object({"items": BgpConfig.array(), +export const AffinityGroupResultsPage = z.preprocess(processResponseBody,z.object({"items": AffinityGroup.array(), "nextPage": z.string().nullable().optional(), })) +/** +* Updateable properties of an `AffinityGroup` + */ +export const AffinityGroupUpdate = z.preprocess(processResponseBody,z.object({"description": z.string().nullable().optional(), +"name": Name.nullable().optional(), +})) + +export const BgpMessageHistory = z.preprocess(processResponseBody,z.record(z.string(), z.unknown())) + /** * Identifies switch physical location */ @@ -233,1346 +252,1449 @@ export const SwitchLocation = z.preprocess(processResponseBody,z.enum(["switch0" ) /** -* A route imported from a BGP peer. +* BGP message history for a particular switch. */ -export const BgpImportedRouteIpv4 = z.preprocess(processResponseBody,z.object({"id": z.number().min(0).max(4294967295), -"nexthop": z.ipv4(), -"prefix": Ipv4Net, +export const SwitchBgpHistory = z.preprocess(processResponseBody,z.object({"history": z.record(z.string(),BgpMessageHistory), "switch": SwitchLocation, })) /** -* 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. +* BGP message history for rack switches. */ -export const BgpPeer = z.preprocess(processResponseBody,z.object({"addr": z.ipv4(), -"bgpAnnounceSet": NameOrId, -"bgpConfig": NameOrId, -"connectRetry": z.number().min(0).max(4294967295), -"delayOpen": z.number().min(0).max(4294967295), -"holdTime": z.number().min(0).max(4294967295), -"idleHoldTime": z.number().min(0).max(4294967295), -"interfaceName": z.string(), -"keepalive": z.number().min(0).max(4294967295), +export const AggregateBgpMessageHistory = z.preprocess(processResponseBody,z.object({"switchHistories": SwitchBgpHistory.array(), })) -export const BgpPeerConfig = z.preprocess(processResponseBody,z.object({"peers": BgpPeer.array(), +/** +* An alert class. + */ +export const AlertClass = z.preprocess(processResponseBody,z.object({"description": z.string(), +"name": z.string(), })) /** -* The current state of a BGP peer. +* A single page of results */ -export const BgpPeerState = z.preprocess(processResponseBody,z.enum(["idle", "connect", "active", "open_sent", "open_confirm", "session_setup", "established"]) -) +export const AlertClassResultsPage = z.preprocess(processResponseBody,z.object({"items": AlertClass.array(), +"nextPage": z.string().nullable().optional(), +})) /** -* The current status of a BGP peer. +* The response received from a webhook receiver endpoint. */ -export const BgpPeerStatus = z.preprocess(processResponseBody,z.object({"addr": z.ipv4(), -"localAsn": z.number().min(0).max(4294967295), -"remoteAsn": z.number().min(0).max(4294967295), -"state": BgpPeerState, -"stateDurationMillis": z.number().min(0), -"switch": SwitchLocation, +export const WebhookDeliveryResponse = z.preprocess(processResponseBody,z.object({"durationMs": z.number().min(0), +"status": z.number().min(0).max(65535), })) +export const WebhookDeliveryAttemptResult = z.preprocess(processResponseBody,z.enum(["succeeded", "failed_http_error", "failed_unreachable", "failed_timeout"]) +) + /** -* A type storing a range over `T`. +* An individual delivery attempt for a webhook event. * -* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. +* This represents a single HTTP request that was sent to the receiver, and its outcome. */ -export const BinRangedouble = z.preprocess(processResponseBody,z.union([ -z.object({"end": z.number(), -"type": z.enum(["range_to"]), -}), -z.object({"end": z.number(), -"start": z.number(), -"type": z.enum(["range"]), -}), -z.object({"start": z.number(), -"type": z.enum(["range_from"]), -}), -]) -) +export const WebhookDeliveryAttempt = z.preprocess(processResponseBody,z.object({"attempt": z.number().min(0), +"response": WebhookDeliveryResponse.nullable().optional(), +"result": WebhookDeliveryAttemptResult, +"timeSent": z.coerce.date(), +})) /** -* A type storing a range over `T`. +* A list of attempts to deliver an alert to a receiver. * -* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. +* The type of the delivery attempt model depends on the receiver type, as it may contain information specific to that delivery mechanism. For example, webhook delivery attempts contain the HTTP status code of the webhook request. */ -export const BinRangefloat = z.preprocess(processResponseBody,z.union([ -z.object({"end": z.number(), -"type": z.enum(["range_to"]), -}), -z.object({"end": z.number(), -"start": z.number(), -"type": z.enum(["range"]), -}), -z.object({"start": z.number(), -"type": z.enum(["range_from"]), -}), -]) -) +export const AlertDeliveryAttempts = z.preprocess(processResponseBody,z.object({"webhook": WebhookDeliveryAttempt.array(), +})) /** -* A type storing a range over `T`. -* -* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. +* The state of a webhook delivery attempt. */ -export const BinRangeint16 = z.preprocess(processResponseBody,z.union([ -z.object({"end": z.number().min(-32767).max(32767), -"type": z.enum(["range_to"]), -}), -z.object({"end": z.number().min(-32767).max(32767), -"start": z.number().min(-32767).max(32767), -"type": z.enum(["range"]), -}), -z.object({"start": z.number().min(-32767).max(32767), -"type": z.enum(["range_from"]), -}), -]) +export const AlertDeliveryState = z.preprocess(processResponseBody,z.enum(["pending", "delivered", "failed"]) ) /** -* A type storing a range over `T`. -* -* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. +* The reason an alert was delivered */ -export const BinRangeint32 = z.preprocess(processResponseBody,z.union([ -z.object({"end": z.number().min(-2147483647).max(2147483647), -"type": z.enum(["range_to"]), -}), -z.object({"end": z.number().min(-2147483647).max(2147483647), -"start": z.number().min(-2147483647).max(2147483647), -"type": z.enum(["range"]), -}), -z.object({"start": z.number().min(-2147483647).max(2147483647), -"type": z.enum(["range_from"]), -}), -]) +export const AlertDeliveryTrigger = z.preprocess(processResponseBody,z.enum(["alert", "resend", "probe"]) ) /** -* A type storing a range over `T`. -* -* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. +* A delivery of a webhook event. */ -export const BinRangeint64 = z.preprocess(processResponseBody,z.union([ -z.object({"end": z.number(), -"type": z.enum(["range_to"]), -}), -z.object({"end": z.number(), -"start": z.number(), -"type": z.enum(["range"]), -}), -z.object({"start": z.number(), -"type": z.enum(["range_from"]), -}), -]) -) +export const AlertDelivery = z.preprocess(processResponseBody,z.object({"alertClass": z.string(), +"alertId": z.uuid(), +"attempts": AlertDeliveryAttempts, +"id": z.uuid(), +"receiverId": z.uuid(), +"state": AlertDeliveryState, +"timeStarted": z.coerce.date(), +"trigger": AlertDeliveryTrigger, +})) + +export const AlertDeliveryId = z.preprocess(processResponseBody,z.object({"deliveryId": z.uuid(), +})) /** -* A type storing a range over `T`. -* -* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. +* A single page of results */ -export const BinRangeint8 = z.preprocess(processResponseBody,z.union([ -z.object({"end": z.number().min(-127).max(127), -"type": z.enum(["range_to"]), -}), -z.object({"end": z.number().min(-127).max(127), -"start": z.number().min(-127).max(127), -"type": z.enum(["range"]), -}), -z.object({"start": z.number().min(-127).max(127), -"type": z.enum(["range_from"]), -}), -]) -) +export const AlertDeliveryResultsPage = z.preprocess(processResponseBody,z.object({"items": AlertDelivery.array(), +"nextPage": z.string().nullable().optional(), +})) /** -* A type storing a range over `T`. +* Data describing the result of an alert receiver liveness probe attempt. + */ +export const AlertProbeResult = z.preprocess(processResponseBody,z.object({"probe": AlertDelivery, +"resendsStarted": z.number().min(0).nullable().optional(), +})) + +/** +* A view of a shared secret key assigned to a webhook receiver. * -* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. +* Once a secret is created, the value of the secret is not available in the API, as it must remain secret. Instead, secrets are referenced by their unique IDs assigned when they are created. */ -export const BinRangeuint16 = z.preprocess(processResponseBody,z.union([ -z.object({"end": z.number().min(0).max(65535), -"type": z.enum(["range_to"]), -}), -z.object({"end": z.number().min(0).max(65535), -"start": z.number().min(0).max(65535), -"type": z.enum(["range"]), -}), -z.object({"start": z.number().min(0).max(65535), -"type": z.enum(["range_from"]), -}), -]) -) +export const WebhookSecret = z.preprocess(processResponseBody,z.object({"id": z.uuid(), +"timeCreated": z.coerce.date(), +})) /** -* A type storing a range over `T`. +* The possible alert delivery mechanisms for an alert receiver. + */ +export const AlertReceiverKind = z.preprocess(processResponseBody,z.object({"endpoint": z.string(), +"kind": z.enum(["webhook"]), +"secrets": WebhookSecret.array(), +})) + +/** +* A webhook event class subscription * -* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. +* A webhook event class subscription matches either a single event class exactly, or a glob pattern including wildcards that may match multiple event classes */ -export const BinRangeuint32 = z.preprocess(processResponseBody,z.union([ -z.object({"end": z.number().min(0).max(4294967295), -"type": z.enum(["range_to"]), -}), -z.object({"end": z.number().min(0).max(4294967295), -"start": z.number().min(0).max(4294967295), -"type": z.enum(["range"]), -}), -z.object({"start": z.number().min(0).max(4294967295), -"type": z.enum(["range_from"]), -}), -]) -) +export const AlertSubscription = z.preprocess(processResponseBody,z.string().regex(/^([a-zA-Z0-9_]+|\*|\*\*)(\.([a-zA-Z0-9_]+|\*|\*\*))*$/)) /** -* A type storing a range over `T`. -* -* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. +* The configuration for an alert receiver. */ -export const BinRangeuint64 = z.preprocess(processResponseBody,z.union([ -z.object({"end": z.number().min(0), -"type": z.enum(["range_to"]), -}), -z.object({"end": z.number().min(0), -"start": z.number().min(0), -"type": z.enum(["range"]), -}), -z.object({"start": z.number().min(0), -"type": z.enum(["range_from"]), -}), -]) -) +export const AlertReceiver = z.preprocess(processResponseBody,z.object({"description": z.string(), +"id": z.uuid(), +"kind": AlertReceiverKind, +"name": Name, +"subscriptions": AlertSubscription.array(), +"timeCreated": z.coerce.date(), +"timeModified": z.coerce.date(), +})) /** -* A type storing a range over `T`. -* -* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. +* A single page of results */ -export const BinRangeuint8 = z.preprocess(processResponseBody,z.union([ -z.object({"end": z.number().min(0).max(255), -"type": z.enum(["range_to"]), -}), -z.object({"end": z.number().min(0).max(255), -"start": z.number().min(0).max(255), -"type": z.enum(["range"]), +export const AlertReceiverResultsPage = z.preprocess(processResponseBody,z.object({"items": AlertReceiver.array(), +"nextPage": z.string().nullable().optional(), +})) + +export const AlertSubscriptionCreate = z.preprocess(processResponseBody,z.object({"subscription": AlertSubscription, +})) + +export const AlertSubscriptionCreated = z.preprocess(processResponseBody,z.object({"subscription": AlertSubscription, +})) + +/** +* Description of source IPs allowed to reach rack services. + */ +export const AllowedSourceIps = z.preprocess(processResponseBody,z.union([ +z.object({"allow": z.enum(["any"]), }), -z.object({"start": z.number().min(0).max(255), -"type": z.enum(["range_from"]), +z.object({"allow": z.enum(["list"]), +"ips": IpNet.array(), }), ]) ) /** -* Type storing bin edges and a count of samples within it. +* Allowlist of IPs or subnets that can make requests to user-facing services. */ -export const Bindouble = z.preprocess(processResponseBody,z.object({"count": z.number().min(0), -"range": BinRangedouble, +export const AllowList = z.preprocess(processResponseBody,z.object({"allowedIps": AllowedSourceIps, +"timeCreated": z.coerce.date(), +"timeModified": z.coerce.date(), })) /** -* Type storing bin edges and a count of samples within it. +* Parameters for updating allowed source IPs */ -export const Binfloat = z.preprocess(processResponseBody,z.object({"count": z.number().min(0), -"range": BinRangefloat, +export const AllowListUpdate = z.preprocess(processResponseBody,z.object({"allowedIps": AllowedSourceIps, })) /** -* Type storing bin edges and a count of samples within it. +* View of an Anti-Affinity Group */ -export const Binint16 = z.preprocess(processResponseBody,z.object({"count": z.number().min(0), -"range": BinRangeint16, +export const AntiAffinityGroup = z.preprocess(processResponseBody,z.object({"description": z.string(), +"failureDomain": FailureDomain, +"id": z.uuid(), +"name": Name, +"policy": AffinityPolicy, +"projectId": z.uuid(), +"timeCreated": z.coerce.date(), +"timeModified": z.coerce.date(), })) /** -* Type storing bin edges and a count of samples within it. +* Create-time parameters for an `AntiAffinityGroup` */ -export const Binint32 = z.preprocess(processResponseBody,z.object({"count": z.number().min(0), -"range": BinRangeint32, +export const AntiAffinityGroupCreate = z.preprocess(processResponseBody,z.object({"description": z.string(), +"failureDomain": FailureDomain, +"name": Name, +"policy": AffinityPolicy, })) /** -* Type storing bin edges and a count of samples within it. +* A member of an Anti-Affinity Group +* +* Membership in a group is not exclusive - members may belong to multiple affinity / anti-affinity groups. +* +* Anti-Affinity Groups can contain up to 32 members. */ -export const Binint64 = z.preprocess(processResponseBody,z.object({"count": z.number().min(0), -"range": BinRangeint64, +export const AntiAffinityGroupMember = z.preprocess(processResponseBody,z.object({"type": z.enum(["instance"]), +"value": z.object({"id": z.uuid(), +"name": Name, +"runState": InstanceState, +}), })) /** -* Type storing bin edges and a count of samples within it. +* A single page of results */ -export const Binint8 = z.preprocess(processResponseBody,z.object({"count": z.number().min(0), -"range": BinRangeint8, +export const AntiAffinityGroupMemberResultsPage = z.preprocess(processResponseBody,z.object({"items": AntiAffinityGroupMember.array(), +"nextPage": z.string().nullable().optional(), })) /** -* Type storing bin edges and a count of samples within it. +* A single page of results */ -export const Binuint16 = z.preprocess(processResponseBody,z.object({"count": z.number().min(0), -"range": BinRangeuint16, +export const AntiAffinityGroupResultsPage = z.preprocess(processResponseBody,z.object({"items": AntiAffinityGroup.array(), +"nextPage": z.string().nullable().optional(), })) /** -* Type storing bin edges and a count of samples within it. +* Updateable properties of an `AntiAffinityGroup` */ -export const Binuint32 = z.preprocess(processResponseBody,z.object({"count": z.number().min(0), -"range": BinRangeuint32, +export const AntiAffinityGroupUpdate = z.preprocess(processResponseBody,z.object({"description": z.string().nullable().optional(), +"name": Name.nullable().optional(), })) +export const AuditLogEntryActor = z.preprocess(processResponseBody,z.union([ +z.object({"kind": z.enum(["user_builtin"]), +"userBuiltinId": z.uuid(), +}), +z.object({"kind": z.enum(["silo_user"]), +"siloId": z.uuid(), +"siloUserId": z.uuid(), +}), +z.object({"kind": z.enum(["scim"]), +"siloId": z.uuid(), +}), +z.object({"kind": z.enum(["unauthenticated"]), +}), +]) +) + /** -* Type storing bin edges and a count of samples within it. +* Result of an audit log entry */ -export const Binuint64 = z.preprocess(processResponseBody,z.object({"count": z.number().min(0), -"range": BinRangeuint64, -})) +export const AuditLogEntryResult = z.preprocess(processResponseBody,z.union([ +z.object({"httpStatusCode": z.number().min(0).max(65535), +"kind": z.enum(["success"]), +}), +z.object({"errorCode": z.string().nullable().optional(), +"errorMessage": z.string(), +"httpStatusCode": z.number().min(0).max(65535), +"kind": z.enum(["error"]), +}), +z.object({"kind": z.enum(["unknown"]), +}), +]) +) /** -* Type storing bin edges and a count of samples within it. +* Audit log entry */ -export const Binuint8 = z.preprocess(processResponseBody,z.object({"count": z.number().min(0), -"range": BinRangeuint8, +export const AuditLogEntry = z.preprocess(processResponseBody,z.object({"actor": AuditLogEntryActor, +"authMethod": z.string().nullable().optional(), +"id": z.uuid(), +"operationId": z.string(), +"requestId": z.string(), +"requestUri": z.string(), +"result": AuditLogEntryResult, +"sourceIp": z.ipv4(), +"timeCompleted": z.coerce.date(), +"timeStarted": z.coerce.date(), +"userAgent": z.string().nullable().optional(), })) /** -* disk block size in bytes +* A single page of results */ -export const BlockSize = z.preprocess(processResponseBody,IntEnum([512,2048,4096] as const)) +export const AuditLogEntryResultsPage = z.preprocess(processResponseBody,z.object({"items": AuditLogEntry.array(), +"nextPage": z.string().nullable().optional(), +})) /** -* Byte count to express memory or storage capacity. +* Authorization scope for a timeseries. +* +* This describes the level at which a user must be authorized to read data from a timeseries. For example, fleet-scoping means the data is only visible to an operator or fleet reader. Project-scoped, on the other hand, indicates that a user will see data limited to the projects on which they have read permissions. */ -export const ByteCount = z.preprocess(processResponseBody,z.number().min(0)) +export const AuthzScope = z.preprocess(processResponseBody,z.enum(["fleet", "silo", "project", "viewable_to_all"]) +) /** -* The service intended to use this certificate. +* Properties that uniquely identify an Oxide hardware component */ -export const ServiceUsingCertificate = z.preprocess(processResponseBody,z.enum(["external_api"])) +export const Baseboard = z.preprocess(processResponseBody,z.object({"part": z.string(), +"revision": z.number().min(0).max(4294967295), +"serial": z.string(), +})) /** -* View of a Certificate +* BFD connection mode. */ -export const Certificate = z.preprocess(processResponseBody,z.object({"description": z.string(), -"id": z.uuid(), -"name": Name, -"service": ServiceUsingCertificate, -"timeCreated": z.coerce.date(), -"timeModified": z.coerce.date(), -})) +export const BfdMode = z.preprocess(processResponseBody,z.enum(["single_hop","multi_hop"])) /** -* Create-time parameters for a `Certificate` +* Information needed to disable a BFD session */ -export const CertificateCreate = z.preprocess(processResponseBody,z.object({"cert": z.string(), -"description": z.string(), -"key": z.string(), -"name": Name, -"service": ServiceUsingCertificate, +export const BfdSessionDisable = z.preprocess(processResponseBody,z.object({"remote": z.ipv4(), +"switch": Name, })) /** -* A single page of results +* Information about a bidirectional forwarding detection (BFD) session. */ -export const CertificateResultsPage = z.preprocess(processResponseBody,z.object({"items": Certificate.array(), -"nextPage": z.string().nullable().optional(), +export const BfdSessionEnable = z.preprocess(processResponseBody,z.object({"detectionThreshold": z.number().min(0).max(255), +"local": z.ipv4().nullable().optional(), +"mode": BfdMode, +"remote": z.ipv4(), +"requiredRx": z.number().min(0), +"switch": Name, })) -/** -* A cumulative or counter data type. - */ -export const Cumulativedouble = z.preprocess(processResponseBody,z.object({"startTime": z.coerce.date(), -"value": z.number(), +export const BfdState = z.preprocess(processResponseBody,z.enum(["admin_down", "down", "init", "up"]) +) + +export const BfdStatus = z.preprocess(processResponseBody,z.object({"detectionThreshold": z.number().min(0).max(255), +"local": z.ipv4().nullable().optional(), +"mode": BfdMode, +"peer": z.ipv4(), +"requiredRx": z.number().min(0), +"state": BfdState, +"switch": Name, })) /** -* A cumulative or counter data type. +* Represents a BGP announce set by id. The id can be used with other API calls to view and manage the announce set. */ -export const Cumulativefloat = z.preprocess(processResponseBody,z.object({"startTime": z.coerce.date(), -"value": z.number(), +export const BgpAnnounceSet = z.preprocess(processResponseBody,z.object({"description": z.string(), +"id": z.uuid(), +"name": Name, +"timeCreated": z.coerce.date(), +"timeModified": z.coerce.date(), })) /** -* A cumulative or counter data type. +* A BGP announcement tied to a particular address lot block. */ -export const Cumulativeint64 = z.preprocess(processResponseBody,z.object({"startTime": z.coerce.date(), -"value": z.number(), +export const BgpAnnouncementCreate = z.preprocess(processResponseBody,z.object({"addressLotBlock": NameOrId, +"network": IpNet, })) /** -* A cumulative or counter data type. +* Parameters for creating a named set of BGP announcements. */ -export const Cumulativeuint64 = z.preprocess(processResponseBody,z.object({"startTime": z.coerce.date(), -"value": z.number().min(0), +export const BgpAnnounceSetCreate = z.preprocess(processResponseBody,z.object({"announcement": BgpAnnouncementCreate.array(), +"description": z.string(), +"name": Name, })) /** -* Info about the current user +* A BGP announcement tied to an address lot block. */ -export const CurrentUser = z.preprocess(processResponseBody,z.object({"displayName": z.string(), -"id": z.uuid(), -"siloId": z.uuid(), -"siloName": Name, +export const BgpAnnouncement = z.preprocess(processResponseBody,z.object({"addressLotBlockId": z.uuid(), +"announceSetId": z.uuid(), +"network": IpNet, })) /** -* 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. +* A base BGP configuration. */ -export const Histogramint8 = z.preprocess(processResponseBody,z.object({"bins": Binint8.array(), -"nSamples": z.number().min(0), -"startTime": z.coerce.date(), +export const BgpConfig = z.preprocess(processResponseBody,z.object({"asn": z.number().min(0).max(4294967295), +"description": z.string(), +"id": z.uuid(), +"name": Name, +"timeCreated": z.coerce.date(), +"timeModified": z.coerce.date(), +"vrf": z.string().nullable().optional(), })) /** -* 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. +* Parameters for creating a BGP configuration. This includes and autonomous system number (ASN) and a virtual routing and forwarding (VRF) identifier. */ -export const Histogramuint8 = z.preprocess(processResponseBody,z.object({"bins": Binuint8.array(), -"nSamples": z.number().min(0), -"startTime": z.coerce.date(), +export const BgpConfigCreate = z.preprocess(processResponseBody,z.object({"asn": z.number().min(0).max(4294967295), +"bgpAnnounceSetId": NameOrId, +"description": z.string(), +"name": Name, +"vrf": Name.nullable().optional(), })) /** -* 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. +* A single page of results */ -export const Histogramint16 = z.preprocess(processResponseBody,z.object({"bins": Binint16.array(), -"nSamples": z.number().min(0), -"startTime": z.coerce.date(), +export const BgpConfigResultsPage = z.preprocess(processResponseBody,z.object({"items": BgpConfig.array(), +"nextPage": z.string().nullable().optional(), })) /** -* 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 current status of a BGP peer. */ -export const Histogramuint16 = z.preprocess(processResponseBody,z.object({"bins": Binuint16.array(), -"nSamples": z.number().min(0), -"startTime": z.coerce.date(), +export const BgpExported = z.preprocess(processResponseBody,z.object({"exports": z.record(z.string(),Ipv4Net.array()), })) /** -* 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. +* A route imported from a BGP peer. */ -export const Histogramint32 = z.preprocess(processResponseBody,z.object({"bins": Binint32.array(), -"nSamples": z.number().min(0), -"startTime": z.coerce.date(), +export const BgpImportedRouteIpv4 = z.preprocess(processResponseBody,z.object({"id": z.number().min(0).max(4294967295), +"nexthop": z.ipv4(), +"prefix": Ipv4Net, +"switch": SwitchLocation, })) /** -* 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. +* Define policy relating to the import and export of prefixes from a BGP peer. */ -export const Histogramuint32 = z.preprocess(processResponseBody,z.object({"bins": Binuint32.array(), -"nSamples": z.number().min(0), -"startTime": z.coerce.date(), -})) +export const ImportExportPolicy = z.preprocess(processResponseBody,z.union([ +z.object({"type": z.enum(["no_filtering"]), +}), +z.object({"type": z.enum(["allow"]), +"value": IpNet.array(), +}), +]) +) /** -* 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. +* 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. */ -export const Histogramint64 = z.preprocess(processResponseBody,z.object({"bins": Binint64.array(), -"nSamples": z.number().min(0), -"startTime": z.coerce.date(), +export const BgpPeer = z.preprocess(processResponseBody,z.object({"addr": z.ipv4(), +"allowedExport": ImportExportPolicy, +"allowedImport": ImportExportPolicy, +"bgpConfig": NameOrId, +"communities": z.number().min(0).max(4294967295).array(), +"connectRetry": z.number().min(0).max(4294967295), +"delayOpen": z.number().min(0).max(4294967295), +"enforceFirstAs": SafeBoolean, +"holdTime": z.number().min(0).max(4294967295), +"idleHoldTime": z.number().min(0).max(4294967295), +"interfaceName": Name, +"keepalive": z.number().min(0).max(4294967295), +"localPref": z.number().min(0).max(4294967295).nullable().optional(), +"md5AuthKey": z.string().nullable().optional(), +"minTtl": z.number().min(0).max(255).nullable().optional(), +"multiExitDiscriminator": z.number().min(0).max(4294967295).nullable().optional(), +"remoteAsn": z.number().min(0).max(4294967295).nullable().optional(), +"vlanId": z.number().min(0).max(65535).nullable().optional(), })) -/** -* 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 const Histogramuint64 = z.preprocess(processResponseBody,z.object({"bins": Binuint64.array(), -"nSamples": z.number().min(0), -"startTime": z.coerce.date(), +export const BgpPeerConfig = z.preprocess(processResponseBody,z.object({"linkName": Name, +"peers": BgpPeer.array(), })) /** -* 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 current state of a BGP peer. */ -export const Histogramfloat = z.preprocess(processResponseBody,z.object({"bins": Binfloat.array(), -"nSamples": z.number().min(0), -"startTime": z.coerce.date(), -})) +export const BgpPeerState = z.preprocess(processResponseBody,z.enum(["idle", "connect", "active", "open_sent", "open_confirm", "connection_collision", "session_setup", "established"]) +) /** -* 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 current status of a BGP peer. */ -export const Histogramdouble = z.preprocess(processResponseBody,z.object({"bins": Bindouble.array(), -"nSamples": z.number().min(0), -"startTime": z.coerce.date(), +export const BgpPeerStatus = z.preprocess(processResponseBody,z.object({"addr": z.ipv4(), +"localAsn": z.number().min(0).max(4294967295), +"remoteAsn": z.number().min(0).max(4294967295), +"state": BgpPeerState, +"stateDurationMillis": z.number().min(0), +"switch": SwitchLocation, })) /** -* The type of an individual datum of a metric. +* A type storing a range over `T`. +* +* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. */ -export const DatumType = z.preprocess(processResponseBody,z.enum(["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 const MissingDatum = z.preprocess(processResponseBody,z.object({"datumType": DatumType, -"startTime": z.coerce.date().nullable().optional(), -})) +export const BinRangedouble = z.preprocess(processResponseBody,z.union([ +z.object({"end": z.number(), +"type": z.enum(["range_to"]), +}), +z.object({"end": z.number(), +"start": z.number(), +"type": z.enum(["range"]), +}), +z.object({"start": z.number(), +"type": z.enum(["range_from"]), +}), +]) +) /** -* A `Datum` is a single sampled data point from a metric. +* A type storing a range over `T`. +* +* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. */ -export const Datum = z.preprocess(processResponseBody,z.union([ -z.object({"datum": SafeBoolean, -"type": z.enum(["bool"]), -}), -z.object({"datum": z.number().min(-127).max(127), -"type": z.enum(["i8"]), +export const BinRangefloat = z.preprocess(processResponseBody,z.union([ +z.object({"end": z.number(), +"type": z.enum(["range_to"]), }), -z.object({"datum": z.number().min(0).max(255), -"type": z.enum(["u8"]), +z.object({"end": z.number(), +"start": z.number(), +"type": z.enum(["range"]), }), -z.object({"datum": z.number().min(-32767).max(32767), -"type": z.enum(["i16"]), +z.object({"start": z.number(), +"type": z.enum(["range_from"]), }), -z.object({"datum": z.number().min(0).max(65535), -"type": z.enum(["u16"]), +]) +) + +/** +* A type storing a range over `T`. +* +* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. + */ +export const BinRangeint16 = z.preprocess(processResponseBody,z.union([ +z.object({"end": z.number().min(-32767).max(32767), +"type": z.enum(["range_to"]), }), -z.object({"datum": z.number().min(-2147483647).max(2147483647), -"type": z.enum(["i32"]), +z.object({"end": z.number().min(-32767).max(32767), +"start": z.number().min(-32767).max(32767), +"type": z.enum(["range"]), }), -z.object({"datum": z.number().min(0).max(4294967295), -"type": z.enum(["u32"]), +z.object({"start": z.number().min(-32767).max(32767), +"type": z.enum(["range_from"]), }), -z.object({"datum": z.number(), -"type": z.enum(["i64"]), +]) +) + +/** +* A type storing a range over `T`. +* +* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. + */ +export const BinRangeint32 = z.preprocess(processResponseBody,z.union([ +z.object({"end": z.number().min(-2147483647).max(2147483647), +"type": z.enum(["range_to"]), }), -z.object({"datum": z.number().min(0), -"type": z.enum(["u64"]), +z.object({"end": z.number().min(-2147483647).max(2147483647), +"start": z.number().min(-2147483647).max(2147483647), +"type": z.enum(["range"]), }), -z.object({"datum": z.number(), -"type": z.enum(["f32"]), +z.object({"start": z.number().min(-2147483647).max(2147483647), +"type": z.enum(["range_from"]), }), -z.object({"datum": z.number(), -"type": z.enum(["f64"]), +]) +) + +/** +* A type storing a range over `T`. +* +* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. + */ +export const BinRangeint64 = z.preprocess(processResponseBody,z.union([ +z.object({"end": z.number(), +"type": z.enum(["range_to"]), }), -z.object({"datum": z.string(), -"type": z.enum(["string"]), +z.object({"end": z.number(), +"start": z.number(), +"type": z.enum(["range"]), }), -z.object({"datum": z.number().min(0).max(255).array(), -"type": z.enum(["bytes"]), +z.object({"start": z.number(), +"type": z.enum(["range_from"]), }), -z.object({"datum": Cumulativeint64, -"type": z.enum(["cumulative_i64"]), +]) +) + +/** +* A type storing a range over `T`. +* +* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. + */ +export const BinRangeint8 = z.preprocess(processResponseBody,z.union([ +z.object({"end": z.number().min(-127).max(127), +"type": z.enum(["range_to"]), }), -z.object({"datum": Cumulativeuint64, -"type": z.enum(["cumulative_u64"]), +z.object({"end": z.number().min(-127).max(127), +"start": z.number().min(-127).max(127), +"type": z.enum(["range"]), }), -z.object({"datum": Cumulativefloat, -"type": z.enum(["cumulative_f32"]), +z.object({"start": z.number().min(-127).max(127), +"type": z.enum(["range_from"]), }), -z.object({"datum": Cumulativedouble, -"type": z.enum(["cumulative_f64"]), +]) +) + +/** +* A type storing a range over `T`. +* +* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. + */ +export const BinRangeuint16 = z.preprocess(processResponseBody,z.union([ +z.object({"end": z.number().min(0).max(65535), +"type": z.enum(["range_to"]), }), -z.object({"datum": Histogramint8, -"type": z.enum(["histogram_i8"]), +z.object({"end": z.number().min(0).max(65535), +"start": z.number().min(0).max(65535), +"type": z.enum(["range"]), }), -z.object({"datum": Histogramuint8, -"type": z.enum(["histogram_u8"]), +z.object({"start": z.number().min(0).max(65535), +"type": z.enum(["range_from"]), }), -z.object({"datum": Histogramint16, -"type": z.enum(["histogram_i16"]), +]) +) + +/** +* A type storing a range over `T`. +* +* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. + */ +export const BinRangeuint32 = z.preprocess(processResponseBody,z.union([ +z.object({"end": z.number().min(0).max(4294967295), +"type": z.enum(["range_to"]), }), -z.object({"datum": Histogramuint16, -"type": z.enum(["histogram_u16"]), +z.object({"end": z.number().min(0).max(4294967295), +"start": z.number().min(0).max(4294967295), +"type": z.enum(["range"]), }), -z.object({"datum": Histogramint32, -"type": z.enum(["histogram_i32"]), -}), -z.object({"datum": Histogramuint32, -"type": z.enum(["histogram_u32"]), -}), -z.object({"datum": Histogramint64, -"type": z.enum(["histogram_i64"]), -}), -z.object({"datum": Histogramuint64, -"type": z.enum(["histogram_u64"]), -}), -z.object({"datum": Histogramfloat, -"type": z.enum(["histogram_f32"]), -}), -z.object({"datum": Histogramdouble, -"type": z.enum(["histogram_f64"]), -}), -z.object({"datum": MissingDatum, -"type": z.enum(["missing"]), +z.object({"start": z.number().min(0).max(4294967295), +"type": z.enum(["range_from"]), }), ]) ) -export const DerEncodedKeyPair = z.preprocess(processResponseBody,z.object({"privateKey": z.string(), -"publicCert": z.string(), -})) - -export const DeviceAccessTokenRequest = z.preprocess(processResponseBody,z.object({"clientId": z.uuid(), -"deviceCode": z.string(), -"grantType": z.string(), -})) - -export const DeviceAuthRequest = z.preprocess(processResponseBody,z.object({"clientId": z.uuid(), -})) - -export const DeviceAuthVerify = z.preprocess(processResponseBody,z.object({"userCode": z.string(), -})) - -export const Digest = z.preprocess(processResponseBody,z.object({"type": z.enum(["sha256"]), -"value": z.string(), -})) - /** -* State of a Disk +* A type storing a range over `T`. +* +* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. */ -export const DiskState = z.preprocess(processResponseBody,z.union([ -z.object({"state": z.enum(["creating"]), -}), -z.object({"state": z.enum(["detached"]), -}), -z.object({"state": z.enum(["import_ready"]), -}), -z.object({"state": z.enum(["importing_from_url"]), -}), -z.object({"state": z.enum(["importing_from_bulk_writes"]), -}), -z.object({"state": z.enum(["finalizing"]), -}), -z.object({"state": z.enum(["maintenance"]), -}), -z.object({"instance": z.uuid(), -"state": z.enum(["attaching"]), -}), -z.object({"instance": z.uuid(), -"state": z.enum(["attached"]), -}), -z.object({"instance": z.uuid(), -"state": z.enum(["detaching"]), +export const BinRangeuint64 = z.preprocess(processResponseBody,z.union([ +z.object({"end": z.number().min(0), +"type": z.enum(["range_to"]), }), -z.object({"state": z.enum(["destroyed"]), +z.object({"end": z.number().min(0), +"start": z.number().min(0), +"type": z.enum(["range"]), }), -z.object({"state": z.enum(["faulted"]), +z.object({"start": z.number().min(0), +"type": z.enum(["range_from"]), }), ]) ) /** -* View of a Disk - */ -export const Disk = z.preprocess(processResponseBody,z.object({"blockSize": ByteCount, -"description": z.string(), -"devicePath": z.string(), -"id": z.uuid(), -"imageId": z.uuid().nullable().optional(), -"name": Name, -"projectId": z.uuid(), -"size": ByteCount, -"snapshotId": z.uuid().nullable().optional(), -"state": DiskState, -"timeCreated": z.coerce.date(), -"timeModified": z.coerce.date(), -})) - -/** -* Different sources for a disk +* A type storing a range over `T`. +* +* This type supports ranges similar to the `RangeTo`, `Range` and `RangeFrom` types in the standard library. Those cover `(..end)`, `(start..end)`, and `(start..)` respectively. */ -export const DiskSource = z.preprocess(processResponseBody,z.union([ -z.object({"blockSize": BlockSize, -"type": z.enum(["blank"]), -}), -z.object({"snapshotId": z.uuid(), -"type": z.enum(["snapshot"]), +export const BinRangeuint8 = z.preprocess(processResponseBody,z.union([ +z.object({"end": z.number().min(0).max(255), +"type": z.enum(["range_to"]), }), -z.object({"imageId": z.uuid(), -"type": z.enum(["image"]), +z.object({"end": z.number().min(0).max(255), +"start": z.number().min(0).max(255), +"type": z.enum(["range"]), }), -z.object({"blockSize": BlockSize, -"type": z.enum(["importing_blocks"]), +z.object({"start": z.number().min(0).max(255), +"type": z.enum(["range_from"]), }), ]) ) /** -* Create-time parameters for a `Disk` +* Type storing bin edges and a count of samples within it. */ -export const DiskCreate = z.preprocess(processResponseBody,z.object({"description": z.string(), -"diskSource": DiskSource, -"name": Name, -"size": ByteCount, +export const Bindouble = z.preprocess(processResponseBody,z.object({"count": z.number().min(0), +"range": BinRangedouble, })) -export const DiskPath = z.preprocess(processResponseBody,z.object({"disk": NameOrId, +/** +* Type storing bin edges and a count of samples within it. + */ +export const Binfloat = z.preprocess(processResponseBody,z.object({"count": z.number().min(0), +"range": BinRangefloat, })) /** -* A single page of results +* Type storing bin edges and a count of samples within it. */ -export const DiskResultsPage = z.preprocess(processResponseBody,z.object({"items": Disk.array(), -"nextPage": z.string().nullable().optional(), +export const Binint16 = z.preprocess(processResponseBody,z.object({"count": z.number().min(0), +"range": BinRangeint16, })) /** -* Parameters for creating an ephemeral IP address for an instance. +* Type storing bin edges and a count of samples within it. */ -export const EphemeralIpCreate = z.preprocess(processResponseBody,z.object({"pool": NameOrId.nullable().optional(), +export const Binint32 = z.preprocess(processResponseBody,z.object({"count": z.number().min(0), +"range": BinRangeint32, })) /** -* Error information from a response. +* Type storing bin edges and a count of samples within it. */ -export const Error = z.preprocess(processResponseBody,z.object({"errorCode": z.string().optional(), -"message": z.string(), -"requestId": z.string(), +export const Binint64 = z.preprocess(processResponseBody,z.object({"count": z.number().min(0), +"range": BinRangeint64, })) -export const ExternalIp = z.preprocess(processResponseBody,z.union([ -z.object({"ip": z.ipv4(), -"kind": z.enum(["ephemeral"]), -}), -z.object({"description": z.string(), -"id": z.uuid(), -"instanceId": z.uuid().nullable().optional(), -"ip": z.ipv4(), -"kind": z.enum(["floating"]), -"name": Name, -"projectId": z.uuid(), -"timeCreated": z.coerce.date(), -"timeModified": z.coerce.date(), -}), -]) -) +/** +* Type storing bin edges and a count of samples within it. + */ +export const Binint8 = z.preprocess(processResponseBody,z.object({"count": z.number().min(0), +"range": BinRangeint8, +})) /** -* Parameters for creating an external IP address for instances. +* Type storing bin edges and a count of samples within it. */ -export const ExternalIpCreate = z.preprocess(processResponseBody,z.union([ -z.object({"pool": NameOrId.nullable().optional(), -"type": z.enum(["ephemeral"]), -}), -z.object({"floatingIp": NameOrId, -"type": z.enum(["floating"]), -}), -]) -) +export const Binuint16 = z.preprocess(processResponseBody,z.object({"count": z.number().min(0), +"range": BinRangeuint16, +})) /** -* A single page of results +* Type storing bin edges and a count of samples within it. */ -export const ExternalIpResultsPage = z.preprocess(processResponseBody,z.object({"items": ExternalIp.array(), -"nextPage": z.string().nullable().optional(), +export const Binuint32 = z.preprocess(processResponseBody,z.object({"count": z.number().min(0), +"range": BinRangeuint32, })) /** -* Parameters for finalizing a disk +* Type storing bin edges and a count of samples within it. */ -export const FinalizeDisk = z.preprocess(processResponseBody,z.object({"snapshotName": Name.nullable().optional(), +export const Binuint64 = z.preprocess(processResponseBody,z.object({"count": z.number().min(0), +"range": BinRangeuint64, })) -export const FleetRole = z.preprocess(processResponseBody,z.enum(["admin","collaborator","viewer"])) +/** +* Type storing bin edges and a count of samples within it. + */ +export const Binuint8 = z.preprocess(processResponseBody,z.object({"count": z.number().min(0), +"range": BinRangeuint8, +})) /** -* Describes what kind of identity is described by an id +* disk block size in bytes */ -export const IdentityType = z.preprocess(processResponseBody,z.enum(["silo_user","silo_group"])) +export const BlockSize = z.preprocess(processResponseBody,IntEnum([512,2048,4096] as const)) /** -* 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. +* Byte count to express memory or storage capacity. */ -export const FleetRoleRoleAssignment = z.preprocess(processResponseBody,z.object({"identityId": z.uuid(), -"identityType": IdentityType, -"roleName": FleetRole, -})) +export const ByteCount = z.preprocess(processResponseBody,z.number().min(0)) /** -* 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. +* The service intended to use this certificate. */ -export const FleetRolePolicy = z.preprocess(processResponseBody,z.object({"roleAssignments": FleetRoleRoleAssignment.array(), -})) +export const ServiceUsingCertificate = z.preprocess(processResponseBody,z.enum(["external_api"])) /** -* A Floating IP is a well-known IP address which can be attached and detached from instances. +* View of a Certificate */ -export const FloatingIp = z.preprocess(processResponseBody,z.object({"description": z.string(), +export const Certificate = z.preprocess(processResponseBody,z.object({"cert": z.string(), +"description": z.string(), "id": z.uuid(), -"instanceId": z.uuid().nullable().optional(), -"ip": z.ipv4(), "name": Name, -"projectId": z.uuid(), +"service": ServiceUsingCertificate, "timeCreated": z.coerce.date(), "timeModified": z.coerce.date(), })) /** -* The type of resource that a floating IP is attached to +* Create-time parameters for a `Certificate` */ -export const FloatingIpParentKind = z.preprocess(processResponseBody,z.enum(["instance"])) +export const CertificateCreate = z.preprocess(processResponseBody,z.object({"cert": z.string(), +"description": z.string(), +"key": z.string(), +"name": Name, +"service": ServiceUsingCertificate, +})) /** -* Parameters for attaching a floating IP address to another resource +* A single page of results */ -export const FloatingIpAttach = z.preprocess(processResponseBody,z.object({"kind": FloatingIpParentKind, -"parent": NameOrId, +export const CertificateResultsPage = z.preprocess(processResponseBody,z.object({"items": Certificate.array(), +"nextPage": z.string().nullable().optional(), })) /** -* Parameters for creating a new floating IP address for instances. +* View of a console session */ -export const FloatingIpCreate = z.preprocess(processResponseBody,z.object({"description": z.string(), -"ip": z.ipv4().nullable().optional(), -"name": Name, -"pool": NameOrId.nullable().optional(), +export const ConsoleSession = z.preprocess(processResponseBody,z.object({"id": z.uuid(), +"timeCreated": z.coerce.date(), +"timeLastUsed": z.coerce.date(), })) /** * A single page of results */ -export const FloatingIpResultsPage = z.preprocess(processResponseBody,z.object({"items": FloatingIp.array(), +export const ConsoleSessionResultsPage = z.preprocess(processResponseBody,z.object({"items": ConsoleSession.array(), "nextPage": z.string().nullable().optional(), })) /** -* Updateable identity-related parameters +* A cumulative or counter data type. */ -export const FloatingIpUpdate = z.preprocess(processResponseBody,z.object({"description": z.string().nullable().optional(), -"name": Name.nullable().optional(), +export const Cumulativedouble = z.preprocess(processResponseBody,z.object({"startTime": z.coerce.date(), +"value": z.number(), })) /** -* View of a Group +* A cumulative or counter data type. */ -export const Group = z.preprocess(processResponseBody,z.object({"displayName": z.string(), -"id": z.uuid(), -"siloId": z.uuid(), +export const Cumulativefloat = z.preprocess(processResponseBody,z.object({"startTime": z.coerce.date(), +"value": z.number(), })) /** -* A single page of results +* A cumulative or counter data type. */ -export const GroupResultsPage = z.preprocess(processResponseBody,z.object({"items": Group.array(), -"nextPage": z.string().nullable().optional(), +export const Cumulativeint64 = z.preprocess(processResponseBody,z.object({"startTime": z.coerce.date(), +"value": z.number(), })) /** -* An RFC-1035-compliant hostname -* -* A hostname identifies a host on a network, and is usually a dot-delimited sequence of labels, where each label contains only letters, digits, or the hyphen. See RFCs 1035 and 952 for more details. - */ -export const Hostname = z.preprocess(processResponseBody,z.string().min(1).max(253).regex(/^([a-zA-Z0-9]+[a-zA-Z0-9\-]*(? 2**53 addresses), integer precision will be lost, in exchange for representing the entire range. In such a case the pool still has many available addresses. */ -export const SwitchPortSettings = z.preprocess(processResponseBody,z.object({"description": z.string(), -"id": z.uuid(), -"name": Name, -"timeCreated": z.coerce.date(), -"timeModified": z.coerce.date(), +export const IpPoolUtilization = z.preprocess(processResponseBody,z.object({"capacity": z.number(), +"remaining": z.number(), })) /** -* Parameters for creating switch port settings. Switch port settings are the central data structure for setting up external networking. Switch port settings include link, interface, route, address and dynamic network protocol configuration. +* A range of IP ports +* +* An inclusive-inclusive range of IP ports. The second port may be omitted to represent a single port. */ -export const SwitchPortSettingsCreate = z.preprocess(processResponseBody,z.object({"addresses": z.record(z.string(),AddressConfig), -"bgpPeers": z.record(z.string(),BgpPeerConfig), -"description": z.string(), -"groups": NameOrId.array(), -"interfaces": z.record(z.string(),SwitchInterfaceConfigCreate), -"links": z.record(z.string(),LinkConfigCreate), -"name": Name, -"portConfig": SwitchPortConfigCreate, -"routes": z.record(z.string(),RouteConfig), +export const L4PortRange = z.preprocess(processResponseBody,z.string().min(1).max(11).regex(/^[0-9]{1,5}(-[0-9]{1,5})?$/)) + +/** +* The forward error correction mode of a link. + */ +export const LinkFec = z.preprocess(processResponseBody,z.enum(["firecode", "none", "rs"]) +) + +/** +* The LLDP configuration associated with a port. + */ +export const LldpLinkConfigCreate = z.preprocess(processResponseBody,z.object({"chassisId": z.string().nullable().optional(), +"enabled": SafeBoolean, +"linkDescription": z.string().nullable().optional(), +"linkName": z.string().nullable().optional(), +"managementIp": z.ipv4().nullable().optional(), +"systemDescription": z.string().nullable().optional(), +"systemName": z.string().nullable().optional(), })) /** -* This structure maps a port settings object to a port settings groups. Port settings objects may inherit settings from groups. This mapping defines the relationship between settings objects and the groups they reference. +* The speed of a link. */ -export const SwitchPortSettingsGroups = z.preprocess(processResponseBody,z.object({"portSettingsGroupId": z.uuid(), -"portSettingsId": z.uuid(), +export const LinkSpeed = z.preprocess(processResponseBody,z.enum(["speed0_g", "speed1_g", "speed10_g", "speed25_g", "speed40_g", "speed50_g", "speed100_g", "speed200_g", "speed400_g"]) +) + +/** +* Per-port tx-eq overrides. This can be used to fine-tune the transceiver equalization settings to improve signal integrity. + */ +export const TxEqConfig = z.preprocess(processResponseBody,z.object({"main": z.number().min(-2147483647).max(2147483647).nullable().optional(), +"post1": z.number().min(-2147483647).max(2147483647).nullable().optional(), +"post2": z.number().min(-2147483647).max(2147483647).nullable().optional(), +"pre1": z.number().min(-2147483647).max(2147483647).nullable().optional(), +"pre2": z.number().min(-2147483647).max(2147483647).nullable().optional(), })) /** -* A single page of results +* Switch link configuration. */ -export const SwitchPortSettingsResultsPage = z.preprocess(processResponseBody,z.object({"items": SwitchPortSettings.array(), -"nextPage": z.string().nullable().optional(), +export const LinkConfigCreate = z.preprocess(processResponseBody,z.object({"autoneg": SafeBoolean, +"fec": LinkFec.nullable().optional(), +"linkName": Name, +"lldp": LldpLinkConfigCreate, +"mtu": z.number().min(0).max(65535), +"speed": LinkSpeed, +"txEq": TxEqConfig.nullable().optional(), })) /** -* A switch port VLAN interface configuration for a port settings object. +* A link layer discovery protocol (LLDP) service configuration. */ -export const SwitchVlanInterfaceConfig = z.preprocess(processResponseBody,z.object({"interfaceConfigId": z.uuid(), -"vlanId": z.number().min(0).max(65535), +export const LldpLinkConfig = z.preprocess(processResponseBody,z.object({"chassisId": z.string().nullable().optional(), +"enabled": SafeBoolean, +"id": z.uuid(), +"linkDescription": z.string().nullable().optional(), +"linkName": z.string().nullable().optional(), +"managementIp": z.ipv4().nullable().optional(), +"systemDescription": z.string().nullable().optional(), +"systemName": z.string().nullable().optional(), +})) + +export const NetworkAddress = z.preprocess(processResponseBody,z.union([ +z.object({"ipAddr": z.ipv4(), +}), +z.object({"iEEE802": z.number().min(0).max(255).array(), +}), +]) +) + +export const ManagementAddress = z.preprocess(processResponseBody,z.object({"addr": NetworkAddress, +"interfaceNum": InterfaceNum, +"oid": z.number().min(0).max(255).array().nullable().optional(), })) /** -* 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. +* Information about LLDP advertisements from other network entities directly connected to a switch port. This structure contains both metadata about when and where the neighbor was seen, as well as the specific information the neighbor was advertising. */ -export const SwitchPortSettingsView = z.preprocess(processResponseBody,z.object({"addresses": SwitchPortAddressConfig.array(), -"bgpPeers": SwitchPortBgpPeerConfig.array(), -"groups": SwitchPortSettingsGroups.array(), -"interfaces": SwitchInterfaceConfig.array(), -"linkLldp": LldpServiceConfig.array(), -"links": SwitchPortLinkConfig.array(), -"port": SwitchPortConfig, -"routes": SwitchPortRouteConfig.array(), -"settings": SwitchPortSettings, -"vlanInterfaces": SwitchVlanInterfaceConfig.array(), +export const LldpNeighbor = z.preprocess(processResponseBody,z.object({"chassisId": z.string(), +"firstSeen": z.coerce.date(), +"lastSeen": z.coerce.date(), +"linkDescription": z.string().nullable().optional(), +"linkName": z.string(), +"localPort": z.string(), +"managementIp": ManagementAddress.array(), +"systemDescription": z.string().nullable().optional(), +"systemName": z.string().nullable().optional(), })) /** * A single page of results */ -export const SwitchResultsPage = z.preprocess(processResponseBody,z.object({"items": Switch.array(), +export const LldpNeighborResultsPage = z.preprocess(processResponseBody,z.object({"items": LldpNeighbor.array(), "nextPage": z.string().nullable().optional(), })) /** -* A sled that has not been added to an initialized rack yet +* A loopback address is an address that is assigned to a rack switch but is not associated with any particular port. */ -export const UninitializedSled = z.preprocess(processResponseBody,z.object({"baseboard": Baseboard, -"cubby": z.number().min(0).max(65535), +export const LoopbackAddress = z.preprocess(processResponseBody,z.object({"address": IpNet, +"addressLotBlockId": z.uuid(), +"id": z.uuid(), "rackId": z.uuid(), +"switchLocation": z.string(), })) /** -* The unique hardware ID for a sled +* Parameters for creating a loopback address on a particular rack switch. */ -export const UninitializedSledId = z.preprocess(processResponseBody,z.object({"part": z.string(), -"serial": z.string(), +export const LoopbackAddressCreate = z.preprocess(processResponseBody,z.object({"address": z.ipv4(), +"addressLot": NameOrId, +"anycast": SafeBoolean, +"mask": z.number().min(0).max(255), +"rackId": z.uuid(), +"switchLocation": Name, })) /** * A single page of results */ -export const UninitializedSledResultsPage = z.preprocess(processResponseBody,z.object({"items": UninitializedSled.array(), +export const LoopbackAddressResultsPage = z.preprocess(processResponseBody,z.object({"items": LoopbackAddress.array(), "nextPage": z.string().nullable().optional(), })) /** -* View of a User +* A `Measurement` is a timestamped datum from a single metric */ -export const User = z.preprocess(processResponseBody,z.object({"displayName": z.string(), -"id": z.uuid(), -"siloId": z.uuid(), +export const Measurement = z.preprocess(processResponseBody,z.object({"datum": Datum, +"timestamp": z.coerce.date(), })) /** -* View of a Built-in User -* -* A Built-in User is explicitly created as opposed to being derived from an Identify Provider. +* A single page of results */ -export const UserBuiltin = z.preprocess(processResponseBody,z.object({"description": z.string(), +export const MeasurementResultsPage = z.preprocess(processResponseBody,z.object({"items": Measurement.array(), +"nextPage": z.string().nullable().optional(), +})) + +/** +* The type of the metric itself, indicating what its values represent. + */ +export const MetricType = z.preprocess(processResponseBody,z.enum(["gauge", "delta", "cumulative"]) +) + +/** +* View of a Multicast Group + */ +export const MulticastGroup = z.preprocess(processResponseBody,z.object({"description": z.string(), "id": z.uuid(), +"ipPoolId": z.uuid(), +"multicastIp": z.ipv4(), +"mvlan": z.number().min(0).max(65535).nullable().optional(), "name": Name, +"sourceIps": z.ipv4().array(), +"state": z.string(), "timeCreated": z.coerce.date(), "timeModified": z.coerce.date(), })) /** -* A single page of results +* Create-time parameters for a multicast group. */ -export const UserBuiltinResultsPage = z.preprocess(processResponseBody,z.object({"items": UserBuiltin.array(), -"nextPage": z.string().nullable().optional(), +export const MulticastGroupCreate = z.preprocess(processResponseBody,z.object({"description": z.string(), +"multicastIp": z.ipv4().nullable().default(null).optional(), +"mvlan": z.number().min(0).max(65535).nullable().optional(), +"name": Name, +"pool": NameOrId.nullable().default(null).optional(), +"sourceIps": z.ipv4().array().nullable().default(null).optional(), })) /** -* 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 though they may contain a UUID. +* View of a Multicast Group Member (instance belonging to a multicast group) */ -export const UserId = z.preprocess(processResponseBody,z.string().min(1).max(63).regex(/^(?![0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)^[a-z]([a-zA-Z0-9-]*[a-zA-Z0-9]+)?$/)) +export const MulticastGroupMember = z.preprocess(processResponseBody,z.object({"description": z.string(), +"id": z.uuid(), +"instanceId": z.uuid(), +"multicastGroupId": z.uuid(), +"name": Name, +"state": z.string(), +"timeCreated": z.coerce.date(), +"timeModified": z.coerce.date(), +})) /** -* Parameters for setting a user's password +* Parameters for adding an instance to a multicast group. */ -export const UserPassword = z.preprocess(processResponseBody,z.union([ -z.object({"mode": z.enum(["password"]), -"value": Password, -}), -z.object({"mode": z.enum(["login_disallowed"]), -}), -]) -) +export const MulticastGroupMemberAdd = z.preprocess(processResponseBody,z.object({"instance": NameOrId, +})) /** -* Create-time parameters for a `User` +* A single page of results */ -export const UserCreate = z.preprocess(processResponseBody,z.object({"externalId": UserId, -"password": UserPassword, +export const MulticastGroupMemberResultsPage = z.preprocess(processResponseBody,z.object({"items": MulticastGroupMember.array(), +"nextPage": z.string().nullable().optional(), })) /** * A single page of results */ -export const UserResultsPage = z.preprocess(processResponseBody,z.object({"items": User.array(), +export const MulticastGroupResultsPage = z.preprocess(processResponseBody,z.object({"items": MulticastGroup.array(), "nextPage": z.string().nullable().optional(), })) /** -* Credentials for local user login +* Update-time parameters for a multicast group. */ -export const UsernamePasswordCredentials = z.preprocess(processResponseBody,z.object({"password": Password, -"username": UserId, +export const MulticastGroupUpdate = z.preprocess(processResponseBody,z.object({"description": z.string().nullable().optional(), +"mvlan": z.number().min(0).max(65535).nullable().optional(), +"name": Name.nullable().optional(), +"sourceIps": z.ipv4().array().nullable().optional(), })) /** -* View of the current silo's resource utilization and capacity +* VPC-private IPv4 configuration for a network interface. */ -export const Utilization = z.preprocess(processResponseBody,z.object({"capacity": VirtualResourceCounts, -"provisioned": VirtualResourceCounts, +export const PrivateIpv4Config = z.preprocess(processResponseBody,z.object({"ip": z.ipv4(), +"subnet": Ipv4Net, +"transitIps": Ipv4Net.array().default([]).optional(), })) /** -* View of a VPC +* VPC-private IPv6 configuration for a network interface. */ -export const Vpc = z.preprocess(processResponseBody,z.object({"description": z.string(), -"dnsName": Name, +export const PrivateIpv6Config = z.preprocess(processResponseBody,z.object({"ip": z.ipv6(), +"subnet": Ipv6Net, +"transitIps": Ipv6Net.array(), +})) + +/** +* VPC-private IP address configuration for a network interface. + */ +export const PrivateIpConfig = z.preprocess(processResponseBody,z.union([ +z.object({"type": z.enum(["v4"]), +"value": PrivateIpv4Config, +}), +z.object({"type": z.enum(["v6"]), +"value": PrivateIpv6Config, +}), +z.object({"type": z.enum(["dual_stack"]), +"value": z.object({"v4": PrivateIpv4Config, +"v6": PrivateIpv6Config, +}), +}), +]) +) + +/** +* The type of network interface + */ +export const NetworkInterfaceKind = z.preprocess(processResponseBody,z.union([ +z.object({"id": z.uuid(), +"type": z.enum(["instance"]), +}), +z.object({"id": z.uuid(), +"type": z.enum(["service"]), +}), +z.object({"id": z.uuid(), +"type": z.enum(["probe"]), +}), +]) +) + +/** +* A Geneve Virtual Network Identifier + */ +export const Vni = z.preprocess(processResponseBody,z.number().min(0).max(4294967295)) + +/** +* Information required to construct a virtual network interface + */ +export const NetworkInterface = z.preprocess(processResponseBody,z.object({"id": z.uuid(), +"ipConfig": PrivateIpConfig, +"kind": NetworkInterfaceKind, +"mac": MacAddr, +"name": Name, +"primary": SafeBoolean, +"slot": z.number().min(0).max(255), +"vni": Vni, +})) + +/** +* List of data values for one timeseries. +* +* Each element is an option, where `None` represents a missing sample. + */ +export const ValueArray = z.preprocess(processResponseBody,z.union([ +z.object({"type": z.enum(["integer"]), +"values": z.number().nullable().array(), +}), +z.object({"type": z.enum(["double"]), +"values": z.number().nullable().array(), +}), +z.object({"type": z.enum(["boolean"]), +"values": SafeBoolean.nullable().array(), +}), +z.object({"type": z.enum(["string"]), +"values": z.string().nullable().array(), +}), +z.object({"type": z.enum(["integer_distribution"]), +"values": Distributionint64.nullable().array(), +}), +z.object({"type": z.enum(["double_distribution"]), +"values": Distributiondouble.nullable().array(), +}), +]) +) + +/** +* A single list of values, for one dimension of a timeseries. + */ +export const Values = z.preprocess(processResponseBody,z.object({"metricType": MetricType, +"values": ValueArray, +})) + +/** +* Timepoints and values for one timeseries. + */ +export const Points = z.preprocess(processResponseBody,z.object({"startTimes": z.coerce.date().array().nullable().optional(), +"timestamps": z.coerce.date().array(), +"values": Values.array(), +})) + +/** +* 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 const Timeseries = z.preprocess(processResponseBody,z.object({"fields": z.record(z.string(),FieldValue), +"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. + */ +export const OxqlTable = z.preprocess(processResponseBody,z.object({"name": z.string(), +"timeseries": Timeseries.array(), +})) + +/** +* The result of a successful OxQL query. + */ +export const OxqlQueryResult = z.preprocess(processResponseBody,z.object({"tables": OxqlTable.array(), +})) + +/** +* A password used to authenticate a user +* +* Passwords may be subject to additional constraints. + */ +export const Password = z.preprocess(processResponseBody,z.string().max(512)) + +/** +* Describes the form factor of physical disks. + */ +export const PhysicalDiskKind = z.preprocess(processResponseBody,z.enum(["m2","u2"])) + +/** +* The operator-defined policy of a physical disk. + */ +export const PhysicalDiskPolicy = z.preprocess(processResponseBody,z.union([ +z.object({"kind": z.enum(["in_service"]), +}), +z.object({"kind": z.enum(["expunged"]), +}), +]) +) + +/** +* The current state of the disk, as determined by Nexus. + */ +export const PhysicalDiskState = z.preprocess(processResponseBody,z.enum(["active", "decommissioned"]) +) + +/** +* View of a Physical Disk +* +* Physical disks reside in a particular sled and are used to store both Instance Disk data as well as internal metadata. + */ +export const PhysicalDisk = z.preprocess(processResponseBody,z.object({"formFactor": PhysicalDiskKind, +"id": z.uuid(), +"model": z.string(), +"policy": PhysicalDiskPolicy, +"serial": z.string(), +"sledId": z.uuid().nullable().optional(), +"state": PhysicalDiskState, +"timeCreated": z.coerce.date(), +"timeModified": z.coerce.date(), +"vendor": z.string(), +})) + +/** +* A single page of results + */ +export const PhysicalDiskResultsPage = z.preprocess(processResponseBody,z.object({"items": PhysicalDisk.array(), +"nextPage": z.string().nullable().optional(), +})) + +export const PingStatus = z.preprocess(processResponseBody,z.enum(["ok"])) + +export const Ping = z.preprocess(processResponseBody,z.object({"status": PingStatus, +})) + +/** +* Identity-related metadata that's included in nearly all public API objects + */ +export const Probe = z.preprocess(processResponseBody,z.object({"description": z.string(), "id": z.uuid(), -"ipv6Prefix": Ipv6Net, "name": Name, -"projectId": z.uuid(), -"systemRouterId": z.uuid(), +"sled": z.uuid(), "timeCreated": z.coerce.date(), "timeModified": z.coerce.date(), })) /** -* Create-time parameters for a `Vpc` +* Create time parameters for probes. */ -export const VpcCreate = z.preprocess(processResponseBody,z.object({"description": z.string(), -"dnsName": Name, -"ipv6Prefix": Ipv6Net.nullable().optional(), +export const ProbeCreate = z.preprocess(processResponseBody,z.object({"description": z.string(), "name": Name, +"poolSelector": PoolSelector.default({"ip_version":null,"type":"auto"}).optional(), +"sled": z.uuid(), })) -export const VpcFirewallRuleAction = z.preprocess(processResponseBody,z.enum(["allow","deny"])) +export const ProbeExternalIpKind = z.preprocess(processResponseBody,z.enum(["snat","floating","ephemeral"])) -export const VpcFirewallRuleDirection = z.preprocess(processResponseBody,z.enum(["inbound","outbound"])) +export const ProbeExternalIp = z.preprocess(processResponseBody,z.object({"firstPort": z.number().min(0).max(65535), +"ip": z.ipv4(), +"kind": ProbeExternalIpKind, +"lastPort": z.number().min(0).max(65535), +})) + +export const ProbeInfo = z.preprocess(processResponseBody,z.object({"externalIps": ProbeExternalIp.array(), +"id": z.uuid(), +"interface": NetworkInterface, +"name": Name, +"sled": z.uuid(), +})) /** -* The `VpcFirewallRuleHostFilter` is used to filter traffic on the basis of its source or destination host. +* A single page of results */ -export const VpcFirewallRuleHostFilter = z.preprocess(processResponseBody,z.union([ +export const ProbeInfoResultsPage = z.preprocess(processResponseBody,z.object({"items": ProbeInfo.array(), +"nextPage": z.string().nullable().optional(), +})) + +/** +* View of a Project + */ +export const Project = z.preprocess(processResponseBody,z.object({"description": z.string(), +"id": z.uuid(), +"name": Name, +"timeCreated": z.coerce.date(), +"timeModified": z.coerce.date(), +})) + +/** +* Create-time parameters for a `Project` + */ +export const ProjectCreate = z.preprocess(processResponseBody,z.object({"description": z.string(), +"name": Name, +})) + +/** +* A single page of results + */ +export const ProjectResultsPage = z.preprocess(processResponseBody,z.object({"items": Project.array(), +"nextPage": z.string().nullable().optional(), +})) + +export const ProjectRole = z.preprocess(processResponseBody,z.enum(["admin","collaborator","limited_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 const ProjectRoleRoleAssignment = z.preprocess(processResponseBody,z.object({"identityId": z.uuid(), +"identityType": IdentityType, +"roleName": ProjectRole, +})) + +/** +* 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 const ProjectRolePolicy = z.preprocess(processResponseBody,z.object({"roleAssignments": ProjectRoleRoleAssignment.array(), +})) + +/** +* Updateable properties of a `Project` + */ +export const ProjectUpdate = z.preprocess(processResponseBody,z.object({"description": z.string().nullable().optional(), +"name": Name.nullable().optional(), +})) + +/** +* View of an Rack + */ +export const Rack = z.preprocess(processResponseBody,z.object({"id": z.uuid(), +"timeCreated": z.coerce.date(), +"timeModified": z.coerce.date(), +})) + +/** +* A single page of results + */ +export const RackResultsPage = z.preprocess(processResponseBody,z.object({"items": Rack.array(), +"nextPage": z.string().nullable().optional(), +})) + +/** +* A route to a destination network through a gateway address. + */ +export const Route = z.preprocess(processResponseBody,z.object({"dst": IpNet, +"gw": z.ipv4(), +"ribPriority": z.number().min(0).max(255).nullable().optional(), +"vid": z.number().min(0).max(65535).nullable().optional(), +})) + +/** +* Route configuration data associated with a switch port configuration. + */ +export const RouteConfig = z.preprocess(processResponseBody,z.object({"linkName": Name, +"routes": Route.array(), +})) + +/** +* A `RouteDestination` is used to match traffic with a routing rule based on the destination of that traffic. +* +* When traffic is to be sent to a destination that is within a given `RouteDestination`, the corresponding `RouterRoute` applies, and traffic will be forward to the `RouteTarget` for that rule. + */ +export const RouteDestination = z.preprocess(processResponseBody,z.union([ +z.object({"type": z.enum(["ip"]), +"value": z.ipv4(), +}), +z.object({"type": z.enum(["ip_net"]), +"value": IpNet, +}), +z.object({"type": z.enum(["vpc"]), +"value": Name, +}), +z.object({"type": z.enum(["subnet"]), +"value": Name, +}), +]) +) + +/** +* A `RouteTarget` describes the possible locations that traffic matching a route destination can be sent. + */ +export const RouteTarget = z.preprocess(processResponseBody,z.union([ +z.object({"type": z.enum(["ip"]), +"value": z.ipv4(), +}), z.object({"type": z.enum(["vpc"]), "value": Name, }), @@ -2283,205 +2900,2232 @@ z.object({"type": z.enum(["subnet"]), z.object({"type": z.enum(["instance"]), "value": Name, }), -z.object({"type": z.enum(["ip"]), -"value": z.ipv4(), +z.object({"type": z.enum(["internet_gateway"]), +"value": Name, }), -z.object({"type": z.enum(["ip_net"]), -"value": IpNet, +z.object({"type": z.enum(["drop"]), }), ]) ) /** -* The protocols that may be specified in a firewall rule's filter +* 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 const VpcFirewallRuleProtocol = z.preprocess(processResponseBody,z.enum(["TCP","UDP","ICMP"])) +export const RouterRouteKind = z.preprocess(processResponseBody,z.enum(["default", "vpc_subnet", "vpc_peering", "custom"]) +) /** -* Filter for a firewall rule. A given packet must match every field that is present for the rule to apply to it. A packet matches a field if any entry in that field matches the packet. +* A route defines a rule that governs where traffic should be sent based on its destination. */ -export const VpcFirewallRuleFilter = z.preprocess(processResponseBody,z.object({"hosts": VpcFirewallRuleHostFilter.array().nullable().optional(), -"ports": L4PortRange.array().nullable().optional(), -"protocols": VpcFirewallRuleProtocol.array().nullable().optional(), +export const RouterRoute = z.preprocess(processResponseBody,z.object({"description": z.string(), +"destination": RouteDestination, +"id": z.uuid(), +"kind": RouterRouteKind, +"name": Name, +"target": RouteTarget, +"timeCreated": z.coerce.date(), +"timeModified": z.coerce.date(), +"vpcRouterId": z.uuid(), +})) + +/** +* Create-time parameters for a `RouterRoute` + */ +export const RouterRouteCreate = z.preprocess(processResponseBody,z.object({"description": z.string(), +"destination": RouteDestination, +"name": Name, +"target": RouteTarget, +})) + +/** +* A single page of results + */ +export const RouterRouteResultsPage = z.preprocess(processResponseBody,z.object({"items": RouterRoute.array(), +"nextPage": z.string().nullable().optional(), +})) + +/** +* Updateable properties of a `RouterRoute` + */ +export const RouterRouteUpdate = z.preprocess(processResponseBody,z.object({"description": z.string().nullable().optional(), +"destination": RouteDestination, +"name": Name.nullable().optional(), +"target": RouteTarget, +})) + +/** +* Identity-related metadata that's included in nearly all public API objects + */ +export const SamlIdentityProvider = z.preprocess(processResponseBody,z.object({"acsUrl": z.string(), +"description": z.string(), +"groupAttributeName": z.string().nullable().optional(), +"id": z.uuid(), +"idpEntityId": z.string(), +"name": Name, +"publicCert": z.string().nullable().optional(), +"sloUrl": z.string(), +"spClientId": z.string(), +"technicalContactEmail": z.string(), +"timeCreated": z.coerce.date(), +"timeModified": z.coerce.date(), +})) + +/** +* Create-time identity-related parameters + */ +export const SamlIdentityProviderCreate = z.preprocess(processResponseBody,z.object({"acsUrl": z.string(), +"description": z.string(), +"groupAttributeName": z.string().nullable().optional(), +"idpEntityId": z.string(), +"idpMetadataSource": IdpMetadataSource, +"name": Name, +"signingKeypair": DerEncodedKeyPair.nullable().default(null).optional(), +"sloUrl": z.string(), +"spClientId": z.string(), +"technicalContactEmail": z.string(), +})) + +export const ScimClientBearerToken = z.preprocess(processResponseBody,z.object({"id": z.uuid(), +"timeCreated": z.coerce.date(), +"timeExpires": z.coerce.date().nullable().optional(), +})) + +/** +* The POST response is the only time the generated bearer token is returned to the client. + */ +export const ScimClientBearerTokenValue = z.preprocess(processResponseBody,z.object({"bearerToken": z.string(), +"id": z.uuid(), +"timeCreated": z.coerce.date(), +"timeExpires": z.coerce.date().nullable().optional(), +})) + +/** +* Configuration of inbound ICMP allowed by API services. + */ +export const ServiceIcmpConfig = z.preprocess(processResponseBody,z.object({"enabled": SafeBoolean, +})) + +/** +* Parameters for PUT requests to `/v1/system/update/target-release`. + */ +export const SetTargetReleaseParams = z.preprocess(processResponseBody,z.object({"systemVersion": z.string().regex(/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/), +})) + +/** +* Describes how identities are managed and users are authenticated in this Silo + */ +export const SiloIdentityMode = z.preprocess(processResponseBody,z.enum(["saml_jit", "local_only", "saml_scim"]) +) + +/** +* View of a Silo +* +* A Silo is the highest level unit of isolation. + */ +export const Silo = z.preprocess(processResponseBody,z.object({"adminGroupName": z.string().nullable().optional(), +"description": z.string(), +"discoverable": SafeBoolean, +"id": z.uuid(), +"identityMode": SiloIdentityMode, +"mappedFleetRoles": z.record(z.string(),FleetRole.array().refine(...uniqueItems)), +"name": Name, +"timeCreated": z.coerce.date(), +"timeModified": z.coerce.date(), +})) + +/** +* View of silo authentication settings + */ +export const SiloAuthSettings = z.preprocess(processResponseBody,z.object({"deviceTokenMaxTtlSeconds": z.number().min(0).max(4294967295).nullable().optional(), +"siloId": z.uuid(), +})) + +/** +* Updateable properties of a silo's settings. + */ +export const SiloAuthSettingsUpdate = z.preprocess(processResponseBody,z.object({"deviceTokenMaxTtlSeconds": z.number().min(1).max(4294967295).nullable(), +})) + +/** +* The amount of provisionable resources for a Silo + */ +export const SiloQuotasCreate = z.preprocess(processResponseBody,z.object({"cpus": z.number(), +"memory": ByteCount, +"storage": ByteCount, +})) + +/** +* Create-time parameters for a `Silo` + */ +export const SiloCreate = z.preprocess(processResponseBody,z.object({"adminGroupName": z.string().nullable().optional(), +"description": z.string(), +"discoverable": SafeBoolean, +"identityMode": SiloIdentityMode, +"mappedFleetRoles": z.record(z.string(),FleetRole.array().refine(...uniqueItems)).optional(), +"name": Name, +"quotas": SiloQuotasCreate, +"tlsCertificates": CertificateCreate.array(), +})) + +/** +* An IP pool in the context of a silo + */ +export const SiloIpPool = z.preprocess(processResponseBody,z.object({"description": z.string(), +"id": z.uuid(), +"ipVersion": IpVersion, +"isDefault": SafeBoolean, +"name": Name, +"poolType": IpPoolType, +"timeCreated": z.coerce.date(), +"timeModified": z.coerce.date(), +})) + +/** +* A single page of results + */ +export const SiloIpPoolResultsPage = z.preprocess(processResponseBody,z.object({"items": SiloIpPool.array(), +"nextPage": z.string().nullable().optional(), +})) + +/** +* A collection of resource counts used to set the virtual capacity of a silo + */ +export const SiloQuotas = z.preprocess(processResponseBody,z.object({"cpus": z.number(), +"memory": ByteCount, +"siloId": z.uuid(), +"storage": ByteCount, +})) + +/** +* A single page of results + */ +export const SiloQuotasResultsPage = z.preprocess(processResponseBody,z.object({"items": SiloQuotas.array(), +"nextPage": z.string().nullable().optional(), +})) + +/** +* Updateable properties of a Silo's resource limits. If a value is omitted it will not be updated. + */ +export const SiloQuotasUpdate = z.preprocess(processResponseBody,z.object({"cpus": z.number().nullable().optional(), +"memory": ByteCount.nullable().optional(), +"storage": ByteCount.nullable().optional(), +})) + +/** +* A single page of results + */ +export const SiloResultsPage = z.preprocess(processResponseBody,z.object({"items": Silo.array(), +"nextPage": z.string().nullable().optional(), +})) + +export const SiloRole = z.preprocess(processResponseBody,z.enum(["admin","collaborator","limited_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 const SiloRoleRoleAssignment = z.preprocess(processResponseBody,z.object({"identityId": z.uuid(), +"identityType": IdentityType, +"roleName": SiloRole, +})) + +/** +* 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 const SiloRolePolicy = z.preprocess(processResponseBody,z.object({"roleAssignments": SiloRoleRoleAssignment.array(), +})) + +/** +* A collection of resource counts used to describe capacity and utilization + */ +export const VirtualResourceCounts = z.preprocess(processResponseBody,z.object({"cpus": z.number(), +"memory": ByteCount, +"storage": ByteCount, +})) + +/** +* View of a silo's resource utilization and capacity + */ +export const SiloUtilization = z.preprocess(processResponseBody,z.object({"allocated": VirtualResourceCounts, +"provisioned": VirtualResourceCounts, +"siloId": z.uuid(), +"siloName": Name, +})) + +/** +* A single page of results + */ +export const SiloUtilizationResultsPage = z.preprocess(processResponseBody,z.object({"items": SiloUtilization.array(), +"nextPage": z.string().nullable().optional(), +})) + +/** +* The operator-defined provision policy of a sled. +* +* This controls whether new resources are going to be provisioned on this sled. + */ +export const SledProvisionPolicy = z.preprocess(processResponseBody,z.enum(["provisionable", "non_provisionable"]) +) + +/** +* The operator-defined policy of a sled. + */ +export const SledPolicy = z.preprocess(processResponseBody,z.union([ +z.object({"kind": z.enum(["in_service"]), +"provisionPolicy": SledProvisionPolicy, +}), +z.object({"kind": z.enum(["expunged"]), +}), +]) +) + +/** +* The current state of the sled. + */ +export const SledState = z.preprocess(processResponseBody,z.enum(["active", "decommissioned"]) +) + +/** +* An operator's view of a Sled. + */ +export const Sled = z.preprocess(processResponseBody,z.object({"baseboard": Baseboard, +"id": z.uuid(), +"policy": SledPolicy, +"rackId": z.uuid(), +"state": SledState, +"timeCreated": z.coerce.date(), +"timeModified": z.coerce.date(), +"usableHardwareThreads": z.number().min(0).max(4294967295), +"usablePhysicalRam": ByteCount, +})) + +/** +* The unique ID of a sled. + */ +export const SledId = z.preprocess(processResponseBody,z.object({"id": z.uuid(), +})) + +/** +* An operator's view of an instance running on a given sled + */ +export const SledInstance = z.preprocess(processResponseBody,z.object({"activeSledId": z.uuid(), +"id": z.uuid(), +"memory": z.number(), +"migrationId": z.uuid().nullable().optional(), +"name": Name, +"ncpus": z.number(), +"projectName": Name, +"siloName": Name, +"state": InstanceState, +"timeCreated": z.coerce.date(), +"timeModified": z.coerce.date(), +})) + +/** +* A single page of results + */ +export const SledInstanceResultsPage = z.preprocess(processResponseBody,z.object({"items": SledInstance.array(), +"nextPage": z.string().nullable().optional(), +})) + +/** +* Parameters for `sled_set_provision_policy`. + */ +export const SledProvisionPolicyParams = z.preprocess(processResponseBody,z.object({"state": SledProvisionPolicy, +})) + +/** +* Response to `sled_set_provision_policy`. + */ +export const SledProvisionPolicyResponse = z.preprocess(processResponseBody,z.object({"newState": SledProvisionPolicy, +"oldState": SledProvisionPolicy, +})) + +/** +* A single page of results + */ +export const SledResultsPage = z.preprocess(processResponseBody,z.object({"items": Sled.array(), +"nextPage": z.string().nullable().optional(), +})) + +export const SnapshotState = z.preprocess(processResponseBody,z.enum(["creating","ready","faulted","destroyed"])) + +/** +* View of a Snapshot + */ +export const Snapshot = z.preprocess(processResponseBody,z.object({"description": z.string(), +"diskId": z.uuid(), +"id": z.uuid(), +"name": Name, +"projectId": z.uuid(), +"size": ByteCount, +"state": SnapshotState, +"timeCreated": z.coerce.date(), +"timeModified": z.coerce.date(), +})) + +/** +* Create-time parameters for a `Snapshot` + */ +export const SnapshotCreate = z.preprocess(processResponseBody,z.object({"description": z.string(), +"disk": NameOrId, +"name": Name, +})) + +/** +* A single page of results + */ +export const SnapshotResultsPage = z.preprocess(processResponseBody,z.object({"items": Snapshot.array(), +"nextPage": z.string().nullable().optional(), +})) + +/** +* View of an SSH Key + */ +export const SshKey = z.preprocess(processResponseBody,z.object({"description": z.string(), +"id": z.uuid(), +"name": Name, +"publicKey": z.string(), +"siloUserId": z.uuid(), +"timeCreated": z.coerce.date(), +"timeModified": z.coerce.date(), +})) + +/** +* Create-time parameters for an `SshKey` + */ +export const SshKeyCreate = z.preprocess(processResponseBody,z.object({"description": z.string(), +"name": Name, +"publicKey": z.string(), +})) + +/** +* A single page of results + */ +export const SshKeyResultsPage = z.preprocess(processResponseBody,z.object({"items": SshKey.array(), +"nextPage": z.string().nullable().optional(), +})) + +export const SupportBundleCreate = z.preprocess(processResponseBody,z.object({"userComment": z.string().nullable().optional(), +})) + +export const SupportBundleState = z.preprocess(processResponseBody,z.enum(["collecting", "destroying", "failed", "active"]) +) + +export const SupportBundleInfo = z.preprocess(processResponseBody,z.object({"id": z.uuid(), +"reasonForCreation": z.string(), +"reasonForFailure": z.string().nullable().optional(), +"state": SupportBundleState, +"timeCreated": z.coerce.date(), +"userComment": z.string().nullable().optional(), +})) + +/** +* A single page of results + */ +export const SupportBundleInfoResultsPage = z.preprocess(processResponseBody,z.object({"items": SupportBundleInfo.array(), +"nextPage": z.string().nullable().optional(), +})) + +export const SupportBundleUpdate = z.preprocess(processResponseBody,z.object({"userComment": z.string().nullable().optional(), +})) + +/** +* An operator's view of a Switch. + */ +export const Switch = z.preprocess(processResponseBody,z.object({"baseboard": Baseboard, +"id": z.uuid(), +"rackId": z.uuid(), +"timeCreated": z.coerce.date(), +"timeModified": z.coerce.date(), +})) + +/** +* Describes the kind of an switch interface. + */ +export const SwitchInterfaceKind2 = z.preprocess(processResponseBody,z.enum(["primary", "vlan", "loopback"]) +) + +/** +* A switch port interface configuration for a port settings object. + */ +export const SwitchInterfaceConfig = z.preprocess(processResponseBody,z.object({"id": z.uuid(), +"interfaceName": Name, +"kind": SwitchInterfaceKind2, +"portSettingsId": z.uuid(), +"v6Enabled": SafeBoolean, +})) + +/** +* Indicates the kind for a switch interface. + */ +export const SwitchInterfaceKind = z.preprocess(processResponseBody,z.union([ +z.object({"type": z.enum(["primary"]), +}), +z.object({"type": z.enum(["vlan"]), +"vid": z.number().min(0).max(65535), +}), +z.object({"type": z.enum(["loopback"]), +}), +]) +) + +/** +* A layer-3 switch interface configuration. When IPv6 is enabled, a link local address will be created for the interface. + */ +export const SwitchInterfaceConfigCreate = z.preprocess(processResponseBody,z.object({"kind": SwitchInterfaceKind, +"linkName": Name, +"v6Enabled": SafeBoolean, +})) + +export const SwitchLinkState = z.preprocess(processResponseBody,z.record(z.string(), z.unknown())) + +/** +* A switch port represents a physical external port on a rack switch. + */ +export const SwitchPort = z.preprocess(processResponseBody,z.object({"id": z.uuid(), +"portName": Name, +"portSettingsId": z.uuid().nullable().optional(), +"rackId": z.uuid(), +"switchLocation": z.string(), +})) + +/** +* An IP address configuration for a port settings object. + */ +export const SwitchPortAddressView = z.preprocess(processResponseBody,z.object({"address": IpNet, +"addressLotBlockId": z.uuid(), +"addressLotId": z.uuid(), +"addressLotName": Name, +"interfaceName": Name, +"portSettingsId": z.uuid(), +"vlanId": z.number().min(0).max(65535).nullable().optional(), +})) + +/** +* Parameters for applying settings to switch ports. + */ +export const SwitchPortApplySettings = z.preprocess(processResponseBody,z.object({"portSettings": NameOrId, +})) + +/** +* The link geometry associated with a switch port. + */ +export const SwitchPortGeometry2 = z.preprocess(processResponseBody,z.enum(["qsfp28x1", "qsfp28x2", "sfp28x4"]) +) + +/** +* A physical port configuration for a port settings object. + */ +export const SwitchPortConfig = z.preprocess(processResponseBody,z.object({"geometry": SwitchPortGeometry2, +"portSettingsId": z.uuid(), +})) + +/** +* The link geometry associated with a switch port. + */ +export const SwitchPortGeometry = z.preprocess(processResponseBody,z.enum(["qsfp28x1", "qsfp28x2", "sfp28x4"]) +) + +/** +* Physical switch port configuration. + */ +export const SwitchPortConfigCreate = z.preprocess(processResponseBody,z.object({"geometry": SwitchPortGeometry, +})) + +/** +* Per-port tx-eq overrides. This can be used to fine-tune the transceiver equalization settings to improve signal integrity. + */ +export const TxEqConfig2 = z.preprocess(processResponseBody,z.object({"main": z.number().min(-2147483647).max(2147483647).nullable().optional(), +"post1": z.number().min(-2147483647).max(2147483647).nullable().optional(), +"post2": z.number().min(-2147483647).max(2147483647).nullable().optional(), +"pre1": z.number().min(-2147483647).max(2147483647).nullable().optional(), +"pre2": z.number().min(-2147483647).max(2147483647).nullable().optional(), +})) + +/** +* A link configuration for a port settings object. + */ +export const SwitchPortLinkConfig = z.preprocess(processResponseBody,z.object({"autoneg": SafeBoolean, +"fec": LinkFec.nullable().optional(), +"linkName": Name, +"lldpLinkConfig": LldpLinkConfig.nullable().optional(), +"mtu": z.number().min(0).max(65535), +"portSettingsId": z.uuid(), +"speed": LinkSpeed, +"txEqConfig": TxEqConfig2.nullable().optional(), +})) + +/** +* A single page of results + */ +export const SwitchPortResultsPage = z.preprocess(processResponseBody,z.object({"items": SwitchPort.array(), +"nextPage": z.string().nullable().optional(), +})) + +/** +* A route configuration for a port settings object. + */ +export const SwitchPortRouteConfig = z.preprocess(processResponseBody,z.object({"dst": IpNet, +"gw": z.ipv4(), +"interfaceName": Name, +"portSettingsId": z.uuid(), +"ribPriority": z.number().min(0).max(255).nullable().optional(), +"vlanId": z.number().min(0).max(65535).nullable().optional(), +})) + +/** +* This structure maps a port settings object to a port settings groups. Port settings objects may inherit settings from groups. This mapping defines the relationship between settings objects and the groups they reference. + */ +export const SwitchPortSettingsGroups = z.preprocess(processResponseBody,z.object({"portSettingsGroupId": z.uuid(), +"portSettingsId": z.uuid(), +})) + +/** +* A switch port VLAN interface configuration for a port settings object. + */ +export const SwitchVlanInterfaceConfig = z.preprocess(processResponseBody,z.object({"interfaceConfigId": z.uuid(), +"vlanId": z.number().min(0).max(65535), +})) + +/** +* 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. + */ +export const SwitchPortSettings = z.preprocess(processResponseBody,z.object({"addresses": SwitchPortAddressView.array(), +"bgpPeers": BgpPeer.array(), +"description": z.string(), +"groups": SwitchPortSettingsGroups.array(), +"id": z.uuid(), +"interfaces": SwitchInterfaceConfig.array(), +"links": SwitchPortLinkConfig.array(), +"name": Name, +"port": SwitchPortConfig, +"routes": SwitchPortRouteConfig.array(), +"timeCreated": z.coerce.date(), +"timeModified": z.coerce.date(), +"vlanInterfaces": SwitchVlanInterfaceConfig.array(), +})) + +/** +* Parameters for creating switch port settings. Switch port settings are the central data structure for setting up external networking. Switch port settings include link, interface, route, address and dynamic network protocol configuration. + */ +export const SwitchPortSettingsCreate = z.preprocess(processResponseBody,z.object({"addresses": AddressConfig.array(), +"bgpPeers": BgpPeerConfig.array().default([]).optional(), +"description": z.string(), +"groups": NameOrId.array().default([]).optional(), +"interfaces": SwitchInterfaceConfigCreate.array().default([]).optional(), +"links": LinkConfigCreate.array(), +"name": Name, +"portConfig": SwitchPortConfigCreate, +"routes": RouteConfig.array().default([]).optional(), +})) + +/** +* A switch port settings identity whose id may be used to view additional details. + */ +export const SwitchPortSettingsIdentity = z.preprocess(processResponseBody,z.object({"description": z.string(), +"id": z.uuid(), +"name": Name, +"timeCreated": z.coerce.date(), +"timeModified": z.coerce.date(), +})) + +/** +* A single page of results + */ +export const SwitchPortSettingsIdentityResultsPage = z.preprocess(processResponseBody,z.object({"items": SwitchPortSettingsIdentity.array(), +"nextPage": z.string().nullable().optional(), +})) + +/** +* A single page of results + */ +export const SwitchResultsPage = z.preprocess(processResponseBody,z.object({"items": Switch.array(), +"nextPage": z.string().nullable().optional(), +})) + +/** +* View of a system software target release + */ +export const TargetRelease = z.preprocess(processResponseBody,z.object({"timeRequested": z.coerce.date(), +"version": z.string().regex(/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/), +})) + +/** +* Text descriptions for the target and metric of a timeseries. + */ +export const TimeseriesDescription = z.preprocess(processResponseBody,z.object({"metric": z.string(), +"target": z.string(), +})) + +/** +* The name of a timeseries +* +* Names are constructed by concatenating the target and metric names with ':'. Target and metric names must be lowercase alphanumeric characters with '_' separating words. + */ +export const TimeseriesName = z.preprocess(processResponseBody,z.string().regex(/^(([a-z]+[a-z0-9]*)(_([a-z0-9]+))*):(([a-z]+[a-z0-9]*)(_([a-z0-9]+))*)$/)) + +/** +* A timeseries query string, written in the Oximeter query language. + */ +export const TimeseriesQuery = z.preprocess(processResponseBody,z.object({"query": z.string(), +})) + +/** +* Measurement units for timeseries samples. + */ +export const Units = z.preprocess(processResponseBody,z.union([ +z.enum(["count","bytes","seconds","nanoseconds","volts","amps","watts","degrees_celsius"]), +z.enum(["none"]), +z.enum(["rpm"]), +]) +) + +/** +* The schema for a timeseries. +* +* This includes the name of the timeseries, as well as the datum type of its metric and the schema for each field. + */ +export const TimeseriesSchema = z.preprocess(processResponseBody,z.object({"authzScope": AuthzScope, +"created": z.coerce.date(), +"datumType": DatumType, +"description": TimeseriesDescription, +"fieldSchema": FieldSchema.array().refine(...uniqueItems), +"timeseriesName": TimeseriesName, +"units": Units, +"version": z.number().min(1).max(255), +})) + +/** +* A single page of results + */ +export const TimeseriesSchemaResultsPage = z.preprocess(processResponseBody,z.object({"items": TimeseriesSchema.array(), +"nextPage": z.string().nullable().optional(), +})) + +/** +* Metadata about a TUF repository + */ +export const TufRepo = z.preprocess(processResponseBody,z.object({"fileName": z.string(), +"hash": z.string(), +"systemVersion": z.string().regex(/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/), +"timeCreated": z.coerce.date(), +})) + +/** +* A single page of results + */ +export const TufRepoResultsPage = z.preprocess(processResponseBody,z.object({"items": TufRepo.array(), +"nextPage": z.string().nullable().optional(), +})) + +/** +* Whether the uploaded TUF repo already existed or was new and had to be inserted. Part of `TufRepoUpload`. + */ +export const TufRepoUploadStatus = z.preprocess(processResponseBody,z.enum(["already_exists", "inserted"]) +) + +export const TufRepoUpload = z.preprocess(processResponseBody,z.object({"repo": TufRepo, +"status": TufRepoUploadStatus, +})) + +/** +* A sled that has not been added to an initialized rack yet + */ +export const UninitializedSled = z.preprocess(processResponseBody,z.object({"baseboard": Baseboard, +"cubby": z.number().min(0).max(65535), +"rackId": z.uuid(), +})) + +/** +* The unique hardware ID for a sled + */ +export const UninitializedSledId = z.preprocess(processResponseBody,z.object({"part": z.string(), +"serial": z.string(), +})) + +/** +* A single page of results + */ +export const UninitializedSledResultsPage = z.preprocess(processResponseBody,z.object({"items": UninitializedSled.array(), +"nextPage": z.string().nullable().optional(), +})) + +export const UpdateStatus = z.preprocess(processResponseBody,z.object({"componentsByReleaseVersion": z.record(z.string(),z.number().min(0)), +"suspended": SafeBoolean, +"targetRelease": TargetRelease.nullable(), +"timeLastStepPlanned": z.coerce.date(), +})) + +/** +* Trusted root role used by the update system to verify update repositories. + */ +export const UpdatesTrustRoot = z.preprocess(processResponseBody,z.object({"id": z.uuid(), +"rootRole": z.record(z.string(), z.unknown()), +"timeCreated": z.coerce.date(), +})) + +/** +* A single page of results + */ +export const UpdatesTrustRootResultsPage = z.preprocess(processResponseBody,z.object({"items": UpdatesTrustRoot.array(), +"nextPage": z.string().nullable().optional(), +})) + +/** +* View of a User + */ +export const User = z.preprocess(processResponseBody,z.object({"displayName": z.string(), +"id": z.uuid(), +"siloId": z.uuid(), +})) + +/** +* View of a Built-in User +* +* Built-in users are identities internal to the system, used when the control plane performs actions autonomously + */ +export const UserBuiltin = z.preprocess(processResponseBody,z.object({"description": z.string(), +"id": z.uuid(), +"name": Name, +"timeCreated": z.coerce.date(), +"timeModified": z.coerce.date(), +})) + +/** +* A single page of results + */ +export const UserBuiltinResultsPage = z.preprocess(processResponseBody,z.object({"items": UserBuiltin.array(), +"nextPage": z.string().nullable().optional(), +})) + +/** +* A username for a local-only user +* +* Usernames must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'. Usernames cannot be a UUID, but they may contain a UUID. They can be at most 63 characters long. + */ +export const UserId = z.preprocess(processResponseBody,z.string().min(1).max(63).regex(/^(?![0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)^[a-z]([a-zA-Z0-9-]*[a-zA-Z0-9]+)?$/)) + +/** +* Parameters for setting a user's password + */ +export const UserPassword = z.preprocess(processResponseBody,z.union([ +z.object({"mode": z.enum(["password"]), +"value": Password, +}), +z.object({"mode": z.enum(["login_disallowed"]), +}), +]) +) + +/** +* Create-time parameters for a `User` + */ +export const UserCreate = z.preprocess(processResponseBody,z.object({"externalId": UserId, +"password": UserPassword, +})) + +/** +* A single page of results + */ +export const UserResultsPage = z.preprocess(processResponseBody,z.object({"items": User.array(), +"nextPage": z.string().nullable().optional(), +})) + +/** +* Credentials for local user login + */ +export const UsernamePasswordCredentials = z.preprocess(processResponseBody,z.object({"password": Password, +"username": UserId, +})) + +/** +* View of the current silo's resource utilization and capacity + */ +export const Utilization = z.preprocess(processResponseBody,z.object({"capacity": VirtualResourceCounts, +"provisioned": VirtualResourceCounts, +})) + +/** +* View of a VPC + */ +export const Vpc = z.preprocess(processResponseBody,z.object({"description": z.string(), +"dnsName": Name, +"id": z.uuid(), +"ipv6Prefix": Ipv6Net, +"name": Name, +"projectId": z.uuid(), +"systemRouterId": z.uuid(), +"timeCreated": z.coerce.date(), +"timeModified": z.coerce.date(), +})) + +/** +* Create-time parameters for a `Vpc` + */ +export const VpcCreate = z.preprocess(processResponseBody,z.object({"description": z.string(), +"dnsName": Name, +"ipv6Prefix": Ipv6Net.nullable().optional(), +"name": Name, +})) + +export const VpcFirewallIcmpFilter = z.preprocess(processResponseBody,z.object({"code": IcmpParamRange.nullable().optional(), +"icmpType": z.number().min(0).max(255), +})) + +export const VpcFirewallRuleAction = z.preprocess(processResponseBody,z.enum(["allow","deny"])) + +export const VpcFirewallRuleDirection = z.preprocess(processResponseBody,z.enum(["inbound","outbound"])) + +/** +* The `VpcFirewallRuleHostFilter` is used to filter traffic on the basis of its source or destination host. + */ +export const VpcFirewallRuleHostFilter = z.preprocess(processResponseBody,z.union([ +z.object({"type": z.enum(["vpc"]), +"value": Name, +}), +z.object({"type": z.enum(["subnet"]), +"value": Name, +}), +z.object({"type": z.enum(["instance"]), +"value": Name, +}), +z.object({"type": z.enum(["ip"]), +"value": z.ipv4(), +}), +z.object({"type": z.enum(["ip_net"]), +"value": IpNet, +}), +]) +) + +/** +* The protocols that may be specified in a firewall rule's filter + */ +export const VpcFirewallRuleProtocol = z.preprocess(processResponseBody,z.union([ +z.object({"type": z.enum(["tcp"]), +}), +z.object({"type": z.enum(["udp"]), +}), +z.object({"type": z.enum(["icmp"]), +"value": VpcFirewallIcmpFilter.nullable(), +}), +]) +) + +/** +* 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 const VpcFirewallRuleFilter = z.preprocess(processResponseBody,z.object({"hosts": VpcFirewallRuleHostFilter.array().nullable().optional(), +"ports": L4PortRange.array().nullable().optional(), +"protocols": VpcFirewallRuleProtocol.array().nullable().optional(), +})) + +export const VpcFirewallRuleStatus = z.preprocess(processResponseBody,z.enum(["disabled","enabled"])) + +/** +* A `VpcFirewallRuleTarget` is used to specify the set of instances to which a firewall rule applies. You can target instances directly by name, or specify a VPC, VPC subnet, IP, or IP subnet, which will apply the rule to traffic going to all matching instances. Targets are additive: the rule applies to instances matching ANY target. + */ +export const VpcFirewallRuleTarget = z.preprocess(processResponseBody,z.union([ +z.object({"type": z.enum(["vpc"]), +"value": Name, +}), +z.object({"type": z.enum(["subnet"]), +"value": Name, +}), +z.object({"type": z.enum(["instance"]), +"value": Name, +}), +z.object({"type": z.enum(["ip"]), +"value": z.ipv4(), +}), +z.object({"type": z.enum(["ip_net"]), +"value": IpNet, +}), +]) +) + +/** +* A single rule in a VPC firewall + */ +export const VpcFirewallRule = z.preprocess(processResponseBody,z.object({"action": VpcFirewallRuleAction, +"description": z.string(), +"direction": VpcFirewallRuleDirection, +"filters": VpcFirewallRuleFilter, +"id": z.uuid(), +"name": Name, +"priority": z.number().min(0).max(65535), +"status": VpcFirewallRuleStatus, +"targets": VpcFirewallRuleTarget.array(), +"timeCreated": z.coerce.date(), +"timeModified": z.coerce.date(), +"vpcId": z.uuid(), +})) + +/** +* A single rule in a VPC firewall + */ +export const VpcFirewallRuleUpdate = z.preprocess(processResponseBody,z.object({"action": VpcFirewallRuleAction, +"description": z.string(), +"direction": VpcFirewallRuleDirection, +"filters": VpcFirewallRuleFilter, +"name": Name, +"priority": z.number().min(0).max(65535), +"status": VpcFirewallRuleStatus, +"targets": VpcFirewallRuleTarget.array(), +})) + +/** +* Updated list of firewall rules. Will replace all existing rules. + */ +export const VpcFirewallRuleUpdateParams = z.preprocess(processResponseBody,z.object({"rules": VpcFirewallRuleUpdate.array().default([]).optional(), +})) + +/** +* Collection of a Vpc's firewall rules + */ +export const VpcFirewallRules = z.preprocess(processResponseBody,z.object({"rules": VpcFirewallRule.array(), +})) + +/** +* A single page of results + */ +export const VpcResultsPage = z.preprocess(processResponseBody,z.object({"items": Vpc.array(), +"nextPage": z.string().nullable().optional(), +})) + +export const VpcRouterKind = z.preprocess(processResponseBody,z.enum(["system","custom"])) + +/** +* A VPC router defines a series of rules that indicate where traffic should be sent depending on its destination. + */ +export const VpcRouter = z.preprocess(processResponseBody,z.object({"description": z.string(), +"id": z.uuid(), +"kind": VpcRouterKind, +"name": Name, +"timeCreated": z.coerce.date(), +"timeModified": z.coerce.date(), +"vpcId": z.uuid(), +})) + +/** +* Create-time parameters for a `VpcRouter` + */ +export const VpcRouterCreate = z.preprocess(processResponseBody,z.object({"description": z.string(), +"name": Name, +})) + +/** +* A single page of results + */ +export const VpcRouterResultsPage = z.preprocess(processResponseBody,z.object({"items": VpcRouter.array(), +"nextPage": z.string().nullable().optional(), +})) + +/** +* Updateable properties of a `VpcRouter` + */ +export const VpcRouterUpdate = z.preprocess(processResponseBody,z.object({"description": z.string().nullable().optional(), +"name": Name.nullable().optional(), +})) + +/** +* A VPC subnet represents a logical grouping for instances that allows network traffic between them, within a IPv4 subnetwork or optionally an IPv6 subnetwork. + */ +export const VpcSubnet = z.preprocess(processResponseBody,z.object({"customRouterId": z.uuid().nullable().optional(), +"description": z.string(), +"id": z.uuid(), +"ipv4Block": Ipv4Net, +"ipv6Block": Ipv6Net, +"name": Name, +"timeCreated": z.coerce.date(), +"timeModified": z.coerce.date(), +"vpcId": z.uuid(), +})) + +/** +* Create-time parameters for a `VpcSubnet` + */ +export const VpcSubnetCreate = z.preprocess(processResponseBody,z.object({"customRouter": NameOrId.nullable().optional(), +"description": z.string(), +"ipv4Block": Ipv4Net, +"ipv6Block": Ipv6Net.nullable().optional(), +"name": Name, +})) + +/** +* A single page of results + */ +export const VpcSubnetResultsPage = z.preprocess(processResponseBody,z.object({"items": VpcSubnet.array(), +"nextPage": z.string().nullable().optional(), +})) + +/** +* Updateable properties of a `VpcSubnet` + */ +export const VpcSubnetUpdate = z.preprocess(processResponseBody,z.object({"customRouter": NameOrId.nullable().optional(), +"description": z.string().nullable().optional(), +"name": Name.nullable().optional(), +})) + +/** +* Updateable properties of a `Vpc` + */ +export const VpcUpdate = z.preprocess(processResponseBody,z.object({"description": z.string().nullable().optional(), +"dnsName": Name.nullable().optional(), +"name": Name.nullable().optional(), +})) + +/** +* Create-time identity-related parameters + */ +export const WebhookCreate = z.preprocess(processResponseBody,z.object({"description": z.string(), +"endpoint": z.string(), +"name": Name, +"secrets": z.string().array(), +"subscriptions": AlertSubscription.array().default([]).optional(), +})) + +/** +* The configuration for a webhook alert receiver. + */ +export const WebhookReceiver = z.preprocess(processResponseBody,z.object({"description": z.string(), +"endpoint": z.string(), +"id": z.uuid(), +"name": Name, +"secrets": WebhookSecret.array(), +"subscriptions": AlertSubscription.array(), +"timeCreated": z.coerce.date(), +"timeModified": z.coerce.date(), +})) + +/** +* Parameters to update a webhook configuration. + */ +export const WebhookReceiverUpdate = z.preprocess(processResponseBody,z.object({"description": z.string().nullable().optional(), +"endpoint": z.string().nullable().optional(), +"name": Name.nullable().optional(), +})) + +export const WebhookSecretCreate = z.preprocess(processResponseBody,z.object({"secret": z.string(), +})) + +/** +* A list of the IDs of secrets associated with a webhook receiver. + */ +export const WebhookSecrets = z.preprocess(processResponseBody,z.object({"secrets": WebhookSecret.array(), +})) + +/** +* Supported set of sort modes for scanning by name or id + */ +export const NameOrIdSortMode = z.preprocess(processResponseBody,z.enum(["name_ascending", "name_descending", "id_ascending"]) +) + +/** +* Supported set of sort modes for scanning by timestamp and ID + */ +export const TimeAndIdSortMode = z.preprocess(processResponseBody,z.enum(["time_and_id_ascending", "time_and_id_descending"]) +) + +/** +* Supported set of sort modes for scanning by id only. +* +* Currently, we only support scanning in ascending order. + */ +export const IdSortMode = z.preprocess(processResponseBody,z.enum(["id_ascending"])) + +export const SystemMetricName = z.preprocess(processResponseBody,z.enum(["virtual_disk_space_provisioned","cpus_provisioned","ram_provisioned"])) + +/** +* The order in which the client wants to page through the requested collection + */ +export const PaginationOrder = z.preprocess(processResponseBody,z.enum(["ascending","descending"])) + +/** +* Supported sort modes when scanning by semantic version + */ +export const VersionSortMode = z.preprocess(processResponseBody,z.enum(["version_ascending", "version_descending"]) +) + +/** +* Supported set of sort modes for scanning by name only +* +* Currently, we only support scanning in ascending order. + */ +export const NameSortMode = z.preprocess(processResponseBody,z.enum(["name_ascending"])) + +export const DeviceAuthRequestParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + }), + query: z.object({ + }), +})) + +export const DeviceAuthConfirmParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + }), + query: z.object({ + }), +})) + +export const DeviceAccessTokenParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + }), + query: z.object({ + }), +})) + +export const ProbeListParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + }), + query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + project: NameOrId.optional(), + sortBy: NameOrIdSortMode.optional(), + }), +})) + +export const ProbeCreateParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + }), + query: z.object({ + project: NameOrId, + }), +})) + +export const ProbeViewParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + probe: NameOrId, + }), + query: z.object({ + project: NameOrId, + }), +})) + +export const ProbeDeleteParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + probe: NameOrId, + }), + query: z.object({ + project: NameOrId, + }), +})) + +export const SupportBundleListParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + }), + query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + sortBy: TimeAndIdSortMode.optional(), + }), +})) + +export const SupportBundleCreateParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + }), + query: z.object({ + }), +})) + +export const SupportBundleViewParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + bundleId: z.uuid(), + }), + query: z.object({ + }), +})) + +export const SupportBundleUpdateParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + bundleId: z.uuid(), + }), + query: z.object({ + }), +})) + +export const SupportBundleDeleteParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + bundleId: z.uuid(), + }), + query: z.object({ + }), +})) + +export const SupportBundleDownloadParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + bundleId: z.uuid(), + }), + query: z.object({ + }), +})) + +export const SupportBundleHeadParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + bundleId: z.uuid(), + }), + query: z.object({ + }), +})) + +export const SupportBundleDownloadFileParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + bundleId: z.uuid(), + file: z.string(), + }), + query: z.object({ + }), +})) + +export const SupportBundleHeadFileParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + bundleId: z.uuid(), + file: z.string(), + }), + query: z.object({ + }), +})) + +export const SupportBundleIndexParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + bundleId: z.uuid(), + }), + query: z.object({ + }), +})) + +export const LoginSamlParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + providerName: Name, + siloName: Name, + }), + query: z.object({ + }), +})) + +export const AffinityGroupListParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + }), + query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + project: NameOrId.optional(), + sortBy: NameOrIdSortMode.optional(), + }), +})) + +export const AffinityGroupCreateParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + }), + query: z.object({ + project: NameOrId, + }), +})) + +export const AffinityGroupViewParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + affinityGroup: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), +})) + +export const AffinityGroupUpdateParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + affinityGroup: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), +})) + +export const AffinityGroupDeleteParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + affinityGroup: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), +})) + +export const AffinityGroupMemberListParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + affinityGroup: NameOrId, + }), + query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + project: NameOrId.optional(), + sortBy: NameOrIdSortMode.optional(), + }), +})) + +export const AffinityGroupMemberInstanceViewParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + affinityGroup: NameOrId, + instance: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), +})) + +export const AffinityGroupMemberInstanceAddParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + affinityGroup: NameOrId, + instance: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), +})) + +export const AffinityGroupMemberInstanceDeleteParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + affinityGroup: NameOrId, + instance: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), +})) + +export const AlertClassListParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + }), + query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + filter: AlertSubscription.optional(), + }), +})) + +export const AlertReceiverListParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + }), + query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + sortBy: NameOrIdSortMode.optional(), + }), +})) + +export const AlertReceiverViewParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + receiver: NameOrId, + }), + query: z.object({ + }), +})) + +export const AlertReceiverDeleteParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + receiver: NameOrId, + }), + query: z.object({ + }), +})) + +export const AlertDeliveryListParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + receiver: NameOrId, + }), + query: z.object({ + delivered: SafeBoolean.nullable().optional(), + failed: SafeBoolean.nullable().optional(), + pending: SafeBoolean.nullable().optional(), + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + sortBy: TimeAndIdSortMode.optional(), + }), +})) + +export const AlertReceiverProbeParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + receiver: NameOrId, + }), + query: z.object({ + resend: SafeBoolean.optional(), + }), +})) + +export const AlertReceiverSubscriptionAddParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + receiver: NameOrId, + }), + query: z.object({ + }), +})) + +export const AlertReceiverSubscriptionRemoveParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + receiver: NameOrId, + subscription: AlertSubscription, + }), + query: z.object({ + }), +})) + +export const AlertDeliveryResendParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + alertId: z.uuid(), + }), + query: z.object({ + receiver: NameOrId, + }), +})) + +export const AntiAffinityGroupListParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + }), + query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + project: NameOrId.optional(), + sortBy: NameOrIdSortMode.optional(), + }), +})) + +export const AntiAffinityGroupCreateParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + }), + query: z.object({ + project: NameOrId, + }), +})) + +export const AntiAffinityGroupViewParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + antiAffinityGroup: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), +})) + +export const AntiAffinityGroupUpdateParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + antiAffinityGroup: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), +})) + +export const AntiAffinityGroupDeleteParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + antiAffinityGroup: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), +})) + +export const AntiAffinityGroupMemberListParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + antiAffinityGroup: NameOrId, + }), + query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + project: NameOrId.optional(), + sortBy: NameOrIdSortMode.optional(), + }), +})) + +export const AntiAffinityGroupMemberInstanceViewParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + antiAffinityGroup: NameOrId, + instance: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), +})) + +export const AntiAffinityGroupMemberInstanceAddParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + antiAffinityGroup: NameOrId, + instance: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), +})) + +export const AntiAffinityGroupMemberInstanceDeleteParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + antiAffinityGroup: NameOrId, + instance: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), +})) + +export const AuthSettingsViewParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + }), + query: z.object({ + }), +})) + +export const AuthSettingsUpdateParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + }), + query: z.object({ + }), +})) + +export const CertificateListParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + }), + query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + sortBy: NameOrIdSortMode.optional(), + }), +})) + +export const CertificateCreateParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + }), + query: z.object({ + }), +})) + +export const CertificateViewParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + certificate: NameOrId, + }), + query: z.object({ + }), +})) + +export const CertificateDeleteParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + certificate: NameOrId, + }), + query: z.object({ + }), +})) + +export const DiskListParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + }), + query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + project: NameOrId.optional(), + sortBy: NameOrIdSortMode.optional(), + }), +})) + +export const DiskCreateParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + }), + query: z.object({ + project: NameOrId, + }), +})) + +export const DiskViewParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + disk: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), +})) + +export const DiskDeleteParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + disk: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), +})) + +export const DiskBulkWriteImportParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + disk: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), +})) + +export const DiskBulkWriteImportStartParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + disk: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), +})) + +export const DiskBulkWriteImportStopParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + disk: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), +})) + +export const DiskFinalizeImportParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + disk: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), +})) + +export const FloatingIpListParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + }), + query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + project: NameOrId.optional(), + sortBy: NameOrIdSortMode.optional(), + }), +})) + +export const FloatingIpCreateParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + }), + query: z.object({ + project: NameOrId, + }), +})) + +export const FloatingIpViewParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + floatingIp: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), +})) + +export const FloatingIpUpdateParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + floatingIp: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), +})) + +export const FloatingIpDeleteParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + floatingIp: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), +})) + +export const FloatingIpAttachParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + floatingIp: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), +})) + +export const FloatingIpDetachParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + floatingIp: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), +})) + +export const GroupListParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + }), + query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + sortBy: IdSortMode.optional(), + }), +})) + +export const GroupViewParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + groupId: z.uuid(), + }), + query: z.object({ + }), +})) + +export const ImageListParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + }), + query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + project: NameOrId.optional(), + sortBy: NameOrIdSortMode.optional(), + }), +})) + +export const ImageCreateParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + }), + query: z.object({ + project: NameOrId.optional(), + }), +})) + +export const ImageViewParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + image: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), +})) + +export const ImageDeleteParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + image: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), +})) + +export const ImageDemoteParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + image: NameOrId, + }), + query: z.object({ + project: NameOrId, + }), +})) + +export const ImagePromoteParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + image: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), +})) + +export const InstanceListParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + }), + query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + project: NameOrId.optional(), + sortBy: NameOrIdSortMode.optional(), + }), +})) + +export const InstanceCreateParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + }), + query: z.object({ + project: NameOrId, + }), +})) + +export const InstanceViewParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + instance: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), +})) + +export const InstanceUpdateParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + instance: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), +})) + +export const InstanceDeleteParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + instance: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), +})) + +export const InstanceAffinityGroupListParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + instance: NameOrId, + }), + query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + project: NameOrId.optional(), + sortBy: NameOrIdSortMode.optional(), + }), +})) + +export const InstanceAntiAffinityGroupListParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + instance: NameOrId, + }), + query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + project: NameOrId.optional(), + sortBy: NameOrIdSortMode.optional(), + }), +})) + +export const InstanceDiskListParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + instance: NameOrId, + }), + query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + project: NameOrId.optional(), + sortBy: NameOrIdSortMode.optional(), + }), +})) + +export const InstanceDiskAttachParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + instance: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), +})) + +export const InstanceDiskDetachParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + instance: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), +})) + +export const InstanceExternalIpListParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + instance: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), +})) + +export const InstanceEphemeralIpAttachParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + instance: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), +})) + +export const InstanceEphemeralIpDetachParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + instance: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), +})) + +export const InstanceMulticastGroupListParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + instance: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), +})) + +export const InstanceMulticastGroupJoinParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + instance: NameOrId, + multicastGroup: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), +})) + +export const InstanceMulticastGroupLeaveParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + instance: NameOrId, + multicastGroup: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), +})) + +export const InstanceRebootParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + instance: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), +})) + +export const InstanceSerialConsoleParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + instance: NameOrId, + }), + query: z.object({ + fromStart: z.number().min(0).nullable().optional(), + maxBytes: z.number().min(0).nullable().optional(), + mostRecent: z.number().min(0).nullable().optional(), + project: NameOrId.optional(), + }), +})) + +export const InstanceSerialConsoleStreamParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + instance: NameOrId, + }), + query: z.object({ + mostRecent: z.number().min(0).nullable().optional(), + project: NameOrId.optional(), + }), })) -export const VpcFirewallRuleStatus = z.preprocess(processResponseBody,z.enum(["disabled","enabled"])) - -/** -* A `VpcFirewallRuleTarget` is used to specify the set of `Instance`s to which a firewall rule applies. - */ -export const VpcFirewallRuleTarget = z.preprocess(processResponseBody,z.union([ -z.object({"type": z.enum(["vpc"]), -"value": Name, -}), -z.object({"type": z.enum(["subnet"]), -"value": Name, -}), -z.object({"type": z.enum(["instance"]), -"value": Name, -}), -z.object({"type": z.enum(["ip"]), -"value": z.ipv4(), -}), -z.object({"type": z.enum(["ip_net"]), -"value": IpNet, -}), -]) -) +export const InstanceSshPublicKeyListParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + instance: NameOrId, + }), + query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + project: NameOrId.optional(), + sortBy: NameOrIdSortMode.optional(), + }), +})) -/** -* A single rule in a VPC firewall - */ -export const VpcFirewallRule = z.preprocess(processResponseBody,z.object({"action": VpcFirewallRuleAction, -"description": z.string(), -"direction": VpcFirewallRuleDirection, -"filters": VpcFirewallRuleFilter, -"id": z.uuid(), -"name": Name, -"priority": z.number().min(0).max(65535), -"status": VpcFirewallRuleStatus, -"targets": VpcFirewallRuleTarget.array(), -"timeCreated": z.coerce.date(), -"timeModified": z.coerce.date(), -"vpcId": z.uuid(), +export const InstanceStartParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + instance: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), })) -/** -* A single rule in a VPC firewall - */ -export const VpcFirewallRuleUpdate = z.preprocess(processResponseBody,z.object({"action": VpcFirewallRuleAction, -"description": z.string(), -"direction": VpcFirewallRuleDirection, -"filters": VpcFirewallRuleFilter, -"name": Name, -"priority": z.number().min(0).max(65535), -"status": VpcFirewallRuleStatus, -"targets": VpcFirewallRuleTarget.array(), +export const InstanceStopParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + instance: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + }), })) -/** -* Updateable properties of a `Vpc`'s firewall Note that VpcFirewallRules are implicitly created along with a Vpc, so there is no explicit creation. - */ -export const VpcFirewallRuleUpdateParams = z.preprocess(processResponseBody,z.object({"rules": VpcFirewallRuleUpdate.array(), +export const InternetGatewayIpAddressListParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + }), + query: z.object({ + gateway: NameOrId.optional(), + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + project: NameOrId.optional(), + sortBy: NameOrIdSortMode.optional(), + vpc: NameOrId.optional(), + }), })) -/** -* Collection of a Vpc's firewall rules - */ -export const VpcFirewallRules = z.preprocess(processResponseBody,z.object({"rules": VpcFirewallRule.array(), +export const InternetGatewayIpAddressCreateParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + }), + query: z.object({ + gateway: NameOrId, + project: NameOrId.optional(), + vpc: NameOrId.optional(), + }), })) -/** -* A single page of results - */ -export const VpcResultsPage = z.preprocess(processResponseBody,z.object({"items": Vpc.array(), -"nextPage": z.string().nullable().optional(), +export const InternetGatewayIpAddressDeleteParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + address: NameOrId, + }), + query: z.object({ + cascade: SafeBoolean.optional(), + gateway: NameOrId.optional(), + project: NameOrId.optional(), + vpc: NameOrId.optional(), + }), })) -/** -* A VPC subnet represents a logical grouping for instances that allows network traffic between them, within a IPv4 subnetwork or optionall an IPv6 subnetwork. - */ -export const VpcSubnet = z.preprocess(processResponseBody,z.object({"description": z.string(), -"id": z.uuid(), -"ipv4Block": Ipv4Net, -"ipv6Block": Ipv6Net, -"name": Name, -"timeCreated": z.coerce.date(), -"timeModified": z.coerce.date(), -"vpcId": z.uuid(), +export const InternetGatewayIpPoolListParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + }), + query: z.object({ + gateway: NameOrId.optional(), + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + project: NameOrId.optional(), + sortBy: NameOrIdSortMode.optional(), + vpc: NameOrId.optional(), + }), })) -/** -* Create-time parameters for a `VpcSubnet` - */ -export const VpcSubnetCreate = z.preprocess(processResponseBody,z.object({"description": z.string(), -"ipv4Block": Ipv4Net, -"ipv6Block": Ipv6Net.nullable().optional(), -"name": Name, +export const InternetGatewayIpPoolCreateParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + }), + query: z.object({ + gateway: NameOrId, + project: NameOrId.optional(), + vpc: NameOrId.optional(), + }), })) -/** -* A single page of results - */ -export const VpcSubnetResultsPage = z.preprocess(processResponseBody,z.object({"items": VpcSubnet.array(), -"nextPage": z.string().nullable().optional(), +export const InternetGatewayIpPoolDeleteParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + pool: NameOrId, + }), + query: z.object({ + cascade: SafeBoolean.optional(), + gateway: NameOrId.optional(), + project: NameOrId.optional(), + vpc: NameOrId.optional(), + }), })) -/** -* Updateable properties of a `VpcSubnet` - */ -export const VpcSubnetUpdate = z.preprocess(processResponseBody,z.object({"description": z.string().nullable().optional(), -"name": Name.nullable().optional(), +export const InternetGatewayListParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + }), + query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + project: NameOrId.optional(), + sortBy: NameOrIdSortMode.optional(), + vpc: NameOrId.optional(), + }), })) -/** -* Updateable properties of a `Vpc` - */ -export const VpcUpdate = z.preprocess(processResponseBody,z.object({"description": z.string().nullable().optional(), -"dnsName": Name.nullable().optional(), -"name": Name.nullable().optional(), +export const InternetGatewayCreateParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + }), + query: z.object({ + project: NameOrId.optional(), + vpc: NameOrId, + }), })) -/** -* Supported set of sort modes for scanning by name or id - */ -export const NameOrIdSortMode = z.preprocess(processResponseBody,z.enum(["name_ascending", "name_descending", "id_ascending"]) -) +export const InternetGatewayViewParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + gateway: NameOrId, + }), + query: z.object({ + project: NameOrId.optional(), + vpc: NameOrId.optional(), + }), +})) -export const DiskMetricName = z.preprocess(processResponseBody,z.enum(["activated","flush","read","read_bytes","write","write_bytes"])) +export const InternetGatewayDeleteParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + gateway: NameOrId, + }), + query: z.object({ + cascade: SafeBoolean.optional(), + project: NameOrId.optional(), + vpc: NameOrId.optional(), + }), +})) -/** -* The order in which the client wants to page through the requested collection - */ -export const PaginationOrder = z.preprocess(processResponseBody,z.enum(["ascending","descending"])) +export const ProjectIpPoolListParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + }), + query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + sortBy: NameOrIdSortMode.optional(), + }), +})) -/** -* Supported set of sort modes for scanning by id only. -* -* Currently, we only support scanning in ascending order. - */ -export const IdSortMode = z.preprocess(processResponseBody,z.enum(["id_ascending"])) +export const ProjectIpPoolViewParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + pool: NameOrId, + }), + query: z.object({ + }), +})) -export const SystemMetricName = z.preprocess(processResponseBody,z.enum(["virtual_disk_space_provisioned","cpus_provisioned","ram_provisioned"])) +export const LoginLocalParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + siloName: Name, + }), + query: z.object({ + }), +})) -/** -* Supported set of sort modes for scanning by name only -* -* Currently, we only support scanning in ascending order. - */ -export const NameSortMode = z.preprocess(processResponseBody,z.enum(["name_ascending"])) +export const LogoutParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + }), + query: z.object({ + }), +})) -export const DeviceAuthRequestParams = z.preprocess(processResponseBody, z.object({ +export const CurrentUserViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ }), })) -export const DeviceAuthConfirmParams = z.preprocess(processResponseBody, z.object({ +export const CurrentUserAccessTokenListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + sortBy: IdSortMode.optional(), }), })) -export const DeviceAccessTokenParams = z.preprocess(processResponseBody, z.object({ +export const CurrentUserAccessTokenDeleteParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + tokenId: z.uuid(), }), query: z.object({ }), })) -export const LoginSamlParams = z.preprocess(processResponseBody, z.object({ +export const CurrentUserGroupsParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - providerName: Name, - siloName: Name, }), query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + sortBy: IdSortMode.optional(), }), })) -export const CertificateListParams = z.preprocess(processResponseBody, z.object({ +export const CurrentUserSshKeyListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ @@ -2491,121 +5135,119 @@ export const CertificateListParams = z.preprocess(processResponseBody, z.object( }), })) -export const CertificateCreateParams = z.preprocess(processResponseBody, z.object({ +export const CurrentUserSshKeyCreateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ }), })) -export const CertificateViewParams = z.preprocess(processResponseBody, z.object({ +export const CurrentUserSshKeyViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - certificate: NameOrId, + sshKey: NameOrId, }), query: z.object({ }), })) -export const CertificateDeleteParams = z.preprocess(processResponseBody, z.object({ +export const CurrentUserSshKeyDeleteParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - certificate: NameOrId, + sshKey: NameOrId, }), query: z.object({ }), })) -export const DiskListParams = z.preprocess(processResponseBody, z.object({ +export const SiloMetricParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + metricName: SystemMetricName, }), query: z.object({ + endTime: z.coerce.date().optional(), limit: z.number().min(1).max(4294967295).nullable().optional(), + order: PaginationOrder.optional(), pageToken: z.string().nullable().optional(), + startTime: z.coerce.date().optional(), project: NameOrId.optional(), - sortBy: NameOrIdSortMode.optional(), }), })) -export const DiskCreateParams = z.preprocess(processResponseBody, z.object({ +export const MulticastGroupListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ - project: NameOrId, + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + sortBy: NameOrIdSortMode.optional(), }), })) -export const DiskViewParams = z.preprocess(processResponseBody, z.object({ +export const MulticastGroupCreateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - disk: NameOrId, }), query: z.object({ - project: NameOrId.optional(), }), })) -export const DiskDeleteParams = z.preprocess(processResponseBody, z.object({ +export const MulticastGroupViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - disk: NameOrId, + multicastGroup: NameOrId, }), query: z.object({ - project: NameOrId.optional(), }), })) -export const DiskBulkWriteImportParams = z.preprocess(processResponseBody, z.object({ +export const MulticastGroupUpdateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - disk: NameOrId, + multicastGroup: NameOrId, }), query: z.object({ - project: NameOrId.optional(), }), })) -export const DiskBulkWriteImportStartParams = z.preprocess(processResponseBody, z.object({ +export const MulticastGroupDeleteParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - disk: NameOrId, + multicastGroup: NameOrId, }), query: z.object({ - project: NameOrId.optional(), }), })) -export const DiskBulkWriteImportStopParams = z.preprocess(processResponseBody, z.object({ +export const MulticastGroupMemberListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - disk: NameOrId, + multicastGroup: NameOrId, }), query: z.object({ - project: NameOrId.optional(), + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + sortBy: IdSortMode.optional(), }), })) -export const DiskFinalizeImportParams = z.preprocess(processResponseBody, z.object({ +export const MulticastGroupMemberAddParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - disk: NameOrId, + multicastGroup: NameOrId, }), query: z.object({ project: NameOrId.optional(), }), })) -export const DiskMetricsListParams = z.preprocess(processResponseBody, z.object({ +export const MulticastGroupMemberRemoveParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - disk: NameOrId, - metric: DiskMetricName, + instance: NameOrId, + multicastGroup: NameOrId, }), query: z.object({ - endTime: z.coerce.date().optional(), - limit: z.number().min(1).max(4294967295).nullable().optional(), - order: PaginationOrder.optional(), - pageToken: z.string().nullable().optional(), - startTime: z.coerce.date().optional(), project: NameOrId.optional(), }), })) -export const FloatingIpListParams = z.preprocess(processResponseBody, z.object({ +export const InstanceNetworkInterfaceListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ + instance: NameOrId.optional(), limit: z.number().min(1).max(4294967295).nullable().optional(), pageToken: z.string().nullable().optional(), project: NameOrId.optional(), @@ -2613,133 +5255,124 @@ export const FloatingIpListParams = z.preprocess(processResponseBody, z.object({ }), })) -export const FloatingIpCreateParams = z.preprocess(processResponseBody, z.object({ +export const InstanceNetworkInterfaceCreateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ - project: NameOrId, + instance: NameOrId, + project: NameOrId.optional(), }), })) -export const FloatingIpViewParams = z.preprocess(processResponseBody, z.object({ +export const InstanceNetworkInterfaceViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - floatingIp: NameOrId, + interface: NameOrId, }), query: z.object({ + instance: NameOrId.optional(), project: NameOrId.optional(), }), })) -export const FloatingIpUpdateParams = z.preprocess(processResponseBody, z.object({ +export const InstanceNetworkInterfaceUpdateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - floatingIp: NameOrId, + interface: NameOrId, }), query: z.object({ + instance: NameOrId.optional(), project: NameOrId.optional(), }), })) -export const FloatingIpDeleteParams = z.preprocess(processResponseBody, z.object({ +export const InstanceNetworkInterfaceDeleteParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - floatingIp: NameOrId, + interface: NameOrId, }), query: z.object({ + instance: NameOrId.optional(), project: NameOrId.optional(), }), })) -export const FloatingIpAttachParams = z.preprocess(processResponseBody, z.object({ +export const PingParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - floatingIp: NameOrId, }), query: z.object({ - project: NameOrId.optional(), }), })) -export const FloatingIpDetachParams = z.preprocess(processResponseBody, z.object({ +export const PolicyViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - floatingIp: NameOrId, }), query: z.object({ - project: NameOrId.optional(), }), })) -export const GroupListParams = z.preprocess(processResponseBody, z.object({ +export const PolicyUpdateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - sortBy: IdSortMode.optional(), }), })) -export const GroupViewParams = z.preprocess(processResponseBody, z.object({ +export const ProjectListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - groupId: z.uuid(), }), query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + sortBy: NameOrIdSortMode.optional(), }), })) -export const ImageListParams = z.preprocess(processResponseBody, z.object({ +export const ProjectCreateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - project: NameOrId.optional(), - sortBy: NameOrIdSortMode.optional(), }), })) -export const ImageCreateParams = z.preprocess(processResponseBody, z.object({ +export const ProjectViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + project: NameOrId, }), query: z.object({ - project: NameOrId.optional(), }), })) -export const ImageViewParams = z.preprocess(processResponseBody, z.object({ +export const ProjectUpdateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - image: NameOrId, + project: NameOrId, }), query: z.object({ - project: NameOrId.optional(), }), })) -export const ImageDeleteParams = z.preprocess(processResponseBody, z.object({ +export const ProjectDeleteParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - image: NameOrId, + project: NameOrId, }), query: z.object({ - project: NameOrId.optional(), }), })) -export const ImageDemoteParams = z.preprocess(processResponseBody, z.object({ +export const ProjectPolicyViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - image: NameOrId, + project: NameOrId, }), query: z.object({ - project: NameOrId, }), })) -export const ImagePromoteParams = z.preprocess(processResponseBody, z.object({ +export const ProjectPolicyUpdateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - image: NameOrId, + project: NameOrId, }), query: z.object({ - project: NameOrId.optional(), }), })) -export const InstanceListParams = z.preprocess(processResponseBody, z.object({ +export const SnapshotListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ @@ -2750,7 +5383,7 @@ export const InstanceListParams = z.preprocess(processResponseBody, z.object({ }), })) -export const InstanceCreateParams = z.preprocess(processResponseBody, z.object({ +export const SnapshotCreateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ @@ -2758,758 +5391,748 @@ export const InstanceCreateParams = z.preprocess(processResponseBody, z.object({ }), })) -export const InstanceViewParams = z.preprocess(processResponseBody, z.object({ +export const SnapshotViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - instance: NameOrId, + snapshot: NameOrId, }), query: z.object({ project: NameOrId.optional(), }), })) -export const InstanceDeleteParams = z.preprocess(processResponseBody, z.object({ +export const SnapshotDeleteParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - instance: NameOrId, + snapshot: NameOrId, }), query: z.object({ project: NameOrId.optional(), }), })) -export const InstanceDiskListParams = z.preprocess(processResponseBody, z.object({ +export const AuditLogListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - instance: NameOrId, }), query: z.object({ + endTime: z.coerce.date().nullable().optional(), limit: z.number().min(1).max(4294967295).nullable().optional(), pageToken: z.string().nullable().optional(), - project: NameOrId.optional(), - sortBy: NameOrIdSortMode.optional(), + sortBy: TimeAndIdSortMode.optional(), + startTime: z.coerce.date().optional(), }), })) -export const InstanceDiskAttachParams = z.preprocess(processResponseBody, z.object({ +export const PhysicalDiskListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - instance: NameOrId, }), query: z.object({ - project: NameOrId.optional(), + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + sortBy: IdSortMode.optional(), }), })) -export const InstanceDiskDetachParams = z.preprocess(processResponseBody, z.object({ +export const PhysicalDiskViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - instance: NameOrId, + diskId: z.uuid(), }), query: z.object({ - project: NameOrId.optional(), }), })) -export const InstanceExternalIpListParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingSwitchPortLldpNeighborsParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - instance: NameOrId, + port: Name, + rackId: z.uuid(), + switchLocation: Name, }), query: z.object({ - project: NameOrId.optional(), + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + sortBy: IdSortMode.optional(), }), })) -export const InstanceEphemeralIpAttachParams = z.preprocess(processResponseBody, z.object({ +export const RackListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - instance: NameOrId, }), query: z.object({ - project: NameOrId.optional(), + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + sortBy: IdSortMode.optional(), }), })) -export const InstanceEphemeralIpDetachParams = z.preprocess(processResponseBody, z.object({ +export const RackViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - instance: NameOrId, + rackId: z.uuid(), }), query: z.object({ - project: NameOrId.optional(), }), })) -export const InstanceMigrateParams = z.preprocess(processResponseBody, z.object({ +export const SledListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - instance: NameOrId, }), query: z.object({ - project: NameOrId.optional(), + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + sortBy: IdSortMode.optional(), }), })) -export const InstanceRebootParams = z.preprocess(processResponseBody, z.object({ +export const SledAddParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - instance: NameOrId, }), query: z.object({ - project: NameOrId.optional(), }), })) -export const InstanceSerialConsoleParams = z.preprocess(processResponseBody, z.object({ +export const SledViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - instance: NameOrId, + sledId: z.uuid(), }), query: z.object({ - fromStart: z.number().min(0).nullable().optional(), - maxBytes: z.number().min(0).nullable().optional(), - mostRecent: z.number().min(0).nullable().optional(), - project: NameOrId.optional(), }), })) -export const InstanceSerialConsoleStreamParams = z.preprocess(processResponseBody, z.object({ +export const SledPhysicalDiskListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - instance: NameOrId, + sledId: z.uuid(), }), query: z.object({ - mostRecent: z.number().min(0).nullable().optional(), - project: NameOrId.optional(), + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + sortBy: IdSortMode.optional(), }), })) -export const InstanceSshPublicKeyListParams = z.preprocess(processResponseBody, z.object({ +export const SledInstanceListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - instance: NameOrId, + sledId: z.uuid(), }), query: z.object({ limit: z.number().min(1).max(4294967295).nullable().optional(), pageToken: z.string().nullable().optional(), - project: NameOrId.optional(), - sortBy: NameOrIdSortMode.optional(), + sortBy: IdSortMode.optional(), }), })) -export const InstanceStartParams = z.preprocess(processResponseBody, z.object({ +export const SledSetProvisionPolicyParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - instance: NameOrId, + sledId: z.uuid(), }), query: z.object({ - project: NameOrId.optional(), }), })) -export const InstanceStopParams = z.preprocess(processResponseBody, z.object({ +export const SledListUninitializedParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - instance: NameOrId, }), query: z.object({ - project: NameOrId.optional(), + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), }), })) -export const ProjectIpPoolListParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingSwitchPortListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ limit: z.number().min(1).max(4294967295).nullable().optional(), pageToken: z.string().nullable().optional(), - sortBy: NameOrIdSortMode.optional(), + sortBy: IdSortMode.optional(), + switchPortId: z.uuid().nullable().optional(), }), })) -export const ProjectIpPoolViewParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingSwitchPortLldpConfigViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - pool: NameOrId, + port: Name, }), query: z.object({ + rackId: z.uuid(), + switchLocation: Name, }), })) -export const LoginLocalParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingSwitchPortLldpConfigUpdateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - siloName: Name, + port: Name, }), query: z.object({ + rackId: z.uuid(), + switchLocation: Name, }), })) -export const LogoutParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingSwitchPortApplySettingsParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + port: Name, + }), + query: z.object({ + rackId: z.uuid(), + switchLocation: Name, + }), +})) + +export const NetworkingSwitchPortClearSettingsParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + port: Name, + }), + query: z.object({ + rackId: z.uuid(), + switchLocation: Name, + }), +})) + +export const NetworkingSwitchPortStatusParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + port: Name, + }), + query: z.object({ + rackId: z.uuid(), + switchLocation: Name, + }), +})) + +export const SwitchListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + sortBy: IdSortMode.optional(), }), })) -export const CurrentUserViewParams = z.preprocess(processResponseBody, z.object({ +export const SwitchViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + switchId: z.uuid(), }), query: z.object({ }), })) -export const CurrentUserGroupsParams = z.preprocess(processResponseBody, z.object({ +export const SiloIdentityProviderListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ limit: z.number().min(1).max(4294967295).nullable().optional(), pageToken: z.string().nullable().optional(), - sortBy: IdSortMode.optional(), + silo: NameOrId.optional(), + sortBy: NameOrIdSortMode.optional(), }), })) -export const CurrentUserSshKeyListParams = z.preprocess(processResponseBody, z.object({ +export const LocalIdpUserCreateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - sortBy: NameOrIdSortMode.optional(), + silo: NameOrId, }), })) -export const CurrentUserSshKeyCreateParams = z.preprocess(processResponseBody, z.object({ +export const LocalIdpUserDeleteParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + userId: z.uuid(), }), query: z.object({ + silo: NameOrId, }), })) -export const CurrentUserSshKeyViewParams = z.preprocess(processResponseBody, z.object({ +export const LocalIdpUserSetPasswordParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - sshKey: NameOrId, + userId: z.uuid(), }), query: z.object({ + silo: NameOrId, }), })) -export const CurrentUserSshKeyDeleteParams = z.preprocess(processResponseBody, z.object({ +export const SamlIdentityProviderCreateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - sshKey: NameOrId, }), query: z.object({ + silo: NameOrId, }), })) -export const SiloMetricParams = z.preprocess(processResponseBody, z.object({ +export const SamlIdentityProviderViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - metricName: SystemMetricName, + provider: NameOrId, }), query: z.object({ - endTime: z.coerce.date().optional(), - limit: z.number().min(1).max(4294967295).nullable().optional(), - order: PaginationOrder.optional(), - pageToken: z.string().nullable().optional(), - startTime: z.coerce.date().optional(), - project: NameOrId.optional(), + silo: NameOrId.optional(), }), })) -export const InstanceNetworkInterfaceListParams = z.preprocess(processResponseBody, z.object({ +export const IpPoolListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ - instance: NameOrId.optional(), limit: z.number().min(1).max(4294967295).nullable().optional(), pageToken: z.string().nullable().optional(), - project: NameOrId.optional(), sortBy: NameOrIdSortMode.optional(), }), })) -export const InstanceNetworkInterfaceCreateParams = z.preprocess(processResponseBody, z.object({ +export const IpPoolCreateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ - instance: NameOrId, - project: NameOrId.optional(), }), })) -export const InstanceNetworkInterfaceViewParams = z.preprocess(processResponseBody, z.object({ +export const IpPoolViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - interface: NameOrId, + pool: NameOrId, }), query: z.object({ - instance: NameOrId.optional(), - project: NameOrId.optional(), }), })) -export const InstanceNetworkInterfaceUpdateParams = z.preprocess(processResponseBody, z.object({ +export const IpPoolUpdateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - interface: NameOrId, + pool: NameOrId, }), query: z.object({ - instance: NameOrId.optional(), - project: NameOrId.optional(), }), })) -export const InstanceNetworkInterfaceDeleteParams = z.preprocess(processResponseBody, z.object({ +export const IpPoolDeleteParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - interface: NameOrId, + pool: NameOrId, }), query: z.object({ - instance: NameOrId.optional(), - project: NameOrId.optional(), }), })) -export const PingParams = z.preprocess(processResponseBody, z.object({ +export const IpPoolRangeListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + pool: NameOrId, }), query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), }), })) -export const PolicyViewParams = z.preprocess(processResponseBody, z.object({ +export const IpPoolRangeAddParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + pool: NameOrId, }), query: z.object({ }), })) -export const PolicyUpdateParams = z.preprocess(processResponseBody, z.object({ +export const IpPoolRangeRemoveParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + pool: NameOrId, }), query: z.object({ }), })) -export const ProjectListParams = z.preprocess(processResponseBody, z.object({ +export const IpPoolSiloListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + pool: NameOrId, }), query: z.object({ limit: z.number().min(1).max(4294967295).nullable().optional(), pageToken: z.string().nullable().optional(), - sortBy: NameOrIdSortMode.optional(), + sortBy: IdSortMode.optional(), }), })) -export const ProjectCreateParams = z.preprocess(processResponseBody, z.object({ +export const IpPoolSiloLinkParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + pool: NameOrId, }), query: z.object({ }), })) -export const ProjectViewParams = z.preprocess(processResponseBody, z.object({ +export const IpPoolSiloUpdateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - project: NameOrId, + pool: NameOrId, + silo: NameOrId, }), query: z.object({ }), })) -export const ProjectUpdateParams = z.preprocess(processResponseBody, z.object({ +export const IpPoolSiloUnlinkParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - project: NameOrId, + pool: NameOrId, + silo: NameOrId, }), query: z.object({ }), })) -export const ProjectDeleteParams = z.preprocess(processResponseBody, z.object({ +export const IpPoolUtilizationViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - project: NameOrId, + pool: NameOrId, }), query: z.object({ }), })) -export const ProjectPolicyViewParams = z.preprocess(processResponseBody, z.object({ +export const IpPoolServiceViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - project: NameOrId, }), query: z.object({ }), })) -export const ProjectPolicyUpdateParams = z.preprocess(processResponseBody, z.object({ +export const IpPoolServiceRangeListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - project: NameOrId, }), query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), }), })) -export const SnapshotListParams = z.preprocess(processResponseBody, z.object({ +export const IpPoolServiceRangeAddParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - project: NameOrId.optional(), - sortBy: NameOrIdSortMode.optional(), }), })) -export const SnapshotCreateParams = z.preprocess(processResponseBody, z.object({ +export const IpPoolServiceRangeRemoveParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ - project: NameOrId, }), })) -export const SnapshotViewParams = z.preprocess(processResponseBody, z.object({ +export const SystemMetricParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - snapshot: NameOrId, + metricName: SystemMetricName, }), query: z.object({ - project: NameOrId.optional(), + endTime: z.coerce.date().optional(), + limit: z.number().min(1).max(4294967295).nullable().optional(), + order: PaginationOrder.optional(), + pageToken: z.string().nullable().optional(), + startTime: z.coerce.date().optional(), + silo: NameOrId.optional(), }), })) -export const SnapshotDeleteParams = z.preprocess(processResponseBody, z.object({ +export const LookupMulticastGroupByIpParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - snapshot: NameOrId, + address: z.ipv4(), }), query: z.object({ - project: NameOrId.optional(), }), })) -export const PhysicalDiskListParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingAddressLotListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ limit: z.number().min(1).max(4294967295).nullable().optional(), pageToken: z.string().nullable().optional(), - sortBy: IdSortMode.optional(), + sortBy: NameOrIdSortMode.optional(), }), })) -export const RackListParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingAddressLotCreateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - sortBy: IdSortMode.optional(), }), })) -export const RackViewParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingAddressLotViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - rackId: z.uuid(), + addressLot: NameOrId, }), query: z.object({ }), })) -export const SledListParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingAddressLotDeleteParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + addressLot: NameOrId, }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - sortBy: IdSortMode.optional(), }), })) -export const SledAddParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingAddressLotBlockListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + addressLot: NameOrId, }), query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + sortBy: IdSortMode.optional(), }), })) -export const SledViewParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingAllowListViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - sledId: z.uuid(), }), query: z.object({ }), })) -export const SledPhysicalDiskListParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingAllowListUpdateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - sledId: z.uuid(), }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - sortBy: IdSortMode.optional(), }), })) -export const SledInstanceListParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingBfdDisableParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - sledId: z.uuid(), }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - sortBy: IdSortMode.optional(), }), })) -export const SledSetProvisionPolicyParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingBfdEnableParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - sledId: z.uuid(), }), query: z.object({ }), })) -export const SledListUninitializedParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingBfdStatusParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), }), })) -export const NetworkingSwitchPortListParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingBgpConfigListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ limit: z.number().min(1).max(4294967295).nullable().optional(), pageToken: z.string().nullable().optional(), - sortBy: IdSortMode.optional(), - switchPortId: z.uuid().nullable().optional(), + sortBy: NameOrIdSortMode.optional(), }), })) -export const NetworkingSwitchPortApplySettingsParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingBgpConfigCreateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - port: Name, }), query: z.object({ - rackId: z.uuid(), - switchLocation: Name, }), })) -export const NetworkingSwitchPortClearSettingsParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingBgpConfigDeleteParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - port: Name, }), query: z.object({ - rackId: z.uuid(), - switchLocation: Name, + nameOrId: NameOrId, }), })) -export const SwitchListParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingBgpAnnounceSetListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ limit: z.number().min(1).max(4294967295).nullable().optional(), pageToken: z.string().nullable().optional(), - sortBy: IdSortMode.optional(), + sortBy: NameOrIdSortMode.optional(), }), })) -export const SwitchViewParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingBgpAnnounceSetUpdateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - switchId: z.uuid(), }), query: z.object({ }), })) -export const SiloIdentityProviderListParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingBgpAnnounceSetDeleteParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + announceSet: NameOrId, }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - silo: NameOrId.optional(), - sortBy: NameOrIdSortMode.optional(), }), })) -export const LocalIdpUserCreateParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingBgpAnnouncementListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + announceSet: NameOrId, }), query: z.object({ - silo: NameOrId, }), })) -export const LocalIdpUserDeleteParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingBgpExportedParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - userId: z.uuid(), }), query: z.object({ - silo: NameOrId, }), })) -export const LocalIdpUserSetPasswordParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingBgpMessageHistoryParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - userId: z.uuid(), }), query: z.object({ - silo: NameOrId, + asn: z.number().min(0).max(4294967295), }), })) -export const SamlIdentityProviderCreateParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingBgpImportedRoutesIpv4Params = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ - silo: NameOrId, + asn: z.number().min(0).max(4294967295), }), })) -export const SamlIdentityProviderViewParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingBgpStatusParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - provider: NameOrId, }), query: z.object({ - silo: NameOrId, }), })) -export const IpPoolListParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingInboundIcmpViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - sortBy: NameOrIdSortMode.optional(), }), })) -export const IpPoolCreateParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingInboundIcmpUpdateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ }), })) -export const IpPoolViewParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingLoopbackAddressListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - pool: NameOrId, }), query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + sortBy: IdSortMode.optional(), }), })) -export const IpPoolUpdateParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingLoopbackAddressCreateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - pool: NameOrId, }), query: z.object({ }), })) -export const IpPoolDeleteParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingLoopbackAddressDeleteParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - pool: NameOrId, + address: z.ipv4(), + rackId: z.uuid(), + subnetMask: z.number().min(0).max(255), + switchLocation: Name, }), query: z.object({ }), })) -export const IpPoolRangeListParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingSwitchPortSettingsListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - pool: NameOrId, }), query: z.object({ limit: z.number().min(1).max(4294967295).nullable().optional(), pageToken: z.string().nullable().optional(), + portSettings: NameOrId.optional(), + sortBy: NameOrIdSortMode.optional(), }), })) -export const IpPoolRangeAddParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - pool: NameOrId, - }), - query: z.object({ - }), -})) - -export const IpPoolRangeRemoveParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingSwitchPortSettingsCreateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - pool: NameOrId, }), query: z.object({ }), })) -export const IpPoolSiloListParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingSwitchPortSettingsDeleteParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - pool: NameOrId, }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - sortBy: IdSortMode.optional(), + portSettings: NameOrId.optional(), }), })) -export const IpPoolSiloLinkParams = z.preprocess(processResponseBody, z.object({ +export const NetworkingSwitchPortSettingsViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - pool: NameOrId, + port: NameOrId, }), query: z.object({ }), })) -export const IpPoolSiloUpdateParams = z.preprocess(processResponseBody, z.object({ +export const SystemPolicyViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - pool: NameOrId, - silo: NameOrId, }), query: z.object({ }), })) -export const IpPoolSiloUnlinkParams = z.preprocess(processResponseBody, z.object({ +export const SystemPolicyUpdateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - pool: NameOrId, - silo: NameOrId, }), query: z.object({ }), })) -export const IpPoolServiceViewParams = z.preprocess(processResponseBody, z.object({ +export const ScimTokenListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ + silo: NameOrId, }), })) -export const IpPoolServiceRangeListParams = z.preprocess(processResponseBody, z.object({ +export const ScimTokenCreateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), + silo: NameOrId, }), })) -export const IpPoolServiceRangeAddParams = z.preprocess(processResponseBody, z.object({ +export const ScimTokenViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + tokenId: z.uuid(), }), query: z.object({ + silo: NameOrId, }), })) -export const IpPoolServiceRangeRemoveParams = z.preprocess(processResponseBody, z.object({ +export const ScimTokenDeleteParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + tokenId: z.uuid(), }), query: z.object({ + silo: NameOrId, }), })) -export const SystemMetricParams = z.preprocess(processResponseBody, z.object({ +export const SystemQuotasListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - metricName: SystemMetricName, }), query: z.object({ - endTime: z.coerce.date().optional(), limit: z.number().min(1).max(4294967295).nullable().optional(), - order: PaginationOrder.optional(), pageToken: z.string().nullable().optional(), - startTime: z.coerce.date().optional(), - silo: NameOrId.optional(), + sortBy: IdSortMode.optional(), }), })) -export const NetworkingAddressLotListParams = z.preprocess(processResponseBody, z.object({ +export const SiloListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ @@ -3519,385 +6142,403 @@ export const NetworkingAddressLotListParams = z.preprocess(processResponseBody, }), })) -export const NetworkingAddressLotCreateParams = z.preprocess(processResponseBody, z.object({ +export const SiloCreateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ }), })) -export const NetworkingAddressLotDeleteParams = z.preprocess(processResponseBody, z.object({ +export const SiloViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - addressLot: NameOrId, + silo: NameOrId, }), query: z.object({ }), })) -export const NetworkingAddressLotBlockListParams = z.preprocess(processResponseBody, z.object({ +export const SiloDeleteParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - addressLot: NameOrId, + silo: NameOrId, }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - sortBy: IdSortMode.optional(), }), })) -export const NetworkingBfdDisableParams = z.preprocess(processResponseBody, z.object({ +export const SiloIpPoolListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + silo: NameOrId, }), query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + sortBy: NameOrIdSortMode.optional(), }), })) -export const NetworkingBfdEnableParams = z.preprocess(processResponseBody, z.object({ +export const SiloPolicyViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + silo: NameOrId, }), query: z.object({ }), })) -export const NetworkingBfdStatusParams = z.preprocess(processResponseBody, z.object({ +export const SiloPolicyUpdateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + silo: NameOrId, }), query: z.object({ }), })) -export const NetworkingBgpConfigListParams = z.preprocess(processResponseBody, z.object({ +export const SiloQuotasViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + silo: NameOrId, }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - nameOrId: NameOrId.optional(), - pageToken: z.string().nullable().optional(), - sortBy: NameOrIdSortMode.optional(), }), })) -export const NetworkingBgpConfigCreateParams = z.preprocess(processResponseBody, z.object({ +export const SiloQuotasUpdateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + silo: NameOrId, }), query: z.object({ }), })) -export const NetworkingBgpConfigDeleteParams = z.preprocess(processResponseBody, z.object({ +export const SystemTimeseriesQueryParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ - nameOrId: NameOrId, }), })) -export const NetworkingBgpAnnounceSetListParams = z.preprocess(processResponseBody, z.object({ +export const SystemTimeseriesSchemaListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ - nameOrId: NameOrId, + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), }), })) -export const NetworkingBgpAnnounceSetCreateParams = z.preprocess(processResponseBody, z.object({ +export const SystemUpdateRepositoryListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + sortBy: VersionSortMode.optional(), }), })) -export const NetworkingBgpAnnounceSetDeleteParams = z.preprocess(processResponseBody, z.object({ +export const SystemUpdateRepositoryUploadParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ - nameOrId: NameOrId, + fileName: z.string(), }), })) -export const NetworkingBgpImportedRoutesIpv4Params = z.preprocess(processResponseBody, z.object({ +export const SystemUpdateRepositoryViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + systemVersion: z.string().regex(/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/), }), query: z.object({ - asn: z.number().min(0).max(4294967295), }), })) -export const NetworkingBgpStatusParams = z.preprocess(processResponseBody, z.object({ +export const SystemUpdateStatusParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ }), })) -export const NetworkingLoopbackAddressListParams = z.preprocess(processResponseBody, z.object({ +export const TargetReleaseUpdateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - sortBy: IdSortMode.optional(), }), })) -export const NetworkingLoopbackAddressCreateParams = z.preprocess(processResponseBody, z.object({ +export const SystemUpdateTrustRootListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + sortBy: IdSortMode.optional(), }), })) -export const NetworkingLoopbackAddressDeleteParams = z.preprocess(processResponseBody, z.object({ +export const SystemUpdateTrustRootCreateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - address: z.ipv4(), - rackId: z.uuid(), - subnetMask: z.number().min(0).max(255), - switchLocation: Name, }), query: z.object({ }), })) -export const NetworkingSwitchPortSettingsListParams = z.preprocess(processResponseBody, z.object({ +export const SystemUpdateTrustRootViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + trustRootId: z.uuid(), }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - portSettings: NameOrId.optional(), - sortBy: NameOrIdSortMode.optional(), }), })) -export const NetworkingSwitchPortSettingsCreateParams = z.preprocess(processResponseBody, z.object({ +export const SystemUpdateTrustRootDeleteParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + trustRootId: z.uuid(), }), query: z.object({ }), })) -export const NetworkingSwitchPortSettingsDeleteParams = z.preprocess(processResponseBody, z.object({ +export const SiloUserListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ - portSettings: NameOrId.optional(), + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + silo: NameOrId.optional(), + sortBy: IdSortMode.optional(), }), })) -export const NetworkingSwitchPortSettingsViewParams = z.preprocess(processResponseBody, z.object({ +export const SiloUserViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - port: NameOrId, + userId: z.uuid(), }), query: z.object({ + silo: NameOrId, }), })) -export const SystemPolicyViewParams = z.preprocess(processResponseBody, z.object({ +export const UserBuiltinListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + sortBy: NameSortMode.optional(), }), })) -export const SystemPolicyUpdateParams = z.preprocess(processResponseBody, z.object({ +export const UserBuiltinViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + user: NameOrId, }), query: z.object({ }), })) -export const RoleListParams = z.preprocess(processResponseBody, z.object({ +export const SiloUtilizationListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ limit: z.number().min(1).max(4294967295).nullable().optional(), pageToken: z.string().nullable().optional(), + sortBy: NameOrIdSortMode.optional(), }), })) -export const RoleViewParams = z.preprocess(processResponseBody, z.object({ +export const SiloUtilizationViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - roleName: z.string(), + silo: NameOrId, }), query: z.object({ }), })) -export const SystemQuotasListParams = z.preprocess(processResponseBody, z.object({ +export const TimeseriesQueryParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - sortBy: IdSortMode.optional(), + project: NameOrId, }), })) -export const SiloListParams = z.preprocess(processResponseBody, z.object({ +export const UserListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ + group: z.uuid().nullable().optional(), limit: z.number().min(1).max(4294967295).nullable().optional(), pageToken: z.string().nullable().optional(), - sortBy: NameOrIdSortMode.optional(), + sortBy: IdSortMode.optional(), }), })) -export const SiloCreateParams = z.preprocess(processResponseBody, z.object({ +export const UserViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + userId: z.uuid(), }), query: z.object({ }), })) -export const SiloViewParams = z.preprocess(processResponseBody, z.object({ +export const UserTokenListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - silo: NameOrId, + userId: z.uuid(), }), query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + sortBy: IdSortMode.optional(), }), })) -export const SiloDeleteParams = z.preprocess(processResponseBody, z.object({ +export const UserLogoutParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - silo: NameOrId, + userId: z.uuid(), }), query: z.object({ }), })) -export const SiloIpPoolListParams = z.preprocess(processResponseBody, z.object({ +export const UserSessionListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - silo: NameOrId, + userId: z.uuid(), }), query: z.object({ limit: z.number().min(1).max(4294967295).nullable().optional(), pageToken: z.string().nullable().optional(), - sortBy: NameOrIdSortMode.optional(), + sortBy: IdSortMode.optional(), }), })) -export const SiloPolicyViewParams = z.preprocess(processResponseBody, z.object({ +export const UtilizationViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - silo: NameOrId, }), query: z.object({ }), })) -export const SiloPolicyUpdateParams = z.preprocess(processResponseBody, z.object({ +export const VpcFirewallRulesViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - silo: NameOrId, }), query: z.object({ + project: NameOrId.optional(), + vpc: NameOrId, }), })) -export const SiloQuotasViewParams = z.preprocess(processResponseBody, z.object({ +export const VpcFirewallRulesUpdateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - silo: NameOrId, }), query: z.object({ + project: NameOrId.optional(), + vpc: NameOrId, }), })) -export const SiloQuotasUpdateParams = z.preprocess(processResponseBody, z.object({ +export const VpcRouterRouteListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - silo: NameOrId, }), query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), + project: NameOrId.optional(), + router: NameOrId.optional(), + sortBy: NameOrIdSortMode.optional(), + vpc: NameOrId.optional(), }), })) -export const SiloUserListParams = z.preprocess(processResponseBody, z.object({ +export const VpcRouterRouteCreateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - silo: NameOrId.optional(), - sortBy: IdSortMode.optional(), + project: NameOrId.optional(), + router: NameOrId, + vpc: NameOrId.optional(), }), })) -export const SiloUserViewParams = z.preprocess(processResponseBody, z.object({ +export const VpcRouterRouteViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - userId: z.uuid(), + route: NameOrId, }), query: z.object({ - silo: NameOrId, + project: NameOrId.optional(), + router: NameOrId.optional(), + vpc: NameOrId.optional(), }), })) -export const UserBuiltinListParams = z.preprocess(processResponseBody, z.object({ +export const VpcRouterRouteUpdateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + route: NameOrId, }), query: z.object({ - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - sortBy: NameSortMode.optional(), + project: NameOrId.optional(), + router: NameOrId.optional(), + vpc: NameOrId.optional(), }), })) -export const UserBuiltinViewParams = z.preprocess(processResponseBody, z.object({ +export const VpcRouterRouteDeleteParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - user: NameOrId, + route: NameOrId, }), query: z.object({ + project: NameOrId.optional(), + router: NameOrId.optional(), + vpc: NameOrId.optional(), }), })) -export const SiloUtilizationListParams = z.preprocess(processResponseBody, z.object({ +export const VpcRouterListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ limit: z.number().min(1).max(4294967295).nullable().optional(), pageToken: z.string().nullable().optional(), + project: NameOrId.optional(), sortBy: NameOrIdSortMode.optional(), + vpc: NameOrId.optional(), }), })) -export const SiloUtilizationViewParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - silo: NameOrId, - }), - query: z.object({ - }), -})) - -export const UserListParams = z.preprocess(processResponseBody, z.object({ +export const VpcRouterCreateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), query: z.object({ - group: z.uuid().nullable().optional(), - limit: z.number().min(1).max(4294967295).nullable().optional(), - pageToken: z.string().nullable().optional(), - sortBy: IdSortMode.optional(), + project: NameOrId.optional(), + vpc: NameOrId, }), })) -export const UtilizationViewParams = z.preprocess(processResponseBody, z.object({ +export const VpcRouterViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + router: NameOrId, }), query: z.object({ + project: NameOrId.optional(), + vpc: NameOrId.optional(), }), })) -export const VpcFirewallRulesViewParams = z.preprocess(processResponseBody, z.object({ +export const VpcRouterUpdateParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + router: NameOrId, }), query: z.object({ project: NameOrId.optional(), - vpc: NameOrId, + vpc: NameOrId.optional(), }), })) -export const VpcFirewallRulesUpdateParams = z.preprocess(processResponseBody, z.object({ +export const VpcRouterDeleteParams = z.preprocess(processResponseBody, z.object({ path: z.object({ + router: NameOrId, }), query: z.object({ project: NameOrId.optional(), - vpc: NameOrId, + vpc: NameOrId.optional(), }), })) @@ -4011,3 +6652,42 @@ export const VpcDeleteParams = z.preprocess(processResponseBody, z.object({ }), })) +export const WebhookReceiverCreateParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + }), + query: z.object({ + }), +})) + +export const WebhookReceiverUpdateParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + receiver: NameOrId, + }), + query: z.object({ + }), +})) + +export const WebhookSecretsListParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + }), + query: z.object({ + receiver: NameOrId, + }), +})) + +export const WebhookSecretsAddParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + }), + query: z.object({ + receiver: NameOrId, + }), +})) + +export const WebhookSecretsDeleteParams = z.preprocess(processResponseBody, z.object({ + path: z.object({ + secretId: z.uuid(), + }), + query: z.object({ + }), +})) + From c0ad198baf1baea5263f83c9e36641b91d8f4c74 Mon Sep 17 00:00:00 2001 From: Charlie Park Date: Thu, 8 Jan 2026 11:11:52 -0800 Subject: [PATCH 03/17] Update default string generator --- oxide-openapi-gen-ts/src/schema/zod.ts | 39 ++++++++++++++++++-------- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/oxide-openapi-gen-ts/src/schema/zod.ts b/oxide-openapi-gen-ts/src/schema/zod.ts index 5868a58..cf2a2a5 100644 --- a/oxide-openapi-gen-ts/src/schema/zod.ts +++ b/oxide-openapi-gen-ts/src/schema/zod.ts @@ -11,6 +11,29 @@ import { makeSchemaGenerator, refToSchemaName } from "./base"; import { type OpenAPIV3 } from "openapi-types"; import { snakeToCamel } from "../util"; +/** + * Recursively transform object keys from snake_case to camelCase for default values + */ +function transformDefaultValue(value: unknown): unknown { + if (value === null || value === undefined) return value; + if (typeof value !== 'object') return value; + if (Array.isArray(value)) return value.map(transformDefaultValue); + + const result: Record = {}; + for (const [key, val] of Object.entries(value)) { + result[snakeToCamel(key)] = transformDefaultValue(val); + } + return result; +} + +/** + * Generate the .default() method call with transformed default value + */ +function getDefaultString(schema: OpenAPIV3.SchemaObject): string { + if (!("default" in schema)) return ""; + return `.default(${JSON.stringify(transformDefaultValue(schema.default))})`; +} + export const schemaToZod = makeSchemaGenerator({ ref(schema, { w0 }) { if ("$ref" in schema) { @@ -20,9 +43,7 @@ export const schemaToZod = makeSchemaGenerator({ boolean(schema, { w0 }) { w0(`SafeBoolean`); - if ("default" in schema) { - w0(`.default(${schema.default})`); - } + w0(getDefaultString(schema)); if (schema.nullable) w0(".nullable()"); }, @@ -64,7 +85,7 @@ export const schemaToZod = makeSchemaGenerator({ } if (schema.nullable) w0(".nullable()"); - if ("default" in schema) w0(`.default(${JSON.stringify(schema.default)})`); + w0(getDefaultString(schema)); }, date(schema, { w0 }) { @@ -87,9 +108,7 @@ export const schemaToZod = makeSchemaGenerator({ schemaToZod(schema.items, io); w0(".array()"); if (schema.nullable) io.w0(".nullable()"); - if ("default" in schema) { - w0(`.default(${JSON.stringify(schema.default)})`); - } + w0(getDefaultString(schema)); if (schema.uniqueItems) w0(`.refine(...uniqueItems)`); }, @@ -179,7 +198,7 @@ export const schemaToZod = makeSchemaGenerator({ } if (schema.nullable) w0(".nullable()"); - if ("default" in schema) w0(`.default(${JSON.stringify(schema.default)})`); + w0(getDefaultString(schema)); }, empty({ w0 }) { @@ -199,9 +218,7 @@ function schemaToZodInt(schema: OpenAPIV3.SchemaObject, { w0 }: IO) { w0(`z.number()`); } - if (schema.default) { - w0(`.default(${schema.default})`); - } + w0(getDefaultString(schema)); const [, unsigned, size] = schema.format?.match(/(u?)int(\d+)/) || []; if ("minimum" in schema) { From aeacfbd84d1b6cbac3a603681683b2fc7e7c17a6 Mon Sep 17 00:00:00 2001 From: Charlie Park Date: Thu, 8 Jan 2026 11:39:11 -0800 Subject: [PATCH 04/17] Remove downloaded spec file; use a cached file in tmp --- .gitignore | 1 - oxide-openapi-gen-ts/.prettierignore | 1 - oxide-openapi-gen-ts/src/gen.test.ts | 3 ++- oxide-openapi-gen-ts/src/schema/types.test.ts | 9 ++++++++- tools/gen.sh | 16 +++++++++++++--- 5 files changed, 23 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 7d7d83c..fcb0f42 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ packages/openpi-gen/node_modules node_modules dist -spec.json .eslintcache diff --git a/oxide-openapi-gen-ts/.prettierignore b/oxide-openapi-gen-ts/.prettierignore index a3fb68a..b05c2df 100644 --- a/oxide-openapi-gen-ts/.prettierignore +++ b/oxide-openapi-gen-ts/.prettierignore @@ -1,2 +1 @@ __snapshots__ -spec.json diff --git a/oxide-openapi-gen-ts/src/gen.test.ts b/oxide-openapi-gen-ts/src/gen.test.ts index d4af56b..16cf10a 100644 --- a/oxide-openapi-gen-ts/src/gen.test.ts +++ b/oxide-openapi-gen-ts/src/gen.test.ts @@ -14,7 +14,8 @@ import { tmpdir } from "node:os"; import { fileURLToPath } from "node:url"; const __dirname = dirname(fileURLToPath(import.meta.url)); -const SPEC_FILE = join(__dirname, "../../spec.json"); +const OMICRON_SHA = readFileSync(join(__dirname, "../../OMICRON_VERSION"), "utf-8").trim(); +const SPEC_FILE = `/tmp/openapi-gen-ts-schemas/${OMICRON_SHA}.json`; let tempDir: string; diff --git a/oxide-openapi-gen-ts/src/schema/types.test.ts b/oxide-openapi-gen-ts/src/schema/types.test.ts index a658219..c3b6f3a 100644 --- a/oxide-openapi-gen-ts/src/schema/types.test.ts +++ b/oxide-openapi-gen-ts/src/schema/types.test.ts @@ -9,10 +9,17 @@ import { test, expect } from "vitest"; import { schemaToTypes } from "./types"; import { TestWritable, initIO } from "../io"; import * as prettier from "prettier"; +import { readFileSync } from "node:fs"; +import { join, dirname } from "node:path"; +import { fileURLToPath } from "node:url"; -import spec from "../../spec.json"; import { type Schema } from "./base"; +const __dirname = dirname(fileURLToPath(import.meta.url)); +const OMICRON_SHA = readFileSync(join(__dirname, "../../../OMICRON_VERSION"), "utf-8").trim(); +const SPEC_FILE = `/tmp/openapi-gen-ts-schemas/${OMICRON_SHA}.json`; +const spec = JSON.parse(readFileSync(SPEC_FILE, "utf-8")); + const schemas = spec.components.schemas; function genType(schema: unknown) { diff --git a/tools/gen.sh b/tools/gen.sh index e3c8f62..fea794f 100755 --- a/tools/gen.sh +++ b/tools/gen.sh @@ -26,13 +26,23 @@ OMICRON_SHA=$(cat "$ROOT_DIR/OMICRON_VERSION") DEST_DIR="$ROOT_DIR/oxide-api/src" SPEC_LATEST_URL="https://raw.githubusercontent.com/oxidecomputer/omicron/$OMICRON_SHA/openapi/nexus/nexus-latest.json" -SPEC_FILE="./spec.json" +SPEC_CACHE_DIR="/tmp/openapi-gen-ts-schemas" + +# Create cache directory if it doesn't exist +mkdir -p "$SPEC_CACHE_DIR" -# TODO: we could get rid of this DL if a test didn't rely on it # nexus-latest.json is a symlink that contains the actual spec filename SPEC_FILENAME=$(curl --fail "$SPEC_LATEST_URL") +SPEC_FILE="$SPEC_CACHE_DIR/$OMICRON_SHA-$SPEC_FILENAME" SPEC_URL="https://raw.githubusercontent.com/oxidecomputer/omicron/$OMICRON_SHA/openapi/nexus/$SPEC_FILENAME" -curl --fail "$SPEC_URL" -o $SPEC_FILE + +# Download spec only if not already cached +if [ ! -f "$SPEC_FILE" ]; then + echo "Downloading spec for $OMICRON_SHA ($SPEC_FILENAME)..." + curl --fail "$SPEC_URL" -o "$SPEC_FILE" +else + echo "Using cached spec for $OMICRON_SHA ($SPEC_FILENAME)" +fi rm -f "$DEST_DIR/*" # remove after we add --clean flag to generator From 98cb233a1aa22176713517ae3c3c95b4f743a597 Mon Sep 17 00:00:00 2001 From: Charlie Park Date: Thu, 8 Jan 2026 11:43:56 -0800 Subject: [PATCH 05/17] Resolve git merge issues after cherrypick from main --- oxide-openapi-gen-ts/src/gen.test.ts | 5 ++++- oxide-openapi-gen-ts/src/schema/types.test.ts | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/oxide-openapi-gen-ts/src/gen.test.ts b/oxide-openapi-gen-ts/src/gen.test.ts index 16cf10a..b78f397 100644 --- a/oxide-openapi-gen-ts/src/gen.test.ts +++ b/oxide-openapi-gen-ts/src/gen.test.ts @@ -12,10 +12,13 @@ import { mkdtempSync, rmSync, readFileSync } from "node:fs"; import { join, dirname } from "node:path"; import { tmpdir } from "node:os"; import { fileURLToPath } from "node:url"; +import { execSync } from "node:child_process"; const __dirname = dirname(fileURLToPath(import.meta.url)); const OMICRON_SHA = readFileSync(join(__dirname, "../../OMICRON_VERSION"), "utf-8").trim(); -const SPEC_FILE = `/tmp/openapi-gen-ts-schemas/${OMICRON_SHA}.json`; +const SPEC_LATEST_URL = `https://raw.githubusercontent.com/oxidecomputer/omicron/${OMICRON_SHA}/openapi/nexus/nexus-latest.json`; +const SPEC_FILENAME = execSync(`curl --fail "${SPEC_LATEST_URL}"`, { encoding: 'utf-8' }).trim(); +const SPEC_FILE = `/tmp/openapi-gen-ts-schemas/${OMICRON_SHA}-${SPEC_FILENAME}`; let tempDir: string; diff --git a/oxide-openapi-gen-ts/src/schema/types.test.ts b/oxide-openapi-gen-ts/src/schema/types.test.ts index c3b6f3a..aae49ec 100644 --- a/oxide-openapi-gen-ts/src/schema/types.test.ts +++ b/oxide-openapi-gen-ts/src/schema/types.test.ts @@ -12,12 +12,15 @@ import * as prettier from "prettier"; import { readFileSync } from "node:fs"; import { join, dirname } from "node:path"; import { fileURLToPath } from "node:url"; +import { execSync } from "node:child_process"; import { type Schema } from "./base"; const __dirname = dirname(fileURLToPath(import.meta.url)); const OMICRON_SHA = readFileSync(join(__dirname, "../../../OMICRON_VERSION"), "utf-8").trim(); -const SPEC_FILE = `/tmp/openapi-gen-ts-schemas/${OMICRON_SHA}.json`; +const SPEC_LATEST_URL = `https://raw.githubusercontent.com/oxidecomputer/omicron/${OMICRON_SHA}/openapi/nexus/nexus-latest.json`; +const SPEC_FILENAME = execSync(`curl --fail "${SPEC_LATEST_URL}"`, { encoding: 'utf-8' }).trim(); +const SPEC_FILE = `/tmp/openapi-gen-ts-schemas/${OMICRON_SHA}-${SPEC_FILENAME}`; const spec = JSON.parse(readFileSync(SPEC_FILE, "utf-8")); const schemas = spec.components.schemas; From 2e0dc612949bbd7944ba2e907991031ab23e38fd Mon Sep 17 00:00:00 2001 From: Charlie Park Date: Thu, 8 Jan 2026 11:45:30 -0800 Subject: [PATCH 06/17] Use camelCase instead of snake_case in generated defaults --- oxide-openapi-gen-ts/src/__snapshots__/validate.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/oxide-openapi-gen-ts/src/__snapshots__/validate.ts b/oxide-openapi-gen-ts/src/__snapshots__/validate.ts index 9afa03a..fc09c20 100644 --- a/oxide-openapi-gen-ts/src/__snapshots__/validate.ts +++ b/oxide-openapi-gen-ts/src/__snapshots__/validate.ts @@ -159,7 +159,7 @@ z.object({"ip": z.ipv4(), "pool": NameOrId.nullable().optional(), "type": z.enum(["explicit"]), }), -z.object({"poolSelector": PoolSelector.default({"ip_version":null,"type":"auto"}).optional(), +z.object({"poolSelector": PoolSelector.default({"ipVersion":null,"type":"auto"}).optional(), "type": z.enum(["auto"]), }), ]) @@ -1556,7 +1556,7 @@ export const Distributionint64 = z.preprocess(processResponseBody,z.object({"bin /** * Parameters for creating an ephemeral IP address for an instance. */ -export const EphemeralIpCreate = z.preprocess(processResponseBody,z.object({"poolSelector": PoolSelector.default({"ip_version":null,"type":"auto"}).optional(), +export const EphemeralIpCreate = z.preprocess(processResponseBody,z.object({"poolSelector": PoolSelector.default({"ipVersion":null,"type":"auto"}).optional(), })) /** @@ -1596,7 +1596,7 @@ z.object({"description": z.string(), * Parameters for creating an external IP address for instances. */ export const ExternalIpCreate = z.preprocess(processResponseBody,z.union([ -z.object({"poolSelector": PoolSelector.default({"ip_version":null,"type":"auto"}).optional(), +z.object({"poolSelector": PoolSelector.default({"ipVersion":null,"type":"auto"}).optional(), "type": z.enum(["ephemeral"]), }), z.object({"floatingIp": NameOrId, @@ -1734,7 +1734,7 @@ export const FloatingIpAttach = z.preprocess(processResponseBody,z.object({"kind /** * Parameters for creating a new floating IP address for instances. */ -export const FloatingIpCreate = z.preprocess(processResponseBody,z.object({"addressSelector": AddressSelector.default({"pool_selector":{"ip_version":null,"type":"auto"},"type":"auto"}).optional(), +export const FloatingIpCreate = z.preprocess(processResponseBody,z.object({"addressSelector": AddressSelector.default({"poolSelector":{"ipVersion":null,"type":"auto"},"type":"auto"}).optional(), "description": z.string(), "name": Name, })) @@ -1986,7 +1986,7 @@ z.object({"type": z.enum(["dual_stack"]), * Create-time parameters for an `InstanceNetworkInterface` */ export const InstanceNetworkInterfaceCreate = z.preprocess(processResponseBody,z.object({"description": z.string(), -"ipConfig": PrivateIpStackCreate.default({"type":"dual_stack","value":{"v4":{"ip":{"type":"auto"},"transit_ips":[]},"v6":{"ip":{"type":"auto"},"transit_ips":[]}}}).optional(), +"ipConfig": PrivateIpStackCreate.default({"type":"dual_stack","value":{"v4":{"ip":{"type":"auto"},"transitIps":[]},"v6":{"ip":{"type":"auto"},"transitIps":[]}}}).optional(), "name": Name, "subnetName": Name, "vpcName": Name, @@ -2499,7 +2499,7 @@ export const MulticastGroup = z.preprocess(processResponseBody,z.object({"descri */ export const MulticastGroupCreate = z.preprocess(processResponseBody,z.object({"description": z.string(), "multicastIp": z.ipv4().nullable().default(null).optional(), -"mvlan": z.number().min(0).max(65535).nullable().optional(), +"mvlan": z.number().default(null).min(0).max(65535).nullable().optional(), "name": Name, "pool": NameOrId.nullable().default(null).optional(), "sourceIps": z.ipv4().array().nullable().default(null).optional(), @@ -2755,7 +2755,7 @@ export const Probe = z.preprocess(processResponseBody,z.object({"description": z */ export const ProbeCreate = z.preprocess(processResponseBody,z.object({"description": z.string(), "name": Name, -"poolSelector": PoolSelector.default({"ip_version":null,"type":"auto"}).optional(), +"poolSelector": PoolSelector.default({"ipVersion":null,"type":"auto"}).optional(), "sled": z.uuid(), })) From 266f181eb904bec8a29c5aa6e559a37c83f4f8b9 Mon Sep 17 00:00:00 2001 From: Charlie Park Date: Thu, 8 Jan 2026 12:11:23 -0800 Subject: [PATCH 07/17] mimic console's generate script --- tools/gen.sh | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/tools/gen.sh b/tools/gen.sh index fea794f..13f3998 100755 --- a/tools/gen.sh +++ b/tools/gen.sh @@ -22,26 +22,25 @@ EOF ) ROOT_DIR="$(dirname "$0")/.." -OMICRON_SHA=$(cat "$ROOT_DIR/OMICRON_VERSION") +OMICRON_SHA=$(head -n 1 "$ROOT_DIR/OMICRON_VERSION") DEST_DIR="$ROOT_DIR/oxide-api/src" -SPEC_LATEST_URL="https://raw.githubusercontent.com/oxidecomputer/omicron/$OMICRON_SHA/openapi/nexus/nexus-latest.json" +SPEC_BASE="https://raw.githubusercontent.com/oxidecomputer/omicron/$OMICRON_SHA/openapi/nexus" SPEC_CACHE_DIR="/tmp/openapi-gen-ts-schemas" # Create cache directory if it doesn't exist mkdir -p "$SPEC_CACHE_DIR" # nexus-latest.json is a symlink that contains the actual spec filename -SPEC_FILENAME=$(curl --fail "$SPEC_LATEST_URL") -SPEC_FILE="$SPEC_CACHE_DIR/$OMICRON_SHA-$SPEC_FILENAME" -SPEC_URL="https://raw.githubusercontent.com/oxidecomputer/omicron/$OMICRON_SHA/openapi/nexus/$SPEC_FILENAME" +LATEST_SPEC=$(curl --fail "$SPEC_BASE/nexus-latest.json") +SPEC_FILE="$SPEC_CACHE_DIR/$OMICRON_SHA-$LATEST_SPEC" # Download spec only if not already cached if [ ! -f "$SPEC_FILE" ]; then - echo "Downloading spec for $OMICRON_SHA ($SPEC_FILENAME)..." - curl --fail "$SPEC_URL" -o "$SPEC_FILE" + echo "Downloading spec for $OMICRON_SHA ($LATEST_SPEC)..." + curl --fail "$SPEC_BASE/$LATEST_SPEC" -o "$SPEC_FILE" else - echo "Using cached spec for $OMICRON_SHA ($SPEC_FILENAME)" + echo "Using cached spec for $OMICRON_SHA ($LATEST_SPEC)" fi rm -f "$DEST_DIR/*" # remove after we add --clean flag to generator From 7896156ab2189951a6fa296e013419fd5d4263de Mon Sep 17 00:00:00 2001 From: Charlie Park Date: Thu, 8 Jan 2026 12:17:54 -0800 Subject: [PATCH 08/17] bump OMICRON_VERSION once more --- OMICRON_VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OMICRON_VERSION b/OMICRON_VERSION index bf54a45..2a5ae49 100644 --- a/OMICRON_VERSION +++ b/OMICRON_VERSION @@ -1 +1 @@ -f4e6ee321ad9bcf9b86542f1c23ab948a1bd692e +135be59591f1ba4bc5941f63bf3a08a0b187b1a9 From 9ef044d91b4125ac3fcf5ab4deab61195a9d7862 Mon Sep 17 00:00:00 2001 From: Charlie Park Date: Thu, 8 Jan 2026 12:28:51 -0800 Subject: [PATCH 09/17] Use try/catch helper in test --- oxide-openapi-gen-ts/src/gen.test.ts | 7 ++-- oxide-openapi-gen-ts/src/schema/types.test.ts | 7 ++-- oxide-openapi-gen-ts/src/test-util.ts | 35 +++++++++++++++++++ 3 files changed, 39 insertions(+), 10 deletions(-) create mode 100644 oxide-openapi-gen-ts/src/test-util.ts diff --git a/oxide-openapi-gen-ts/src/gen.test.ts b/oxide-openapi-gen-ts/src/gen.test.ts index b78f397..4fcda5b 100644 --- a/oxide-openapi-gen-ts/src/gen.test.ts +++ b/oxide-openapi-gen-ts/src/gen.test.ts @@ -12,13 +12,10 @@ import { mkdtempSync, rmSync, readFileSync } from "node:fs"; import { join, dirname } from "node:path"; import { tmpdir } from "node:os"; import { fileURLToPath } from "node:url"; -import { execSync } from "node:child_process"; +import { getSpecFilePath } from "./test-util"; const __dirname = dirname(fileURLToPath(import.meta.url)); -const OMICRON_SHA = readFileSync(join(__dirname, "../../OMICRON_VERSION"), "utf-8").trim(); -const SPEC_LATEST_URL = `https://raw.githubusercontent.com/oxidecomputer/omicron/${OMICRON_SHA}/openapi/nexus/nexus-latest.json`; -const SPEC_FILENAME = execSync(`curl --fail "${SPEC_LATEST_URL}"`, { encoding: 'utf-8' }).trim(); -const SPEC_FILE = `/tmp/openapi-gen-ts-schemas/${OMICRON_SHA}-${SPEC_FILENAME}`; +const SPEC_FILE = getSpecFilePath(join(__dirname, "../../OMICRON_VERSION")); let tempDir: string; diff --git a/oxide-openapi-gen-ts/src/schema/types.test.ts b/oxide-openapi-gen-ts/src/schema/types.test.ts index aae49ec..145ba84 100644 --- a/oxide-openapi-gen-ts/src/schema/types.test.ts +++ b/oxide-openapi-gen-ts/src/schema/types.test.ts @@ -12,15 +12,12 @@ import * as prettier from "prettier"; import { readFileSync } from "node:fs"; import { join, dirname } from "node:path"; import { fileURLToPath } from "node:url"; -import { execSync } from "node:child_process"; +import { getSpecFilePath } from "../test-util"; import { type Schema } from "./base"; const __dirname = dirname(fileURLToPath(import.meta.url)); -const OMICRON_SHA = readFileSync(join(__dirname, "../../../OMICRON_VERSION"), "utf-8").trim(); -const SPEC_LATEST_URL = `https://raw.githubusercontent.com/oxidecomputer/omicron/${OMICRON_SHA}/openapi/nexus/nexus-latest.json`; -const SPEC_FILENAME = execSync(`curl --fail "${SPEC_LATEST_URL}"`, { encoding: 'utf-8' }).trim(); -const SPEC_FILE = `/tmp/openapi-gen-ts-schemas/${OMICRON_SHA}-${SPEC_FILENAME}`; +const SPEC_FILE = getSpecFilePath(join(__dirname, "../../../OMICRON_VERSION")); const spec = JSON.parse(readFileSync(SPEC_FILE, "utf-8")); const schemas = spec.components.schemas; diff --git a/oxide-openapi-gen-ts/src/test-util.ts b/oxide-openapi-gen-ts/src/test-util.ts new file mode 100644 index 0000000..9639270 --- /dev/null +++ b/oxide-openapi-gen-ts/src/test-util.ts @@ -0,0 +1,35 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, you can obtain one at https://mozilla.org/MPL/2.0/. + * + * Copyright Oxide Computer Company + */ + +import { readFileSync } from "node:fs"; +import { execSync } from "node:child_process"; + +/** + * Gets the path to the cached OpenAPI spec file based on OMICRON_VERSION. + * Fetches the latest spec filename from GitHub and constructs the cached path. + * + * @param omicronVersionPath - Path to the OMICRON_VERSION file relative to the calling file + * @returns The full path to the cached spec file in /tmp + * @throws Error if the spec filename cannot be fetched (network issues, invalid version, etc.) + */ +export function getSpecFilePath(omicronVersionPath: string): string { + const OMICRON_SHA = readFileSync(omicronVersionPath, "utf-8").trim(); + const SPEC_BASE = `https://raw.githubusercontent.com/oxidecomputer/omicron/${OMICRON_SHA}/openapi/nexus`; + + let LATEST_SPEC: string; + try { + LATEST_SPEC = execSync(`curl --fail "${SPEC_BASE}/nexus-latest.json"`, { encoding: 'utf-8' }).trim(); + } catch (error) { + throw new Error( + `Failed to fetch spec filename from ${SPEC_BASE}/nexus-latest.json. ` + + `Please check network connectivity and verify OMICRON_VERSION (${OMICRON_SHA}) is valid.` + ); + } + + return `/tmp/openapi-gen-ts-schemas/${OMICRON_SHA}-${LATEST_SPEC}`; +} From 5c36cdaef2ab3d1048f49adbb6201c71bd7de433 Mon Sep 17 00:00:00 2001 From: Charlie Park Date: Thu, 8 Jan 2026 12:36:17 -0800 Subject: [PATCH 10/17] small refactor --- oxide-openapi-gen-ts/src/test-util.ts | 34 +++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/oxide-openapi-gen-ts/src/test-util.ts b/oxide-openapi-gen-ts/src/test-util.ts index 9639270..1db0dc1 100644 --- a/oxide-openapi-gen-ts/src/test-util.ts +++ b/oxide-openapi-gen-ts/src/test-util.ts @@ -6,19 +6,33 @@ * Copyright Oxide Computer Company */ -import { readFileSync } from "node:fs"; +import { readFileSync, readdirSync, existsSync } from "node:fs"; import { execSync } from "node:child_process"; /** * Gets the path to the cached OpenAPI spec file based on OMICRON_VERSION. - * Fetches the latest spec filename from GitHub and constructs the cached path. + * First checks for an existing cached file, only fetching the spec filename from GitHub if needed. * * @param omicronVersionPath - Path to the OMICRON_VERSION file relative to the calling file * @returns The full path to the cached spec file in /tmp - * @throws Error if the spec filename cannot be fetched (network issues, invalid version, etc.) + * @throws Error if the spec filename cannot be fetched or if the spec file doesn't exist */ export function getSpecFilePath(omicronVersionPath: string): string { - const OMICRON_SHA = readFileSync(omicronVersionPath, "utf-8").trim(); + // Use split("\n")[0] to match bash's `head -n 1` behavior + const OMICRON_SHA = readFileSync(omicronVersionPath, "utf-8").split("\n")[0].trim(); + const SPEC_CACHE_DIR = "/tmp/openapi-gen-ts-schemas"; + + // Check if a cached file already exists for this OMICRON_SHA + if (existsSync(SPEC_CACHE_DIR)) { + const cachedFiles = readdirSync(SPEC_CACHE_DIR); + const matchingFile = cachedFiles.find((file) => file.startsWith(`${OMICRON_SHA}-`)); + + if (matchingFile) { + return `${SPEC_CACHE_DIR}/${matchingFile}`; + } + } + + // No cached file found, fetch the latest spec filename from GitHub const SPEC_BASE = `https://raw.githubusercontent.com/oxidecomputer/omicron/${OMICRON_SHA}/openapi/nexus`; let LATEST_SPEC: string; @@ -31,5 +45,15 @@ export function getSpecFilePath(omicronVersionPath: string): string { ); } - return `/tmp/openapi-gen-ts-schemas/${OMICRON_SHA}-${LATEST_SPEC}`; + const SPEC_FILE = `${SPEC_CACHE_DIR}/${OMICRON_SHA}-${LATEST_SPEC}`; + + // Check if the spec file exists after determining the filename + if (!existsSync(SPEC_FILE)) { + throw new Error( + `Spec file not found at ${SPEC_FILE}. ` + + `Please run \`npm run pretest\` or \`../tools/gen.sh\` to download the spec file first.` + ); + } + + return SPEC_FILE; } From f66a86eb1c7538749949bdf6aedf48b974fef95a Mon Sep 17 00:00:00 2001 From: Charlie Park Date: Thu, 8 Jan 2026 12:37:19 -0800 Subject: [PATCH 11/17] formatting --- oxide-openapi-gen-ts/src/schema/zod.ts | 2 +- oxide-openapi-gen-ts/src/test-util.ts | 16 +++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/oxide-openapi-gen-ts/src/schema/zod.ts b/oxide-openapi-gen-ts/src/schema/zod.ts index cf2a2a5..6ff929a 100644 --- a/oxide-openapi-gen-ts/src/schema/zod.ts +++ b/oxide-openapi-gen-ts/src/schema/zod.ts @@ -16,7 +16,7 @@ import { snakeToCamel } from "../util"; */ function transformDefaultValue(value: unknown): unknown { if (value === null || value === undefined) return value; - if (typeof value !== 'object') return value; + if (typeof value !== "object") return value; if (Array.isArray(value)) return value.map(transformDefaultValue); const result: Record = {}; diff --git a/oxide-openapi-gen-ts/src/test-util.ts b/oxide-openapi-gen-ts/src/test-util.ts index 1db0dc1..02b9dee 100644 --- a/oxide-openapi-gen-ts/src/test-util.ts +++ b/oxide-openapi-gen-ts/src/test-util.ts @@ -19,13 +19,17 @@ import { execSync } from "node:child_process"; */ export function getSpecFilePath(omicronVersionPath: string): string { // Use split("\n")[0] to match bash's `head -n 1` behavior - const OMICRON_SHA = readFileSync(omicronVersionPath, "utf-8").split("\n")[0].trim(); + const OMICRON_SHA = readFileSync(omicronVersionPath, "utf-8") + .split("\n")[0] + .trim(); const SPEC_CACHE_DIR = "/tmp/openapi-gen-ts-schemas"; // Check if a cached file already exists for this OMICRON_SHA if (existsSync(SPEC_CACHE_DIR)) { const cachedFiles = readdirSync(SPEC_CACHE_DIR); - const matchingFile = cachedFiles.find((file) => file.startsWith(`${OMICRON_SHA}-`)); + const matchingFile = cachedFiles.find((file) => + file.startsWith(`${OMICRON_SHA}-`) + ); if (matchingFile) { return `${SPEC_CACHE_DIR}/${matchingFile}`; @@ -37,11 +41,13 @@ export function getSpecFilePath(omicronVersionPath: string): string { let LATEST_SPEC: string; try { - LATEST_SPEC = execSync(`curl --fail "${SPEC_BASE}/nexus-latest.json"`, { encoding: 'utf-8' }).trim(); + LATEST_SPEC = execSync(`curl --fail "${SPEC_BASE}/nexus-latest.json"`, { + encoding: "utf-8", + }).trim(); } catch (error) { throw new Error( `Failed to fetch spec filename from ${SPEC_BASE}/nexus-latest.json. ` + - `Please check network connectivity and verify OMICRON_VERSION (${OMICRON_SHA}) is valid.` + `Please check network connectivity and verify OMICRON_VERSION (${OMICRON_SHA}) is valid.` ); } @@ -51,7 +57,7 @@ export function getSpecFilePath(omicronVersionPath: string): string { if (!existsSync(SPEC_FILE)) { throw new Error( `Spec file not found at ${SPEC_FILE}. ` + - `Please run \`npm run pretest\` or \`../tools/gen.sh\` to download the spec file first.` + `Please run \`npm run pretest\` or \`../tools/gen.sh\` to download the spec file first.` ); } From 0ea69f1e56e9dd0a2164a8477fbe03677b6eb8b9 Mon Sep 17 00:00:00 2001 From: Charlie Park Date: Thu, 8 Jan 2026 13:42:39 -0800 Subject: [PATCH 12/17] Update version number to 0.12.1 in package.json --- oxide-openapi-gen-ts/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oxide-openapi-gen-ts/package.json b/oxide-openapi-gen-ts/package.json index 0ee93b8..013208a 100644 --- a/oxide-openapi-gen-ts/package.json +++ b/oxide-openapi-gen-ts/package.json @@ -1,6 +1,6 @@ { "name": "@oxide/openapi-gen-ts", - "version": "0.12.0", + "version": "0.12.1", "description": "OpenAPI client generator used to generate Oxide TypeScript SDK", "keywords": [ "oxide", From 10caef1490cdb6af58421ed17691fbde9243fb5f Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 8 Jan 2026 21:43:01 +0000 Subject: [PATCH 13/17] Autogenerate config update --- oxide-openapi-gen-ts/package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/oxide-openapi-gen-ts/package-lock.json b/oxide-openapi-gen-ts/package-lock.json index f78ec84..4fe1959 100644 --- a/oxide-openapi-gen-ts/package-lock.json +++ b/oxide-openapi-gen-ts/package-lock.json @@ -1,12 +1,12 @@ { "name": "@oxide/openapi-gen-ts", - "version": "0.12.0", + "version": "0.12.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@oxide/openapi-gen-ts", - "version": "0.12.0", + "version": "0.12.1", "license": "MPL-2.0", "dependencies": { "@commander-js/extra-typings": "^14.0.0", From 422a8cfbe65b7102fbf71b47b418ebc75b3f33d0 Mon Sep 17 00:00:00 2001 From: David Crespo Date: Thu, 8 Jan 2026 17:07:58 -0600 Subject: [PATCH 14/17] use the same mapObj we use in the client --- oxide-openapi-gen-ts/src/schema/zod.ts | 19 ++------------ oxide-openapi-gen-ts/src/util.ts | 35 ++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 17 deletions(-) diff --git a/oxide-openapi-gen-ts/src/schema/zod.ts b/oxide-openapi-gen-ts/src/schema/zod.ts index 6ff929a..eb6a9a7 100644 --- a/oxide-openapi-gen-ts/src/schema/zod.ts +++ b/oxide-openapi-gen-ts/src/schema/zod.ts @@ -9,29 +9,14 @@ import { type IO } from "../io"; import { makeSchemaGenerator, refToSchemaName } from "./base"; import { type OpenAPIV3 } from "openapi-types"; -import { snakeToCamel } from "../util"; - -/** - * Recursively transform object keys from snake_case to camelCase for default values - */ -function transformDefaultValue(value: unknown): unknown { - if (value === null || value === undefined) return value; - if (typeof value !== "object") return value; - if (Array.isArray(value)) return value.map(transformDefaultValue); - - const result: Record = {}; - for (const [key, val] of Object.entries(value)) { - result[snakeToCamel(key)] = transformDefaultValue(val); - } - return result; -} +import { camelify, snakeToCamel } from "../util"; /** * Generate the .default() method call with transformed default value */ function getDefaultString(schema: OpenAPIV3.SchemaObject): string { if (!("default" in schema)) return ""; - return `.default(${JSON.stringify(transformDefaultValue(schema.default))})`; + return `.default(${JSON.stringify(camelify(schema.default))})`; } export const schemaToZod = makeSchemaGenerator({ diff --git a/oxide-openapi-gen-ts/src/util.ts b/oxide-openapi-gen-ts/src/util.ts index df01671..905a452 100644 --- a/oxide-openapi-gen-ts/src/util.ts +++ b/oxide-openapi-gen-ts/src/util.ts @@ -55,3 +55,38 @@ export const topologicalSort = ( export const extractDoc = (schema: OpenAPIV3.SchemaObject): string => [schema.title, schema.description].filter((n) => n).join("\n\n"); + +const isObjectOrArray = (o: unknown) => + typeof o === "object" && + !(o instanceof Date) && + !(o instanceof RegExp) && + !(o instanceof Error) && + o !== null; + +/** + * Recursively map (k, v) pairs using Object.entries + * + * Note that value transform function takes both k and v so we can use the key + * to decide whether to transform the value. + * + * @param kf maps key to key + * @param vf maps key + value to value + */ +const mapObj = + ( + kf: (k: string) => string, + vf: (k: string | undefined, v: unknown) => unknown = (_, v) => v + ) => + (o: unknown): unknown => { + if (!isObjectOrArray(o)) return o; + + if (Array.isArray(o)) return o.map(mapObj(kf, vf)); + + const newObj: Record = {}; + for (const [k, v] of Object.entries(o as Record)) { + newObj[kf(k)] = isObjectOrArray(v) ? mapObj(kf, vf)(v) : vf(k, v); + } + return newObj; + }; + +export const camelify = mapObj(snakeToCamel); From 38f5b8fa726c6e86b5be6106fd3db9accf5b3b5f Mon Sep 17 00:00:00 2001 From: Charlie Park Date: Thu, 8 Jan 2026 17:28:49 -0800 Subject: [PATCH 15/17] refactor to just use SHA for filename --- tools/gen.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/gen.sh b/tools/gen.sh index 13f3998..1e6d367 100755 --- a/tools/gen.sh +++ b/tools/gen.sh @@ -31,16 +31,16 @@ SPEC_CACHE_DIR="/tmp/openapi-gen-ts-schemas" # Create cache directory if it doesn't exist mkdir -p "$SPEC_CACHE_DIR" -# nexus-latest.json is a symlink that contains the actual spec filename -LATEST_SPEC=$(curl --fail "$SPEC_BASE/nexus-latest.json") -SPEC_FILE="$SPEC_CACHE_DIR/$OMICRON_SHA-$LATEST_SPEC" +SPEC_FILE="$SPEC_CACHE_DIR/$OMICRON_SHA.json" # Download spec only if not already cached if [ ! -f "$SPEC_FILE" ]; then - echo "Downloading spec for $OMICRON_SHA ($LATEST_SPEC)..." + echo "Downloading spec for $OMICRON_SHA..." + # nexus-latest.json is a symlink that contains the actual spec filename + LATEST_SPEC=$(curl --fail "$SPEC_BASE/nexus-latest.json") curl --fail "$SPEC_BASE/$LATEST_SPEC" -o "$SPEC_FILE" else - echo "Using cached spec for $OMICRON_SHA ($LATEST_SPEC)" + echo "Using cached spec for $OMICRON_SHA" fi rm -f "$DEST_DIR/*" # remove after we add --clean flag to generator From 449205f5accee7ae9f74f28893e6a58583129faf Mon Sep 17 00:00:00 2001 From: Charlie Park Date: Thu, 8 Jan 2026 17:36:18 -0800 Subject: [PATCH 16/17] Update test file to match SHA file name --- oxide-openapi-gen-ts/src/test-util.ts | 40 ++++----------------------- 1 file changed, 5 insertions(+), 35 deletions(-) diff --git a/oxide-openapi-gen-ts/src/test-util.ts b/oxide-openapi-gen-ts/src/test-util.ts index 02b9dee..0d11fd9 100644 --- a/oxide-openapi-gen-ts/src/test-util.ts +++ b/oxide-openapi-gen-ts/src/test-util.ts @@ -6,16 +6,14 @@ * Copyright Oxide Computer Company */ -import { readFileSync, readdirSync, existsSync } from "node:fs"; -import { execSync } from "node:child_process"; +import { readFileSync, existsSync } from "node:fs"; /** * Gets the path to the cached OpenAPI spec file based on OMICRON_VERSION. - * First checks for an existing cached file, only fetching the spec filename from GitHub if needed. * - * @param omicronVersionPath - Path to the OMICRON_VERSION file relative to the calling file + * @param omicronVersionPath - Path to the OMICRON_VERSION file * @returns The full path to the cached spec file in /tmp - * @throws Error if the spec filename cannot be fetched or if the spec file doesn't exist + * @throws Error if the spec file doesn't exist */ export function getSpecFilePath(omicronVersionPath: string): string { // Use split("\n")[0] to match bash's `head -n 1` behavior @@ -23,37 +21,9 @@ export function getSpecFilePath(omicronVersionPath: string): string { .split("\n")[0] .trim(); const SPEC_CACHE_DIR = "/tmp/openapi-gen-ts-schemas"; + const SPEC_FILE = `${SPEC_CACHE_DIR}/${OMICRON_SHA}.json`; - // Check if a cached file already exists for this OMICRON_SHA - if (existsSync(SPEC_CACHE_DIR)) { - const cachedFiles = readdirSync(SPEC_CACHE_DIR); - const matchingFile = cachedFiles.find((file) => - file.startsWith(`${OMICRON_SHA}-`) - ); - - if (matchingFile) { - return `${SPEC_CACHE_DIR}/${matchingFile}`; - } - } - - // No cached file found, fetch the latest spec filename from GitHub - const SPEC_BASE = `https://raw.githubusercontent.com/oxidecomputer/omicron/${OMICRON_SHA}/openapi/nexus`; - - let LATEST_SPEC: string; - try { - LATEST_SPEC = execSync(`curl --fail "${SPEC_BASE}/nexus-latest.json"`, { - encoding: "utf-8", - }).trim(); - } catch (error) { - throw new Error( - `Failed to fetch spec filename from ${SPEC_BASE}/nexus-latest.json. ` + - `Please check network connectivity and verify OMICRON_VERSION (${OMICRON_SHA}) is valid.` - ); - } - - const SPEC_FILE = `${SPEC_CACHE_DIR}/${OMICRON_SHA}-${LATEST_SPEC}`; - - // Check if the spec file exists after determining the filename + // Check if the spec file exists if (!existsSync(SPEC_FILE)) { throw new Error( `Spec file not found at ${SPEC_FILE}. ` + From d1bc18601eb4ade8594d6d4d09d96385efd1493d Mon Sep 17 00:00:00 2001 From: Charlie Park Date: Thu, 8 Jan 2026 19:23:31 -0800 Subject: [PATCH 17/17] version gets a min bump to 0.13.0 --- oxide-openapi-gen-ts/package-lock.json | 4 ++-- oxide-openapi-gen-ts/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/oxide-openapi-gen-ts/package-lock.json b/oxide-openapi-gen-ts/package-lock.json index 4fe1959..e57ce19 100644 --- a/oxide-openapi-gen-ts/package-lock.json +++ b/oxide-openapi-gen-ts/package-lock.json @@ -1,12 +1,12 @@ { "name": "@oxide/openapi-gen-ts", - "version": "0.12.1", + "version": "0.13.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@oxide/openapi-gen-ts", - "version": "0.12.1", + "version": "0.13.0", "license": "MPL-2.0", "dependencies": { "@commander-js/extra-typings": "^14.0.0", diff --git a/oxide-openapi-gen-ts/package.json b/oxide-openapi-gen-ts/package.json index 013208a..2342973 100644 --- a/oxide-openapi-gen-ts/package.json +++ b/oxide-openapi-gen-ts/package.json @@ -1,6 +1,6 @@ { "name": "@oxide/openapi-gen-ts", - "version": "0.12.1", + "version": "0.13.0", "description": "OpenAPI client generator used to generate Oxide TypeScript SDK", "keywords": [ "oxide",