/
model_create_device_request_one_of_1.go
84 lines (58 loc) · 7.21 KB
/
model_create_device_request_one_of_1.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/*
* Metal API
*
* This is the API for Equinix Metal. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. The official API docs are hosted at <https://metal.equinix.com/developers/api>.
*
* API version: 1.0.0
* Contact: support@equinixmetal.com
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
package startapi
import (
"time"
)
type CreateDeviceRequestOneOf1 struct {
Facility CreateDeviceRequestOneOf1AllOfFacility `json:"facility"`
// When true, devices with a `custom_ipxe` OS will always boot to iPXE. The default setting of false ensures that iPXE will be used on only the first boot.
AlwaysPxe bool `json:"always_pxe,omitempty"`
// The billing cycle of the device.
BillingCycle string `json:"billing_cycle,omitempty"`
// Customdata is an arbitrary JSON value that can be accessed via the metadata service.
Customdata *interface{} `json:"customdata,omitempty"`
// Any description of the device or how it will be used. This may be used to inform other API consumers with project access.
Description string `json:"description,omitempty"`
// The features attribute allows you to optionally specify what features your server should have. In the API shorthand syntax, all features listed are `required`: ``` { \"features\": [\"tpm\"] } ``` Alternatively, if you do not require a certain feature, but would prefer to be assigned a server with that feature if there are any available, you may specify that feature with a `preferred` value. The request will not fail if we have no servers with that feature in our inventory. The API offers an alternative syntax for mixing preferred and required features: ``` { \"features\": { \"tpm\": \"required\", \"raid\": \"preferred\" } } ``` The request will only fail if there are no available servers matching the required `tpm` criteria.
Features []string `json:"features,omitempty"`
// The Hardware Reservation UUID to provision. Alternatively, `next-available` can be specified to select from any of the available hardware reservations. An error will be returned if the requested reservation option is not available. See [Reserved Hardware](https://metal.equinix.com/developers/docs/deploy/reserved/) for more details.
HardwareReservationId string `json:"hardware_reservation_id,omitempty"`
// The hostname to use within the operating system. The same hostname may be used on multiple devices within a project.
Hostname string `json:"hostname,omitempty"`
// The `ip_addresses attribute will allow you to specify the addresses you want created with your device. The default value configures public IPv4, public IPv6, and private IPv4. Private IPv4 address is required. When specifying `ip_addresses`, one of the array items must enable private IPv4. Some operating systems require public IPv4 address. In those cases you will receive an error message if public IPv4 is not enabled. For example, to only configure your server with a private IPv4 address, you can send `{ \"ip_addresses\": [{ \"address_family\": 4, \"public\": false }] }`. It is possible to request a subnet size larger than a `/30` by assigning addresses using the UUID(s) of ip_reservations in your project. For example, `{ \"ip_addresses\": [..., {\"address_family\": 4, \"public\": true, \"ip_reservations\": [\"uuid1\", \"uuid2\"]}] }` To access a server without public IPs, you can use our Out-of-Band console access (SOS) or proxy through another server in the project with public IPs enabled.
IpAddresses []CreateDeviceRequestOneOfAllOf1IpAddressesInner `json:"ip_addresses,omitempty"`
// When set, the device will chainload an iPXE Script at boot fetched from the supplied URL. See [Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/) for more details.
IpxeScriptUrl string `json:"ipxe_script_url,omitempty"`
// Whether the device should be locked, preventing accidental deletion.
Locked bool `json:"locked,omitempty"`
// Overrides default behaviour of attaching all of the organization members ssh keys and project ssh keys to device if no specific keys specified
NoSshKeys bool `json:"no_ssh_keys,omitempty"`
// The slug of the operating system to provision. Check the Equinix Metal operating system documentation for rules that may be imposed per operating system, including restrictions on IP address options and device plans.
OperatingSystem string `json:"operating_system"`
// The slug of the device plan to provision.
Plan string `json:"plan"`
// Deprecated. Use ip_addresses. Subnet range for addresses allocated to this device.
PrivateIpv4SubnetSize float32 `json:"private_ipv4_subnet_size,omitempty"`
// A list of UUIDs identifying the device parent project that should be authorized to access this device (typically via /root/.ssh/authorized_keys). These keys will also appear in the device metadata. If no SSH keys are specified (`user_ssh_keys`, `project_ssh_keys`, and `ssh_keys` are all empty lists or omitted), all parent project keys, parent project members keys and organization members keys will be included. This behaviour can be changed with 'no_ssh_keys' option to omit any SSH key being added.
ProjectSshKeys []string `json:"project_ssh_keys,omitempty"`
// Deprecated. Use ip_addresses. Subnet range for addresses allocated to this device. Your project must have addresses available for a non-default request.
PublicIpv4SubnetSize float32 `json:"public_ipv4_subnet_size,omitempty"`
SpotInstance bool `json:"spot_instance,omitempty"`
SpotPriceMax float32 `json:"spot_price_max,omitempty"`
// A list of new or existing project ssh_keys that should be authorized to access this device (typically via /root/.ssh/authorized_keys). These keys will also appear in the device metadata. These keys are added in addition to any keys defined by `project_ssh_keys` and `user_ssh_keys`.
SshKeys []CreateDeviceRequestOneOfAllOf1SshKeysInner `json:"ssh_keys,omitempty"`
Tags []string `json:"tags,omitempty"`
TerminationTime time.Time `json:"termination_time,omitempty"`
// A list of UUIDs identifying the users that should be authorized to access this device (typically via /root/.ssh/authorized_keys). These keys will also appear in the device metadata. The users must be members of the project or organization. If no SSH keys are specified (`user_ssh_keys`, `project_ssh_keys`, and `ssh_keys` are all empty lists or omitted), all parent project keys, parent project members keys and organization members keys will be included. This behaviour can be changed with 'no_ssh_keys' option to omit any SSH key being added.
UserSshKeys []string `json:"user_ssh_keys,omitempty"`
// The userdata presented in the metadata service for this device. Userdata is fetched and interpreted by the operating system installed on the device. Acceptable formats are determined by the operating system, with the exception of a special iPXE enabling syntax which is handled before the operating system starts. See [Server User Data](https://metal.equinix.com/developers/docs/servers/user-data/) and [Provisioning with Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/#provisioning-with-custom-ipxe) for more details.
Userdata string `json:"userdata,omitempty"`
}