SetMaintenance
const url = 'https://example.com/hopbox.admin.v1.InstallConfigService/SetMaintenance';const options = { method: 'POST', headers: { 'Connect-Protocol-Version': '1', 'Connect-Timeout-Ms': '1000', 'Content-Type': 'application/json' }, body: '{"maintenance":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/hopbox.admin.v1.InstallConfigService/SetMaintenance \ --header 'Connect-Protocol-Version: 1' \ --header 'Connect-Timeout-Ms: 1000' \ --header 'Content-Type: application/json' \ --data '{ "maintenance": true }'SetMaintenance turns maintenance mode of the install on or off. In maintenance mode, the API refuses every call without the option (hopbox.v1.read_only) with UNAVAILABLE, and the control role closes every control channel and takes no new one. A call that turns it on returns after the calls and the channels that ran have ended. Only root on a control server calls it, through the admin socket, which takes it also in maintenance mode.
Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Define the version of the Connect protocol
Define the version of the Connect protocol
Example
1Define the timeout, in ms
Define the timeout, in ms
Example
1000Request Bodyrequired
Section titled “Request Bodyrequired”SetMaintenanceRequest names the new state of maintenance mode.
object
Maintenance set to true turns maintenance mode on, and false turns it off. A request for the state that the install has already changes nothing, and succeeds.
Example generated
{ "maintenance": true}Responses
Section titled “Responses”Success
SetMaintenanceResponse holds the settings after the change.
object
object
Domain is the domain of the install, for example hop.example.org. It is empty until an instance admin sets it.
Version grows by 1 with each change.
Update_time is the time of the last change.
Public_addresses are the IPv4 and IPv6 addresses at which the edge servers take traffic. The DNS role points the domain, ns1, ns2, and every machine name at them. It is empty until an instance admin sets it.
Acme_directory_url is the ACME directory of the CA that issues the wildcard certificate of the install. The default is the production CA of Let’s Encrypt, https://acme-v02.api.letsencrypt.org/directory.
Acme_email is the contact email of the ACME account of the install. It is empty when the account has no contact.
Acme_terms_agreed is true once an instance admin agreed to the terms of the CA of acme_directory_url. The install asks for no certificate before that.
Mail_transport is how the install delivers its mail. The default is MAIL_TRANSPORT_SMTP.
Maintenance is true while the install is in maintenance mode. SetMaintenance changes it.
Sign_up_mode is how a new person gets an account. The default is SIGN_UP_MODE_APPROVAL.
Grafana_url is the Grafana of the monitoring bundle, for the links of the console to its dashboards. It is empty until an instance admin sets it, and the console then shows no link.
Abuse_thresholds are the thresholds of the detection of abuse inside hopboxd.
object
Cpu_percent is the share of its vCPUs, averaged over 30 minutes, that a machine uses for cpu_for: 1 to 100. The default is 90.
Cpu_for is how long the machine uses that share: 10 minutes to 6 hours. The default is 2 hours.
Egress_bytes_per_second is the rate over 5 minutes at which a machine sends for egress_for: 1 to 100,000,000,000. The default is 50,000,000.
Egress_for is how long the machine sends at that rate: 5 minutes to 6 hours. The default is 30 minutes.
Scan_connections_per_second is the rate over 5 minutes at which a machine opens new outbound connections for scan_for: 1 to 1,000,000. The default is 100.
Scan_for is how long the machine opens connections at that rate: 5 minutes to 6 hours. The default is 10 minutes.
Org_burst is the number of orgs that one account makes in 1 hour: 1 to 10,000. The default is 5.
Api_key_burst is the number of API keys that one account makes in 1 hour: 1 to 10,000. The default is 5.
Machine_burst is the number of machines that one account makes in 1 hour: 1 to 10,000. The default is 10.
Url_churn is the number of changes of the port or the visibility of machine URLs that one account makes in 1 hour: 1 to 10,000. The default is 20.
New_account_age is the age below which an account that makes a machine URL public is new: 1 hour to 90 days. The default is 7 days.
Long_api_key_burst is the number of API keys with the preset lifetime of 365 days that one account makes in 1 hour: 1 to 10,000. The default is 2.
Example
{ "config": { "updateTime": "2023-01-15T01:30:15.01Z", "mailTransport": "MAIL_TRANSPORT_UNSPECIFIED", "signUpMode": "SIGN_UP_MODE_UNSPECIFIED" }}default
Section titled “default”Error
Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation
object
The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
A list of messages that carry the error details. There is no limit on the number of messages.
Contains an arbitrary serialized message along with a @type that describes the type of the serialized message, with an additional debug field for ConnectRPC error details.
object
A URL that acts as a globally unique identifier for the type of the serialized message. For example: type.googleapis.com/google.rpc.ErrorInfo.
The Protobuf message, serialized as bytes and base64-encoded. The specific message type is identified by the type field.
Deserialized error detail payload. The ‘type’ field indicates the schema. This field is for easier debugging and should not be relied upon for application logic.
object
Example
{ "code": "canceled"}