UpdateInstallConfig
const url = 'https://example.com/hopbox.admin.v1.InstallConfigService/UpdateInstallConfig';const options = { method: 'POST', headers: { 'Connect-Protocol-Version': '1', 'Connect-Timeout-Ms': '1000', 'Content-Type': 'application/json' }, body: '{"domain":"example","expectedVersion":"example","publicAddresses":{"addresses":["example"]},"acmeDirectoryUrl":"example","acmeEmail":"example","acmeTermsAgreed":true,"mailTransport":"MAIL_TRANSPORT_UNSPECIFIED","signUpMode":"SIGN_UP_MODE_UNSPECIFIED","grafanaUrl":"example","abuseThresholds":{"cpuPercent":1,"cpuFor":"example","egressBytesPerSecond":"example","egressFor":"example","scanConnectionsPerSecond":1,"scanFor":"example","orgBurst":1,"apiKeyBurst":1,"machineBurst":1,"urlChurn":1,"newAccountAge":"example","longApiKeyBurst":1}}'};
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/UpdateInstallConfig \ --header 'Connect-Protocol-Version: 1' \ --header 'Connect-Timeout-Ms: 1000' \ --header 'Content-Type: application/json' \ --data '{ "domain": "example", "expectedVersion": "example", "publicAddresses": { "addresses": [ "example" ] }, "acmeDirectoryUrl": "example", "acmeEmail": "example", "acmeTermsAgreed": true, "mailTransport": "MAIL_TRANSPORT_UNSPECIFIED", "signUpMode": "SIGN_UP_MODE_UNSPECIFIED", "grafanaUrl": "example", "abuseThresholds": { "cpuPercent": 1, "cpuFor": "example", "egressBytesPerSecond": "example", "egressFor": "example", "scanConnectionsPerSecond": 1, "scanFor": "example", "orgBurst": 1, "apiKeyBurst": 1, "machineBurst": 1, "urlChurn": 1, "newAccountAge": "example", "longApiKeyBurst": 1 } }'UpdateInstallConfig changes the settings that the request sets, and keeps the others.
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”UpdateInstallConfigRequest holds the settings to change.
object
Domain is the new domain of the install: a lowercase DNS name with at least two labels, such as hop.example.org. Leave it out to keep the domain.
Expected_version is the version of the settings that the caller read. If the settings have another version now, the call fails with ABORTED and changes nothing. Leave it out to change the settings at any version.
Public_addresses replaces the public addresses of the install. Leave it out to keep them. An empty list removes them.
object
Addresses holds at most 16 IPv4 or IPv6 addresses, none twice. An address must not be unspecified, multicast, or link-local, and must not have an IPv6 zone.
Acme_directory_url is the new ACME directory: an https URL of at most 2048 characters, without user info or a fragment. Leave it out to keep the directory. A new directory names another CA, so it also sets acme_terms_agreed to false, unless the request sets acme_terms_agreed too.
Acme_email is the new contact email of the ACME account. An empty string removes the contact. Leave it out to keep the email.
Acme_terms_agreed set to true records that the caller agrees to the terms of the CA of the directory. Set to false, it stops new certificates. Leave it out to keep it.
MailTransport says how the install delivers its mail.
SignUpMode says how a new person gets an account.
Grafana_url is the new URL of Grafana: an http or https URL of at most 2048 characters, without user info, a query, or a fragment, such as http://127.0.0.1:3000 behind an SSH tunnel. An empty string removes it. Leave it out to keep the URL.
Abuse_thresholds changes the thresholds of the detection of abuse that it sets. A value out of its bounds fails with INVALID_ARGUMENT. Leave it out to keep every threshold.
object
Responses
Section titled “Responses”Success
UpdateInstallConfigResponse 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"}