ngrok_api/types.rs
1// Code generated for API Clients. DO NOT EDIT.
2
3use serde::{Deserialize, Serialize};
4use std::collections::HashMap;
5
6#[derive(Clone, Debug, Default, Deserialize, Serialize)]
7pub struct Item {
8 /// a resource identifier
9 pub id: String,
10}
11
12#[derive(Clone, Debug, Default, Deserialize, Serialize)]
13pub struct Paging {
14 pub before_id: Option<String>,
15 pub limit: Option<String>,
16}
17
18#[derive(Clone, Debug, Default, Deserialize, Serialize)]
19pub struct Error {
20 pub error_code: String,
21 pub status_code: i32,
22 pub msg: String,
23 pub details: HashMap<String, String>,
24}
25
26#[derive(Clone, Debug, Default, Deserialize, Serialize)]
27pub struct Ref {
28 /// a resource identifier
29 pub id: String,
30 /// a uri for locating a resource
31 pub uri: String,
32}
33
34#[derive(Clone, Debug, Default, Deserialize, Serialize)]
35pub struct AbuseReport {
36 /// ID of the abuse report
37 pub id: String,
38 /// URI of the abuse report API resource
39 pub uri: String,
40 /// timestamp that the abuse report record was created in RFC 3339 format
41 pub created_at: String,
42 /// a list of URLs containing suspected abusive content
43 pub urls: Vec<String>,
44 /// arbitrary user-defined data about this abuse report. Optional, max 4096 bytes.
45 pub metadata: String,
46 /// Indicates whether ngrok has processed the abuse report. one of `PENDING`,
47 /// `PROCESSED`, or `PARTIALLY_PROCESSED`
48 pub status: String,
49 /// an array of hostname statuses related to the report
50 pub hostnames: Vec<AbuseReportHostname>,
51}
52
53#[derive(Clone, Debug, Default, Deserialize, Serialize)]
54pub struct AbuseReportHostname {
55 /// the hostname ngrok has parsed out of one of the reported URLs in this abuse
56 /// report
57 pub hostname: String,
58 /// indicates what action ngrok has taken against the hostname. one of `PENDING`,
59 /// `BANNED`, `UNBANNED`, or `IGNORE`
60 pub status: String,
61}
62
63#[derive(Clone, Debug, Default, Deserialize, Serialize)]
64pub struct AbuseReportCreate {
65 /// a list of URLs containing suspected abusive content
66 pub urls: Vec<String>,
67 /// arbitrary user-defined data about this abuse report. Optional, max 4096 bytes.
68 pub metadata: String,
69}
70
71#[derive(Clone, Debug, Default, Deserialize, Serialize)]
72pub struct AgentIngressCreate {
73 /// human-readable description of the use of this Agent Ingress. optional, max 255
74 /// bytes.
75 pub description: String,
76 /// arbitrary user-defined machine-readable data of this Agent Ingress. optional,
77 /// max 4096 bytes
78 pub metadata: String,
79 /// the domain that you own to be used as the base domain name to generate regional
80 /// agent ingress domains.
81 pub domain: String,
82 /// configuration for automatic management of TLS certificates for this domain, or
83 /// null if automatic management is disabled. Optional.
84 pub certificate_management_policy: Option<AgentIngressCertPolicy>,
85}
86
87#[derive(Clone, Debug, Default, Deserialize, Serialize)]
88pub struct AgentIngressUpdate {
89 pub id: String,
90 /// human-readable description of the use of this Agent Ingress. optional, max 255
91 /// bytes.
92 pub description: Option<String>,
93 /// arbitrary user-defined machine-readable data of this Agent Ingress. optional,
94 /// max 4096 bytes
95 pub metadata: Option<String>,
96 /// configuration for automatic management of TLS certificates for this domain, or
97 /// null if automatic management is disabled. Optional.
98 pub certificate_management_policy: Option<AgentIngressCertPolicy>,
99}
100
101#[derive(Clone, Debug, Default, Deserialize, Serialize)]
102pub struct AgentIngress {
103 /// unique Agent Ingress resource identifier
104 pub id: String,
105 /// URI to the API resource of this Agent ingress
106 pub uri: String,
107 /// human-readable description of the use of this Agent Ingress. optional, max 255
108 /// bytes.
109 pub description: String,
110 /// arbitrary user-defined machine-readable data of this Agent Ingress. optional,
111 /// max 4096 bytes
112 pub metadata: String,
113 /// the domain that you own to be used as the base domain name to generate regional
114 /// agent ingress domains.
115 pub domain: String,
116 /// a list of target values to use as the values of NS records for the domain
117 /// property these values will delegate control over the domain to ngrok
118 pub ns_targets: Vec<String>,
119 /// a list of regional agent ingress domains that are subdomains of the value of
120 /// domain this value may increase over time as ngrok adds more regions
121 pub region_domains: Vec<String>,
122 /// timestamp when the Agent Ingress was created, RFC 3339 format
123 pub created_at: String,
124 /// configuration for automatic management of TLS certificates for this domain, or
125 /// null if automatic management is disabled
126 pub certificate_management_policy: Option<AgentIngressCertPolicy>,
127 /// status of the automatic certificate management for this domain, or null if
128 /// automatic management is disabled
129 pub certificate_management_status: Option<AgentIngressCertStatus>,
130}
131
132#[derive(Clone, Debug, Default, Deserialize, Serialize)]
133pub struct AgentIngressList {
134 /// the list of Agent Ingresses owned by this account
135 pub ingresses: Vec<AgentIngress>,
136 /// URI of the Agent Ingress list API resource
137 pub uri: String,
138 /// URI of the next page, or null if there is no next page
139 pub next_page_uri: Option<String>,
140}
141
142#[derive(Clone, Debug, Default, Deserialize, Serialize)]
143pub struct AgentIngressCertPolicy {
144 /// certificate authority to request certificates from. The only supported value is
145 /// letsencrypt.
146 pub authority: String,
147 /// type of private key to use when requesting certificates. Defaults to rsa, can be
148 /// either rsa or ecdsa.
149 pub private_key_type: String,
150}
151
152#[derive(Clone, Debug, Default, Deserialize, Serialize)]
153pub struct AgentIngressCertStatus {
154 /// timestamp when the next renewal will be requested, RFC 3339 format
155 pub renews_at: Option<String>,
156 /// status of the certificate provisioning job, or null if the certificiate isn't
157 /// being provisioned or renewed
158 pub provisioning_job: Option<AgentIngressCertJob>,
159}
160
161#[derive(Clone, Debug, Default, Deserialize, Serialize)]
162pub struct AgentIngressCertJob {
163 /// if present, an error code indicating why provisioning is failing. It may be
164 /// either a temporary condition (INTERNAL_ERROR), or a permanent one the user must
165 /// correct (DNS_ERROR).
166 pub error_code: Option<String>,
167 /// a message describing the current status or error
168 pub msg: String,
169 /// timestamp when the provisioning job started, RFC 3339 format
170 pub started_at: String,
171 /// timestamp when the provisioning job will be retried
172 pub retries_at: Option<String>,
173}
174
175#[derive(Clone, Debug, Default, Deserialize, Serialize)]
176pub struct APIKeyCreate {
177 /// human-readable description of what uses the API key to authenticate. optional,
178 /// max 255 bytes.
179 pub description: String,
180 /// arbitrary user-defined data of this API key. optional, max 4096 bytes
181 pub metadata: String,
182 /// If supplied at credential creation, ownership will be assigned to the specified
183 /// User or Bot. Only admins may specify an owner other than themselves. Defaults to
184 /// the authenticated User or Bot.
185 pub owner_id: Option<String>,
186}
187
188#[derive(Clone, Debug, Default, Deserialize, Serialize)]
189pub struct APIKeyUpdate {
190 pub id: String,
191 /// human-readable description of what uses the API key to authenticate. optional,
192 /// max 255 bytes.
193 pub description: Option<String>,
194 /// arbitrary user-defined data of this API key. optional, max 4096 bytes
195 pub metadata: Option<String>,
196}
197
198#[derive(Clone, Debug, Default, Deserialize, Serialize)]
199pub struct APIKey {
200 /// unique API key resource identifier
201 pub id: String,
202 /// URI to the API resource of this API key
203 pub uri: String,
204 /// human-readable description of what uses the API key to authenticate. optional,
205 /// max 255 bytes.
206 pub description: String,
207 /// arbitrary user-defined data of this API key. optional, max 4096 bytes
208 pub metadata: String,
209 /// timestamp when the api key was created, RFC 3339 format
210 pub created_at: String,
211 /// the bearer token that can be placed into the Authorization header to
212 /// authenticate request to the ngrok API. **This value is only available one time,
213 /// on the API response from key creation. Otherwise it is null.**
214 pub token: Option<String>,
215 /// If supplied at credential creation, ownership will be assigned to the specified
216 /// User or Bot. Only admins may specify an owner other than themselves. Defaults to
217 /// the authenticated User or Bot.
218 pub owner_id: Option<String>,
219}
220
221#[derive(Clone, Debug, Default, Deserialize, Serialize)]
222pub struct APIKeyList {
223 /// the list of API keys for this account
224 pub keys: Vec<APIKey>,
225 /// URI of the API keys list API resource
226 pub uri: String,
227 /// URI of the next page, or null if there is no next page
228 pub next_page_uri: Option<String>,
229}
230
231#[derive(Clone, Debug, Default, Deserialize, Serialize)]
232pub struct ApplicationSession {
233 /// unique application session resource identifier
234 pub id: String,
235 /// URI of the application session API resource
236 pub uri: String,
237 /// URL of the hostport served by this endpoint
238 pub public_url: String,
239 /// browser session details of the application session
240 pub browser_session: BrowserSession,
241 /// application user this session is associated with
242 pub application_user: Option<Ref>,
243 /// timestamp when the user was created in RFC 3339 format
244 pub created_at: String,
245 /// timestamp when the user was last active in RFC 3339 format
246 pub last_active: String,
247 /// timestamp when session expires in RFC 3339 format
248 pub expires_at: String,
249 /// ephemeral endpoint this session is associated with
250 pub endpoint: Option<Ref>,
251 /// edge this session is associated with, null if the endpoint is agent-initiated
252 pub edge: Option<Ref>,
253 /// route this session is associated with, null if the endpoint is agent-initiated
254 pub route: Option<Ref>,
255}
256
257#[derive(Clone, Debug, Default, Deserialize, Serialize)]
258pub struct ApplicationSessionList {
259 /// list of all application sessions on this account
260 pub application_sessions: Vec<ApplicationSession>,
261 /// URI of the application session list API resource
262 pub uri: String,
263 /// URI of the next page, or null if there is no next page
264 pub next_page_uri: Option<String>,
265}
266
267#[derive(Clone, Debug, Default, Deserialize, Serialize)]
268pub struct BrowserSession {
269 /// HTTP User-Agent data
270 pub user_agent: UserAgent,
271 /// IP address
272 pub ip_address: String,
273 /// IP geolocation data
274 pub location: Option<Location>,
275}
276
277#[derive(Clone, Debug, Default, Deserialize, Serialize)]
278pub struct UserAgent {
279 /// raw User-Agent request header
280 pub raw: String,
281 /// browser name (e.g. Chrome)
282 pub browser_name: String,
283 /// browser version (e.g. 102)
284 pub browser_version: String,
285 /// type of device (e.g. Desktop)
286 pub device_type: String,
287 /// operating system name (e.g. MacOS)
288 pub os_name: String,
289 /// operating system version (e.g. 10.15.7)
290 pub os_version: String,
291}
292
293#[derive(Clone, Debug, Default, Deserialize, Serialize)]
294pub struct Location {
295 /// ISO country code
296 pub country_code: Option<String>,
297 /// geographical latitude
298 pub latitude: Option<f64>,
299 /// geographical longitude
300 pub longitude: Option<f64>,
301 /// accuracy radius of the geographical coordinates
302 pub lat_long_radius_km: Option<u64>,
303}
304
305#[derive(Clone, Debug, Default, Deserialize, Serialize)]
306pub struct ApplicationUser {
307 /// unique application user resource identifier
308 pub id: String,
309 /// URI of the application user API resource
310 pub uri: String,
311 /// identity provider that the user authenticated with
312 pub identity_provider: IdentityProvider,
313 /// unique user identifier
314 pub provider_user_id: String,
315 /// user username
316 pub username: String,
317 /// user email
318 pub email: String,
319 /// user common name
320 pub name: String,
321 /// timestamp when the user was created in RFC 3339 format
322 pub created_at: String,
323 /// timestamp when the user was last active in RFC 3339 format
324 pub last_active: String,
325 /// timestamp when the user last signed-in in RFC 3339 format
326 pub last_login: String,
327}
328
329#[derive(Clone, Debug, Default, Deserialize, Serialize)]
330pub struct ApplicationUserList {
331 /// list of all application users on this account
332 pub application_users: Vec<ApplicationUser>,
333 /// URI of the application user list API resource
334 pub uri: String,
335 /// URI of the next page, or null if there is no next page
336 pub next_page_uri: Option<String>,
337}
338
339#[derive(Clone, Debug, Default, Deserialize, Serialize)]
340pub struct IdentityProvider {
341 /// name of the identity provider (e.g. Google)
342 pub name: String,
343 /// URL of the identity provider (e.g. https://accounts.google.com)
344 pub url: String,
345}
346
347#[derive(Clone, Debug, Default, Deserialize, Serialize)]
348pub struct TunnelSession {
349 /// version of the ngrok agent that started this ngrok tunnel session
350 pub agent_version: String,
351 /// reference to the tunnel credential or ssh credential used by the ngrok agent to
352 /// start this tunnel session
353 pub credential: Ref,
354 /// unique tunnel session resource identifier
355 pub id: String,
356 /// source ip address of the tunnel session
357 pub ip: String,
358 /// arbitrary user-defined data specified in the metadata property in the ngrok
359 /// configuration file. See the metadata configuration option
360 pub metadata: String,
361 /// operating system of the host the ngrok agent is running on
362 pub os: String,
363 /// the ngrok region identifier in which this tunnel session was started
364 pub region: String,
365 /// time when the tunnel session first connected to the ngrok servers
366 pub started_at: String,
367 /// the transport protocol used to start the tunnel session. Either `ngrok/v2` or
368 /// `ssh`
369 pub transport: String,
370 /// URI to the API resource of the tunnel session
371 pub uri: String,
372}
373
374#[derive(Clone, Debug, Default, Deserialize, Serialize)]
375pub struct TunnelSessionList {
376 /// list of all tunnel sessions on this account
377 pub tunnel_sessions: Vec<TunnelSession>,
378 /// URI to the API resource of the tunnel session list
379 pub uri: String,
380 /// URI of the next page, or null if there is no next page
381 pub next_page_uri: Option<String>,
382}
383
384#[derive(Clone, Debug, Default, Deserialize, Serialize)]
385pub struct TunnelSessionsUpdate {
386 pub id: String,
387}
388
389#[derive(Clone, Debug, Default, Deserialize, Serialize)]
390pub struct FailoverBackend {
391 /// unique identifier for this Failover backend
392 pub id: String,
393 /// URI of the FailoverBackend API resource
394 pub uri: String,
395 /// timestamp when the backend was created, RFC 3339 format
396 pub created_at: String,
397 /// human-readable description of this backend. Optional
398 pub description: String,
399 /// arbitrary user-defined machine-readable data of this backend. Optional
400 pub metadata: String,
401 /// the ids of the child backends in order
402 pub backends: Vec<String>,
403}
404
405#[derive(Clone, Debug, Default, Deserialize, Serialize)]
406pub struct FailoverBackendCreate {
407 /// human-readable description of this backend. Optional
408 pub description: String,
409 /// arbitrary user-defined machine-readable data of this backend. Optional
410 pub metadata: String,
411 /// the ids of the child backends in order
412 pub backends: Vec<String>,
413}
414
415#[derive(Clone, Debug, Default, Deserialize, Serialize)]
416pub struct FailoverBackendUpdate {
417 pub id: String,
418 /// human-readable description of this backend. Optional
419 pub description: Option<String>,
420 /// arbitrary user-defined machine-readable data of this backend. Optional
421 pub metadata: Option<String>,
422 /// the ids of the child backends in order
423 pub backends: Vec<String>,
424}
425
426#[derive(Clone, Debug, Default, Deserialize, Serialize)]
427pub struct FailoverBackendList {
428 /// the list of all Failover backends on this account
429 pub backends: Vec<FailoverBackend>,
430 /// URI of the Failover backends list API resource
431 pub uri: String,
432 /// URI of the next page, or null if there is no next page
433 pub next_page_uri: Option<String>,
434}
435
436#[derive(Clone, Debug, Default, Deserialize, Serialize)]
437pub struct HTTPResponseBackend {
438 pub id: String,
439 /// URI of the HTTPResponseBackend API resource
440 pub uri: String,
441 /// timestamp when the backend was created, RFC 3339 format
442 pub created_at: String,
443 /// human-readable description of this backend. Optional
444 pub description: String,
445 /// arbitrary user-defined machine-readable data of this backend. Optional
446 pub metadata: String,
447 /// body to return as fixed content
448 pub body: String,
449 /// headers to return
450 pub headers: HashMap<String, String>,
451 /// status code to return
452 pub status_code: i32,
453}
454
455#[derive(Clone, Debug, Default, Deserialize, Serialize)]
456pub struct HTTPResponseBackendCreate {
457 /// human-readable description of this backend. Optional
458 pub description: String,
459 /// arbitrary user-defined machine-readable data of this backend. Optional
460 pub metadata: String,
461 /// body to return as fixed content
462 pub body: String,
463 /// headers to return
464 pub headers: HashMap<String, String>,
465 /// status code to return
466 pub status_code: Option<i32>,
467}
468
469#[derive(Clone, Debug, Default, Deserialize, Serialize)]
470pub struct HTTPResponseBackendUpdate {
471 pub id: String,
472 /// human-readable description of this backend. Optional
473 pub description: Option<String>,
474 /// arbitrary user-defined machine-readable data of this backend. Optional
475 pub metadata: Option<String>,
476 /// body to return as fixed content
477 pub body: Option<String>,
478 /// headers to return
479 pub headers: Option<HashMap<String, String>>,
480 /// status code to return
481 pub status_code: Option<i32>,
482}
483
484#[derive(Clone, Debug, Default, Deserialize, Serialize)]
485pub struct HTTPResponseBackendList {
486 pub backends: Vec<HTTPResponseBackend>,
487 pub uri: String,
488 pub next_page_uri: Option<String>,
489}
490
491#[derive(Clone, Debug, Default, Deserialize, Serialize)]
492pub struct StaticBackend {
493 /// unique identifier for this static backend
494 pub id: String,
495 /// URI of the StaticBackend API resource
496 pub uri: String,
497 /// timestamp when the backend was created, RFC 3339 format
498 pub created_at: String,
499 /// human-readable description of this backend. Optional
500 pub description: String,
501 /// arbitrary user-defined machine-readable data of this backend. Optional
502 pub metadata: String,
503 /// the address to forward to
504 pub address: String,
505 /// tls configuration to use
506 pub tls: StaticBackendTLS,
507}
508
509#[derive(Clone, Debug, Default, Deserialize, Serialize)]
510pub struct StaticBackendTLS {
511 /// if TLS is checked
512 pub enabled: bool,
513}
514
515#[derive(Clone, Debug, Default, Deserialize, Serialize)]
516pub struct StaticBackendCreate {
517 /// human-readable description of this backend. Optional
518 pub description: String,
519 /// arbitrary user-defined machine-readable data of this backend. Optional
520 pub metadata: String,
521 /// the address to forward to
522 pub address: String,
523 /// tls configuration to use
524 pub tls: StaticBackendTLS,
525}
526
527#[derive(Clone, Debug, Default, Deserialize, Serialize)]
528pub struct StaticBackendUpdate {
529 pub id: String,
530 /// human-readable description of this backend. Optional
531 pub description: Option<String>,
532 /// arbitrary user-defined machine-readable data of this backend. Optional
533 pub metadata: Option<String>,
534 /// the address to forward to
535 pub address: String,
536 /// tls configuration to use
537 pub tls: StaticBackendTLS,
538}
539
540#[derive(Clone, Debug, Default, Deserialize, Serialize)]
541pub struct StaticBackendList {
542 /// the list of all static backends on this account
543 pub backends: Vec<StaticBackend>,
544 /// URI of the static backends list API resource
545 pub uri: String,
546 /// URI of the next page, or null if there is no next page
547 pub next_page_uri: Option<String>,
548}
549
550#[derive(Clone, Debug, Default, Deserialize, Serialize)]
551pub struct TunnelGroupBackend {
552 /// unique identifier for this TunnelGroup backend
553 pub id: String,
554 /// URI of the TunnelGroupBackend API resource
555 pub uri: String,
556 /// timestamp when the backend was created, RFC 3339 format
557 pub created_at: String,
558 /// human-readable description of this backend. Optional
559 pub description: String,
560 /// arbitrary user-defined machine-readable data of this backend. Optional
561 pub metadata: String,
562 /// labels to watch for tunnels on, e.g. app->foo, dc->bar
563 pub labels: HashMap<String, String>,
564 /// tunnels matching this backend
565 pub tunnels: Vec<Ref>,
566}
567
568#[derive(Clone, Debug, Default, Deserialize, Serialize)]
569pub struct TunnelGroupBackendCreate {
570 /// human-readable description of this backend. Optional
571 pub description: String,
572 /// arbitrary user-defined machine-readable data of this backend. Optional
573 pub metadata: String,
574 /// labels to watch for tunnels on, e.g. app->foo, dc->bar
575 pub labels: HashMap<String, String>,
576}
577
578#[derive(Clone, Debug, Default, Deserialize, Serialize)]
579pub struct TunnelGroupBackendUpdate {
580 pub id: String,
581 /// human-readable description of this backend. Optional
582 pub description: Option<String>,
583 /// arbitrary user-defined machine-readable data of this backend. Optional
584 pub metadata: Option<String>,
585 /// labels to watch for tunnels on, e.g. app->foo, dc->bar
586 pub labels: HashMap<String, String>,
587}
588
589#[derive(Clone, Debug, Default, Deserialize, Serialize)]
590pub struct TunnelGroupBackendList {
591 /// the list of all TunnelGroup backends on this account
592 pub backends: Vec<TunnelGroupBackend>,
593 /// URI of the TunnelGroup backends list API resource
594 pub uri: String,
595 /// URI of the next page, or null if there is no next page
596 pub next_page_uri: Option<String>,
597}
598
599#[derive(Clone, Debug, Default, Deserialize, Serialize)]
600pub struct WeightedBackend {
601 /// unique identifier for this Weighted backend
602 pub id: String,
603 /// URI of the WeightedBackend API resource
604 pub uri: String,
605 /// timestamp when the backend was created, RFC 3339 format
606 pub created_at: String,
607 /// human-readable description of this backend. Optional
608 pub description: String,
609 /// arbitrary user-defined machine-readable data of this backend. Optional
610 pub metadata: String,
611 /// the ids of the child backends to their weights [0-10000]
612 pub backends: HashMap<String, i64>,
613}
614
615#[derive(Clone, Debug, Default, Deserialize, Serialize)]
616pub struct WeightedBackendCreate {
617 /// human-readable description of this backend. Optional
618 pub description: String,
619 /// arbitrary user-defined machine-readable data of this backend. Optional
620 pub metadata: String,
621 /// the ids of the child backends to their weights [0-10000]
622 pub backends: HashMap<String, i64>,
623}
624
625#[derive(Clone, Debug, Default, Deserialize, Serialize)]
626pub struct WeightedBackendUpdate {
627 pub id: String,
628 /// human-readable description of this backend. Optional
629 pub description: Option<String>,
630 /// arbitrary user-defined machine-readable data of this backend. Optional
631 pub metadata: Option<String>,
632 /// the ids of the child backends to their weights [0-10000]
633 pub backends: HashMap<String, i64>,
634}
635
636#[derive(Clone, Debug, Default, Deserialize, Serialize)]
637pub struct WeightedBackendList {
638 /// the list of all Weighted backends on this account
639 pub backends: Vec<WeightedBackend>,
640 /// URI of the Weighted backends list API resource
641 pub uri: String,
642 /// URI of the next page, or null if there is no next page
643 pub next_page_uri: Option<String>,
644}
645
646#[derive(Clone, Debug, Default, Deserialize, Serialize)]
647pub struct BotUser {
648 /// unique API key resource identifier
649 pub id: String,
650 /// URI to the API resource of this bot user
651 pub uri: String,
652 /// human-readable name used to identify the bot
653 pub name: String,
654 /// whether or not the bot is active
655 pub active: bool,
656 /// timestamp when the api key was created, RFC 3339 format
657 pub created_at: String,
658}
659
660#[derive(Clone, Debug, Default, Deserialize, Serialize)]
661pub struct BotUserCreate {
662 /// human-readable name used to identify the bot
663 pub name: String,
664 /// whether or not the bot is active
665 pub active: Option<bool>,
666}
667
668#[derive(Clone, Debug, Default, Deserialize, Serialize)]
669pub struct BotUserUpdate {
670 pub id: String,
671 /// human-readable name used to identify the bot
672 pub name: Option<String>,
673 /// whether or not the bot is active
674 pub active: Option<bool>,
675}
676
677#[derive(Clone, Debug, Default, Deserialize, Serialize)]
678pub struct BotUserList {
679 /// the list of all bot users on this account
680 pub bot_users: Vec<BotUser>,
681 /// URI of the bot users list API resource
682 pub uri: String,
683 /// URI of the next page, or null if there is no next page
684 pub next_page_uri: Option<String>,
685}
686
687#[derive(Clone, Debug, Default, Deserialize, Serialize)]
688pub struct CertificateAuthorityCreate {
689 /// human-readable description of this Certificate Authority. optional, max 255
690 /// bytes.
691 pub description: String,
692 /// arbitrary user-defined machine-readable data of this Certificate Authority.
693 /// optional, max 4096 bytes.
694 pub metadata: String,
695 /// raw PEM of the Certificate Authority
696 pub ca_pem: String,
697}
698
699#[derive(Clone, Debug, Default, Deserialize, Serialize)]
700pub struct CertificateAuthorityUpdate {
701 pub id: String,
702 /// human-readable description of this Certificate Authority. optional, max 255
703 /// bytes.
704 pub description: Option<String>,
705 /// arbitrary user-defined machine-readable data of this Certificate Authority.
706 /// optional, max 4096 bytes.
707 pub metadata: Option<String>,
708}
709
710#[derive(Clone, Debug, Default, Deserialize, Serialize)]
711pub struct CertificateAuthority {
712 /// unique identifier for this Certificate Authority
713 pub id: String,
714 /// URI of the Certificate Authority API resource
715 pub uri: String,
716 /// timestamp when the Certificate Authority was created, RFC 3339 format
717 pub created_at: String,
718 /// human-readable description of this Certificate Authority. optional, max 255
719 /// bytes.
720 pub description: String,
721 /// arbitrary user-defined machine-readable data of this Certificate Authority.
722 /// optional, max 4096 bytes.
723 pub metadata: String,
724 /// raw PEM of the Certificate Authority
725 pub ca_pem: String,
726 /// subject common name of the Certificate Authority
727 pub subject_common_name: String,
728 /// timestamp when this Certificate Authority becomes valid, RFC 3339 format
729 pub not_before: String,
730 /// timestamp when this Certificate Authority becomes invalid, RFC 3339 format
731 pub not_after: String,
732 /// set of actions the private key of this Certificate Authority can be used for
733 pub key_usages: Vec<String>,
734 /// extended set of actions the private key of this Certificate Authority can be
735 /// used for
736 pub extended_key_usages: Vec<String>,
737}
738
739#[derive(Clone, Debug, Default, Deserialize, Serialize)]
740pub struct CertificateAuthorityList {
741 /// the list of all certificate authorities on this account
742 pub certificate_authorities: Vec<CertificateAuthority>,
743 /// URI of the certificates authorities list API resource
744 pub uri: String,
745 /// URI of the next page, or null if there is no next page
746 pub next_page_uri: Option<String>,
747}
748
749#[derive(Clone, Debug, Default, Deserialize, Serialize)]
750pub struct CredentialCreate {
751 /// human-readable description of who or what will use the credential to
752 /// authenticate. Optional, max 255 bytes.
753 pub description: String,
754 /// arbitrary user-defined machine-readable data of this credential. Optional, max
755 /// 4096 bytes.
756 pub metadata: String,
757 /// optional list of ACL rules. If unspecified, the credential will have no
758 /// restrictions. The only allowed ACL rule at this time is the `bind` rule. The
759 /// `bind` rule allows the caller to restrict what domains, addresses, and labels
760 /// the token is allowed to bind. For example, to allow the token to open a tunnel
761 /// on example.ngrok.io your ACL would include the rule `bind:example.ngrok.io`.
762 /// Bind rules for domains may specify a leading wildcard to match multiple domains
763 /// with a common suffix. For example, you may specify a rule of
764 /// `bind:*.example.com` which will allow `x.example.com`, `y.example.com`,
765 /// `*.example.com`, etc. Bind rules for labels may specify a wildcard key and/or
766 /// value to match multiple labels. For example, you may specify a rule of
767 /// `bind:*=example` which will allow `x=example`, `y=example`, etc. A rule of `'*'`
768 /// is equivalent to no acl at all and will explicitly permit all actions.
769 pub acl: Vec<String>,
770 /// If supplied at credential creation, ownership will be assigned to the specified
771 /// User or Bot. Only admins may specify an owner other than themselves. Defaults to
772 /// the authenticated User or Bot.
773 pub owner_id: Option<String>,
774}
775
776#[derive(Clone, Debug, Default, Deserialize, Serialize)]
777pub struct CredentialUpdate {
778 pub id: String,
779 /// human-readable description of who or what will use the credential to
780 /// authenticate. Optional, max 255 bytes.
781 pub description: Option<String>,
782 /// arbitrary user-defined machine-readable data of this credential. Optional, max
783 /// 4096 bytes.
784 pub metadata: Option<String>,
785 /// optional list of ACL rules. If unspecified, the credential will have no
786 /// restrictions. The only allowed ACL rule at this time is the `bind` rule. The
787 /// `bind` rule allows the caller to restrict what domains, addresses, and labels
788 /// the token is allowed to bind. For example, to allow the token to open a tunnel
789 /// on example.ngrok.io your ACL would include the rule `bind:example.ngrok.io`.
790 /// Bind rules for domains may specify a leading wildcard to match multiple domains
791 /// with a common suffix. For example, you may specify a rule of
792 /// `bind:*.example.com` which will allow `x.example.com`, `y.example.com`,
793 /// `*.example.com`, etc. Bind rules for labels may specify a wildcard key and/or
794 /// value to match multiple labels. For example, you may specify a rule of
795 /// `bind:*=example` which will allow `x=example`, `y=example`, etc. A rule of `'*'`
796 /// is equivalent to no acl at all and will explicitly permit all actions.
797 pub acl: Option<Vec<String>>,
798}
799
800#[derive(Clone, Debug, Default, Deserialize, Serialize)]
801pub struct Credential {
802 /// unique tunnel credential resource identifier
803 pub id: String,
804 /// URI of the tunnel credential API resource
805 pub uri: String,
806 /// timestamp when the tunnel credential was created, RFC 3339 format
807 pub created_at: String,
808 /// human-readable description of who or what will use the credential to
809 /// authenticate. Optional, max 255 bytes.
810 pub description: String,
811 /// arbitrary user-defined machine-readable data of this credential. Optional, max
812 /// 4096 bytes.
813 pub metadata: String,
814 /// the credential's authtoken that can be used to authenticate an ngrok agent.
815 /// **This value is only available one time, on the API response from credential
816 /// creation, otherwise it is null.**
817 pub token: Option<String>,
818 /// optional list of ACL rules. If unspecified, the credential will have no
819 /// restrictions. The only allowed ACL rule at this time is the `bind` rule. The
820 /// `bind` rule allows the caller to restrict what domains, addresses, and labels
821 /// the token is allowed to bind. For example, to allow the token to open a tunnel
822 /// on example.ngrok.io your ACL would include the rule `bind:example.ngrok.io`.
823 /// Bind rules for domains may specify a leading wildcard to match multiple domains
824 /// with a common suffix. For example, you may specify a rule of
825 /// `bind:*.example.com` which will allow `x.example.com`, `y.example.com`,
826 /// `*.example.com`, etc. Bind rules for labels may specify a wildcard key and/or
827 /// value to match multiple labels. For example, you may specify a rule of
828 /// `bind:*=example` which will allow `x=example`, `y=example`, etc. A rule of `'*'`
829 /// is equivalent to no acl at all and will explicitly permit all actions.
830 pub acl: Vec<String>,
831 /// If supplied at credential creation, ownership will be assigned to the specified
832 /// User or Bot. Only admins may specify an owner other than themselves. Defaults to
833 /// the authenticated User or Bot.
834 pub owner_id: Option<String>,
835}
836
837#[derive(Clone, Debug, Default, Deserialize, Serialize)]
838pub struct CredentialList {
839 /// the list of all tunnel credentials on this account
840 pub credentials: Vec<Credential>,
841 /// URI of the tunnel credential list API resource
842 pub uri: String,
843 /// URI of the next page, or null if there is no next page
844 pub next_page_uri: Option<String>,
845}
846
847#[derive(Clone, Debug, Default, Deserialize, Serialize)]
848pub struct EndpointWebhookValidation {
849 /// `true` if the module will be applied to traffic, `false` to disable. default
850 /// `true` if unspecified
851 pub enabled: Option<bool>,
852 /// a string indicating which webhook provider will be sending webhooks to this
853 /// endpoint. Value must be one of the supported providers defined at
854 /// https://ngrok.com/docs/cloud-edge/modules/webhook-verification
855 pub provider: String,
856 /// a string secret used to validate requests from the given provider. All providers
857 /// except AWS SNS require a secret
858 pub secret: String,
859}
860
861#[derive(Clone, Debug, Default, Deserialize, Serialize)]
862pub struct EndpointCompression {
863 /// `true` if the module will be applied to traffic, `false` to disable. default
864 /// `true` if unspecified
865 pub enabled: Option<bool>,
866}
867
868#[derive(Clone, Debug, Default, Deserialize, Serialize)]
869pub struct EndpointMutualTLS {
870 /// `true` if the module will be applied to traffic, `false` to disable. default
871 /// `true` if unspecified
872 pub enabled: Option<bool>,
873 /// PEM-encoded CA certificates that will be used to validate. Multiple CAs may be
874 /// provided by concatenating them together.
875 pub certificate_authorities: Vec<Ref>,
876}
877
878#[derive(Clone, Debug, Default, Deserialize, Serialize)]
879pub struct EndpointMutualTLSMutate {
880 /// `true` if the module will be applied to traffic, `false` to disable. default
881 /// `true` if unspecified
882 pub enabled: Option<bool>,
883 /// list of certificate authorities that will be used to validate the TLS client
884 /// certificate presented by the initiator of the TLS connection
885 pub certificate_authority_ids: Vec<String>,
886}
887
888#[derive(Clone, Debug, Default, Deserialize, Serialize)]
889pub struct EndpointTLSTermination {
890 /// `true` if the module will be applied to traffic, `false` to disable. default
891 /// `true` if unspecified
892 pub enabled: Option<bool>,
893 /// `edge` if the ngrok edge should terminate TLS traffic, `upstream` if TLS traffic
894 /// should be passed through to the upstream ngrok agent / application server for
895 /// termination. if `upstream` is chosen, most other modules will be disallowed
896 /// because they rely on the ngrok edge being able to access the underlying traffic.
897 pub terminate_at: String,
898 /// The minimum TLS version used for termination and advertised to the client during
899 /// the TLS handshake. if unspecified, ngrok will choose an industry-safe default.
900 /// This value must be null if `terminate_at` is set to `upstream`.
901 pub min_version: Option<String>,
902}
903
904#[derive(Clone, Debug, Default, Deserialize, Serialize)]
905pub struct EndpointTLSTerminationAtEdge {
906 /// `true` if the module will be applied to traffic, `false` to disable. default
907 /// `true` if unspecified
908 pub enabled: Option<bool>,
909 /// The minimum TLS version used for termination and advertised to the client during
910 /// the TLS handshake. if unspecified, ngrok will choose an industry-safe default.
911 /// This value must be null if `terminate_at` is set to `upstream`.
912 pub min_version: Option<String>,
913}
914
915#[derive(Clone, Debug, Default, Deserialize, Serialize)]
916pub struct EndpointRequestHeaders {
917 /// `true` if the module will be applied to traffic, `false` to disable. default
918 /// `true` if unspecified
919 pub enabled: Option<bool>,
920 /// a map of header key to header value that will be injected into the HTTP Request
921 /// before being sent to the upstream application server
922 pub add: HashMap<String, String>,
923 /// a list of header names that will be removed from the HTTP Request before being
924 /// sent to the upstream application server
925 pub remove: Vec<String>,
926}
927
928#[derive(Clone, Debug, Default, Deserialize, Serialize)]
929pub struct EndpointResponseHeaders {
930 /// `true` if the module will be applied to traffic, `false` to disable. default
931 /// `true` if unspecified
932 pub enabled: Option<bool>,
933 /// a map of header key to header value that will be injected into the HTTP Response
934 /// returned to the HTTP client
935 pub add: HashMap<String, String>,
936 /// a list of header names that will be removed from the HTTP Response returned to
937 /// the HTTP client
938 pub remove: Vec<String>,
939}
940
941#[derive(Clone, Debug, Default, Deserialize, Serialize)]
942pub struct EndpointIPPolicy {
943 /// `true` if the module will be applied to traffic, `false` to disable. default
944 /// `true` if unspecified
945 pub enabled: Option<bool>,
946 /// list of all IP policies that will be used to check if a source IP is allowed
947 /// access to the endpoint
948 pub ip_policies: Vec<Ref>,
949}
950
951#[derive(Clone, Debug, Default, Deserialize, Serialize)]
952pub struct EndpointIPPolicyMutate {
953 /// `true` if the module will be applied to traffic, `false` to disable. default
954 /// `true` if unspecified
955 pub enabled: Option<bool>,
956 /// list of all IP policies that will be used to check if a source IP is allowed
957 /// access to the endpoint
958 pub ip_policy_ids: Vec<String>,
959}
960
961#[derive(Clone, Debug, Default, Deserialize, Serialize)]
962pub struct EndpointCircuitBreaker {
963 /// `true` if the module will be applied to traffic, `false` to disable. default
964 /// `true` if unspecified
965 pub enabled: Option<bool>,
966 /// Integer number of seconds after which the circuit is tripped to wait before
967 /// re-evaluating upstream health
968 pub tripped_duration: u32,
969 /// Integer number of seconds in the statistical rolling window that metrics are
970 /// retained for.
971 pub rolling_window: u32,
972 /// Integer number of buckets into which metrics are retained. Max 128.
973 pub num_buckets: u32,
974 /// Integer number of requests in a rolling window that will trip the circuit.
975 /// Helpful if traffic volume is low.
976 pub volume_threshold: u32,
977 /// Error threshold percentage should be between 0 - 1.0, not 0-100.0
978 pub error_threshold_percentage: f64,
979}
980
981#[derive(Clone, Debug, Default, Deserialize, Serialize)]
982pub struct EndpointOAuth {
983 /// `true` if the module will be applied to traffic, `false` to disable. default
984 /// `true` if unspecified
985 pub enabled: Option<bool>,
986 /// an object which defines the identity provider to use for authentication and
987 /// configuration for who may access the endpoint
988 pub provider: EndpointOAuthProvider,
989 /// Do not enforce authentication on HTTP OPTIONS requests. necessary if you are
990 /// supporting CORS.
991 pub options_passthrough: bool,
992 /// the prefix of the session cookie that ngrok sets on the http client to cache
993 /// authentication. default is 'ngrok.'
994 pub cookie_prefix: String,
995 /// Integer number of seconds of inactivity after which if the user has not accessed
996 /// the endpoint, their session will time out and they will be forced to
997 /// reauthenticate.
998 pub inactivity_timeout: u32,
999 /// Integer number of seconds of the maximum duration of an authenticated session.
1000 /// After this period is exceeded, a user must reauthenticate.
1001 pub maximum_duration: u32,
1002 /// Integer number of seconds after which ngrok guarantees it will refresh user
1003 /// state from the identity provider and recheck whether the user is still
1004 /// authorized to access the endpoint. This is the preferred tunable to use to
1005 /// enforce a minimum amount of time after which a revoked user will no longer be
1006 /// able to access the resource.
1007 pub auth_check_interval: u32,
1008}
1009
1010#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1011pub struct EndpointOAuthProvider {
1012 /// configuration for using github as the identity provider
1013 pub github: Option<EndpointOAuthGitHub>,
1014 /// configuration for using facebook as the identity provider
1015 pub facebook: Option<EndpointOAuthFacebook>,
1016 /// configuration for using microsoft as the identity provider
1017 pub microsoft: Option<EndpointOAuthMicrosoft>,
1018 /// configuration for using google as the identity provider
1019 pub google: Option<EndpointOAuthGoogle>,
1020 /// configuration for using linkedin as the identity provider
1021 pub linkedin: Option<EndpointOAuthLinkedIn>,
1022 /// configuration for using gitlab as the identity provider
1023 pub gitlab: Option<EndpointOAuthGitLab>,
1024 /// configuration for using twitch as the identity provider
1025 pub twitch: Option<EndpointOAuthTwitch>,
1026 /// configuration for using amazon as the identity provider
1027 pub amazon: Option<EndpointOAuthAmazon>,
1028}
1029
1030#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1031pub struct EndpointOAuthGitHub {
1032 /// the OAuth app client ID. retrieve it from the identity provider's dashboard
1033 /// where you created your own OAuth app. optional. if unspecified, ngrok will use
1034 /// its own managed oauth application which has additional restrictions. see the
1035 /// OAuth module docs for more details. if present, client_secret must be present as
1036 /// well.
1037 pub client_id: Option<String>,
1038 /// the OAuth app client secret. retrieve if from the identity provider's dashboard
1039 /// where you created your own OAuth app. optional, see all of the caveats in the
1040 /// docs for `client_id`.
1041 pub client_secret: Option<String>,
1042 /// a list of provider-specific OAuth scopes with the permissions your OAuth app
1043 /// would like to ask for. these may not be set if you are using the ngrok-managed
1044 /// oauth app (i.e. you must pass both `client_id` and `client_secret` to set
1045 /// scopes)
1046 pub scopes: Option<Vec<String>>,
1047 /// a list of email addresses of users authenticated by identity provider who are
1048 /// allowed access to the endpoint
1049 pub email_addresses: Option<Vec<String>>,
1050 /// a list of email domains of users authenticated by identity provider who are
1051 /// allowed access to the endpoint
1052 pub email_domains: Option<Vec<String>>,
1053 /// a list of github teams identifiers. users will be allowed access to the endpoint
1054 /// if they are a member of any of these teams. identifiers should be in the 'slug'
1055 /// format qualified with the org name, e.g. `org-name/team-name`
1056 pub teams: Option<Vec<String>>,
1057 /// a list of github org identifiers. users who are members of any of the listed
1058 /// organizations will be allowed access. identifiers should be the organization's
1059 /// 'slug'
1060 pub organizations: Option<Vec<String>>,
1061}
1062
1063#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1064pub struct EndpointOAuthFacebook {
1065 /// the OAuth app client ID. retrieve it from the identity provider's dashboard
1066 /// where you created your own OAuth app. optional. if unspecified, ngrok will use
1067 /// its own managed oauth application which has additional restrictions. see the
1068 /// OAuth module docs for more details. if present, client_secret must be present as
1069 /// well.
1070 pub client_id: Option<String>,
1071 /// the OAuth app client secret. retrieve if from the identity provider's dashboard
1072 /// where you created your own OAuth app. optional, see all of the caveats in the
1073 /// docs for `client_id`.
1074 pub client_secret: Option<String>,
1075 /// a list of provider-specific OAuth scopes with the permissions your OAuth app
1076 /// would like to ask for. these may not be set if you are using the ngrok-managed
1077 /// oauth app (i.e. you must pass both `client_id` and `client_secret` to set
1078 /// scopes)
1079 pub scopes: Vec<String>,
1080 /// a list of email addresses of users authenticated by identity provider who are
1081 /// allowed access to the endpoint
1082 pub email_addresses: Vec<String>,
1083 /// a list of email domains of users authenticated by identity provider who are
1084 /// allowed access to the endpoint
1085 pub email_domains: Vec<String>,
1086}
1087
1088#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1089pub struct EndpointOAuthMicrosoft {
1090 /// the OAuth app client ID. retrieve it from the identity provider's dashboard
1091 /// where you created your own OAuth app. optional. if unspecified, ngrok will use
1092 /// its own managed oauth application which has additional restrictions. see the
1093 /// OAuth module docs for more details. if present, client_secret must be present as
1094 /// well.
1095 pub client_id: Option<String>,
1096 /// the OAuth app client secret. retrieve if from the identity provider's dashboard
1097 /// where you created your own OAuth app. optional, see all of the caveats in the
1098 /// docs for `client_id`.
1099 pub client_secret: Option<String>,
1100 /// a list of provider-specific OAuth scopes with the permissions your OAuth app
1101 /// would like to ask for. these may not be set if you are using the ngrok-managed
1102 /// oauth app (i.e. you must pass both `client_id` and `client_secret` to set
1103 /// scopes)
1104 pub scopes: Vec<String>,
1105 /// a list of email addresses of users authenticated by identity provider who are
1106 /// allowed access to the endpoint
1107 pub email_addresses: Vec<String>,
1108 /// a list of email domains of users authenticated by identity provider who are
1109 /// allowed access to the endpoint
1110 pub email_domains: Vec<String>,
1111}
1112
1113#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1114pub struct EndpointOAuthGoogle {
1115 /// the OAuth app client ID. retrieve it from the identity provider's dashboard
1116 /// where you created your own OAuth app. optional. if unspecified, ngrok will use
1117 /// its own managed oauth application which has additional restrictions. see the
1118 /// OAuth module docs for more details. if present, client_secret must be present as
1119 /// well.
1120 pub client_id: Option<String>,
1121 /// the OAuth app client secret. retrieve if from the identity provider's dashboard
1122 /// where you created your own OAuth app. optional, see all of the caveats in the
1123 /// docs for `client_id`.
1124 pub client_secret: Option<String>,
1125 /// a list of provider-specific OAuth scopes with the permissions your OAuth app
1126 /// would like to ask for. these may not be set if you are using the ngrok-managed
1127 /// oauth app (i.e. you must pass both `client_id` and `client_secret` to set
1128 /// scopes)
1129 pub scopes: Vec<String>,
1130 /// a list of email addresses of users authenticated by identity provider who are
1131 /// allowed access to the endpoint
1132 pub email_addresses: Vec<String>,
1133 /// a list of email domains of users authenticated by identity provider who are
1134 /// allowed access to the endpoint
1135 pub email_domains: Vec<String>,
1136}
1137
1138#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1139pub struct EndpointOAuthLinkedIn {
1140 pub client_id: Option<String>,
1141 pub client_secret: Option<String>,
1142 pub scopes: Vec<String>,
1143 pub email_addresses: Vec<String>,
1144 pub email_domains: Vec<String>,
1145}
1146
1147#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1148pub struct EndpointOAuthGitLab {
1149 pub client_id: Option<String>,
1150 pub client_secret: Option<String>,
1151 pub scopes: Vec<String>,
1152 pub email_addresses: Vec<String>,
1153 pub email_domains: Vec<String>,
1154}
1155
1156#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1157pub struct EndpointOAuthTwitch {
1158 pub client_id: Option<String>,
1159 pub client_secret: Option<String>,
1160 pub scopes: Vec<String>,
1161 pub email_addresses: Vec<String>,
1162 pub email_domains: Vec<String>,
1163}
1164
1165#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1166pub struct EndpointOAuthAmazon {
1167 pub client_id: Option<String>,
1168 pub client_secret: Option<String>,
1169 pub scopes: Vec<String>,
1170 pub email_addresses: Vec<String>,
1171 pub email_domains: Vec<String>,
1172}
1173
1174#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1175pub struct EndpointSAML {
1176 /// `true` if the module will be applied to traffic, `false` to disable. default
1177 /// `true` if unspecified
1178 pub enabled: Option<bool>,
1179 /// Do not enforce authentication on HTTP OPTIONS requests. necessary if you are
1180 /// supporting CORS.
1181 pub options_passthrough: bool,
1182 /// the prefix of the session cookie that ngrok sets on the http client to cache
1183 /// authentication. default is 'ngrok.'
1184 pub cookie_prefix: String,
1185 /// Integer number of seconds of inactivity after which if the user has not accessed
1186 /// the endpoint, their session will time out and they will be forced to
1187 /// reauthenticate.
1188 pub inactivity_timeout: u32,
1189 /// Integer number of seconds of the maximum duration of an authenticated session.
1190 /// After this period is exceeded, a user must reauthenticate.
1191 pub maximum_duration: u32,
1192 /// The full XML IdP EntityDescriptor. Your IdP may provide this to you as a a file
1193 /// to download or as a URL.
1194 pub idp_metadata: String,
1195 /// If true, indicates that whenever we redirect a user to the IdP for
1196 /// authentication that the IdP must prompt the user for authentication credentials
1197 /// even if the user already has a valid session with the IdP.
1198 pub force_authn: bool,
1199 /// If true, the IdP may initiate a login directly (e.g. the user does not need to
1200 /// visit the endpoint first and then be redirected). The IdP should set the
1201 /// `RelayState` parameter to the target URL of the resource they want the user to
1202 /// be redirected to after the SAML login assertion has been processed.
1203 pub allow_idp_initiated: Option<bool>,
1204 /// If present, only users who are a member of one of the listed groups may access
1205 /// the target endpoint.
1206 pub authorized_groups: Vec<String>,
1207 /// The SP Entity's unique ID. This always takes the form of a URL. In ngrok's
1208 /// implementation, this URL is the same as the metadata URL. This will need to be
1209 /// specified to the IdP as configuration.
1210 pub entity_id: String,
1211 /// The public URL of the SP's Assertion Consumer Service. This is where the IdP
1212 /// will redirect to during an authentication flow. This will need to be specified
1213 /// to the IdP as configuration.
1214 pub assertion_consumer_service_url: String,
1215 /// The public URL of the SP's Single Logout Service. This is where the IdP will
1216 /// redirect to during a single logout flow. This will optionally need to be
1217 /// specified to the IdP as configuration.
1218 pub single_logout_url: String,
1219 /// PEM-encoded x.509 certificate of the key pair that is used to sign all SAML
1220 /// requests that the ngrok SP makes to the IdP. Many IdPs do not support request
1221 /// signing verification, but we highly recommend specifying this in the IdP's
1222 /// configuration if it is supported.
1223 pub request_signing_certificate_pem: String,
1224 /// A public URL where the SP's metadata is hosted. If an IdP supports dynamic
1225 /// configuration, this is the URL it can use to retrieve the SP metadata.
1226 pub metadata_url: String,
1227 /// Defines the name identifier format the SP expects the IdP to use in its
1228 /// assertions to identify subjects. If unspecified, a default value of
1229 /// `urn:oasis:names:tc:SAML:2.0:nameid-format:persistent` will be used. A subset of
1230 /// the allowed values enumerated by the SAML specification are supported.
1231 pub nameid_format: String,
1232}
1233
1234#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1235pub struct EndpointSAMLMutate {
1236 /// `true` if the module will be applied to traffic, `false` to disable. default
1237 /// `true` if unspecified
1238 pub enabled: Option<bool>,
1239 /// Do not enforce authentication on HTTP OPTIONS requests. necessary if you are
1240 /// supporting CORS.
1241 pub options_passthrough: bool,
1242 /// the prefix of the session cookie that ngrok sets on the http client to cache
1243 /// authentication. default is 'ngrok.'
1244 pub cookie_prefix: String,
1245 /// Integer number of seconds of inactivity after which if the user has not accessed
1246 /// the endpoint, their session will time out and they will be forced to
1247 /// reauthenticate.
1248 pub inactivity_timeout: u32,
1249 /// Integer number of seconds of the maximum duration of an authenticated session.
1250 /// After this period is exceeded, a user must reauthenticate.
1251 pub maximum_duration: u32,
1252 /// The full XML IdP EntityDescriptor. Your IdP may provide this to you as a a file
1253 /// to download or as a URL.
1254 pub idp_metadata: String,
1255 /// If true, indicates that whenever we redirect a user to the IdP for
1256 /// authentication that the IdP must prompt the user for authentication credentials
1257 /// even if the user already has a valid session with the IdP.
1258 pub force_authn: bool,
1259 /// If true, the IdP may initiate a login directly (e.g. the user does not need to
1260 /// visit the endpoint first and then be redirected). The IdP should set the
1261 /// `RelayState` parameter to the target URL of the resource they want the user to
1262 /// be redirected to after the SAML login assertion has been processed.
1263 pub allow_idp_initiated: Option<bool>,
1264 /// If present, only users who are a member of one of the listed groups may access
1265 /// the target endpoint.
1266 pub authorized_groups: Vec<String>,
1267 /// Defines the name identifier format the SP expects the IdP to use in its
1268 /// assertions to identify subjects. If unspecified, a default value of
1269 /// `urn:oasis:names:tc:SAML:2.0:nameid-format:persistent` will be used. A subset of
1270 /// the allowed values enumerated by the SAML specification are supported.
1271 pub nameid_format: String,
1272}
1273
1274#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1275pub struct EndpointOIDC {
1276 /// `true` if the module will be applied to traffic, `false` to disable. default
1277 /// `true` if unspecified
1278 pub enabled: Option<bool>,
1279 /// Do not enforce authentication on HTTP OPTIONS requests. necessary if you are
1280 /// supporting CORS.
1281 pub options_passthrough: bool,
1282 /// the prefix of the session cookie that ngrok sets on the http client to cache
1283 /// authentication. default is 'ngrok.'
1284 pub cookie_prefix: String,
1285 /// Integer number of seconds of inactivity after which if the user has not accessed
1286 /// the endpoint, their session will time out and they will be forced to
1287 /// reauthenticate.
1288 pub inactivity_timeout: u32,
1289 /// Integer number of seconds of the maximum duration of an authenticated session.
1290 /// After this period is exceeded, a user must reauthenticate.
1291 pub maximum_duration: u32,
1292 /// URL of the OIDC "OpenID provider". This is the base URL used for discovery.
1293 pub issuer: String,
1294 /// The OIDC app's client ID and OIDC audience.
1295 pub client_id: String,
1296 /// The OIDC app's client secret.
1297 pub client_secret: String,
1298 /// The set of scopes to request from the OIDC identity provider.
1299 pub scopes: Vec<String>,
1300}
1301
1302#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1303pub struct EndpointBackend {
1304 /// `true` if the module will be applied to traffic, `false` to disable. default
1305 /// `true` if unspecified
1306 pub enabled: Option<bool>,
1307 /// backend to be used to back this endpoint
1308 pub backend: Ref,
1309}
1310
1311#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1312pub struct EndpointBackendMutate {
1313 /// `true` if the module will be applied to traffic, `false` to disable. default
1314 /// `true` if unspecified
1315 pub enabled: Option<bool>,
1316 /// backend to be used to back this endpoint
1317 pub backend_id: String,
1318}
1319
1320#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1321pub struct EndpointWebsocketTCPConverter {
1322 /// `true` if the module will be applied to traffic, `false` to disable. default
1323 /// `true` if unspecified
1324 pub enabled: Option<bool>,
1325}
1326
1327#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1328pub struct EndpointUserAgentFilter {
1329 pub enabled: Option<bool>,
1330 pub allow: Vec<String>,
1331 pub deny: Vec<String>,
1332}
1333
1334#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1335pub struct EndpointTrafficPolicy {
1336 /// `true` if the module will be applied to traffic, `false` to disable. default
1337 /// `true` if unspecified
1338 pub enabled: Option<bool>,
1339 /// the traffic policy that should be applied to the traffic on your endpoint.
1340 pub value: String,
1341}
1342
1343#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1344pub struct EdgeRouteItem {
1345 /// unique identifier of this edge
1346 pub edge_id: String,
1347 /// unique identifier of this edge route
1348 pub id: String,
1349}
1350
1351#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1352pub struct HTTPSEdgeRouteCreate {
1353 /// unique identifier of this edge
1354 pub edge_id: String,
1355 /// Type of match to use for this route. Valid values are "exact_path" and
1356 /// "path_prefix".
1357 pub match_type: String,
1358 /// Route selector: "/blog" or "example.com" or "example.com/blog"
1359 pub r#match: String,
1360 /// human-readable description of what this edge will be used for; optional, max 255
1361 /// bytes.
1362 pub description: String,
1363 /// arbitrary user-defined machine-readable data of this edge. Optional, max 4096
1364 /// bytes.
1365 pub metadata: String,
1366 /// backend module configuration or `null`
1367 pub backend: Option<EndpointBackendMutate>,
1368 /// ip restriction module configuration or `null`
1369 pub ip_restriction: Option<EndpointIPPolicyMutate>,
1370 /// circuit breaker module configuration or `null`
1371 pub circuit_breaker: Option<EndpointCircuitBreaker>,
1372 /// compression module configuration or `null`
1373 pub compression: Option<EndpointCompression>,
1374 /// request headers module configuration or `null`
1375 pub request_headers: Option<EndpointRequestHeaders>,
1376 /// response headers module configuration or `null`
1377 pub response_headers: Option<EndpointResponseHeaders>,
1378 /// webhook verification module configuration or `null`
1379 pub webhook_verification: Option<EndpointWebhookValidation>,
1380 /// oauth module configuration or `null`
1381 pub oauth: Option<EndpointOAuth>,
1382 /// saml module configuration or `null`
1383 pub saml: Option<EndpointSAMLMutate>,
1384 /// oidc module configuration or `null`
1385 pub oidc: Option<EndpointOIDC>,
1386 /// websocket to tcp adapter configuration or `null`
1387 pub websocket_tcp_converter: Option<EndpointWebsocketTCPConverter>,
1388 pub user_agent_filter: Option<EndpointUserAgentFilter>,
1389 /// the traffic policy associated with this edge or null
1390 pub traffic_policy: Option<EndpointTrafficPolicy>,
1391}
1392
1393#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1394pub struct HTTPSEdgeRouteUpdate {
1395 /// unique identifier of this edge
1396 pub edge_id: String,
1397 /// unique identifier of this edge route
1398 pub id: String,
1399 /// Type of match to use for this route. Valid values are "exact_path" and
1400 /// "path_prefix".
1401 pub match_type: String,
1402 /// Route selector: "/blog" or "example.com" or "example.com/blog"
1403 pub r#match: String,
1404 /// human-readable description of what this edge will be used for; optional, max 255
1405 /// bytes.
1406 pub description: String,
1407 /// arbitrary user-defined machine-readable data of this edge. Optional, max 4096
1408 /// bytes.
1409 pub metadata: String,
1410 /// backend module configuration or `null`
1411 pub backend: Option<EndpointBackendMutate>,
1412 /// ip restriction module configuration or `null`
1413 pub ip_restriction: Option<EndpointIPPolicyMutate>,
1414 /// circuit breaker module configuration or `null`
1415 pub circuit_breaker: Option<EndpointCircuitBreaker>,
1416 /// compression module configuration or `null`
1417 pub compression: Option<EndpointCompression>,
1418 /// request headers module configuration or `null`
1419 pub request_headers: Option<EndpointRequestHeaders>,
1420 /// response headers module configuration or `null`
1421 pub response_headers: Option<EndpointResponseHeaders>,
1422 /// webhook verification module configuration or `null`
1423 pub webhook_verification: Option<EndpointWebhookValidation>,
1424 /// oauth module configuration or `null`
1425 pub oauth: Option<EndpointOAuth>,
1426 /// saml module configuration or `null`
1427 pub saml: Option<EndpointSAMLMutate>,
1428 /// oidc module configuration or `null`
1429 pub oidc: Option<EndpointOIDC>,
1430 /// websocket to tcp adapter configuration or `null`
1431 pub websocket_tcp_converter: Option<EndpointWebsocketTCPConverter>,
1432 pub user_agent_filter: Option<EndpointUserAgentFilter>,
1433 /// the traffic policy associated with this edge or null
1434 pub traffic_policy: Option<EndpointTrafficPolicy>,
1435}
1436
1437#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1438pub struct HTTPSEdgeRoute {
1439 /// unique identifier of this edge
1440 pub edge_id: String,
1441 /// unique identifier of this edge route
1442 pub id: String,
1443 /// timestamp when the edge configuration was created, RFC 3339 format
1444 pub created_at: String,
1445 /// Type of match to use for this route. Valid values are "exact_path" and
1446 /// "path_prefix".
1447 pub match_type: String,
1448 /// Route selector: "/blog" or "example.com" or "example.com/blog"
1449 pub r#match: String,
1450 /// URI of the edge API resource
1451 pub uri: String,
1452 /// human-readable description of what this edge will be used for; optional, max 255
1453 /// bytes.
1454 pub description: String,
1455 /// arbitrary user-defined machine-readable data of this edge. Optional, max 4096
1456 /// bytes.
1457 pub metadata: String,
1458 /// backend module configuration or `null`
1459 pub backend: Option<EndpointBackend>,
1460 /// ip restriction module configuration or `null`
1461 pub ip_restriction: Option<EndpointIPPolicy>,
1462 /// circuit breaker module configuration or `null`
1463 pub circuit_breaker: Option<EndpointCircuitBreaker>,
1464 /// compression module configuration or `null`
1465 pub compression: Option<EndpointCompression>,
1466 /// request headers module configuration or `null`
1467 pub request_headers: Option<EndpointRequestHeaders>,
1468 /// response headers module configuration or `null`
1469 pub response_headers: Option<EndpointResponseHeaders>,
1470 /// webhook verification module configuration or `null`
1471 pub webhook_verification: Option<EndpointWebhookValidation>,
1472 /// oauth module configuration or `null`
1473 pub oauth: Option<EndpointOAuth>,
1474 /// saml module configuration or `null`
1475 pub saml: Option<EndpointSAML>,
1476 /// oidc module configuration or `null`
1477 pub oidc: Option<EndpointOIDC>,
1478 /// websocket to tcp adapter configuration or `null`
1479 pub websocket_tcp_converter: Option<EndpointWebsocketTCPConverter>,
1480 pub user_agent_filter: Option<EndpointUserAgentFilter>,
1481 /// the traffic policy associated with this edge or null
1482 pub traffic_policy: Option<EndpointTrafficPolicy>,
1483}
1484
1485#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1486pub struct HTTPSEdgeList {
1487 /// the list of all HTTPS Edges on this account
1488 pub https_edges: Vec<HTTPSEdge>,
1489 /// URI of the HTTPS Edge list API resource
1490 pub uri: String,
1491 /// URI of the next page, or null if there is no next page
1492 pub next_page_uri: Option<String>,
1493}
1494
1495#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1496pub struct HTTPSEdgeCreate {
1497 /// human-readable description of what this edge will be used for; optional, max 255
1498 /// bytes.
1499 pub description: String,
1500 /// arbitrary user-defined machine-readable data of this edge; optional, max 4096
1501 /// bytes.
1502 pub metadata: String,
1503 /// hostports served by this edge
1504 pub hostports: Option<Vec<String>>,
1505 /// edge modules
1506 pub mutual_tls: Option<EndpointMutualTLSMutate>,
1507 pub tls_termination: Option<EndpointTLSTerminationAtEdge>,
1508}
1509
1510#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1511pub struct HTTPSEdgeUpdate {
1512 /// unique identifier of this edge
1513 pub id: String,
1514 /// human-readable description of what this edge will be used for; optional, max 255
1515 /// bytes.
1516 pub description: Option<String>,
1517 /// arbitrary user-defined machine-readable data of this edge; optional, max 4096
1518 /// bytes.
1519 pub metadata: Option<String>,
1520 /// hostports served by this edge
1521 pub hostports: Option<Vec<String>>,
1522 /// edge modules
1523 pub mutual_tls: Option<EndpointMutualTLSMutate>,
1524 pub tls_termination: Option<EndpointTLSTerminationAtEdge>,
1525}
1526
1527#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1528pub struct HTTPSEdge {
1529 /// unique identifier of this edge
1530 pub id: String,
1531 /// human-readable description of what this edge will be used for; optional, max 255
1532 /// bytes.
1533 pub description: String,
1534 /// arbitrary user-defined machine-readable data of this edge; optional, max 4096
1535 /// bytes.
1536 pub metadata: String,
1537 /// timestamp when the edge configuration was created, RFC 3339 format
1538 pub created_at: String,
1539 /// URI of the edge API resource
1540 pub uri: String,
1541 /// hostports served by this edge
1542 pub hostports: Option<Vec<String>>,
1543 /// edge modules
1544 pub mutual_tls: Option<EndpointMutualTLS>,
1545 pub tls_termination: Option<EndpointTLSTermination>,
1546 /// routes
1547 pub routes: Vec<HTTPSEdgeRoute>,
1548}
1549
1550#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1551pub struct EdgeBackendReplace {
1552 pub id: String,
1553 pub module: EndpointBackendMutate,
1554}
1555
1556#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1557pub struct EdgeIPRestrictionReplace {
1558 pub id: String,
1559 pub module: EndpointIPPolicyMutate,
1560}
1561
1562#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1563pub struct EdgeMutualTLSReplace {
1564 pub id: String,
1565 pub module: EndpointMutualTLSMutate,
1566}
1567
1568#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1569pub struct EdgeTLSTerminationReplace {
1570 pub id: String,
1571 pub module: EndpointTLSTermination,
1572}
1573
1574#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1575pub struct EdgeTLSTerminationAtEdgeReplace {
1576 pub id: String,
1577 pub module: EndpointTLSTerminationAtEdge,
1578}
1579
1580#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1581pub struct EdgeTrafficPolicyReplace {
1582 pub id: String,
1583 pub module: EndpointTrafficPolicy,
1584}
1585
1586#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1587pub struct EdgeRouteBackendReplace {
1588 pub edge_id: String,
1589 pub id: String,
1590 pub module: EndpointBackendMutate,
1591}
1592
1593#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1594pub struct EdgeRouteIPRestrictionReplace {
1595 pub edge_id: String,
1596 pub id: String,
1597 pub module: EndpointIPPolicyMutate,
1598}
1599
1600#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1601pub struct EdgeRouteRequestHeadersReplace {
1602 pub edge_id: String,
1603 pub id: String,
1604 pub module: EndpointRequestHeaders,
1605}
1606
1607#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1608pub struct EdgeRouteResponseHeadersReplace {
1609 pub edge_id: String,
1610 pub id: String,
1611 pub module: EndpointResponseHeaders,
1612}
1613
1614#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1615pub struct EdgeRouteCompressionReplace {
1616 pub edge_id: String,
1617 pub id: String,
1618 pub module: EndpointCompression,
1619}
1620
1621#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1622pub struct EdgeRouteCircuitBreakerReplace {
1623 pub edge_id: String,
1624 pub id: String,
1625 pub module: EndpointCircuitBreaker,
1626}
1627
1628#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1629pub struct EdgeRouteWebhookVerificationReplace {
1630 pub edge_id: String,
1631 pub id: String,
1632 pub module: EndpointWebhookValidation,
1633}
1634
1635#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1636pub struct EdgeRouteOAuthReplace {
1637 pub edge_id: String,
1638 pub id: String,
1639 pub module: EndpointOAuth,
1640}
1641
1642#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1643pub struct EdgeRouteSAMLReplace {
1644 pub edge_id: String,
1645 pub id: String,
1646 pub module: EndpointSAMLMutate,
1647}
1648
1649#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1650pub struct EdgeRouteOIDCReplace {
1651 pub edge_id: String,
1652 pub id: String,
1653 pub module: EndpointOIDC,
1654}
1655
1656#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1657pub struct EdgeRouteWebsocketTCPConverterReplace {
1658 pub edge_id: String,
1659 pub id: String,
1660 pub module: EndpointWebsocketTCPConverter,
1661}
1662
1663#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1664pub struct EdgeRouteUserAgentFilterReplace {
1665 pub edge_id: String,
1666 pub id: String,
1667 pub module: EndpointUserAgentFilter,
1668}
1669
1670#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1671pub struct EdgeRouteTrafficPolicyReplace {
1672 pub edge_id: String,
1673 pub id: String,
1674 pub module: EndpointTrafficPolicy,
1675}
1676
1677#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1678pub struct TCPEdgeList {
1679 /// the list of all TCP Edges on this account
1680 pub tcp_edges: Vec<TCPEdge>,
1681 /// URI of the TCP Edge list API resource
1682 pub uri: String,
1683 /// URI of the next page, or null if there is no next page
1684 pub next_page_uri: Option<String>,
1685}
1686
1687#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1688pub struct TCPEdgeCreate {
1689 /// human-readable description of what this edge will be used for; optional, max 255
1690 /// bytes.
1691 pub description: String,
1692 /// arbitrary user-defined machine-readable data of this edge. Optional, max 4096
1693 /// bytes.
1694 pub metadata: String,
1695 /// hostports served by this edge
1696 pub hostports: Option<Vec<String>>,
1697 /// edge modules
1698 pub backend: Option<EndpointBackendMutate>,
1699 pub ip_restriction: Option<EndpointIPPolicyMutate>,
1700 /// the traffic policy associated with this edge or null
1701 pub traffic_policy: Option<EndpointTrafficPolicy>,
1702}
1703
1704#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1705pub struct TCPEdgeUpdate {
1706 /// unique identifier of this edge
1707 pub id: String,
1708 /// human-readable description of what this edge will be used for; optional, max 255
1709 /// bytes.
1710 pub description: Option<String>,
1711 /// arbitrary user-defined machine-readable data of this edge. Optional, max 4096
1712 /// bytes.
1713 pub metadata: Option<String>,
1714 /// hostports served by this edge
1715 pub hostports: Option<Vec<String>>,
1716 /// edge modules
1717 pub backend: Option<EndpointBackendMutate>,
1718 pub ip_restriction: Option<EndpointIPPolicyMutate>,
1719 /// the traffic policy associated with this edge or null
1720 pub traffic_policy: Option<EndpointTrafficPolicy>,
1721}
1722
1723#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1724pub struct TCPEdge {
1725 /// unique identifier of this edge
1726 pub id: String,
1727 /// human-readable description of what this edge will be used for; optional, max 255
1728 /// bytes.
1729 pub description: String,
1730 /// arbitrary user-defined machine-readable data of this edge. Optional, max 4096
1731 /// bytes.
1732 pub metadata: String,
1733 /// timestamp when the edge was created, RFC 3339 format
1734 pub created_at: String,
1735 /// URI of the edge API resource
1736 pub uri: String,
1737 /// hostports served by this edge
1738 pub hostports: Option<Vec<String>>,
1739 /// edge modules
1740 pub backend: Option<EndpointBackend>,
1741 pub ip_restriction: Option<EndpointIPPolicy>,
1742 /// the traffic policy associated with this edge or null
1743 pub traffic_policy: Option<EndpointTrafficPolicy>,
1744}
1745
1746#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1747pub struct TLSEdgeList {
1748 /// the list of all TLS Edges on this account
1749 pub tls_edges: Vec<TLSEdge>,
1750 /// URI of the TLS Edge list API resource
1751 pub uri: String,
1752 /// URI of the next page, or null if there is no next page
1753 pub next_page_uri: Option<String>,
1754}
1755
1756#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1757pub struct TLSEdgeCreate {
1758 /// human-readable description of what this edge will be used for; optional, max 255
1759 /// bytes.
1760 pub description: String,
1761 /// arbitrary user-defined machine-readable data of this edge. Optional, max 4096
1762 /// bytes.
1763 pub metadata: String,
1764 /// hostports served by this edge
1765 pub hostports: Option<Vec<String>>,
1766 /// edge modules
1767 pub backend: Option<EndpointBackendMutate>,
1768 pub ip_restriction: Option<EndpointIPPolicyMutate>,
1769 pub mutual_tls: Option<EndpointMutualTLSMutate>,
1770 pub tls_termination: Option<EndpointTLSTermination>,
1771 /// the traffic policy associated with this edge or null
1772 pub traffic_policy: Option<EndpointTrafficPolicy>,
1773}
1774
1775#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1776pub struct TLSEdgeUpdate {
1777 /// unique identifier of this edge
1778 pub id: String,
1779 /// human-readable description of what this edge will be used for; optional, max 255
1780 /// bytes.
1781 pub description: Option<String>,
1782 /// arbitrary user-defined machine-readable data of this edge. Optional, max 4096
1783 /// bytes.
1784 pub metadata: Option<String>,
1785 /// hostports served by this edge
1786 pub hostports: Option<Vec<String>>,
1787 /// edge modules
1788 pub backend: Option<EndpointBackendMutate>,
1789 pub ip_restriction: Option<EndpointIPPolicyMutate>,
1790 pub mutual_tls: Option<EndpointMutualTLSMutate>,
1791 pub tls_termination: Option<EndpointTLSTermination>,
1792 /// the traffic policy associated with this edge or null
1793 pub traffic_policy: Option<EndpointTrafficPolicy>,
1794}
1795
1796#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1797pub struct TLSEdge {
1798 /// unique identifier of this edge
1799 pub id: String,
1800 /// human-readable description of what this edge will be used for; optional, max 255
1801 /// bytes.
1802 pub description: String,
1803 /// arbitrary user-defined machine-readable data of this edge. Optional, max 4096
1804 /// bytes.
1805 pub metadata: String,
1806 /// timestamp when the edge configuration was created, RFC 3339 format
1807 pub created_at: String,
1808 /// URI of the edge API resource
1809 pub uri: String,
1810 /// hostports served by this edge
1811 pub hostports: Option<Vec<String>>,
1812 /// edge modules
1813 pub backend: Option<EndpointBackend>,
1814 pub ip_restriction: Option<EndpointIPPolicy>,
1815 pub mutual_tls: Option<EndpointMutualTLS>,
1816 pub tls_termination: Option<EndpointTLSTermination>,
1817 /// the traffic policy associated with this edge or null
1818 pub traffic_policy: Option<EndpointTrafficPolicy>,
1819}
1820
1821#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1822pub struct Endpoint {
1823 /// unique endpoint resource identifier
1824 pub id: String,
1825 /// identifier of the region this endpoint belongs to
1826 pub region: String,
1827 /// timestamp when the endpoint was created in RFC 3339 format
1828 pub created_at: String,
1829 /// timestamp when the endpoint was updated in RFC 3339 format
1830 pub updated_at: String,
1831 /// URL of the hostport served by this endpoint
1832 pub public_url: String,
1833 /// protocol served by this endpoint. one of `http`, `https`, `tcp`, or `tls`
1834 pub proto: String,
1835 pub scheme: String,
1836 /// hostport served by this endpoint (hostname:port) -> soon to be deprecated
1837 pub hostport: String,
1838 pub host: String,
1839 pub port: i64,
1840 /// whether the endpoint is `ephemeral` (served directly by an agent-initiated
1841 /// tunnel) or `edge` (served by an edge) or `cloud (represents a cloud endpoint)`
1842 pub r#type: String,
1843 /// user-supplied metadata of the associated tunnel or edge object
1844 pub metadata: String,
1845 /// user-supplied description of the associated tunnel
1846 pub description: String,
1847 /// the domain reserved for this endpoint
1848 pub domain: Option<Ref>,
1849 /// the address reserved for this endpoint
1850 pub tcp_addr: Option<Ref>,
1851 /// the tunnel serving requests to this endpoint, if this is an ephemeral endpoint
1852 pub tunnel: Option<Ref>,
1853 /// the edge serving requests to this endpoint, if this is an edge endpoint
1854 pub edge: Option<Ref>,
1855 /// the local address the tunnel forwards to
1856 pub upstream_url: String,
1857 /// the protocol the agent uses to forward with
1858 pub upstream_proto: String,
1859 /// the url of the endpoint
1860 pub url: String,
1861 /// The ID of the owner (bot or user) that owns this endpoint
1862 pub principal: Option<Ref>,
1863 /// TODO: deprecate me!
1864 pub principal_id: Option<Ref>,
1865 /// The traffic policy attached to this endpoint
1866 pub traffic_policy: String,
1867 /// the bindings associated with this endpoint
1868 pub bindings: Option<Vec<String>>,
1869 /// The tunnel session of the agent for this endpoint
1870 pub tunnel_session: Option<Ref>,
1871 /// URI of the clep API resource
1872 pub uri: String,
1873 /// user supplied name for the endpoint
1874 pub name: String,
1875}
1876
1877#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1878pub struct EndpointList {
1879 /// the list of all active endpoints on this account
1880 pub endpoints: Vec<Endpoint>,
1881 /// URI of the endpoints list API resource
1882 pub uri: String,
1883 /// URI of the next page, or null if there is no next page
1884 pub next_page_uri: Option<String>,
1885}
1886
1887#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1888pub struct EndpointCreate {
1889 /// the url of the endpoint
1890 pub url: String,
1891 /// whether the endpoint is `ephemeral` (served directly by an agent-initiated
1892 /// tunnel) or `edge` (served by an edge) or `cloud (represents a cloud endpoint)`
1893 pub r#type: String,
1894 /// The traffic policy attached to this endpoint
1895 pub traffic_policy: String,
1896 /// user-supplied description of the associated tunnel
1897 pub description: Option<String>,
1898 /// user-supplied metadata of the associated tunnel or edge object
1899 pub metadata: Option<String>,
1900 /// the bindings associated with this endpoint
1901 pub bindings: Option<Vec<String>>,
1902}
1903
1904#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1905pub struct EndpointUpdate {
1906 /// unique endpoint resource identifier
1907 pub id: String,
1908 /// the url of the endpoint
1909 pub url: Option<String>,
1910 /// The traffic policy attached to this endpoint
1911 pub traffic_policy: Option<String>,
1912 /// user-supplied description of the associated tunnel
1913 pub description: Option<String>,
1914 /// user-supplied metadata of the associated tunnel or edge object
1915 pub metadata: Option<String>,
1916 /// the bindings associated with this endpoint
1917 pub bindings: Option<Vec<String>>,
1918}
1919
1920#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1921pub struct EventDestinationCreate {
1922 /// Arbitrary user-defined machine-readable data of this Event Destination.
1923 /// Optional, max 4096 bytes.
1924 pub metadata: String,
1925 /// Human-readable description of the Event Destination. Optional, max 255 bytes.
1926 pub description: String,
1927 /// The output format you would like to serialize events into when sending to their
1928 /// target. Currently the only accepted value is `JSON`.
1929 pub format: String,
1930 /// An object that encapsulates where and how to send your events. An event
1931 /// destination must contain exactly one of the following objects, leaving the rest
1932 /// null: `kinesis`, `firehose`, `cloudwatch_logs`, or `s3`.
1933 pub target: EventTarget,
1934}
1935
1936#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1937pub struct EventDestinationUpdate {
1938 /// Unique identifier for this Event Destination.
1939 pub id: String,
1940 /// Arbitrary user-defined machine-readable data of this Event Destination.
1941 /// Optional, max 4096 bytes.
1942 pub metadata: Option<String>,
1943 /// Human-readable description of the Event Destination. Optional, max 255 bytes.
1944 pub description: Option<String>,
1945 /// The output format you would like to serialize events into when sending to their
1946 /// target. Currently the only accepted value is `JSON`.
1947 pub format: Option<String>,
1948 /// An object that encapsulates where and how to send your events. An event
1949 /// destination must contain exactly one of the following objects, leaving the rest
1950 /// null: `kinesis`, `firehose`, `cloudwatch_logs`, or `s3`.
1951 pub target: Option<EventTarget>,
1952}
1953
1954#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1955pub struct EventDestination {
1956 /// Unique identifier for this Event Destination.
1957 pub id: String,
1958 /// Arbitrary user-defined machine-readable data of this Event Destination.
1959 /// Optional, max 4096 bytes.
1960 pub metadata: String,
1961 /// Timestamp when the Event Destination was created, RFC 3339 format.
1962 pub created_at: String,
1963 /// Human-readable description of the Event Destination. Optional, max 255 bytes.
1964 pub description: String,
1965 /// The output format you would like to serialize events into when sending to their
1966 /// target. Currently the only accepted value is `JSON`.
1967 pub format: String,
1968 /// An object that encapsulates where and how to send your events. An event
1969 /// destination must contain exactly one of the following objects, leaving the rest
1970 /// null: `kinesis`, `firehose`, `cloudwatch_logs`, or `s3`.
1971 pub target: EventTarget,
1972 /// URI of the Event Destination API resource.
1973 pub uri: String,
1974}
1975
1976#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1977pub struct EventDestinationList {
1978 /// The list of all Event Destinations on this account.
1979 pub event_destinations: Vec<EventDestination>,
1980 /// URI of the Event Destinations list API resource.
1981 pub uri: String,
1982 /// URI of the next page, or null if there is no next page.
1983 pub next_page_uri: Option<String>,
1984}
1985
1986#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1987pub struct EventTarget {
1988 /// Configuration used to send events to Amazon Kinesis Data Firehose.
1989 pub firehose: Option<EventTargetFirehose>,
1990 /// Configuration used to send events to Amazon Kinesis.
1991 pub kinesis: Option<EventTargetKinesis>,
1992 /// Configuration used to send events to Amazon CloudWatch Logs.
1993 pub cloudwatch_logs: Option<EventTargetCloudwatchLogs>,
1994 /// Configuration used to send events to Datadog.
1995 pub datadog: Option<EventTargetDatadog>,
1996 pub azure_logs_ingestion: Option<EventTargetAzureLogsIngestion>,
1997}
1998
1999#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2000pub struct EventTargetFirehose {
2001 /// Configuration for how to authenticate into your AWS account. Exactly one of
2002 /// `role` or `creds` should be configured.
2003 pub auth: AWSAuth,
2004 /// An Amazon Resource Name specifying the Firehose delivery stream to deposit
2005 /// events into.
2006 pub delivery_stream_arn: String,
2007}
2008
2009#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2010pub struct EventTargetKinesis {
2011 /// Configuration for how to authenticate into your AWS account. Exactly one of
2012 /// `role` or `creds` should be configured.
2013 pub auth: AWSAuth,
2014 /// An Amazon Resource Name specifying the Kinesis stream to deposit events into.
2015 pub stream_arn: String,
2016}
2017
2018#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2019pub struct EventTargetCloudwatchLogs {
2020 /// Configuration for how to authenticate into your AWS account. Exactly one of
2021 /// `role` or `creds` should be configured.
2022 pub auth: AWSAuth,
2023 /// An Amazon Resource Name specifying the CloudWatch Logs group to deposit events
2024 /// into.
2025 pub log_group_arn: String,
2026}
2027
2028#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2029pub struct EventTargetDatadog {
2030 /// Datadog API key to use.
2031 pub api_key: Option<String>,
2032 /// Tags to send with the event.
2033 pub ddtags: Option<String>,
2034 /// Service name to send with the event.
2035 pub service: Option<String>,
2036 /// Datadog site to send event to.
2037 pub ddsite: Option<String>,
2038}
2039
2040#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2041pub struct EventTargetAzureLogsIngestion {
2042 /// Tenant ID for the Azure account
2043 pub tenant_id: String,
2044 /// Client ID for the application client
2045 pub client_id: String,
2046 /// Client Secret for the application client
2047 pub client_secret: String,
2048 /// Data collection endpoint logs ingestion URI
2049 pub logs_ingestion_uri: String,
2050 /// Data collection rule immutable ID
2051 pub data_collection_rule_id: String,
2052 /// Data collection stream name to use as destination, located inside the DCR
2053 pub data_collection_stream_name: String,
2054}
2055
2056#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2057pub struct AWSAuth {
2058 /// A role for ngrok to assume on your behalf to deposit events into your AWS
2059 /// account.
2060 pub role: Option<AWSRole>,
2061 /// Credentials to your AWS account if you prefer ngrok to sign in with long-term
2062 /// access keys.
2063 pub creds: Option<AWSCredentials>,
2064}
2065
2066#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2067pub struct AWSRole {
2068 /// An ARN that specifies the role that ngrok should use to deliver to the
2069 /// configured target.
2070 pub role_arn: String,
2071}
2072
2073#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2074pub struct AWSCredentials {
2075 /// The ID portion of an AWS access key.
2076 pub aws_access_key_id: String,
2077 /// The secret portion of an AWS access key.
2078 pub aws_secret_access_key: Option<String>,
2079}
2080
2081#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2082pub struct EventSubscriptionCreate {
2083 /// Arbitrary customer supplied information intended to be machine readable.
2084 /// Optional, max 4096 chars.
2085 pub metadata: String,
2086 /// Arbitrary customer supplied information intended to be human readable. Optional,
2087 /// max 255 chars.
2088 pub description: String,
2089 /// Sources containing the types for which this event subscription will trigger
2090 pub sources: Vec<EventSourceReplace>,
2091 /// A list of Event Destination IDs which should be used for this Event
2092 /// Subscription.
2093 pub destination_ids: Vec<String>,
2094}
2095
2096#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2097pub struct EventSubscriptionUpdate {
2098 /// Unique identifier for this Event Subscription.
2099 pub id: String,
2100 /// Arbitrary customer supplied information intended to be machine readable.
2101 /// Optional, max 4096 chars.
2102 pub metadata: Option<String>,
2103 /// Arbitrary customer supplied information intended to be human readable. Optional,
2104 /// max 255 chars.
2105 pub description: Option<String>,
2106 /// Sources containing the types for which this event subscription will trigger
2107 pub sources: Option<Vec<EventSourceReplace>>,
2108 /// A list of Event Destination IDs which should be used for this Event
2109 /// Subscription.
2110 pub destination_ids: Option<Vec<String>>,
2111}
2112
2113#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2114pub struct EventSubscriptionList {
2115 /// The list of all Event Subscriptions on this account.
2116 pub event_subscriptions: Vec<EventSubscription>,
2117 /// URI of the Event Subscriptions list API resource.
2118 pub uri: String,
2119 /// URI of next page, or null if there is no next page.
2120 pub next_page_uri: Option<String>,
2121}
2122
2123#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2124pub struct EventSubscription {
2125 /// Unique identifier for this Event Subscription.
2126 pub id: String,
2127 /// URI of the Event Subscription API resource.
2128 pub uri: String,
2129 /// When the Event Subscription was created (RFC 3339 format).
2130 pub created_at: String,
2131 /// Arbitrary customer supplied information intended to be machine readable.
2132 /// Optional, max 4096 chars.
2133 pub metadata: String,
2134 /// Arbitrary customer supplied information intended to be human readable. Optional,
2135 /// max 255 chars.
2136 pub description: String,
2137 /// Sources containing the types for which this event subscription will trigger
2138 pub sources: Vec<EventSource>,
2139 /// Destinations to which these events will be sent
2140 pub destinations: Vec<Ref>,
2141}
2142
2143#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2144pub struct EventSourceReplace {
2145 /// Type of event for which an event subscription will trigger
2146 pub r#type: String,
2147}
2148
2149#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2150pub struct EventSource {
2151 /// Type of event for which an event subscription will trigger
2152 pub r#type: String,
2153 /// URI of the Event Source API resource.
2154 pub uri: String,
2155}
2156
2157#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2158pub struct EventSourceList {
2159 /// The list of all Event Sources for an Event Subscription
2160 pub sources: Vec<EventSource>,
2161 /// URI of the next page, or null if there is no next page.
2162 pub uri: String,
2163}
2164
2165#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2166pub struct EventSourceCreate {
2167 /// The unique identifier for the Event Subscription that this Event Source is
2168 /// attached to.
2169 pub subscription_id: String,
2170 /// Type of event for which an event subscription will trigger
2171 pub r#type: String,
2172}
2173
2174#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2175pub struct EventSourceUpdate {
2176 /// The unique identifier for the Event Subscription that this Event Source is
2177 /// attached to.
2178 pub subscription_id: String,
2179 /// Type of event for which an event subscription will trigger
2180 pub r#type: String,
2181}
2182
2183/// This is needed instead of Item because the parameters are different.
2184#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2185pub struct EventSourceItem {
2186 /// The unique identifier for the Event Subscription that this Event Source is
2187 /// attached to.
2188 pub subscription_id: String,
2189 /// Type of event for which an event subscription will trigger
2190 pub r#type: String,
2191}
2192
2193/// This is needed instead of Paging because the parameters are different. We also don't need the typical pagination params because pagination of this isn't necessary or supported.
2194#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2195pub struct EventSourcePaging {
2196 /// The unique identifier for the Event Subscription that this Event Source is
2197 /// attached to.
2198 pub subscription_id: String,
2199}
2200
2201#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2202pub struct IPPolicyCreate {
2203 /// human-readable description of the source IPs of this IP policy. optional, max
2204 /// 255 bytes.
2205 pub description: String,
2206 /// arbitrary user-defined machine-readable data of this IP policy. optional, max
2207 /// 4096 bytes.
2208 pub metadata: String,
2209}
2210
2211#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2212pub struct IPPolicyUpdate {
2213 pub id: String,
2214 /// human-readable description of the source IPs of this IP policy. optional, max
2215 /// 255 bytes.
2216 pub description: Option<String>,
2217 /// arbitrary user-defined machine-readable data of this IP policy. optional, max
2218 /// 4096 bytes.
2219 pub metadata: Option<String>,
2220}
2221
2222#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2223pub struct IPPolicy {
2224 /// unique identifier for this IP policy
2225 pub id: String,
2226 /// URI of the IP Policy API resource
2227 pub uri: String,
2228 /// timestamp when the IP policy was created, RFC 3339 format
2229 pub created_at: String,
2230 /// human-readable description of the source IPs of this IP policy. optional, max
2231 /// 255 bytes.
2232 pub description: String,
2233 /// arbitrary user-defined machine-readable data of this IP policy. optional, max
2234 /// 4096 bytes.
2235 pub metadata: String,
2236}
2237
2238#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2239pub struct IPPolicyList {
2240 /// the list of all IP policies on this account
2241 pub ip_policies: Vec<IPPolicy>,
2242 /// URI of the IP policy list API resource
2243 pub uri: String,
2244 /// URI of the next page, or null if there is no next page
2245 pub next_page_uri: Option<String>,
2246}
2247
2248#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2249pub struct IPPolicyRuleCreate {
2250 /// human-readable description of the source IPs of this IP rule. optional, max 255
2251 /// bytes.
2252 pub description: String,
2253 /// arbitrary user-defined machine-readable data of this IP policy rule. optional,
2254 /// max 4096 bytes.
2255 pub metadata: String,
2256 /// an IP or IP range specified in CIDR notation. IPv4 and IPv6 are both supported.
2257 pub cidr: String,
2258 /// ID of the IP policy this IP policy rule will be attached to
2259 pub ip_policy_id: String,
2260 /// the action to apply to the policy rule, either `allow` or `deny`
2261 pub action: Option<String>,
2262}
2263
2264#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2265pub struct IPPolicyRuleUpdate {
2266 pub id: String,
2267 /// human-readable description of the source IPs of this IP rule. optional, max 255
2268 /// bytes.
2269 pub description: Option<String>,
2270 /// arbitrary user-defined machine-readable data of this IP policy rule. optional,
2271 /// max 4096 bytes.
2272 pub metadata: Option<String>,
2273 /// an IP or IP range specified in CIDR notation. IPv4 and IPv6 are both supported.
2274 pub cidr: Option<String>,
2275}
2276
2277#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2278pub struct IPPolicyRule {
2279 /// unique identifier for this IP policy rule
2280 pub id: String,
2281 /// URI of the IP policy rule API resource
2282 pub uri: String,
2283 /// timestamp when the IP policy rule was created, RFC 3339 format
2284 pub created_at: String,
2285 /// human-readable description of the source IPs of this IP rule. optional, max 255
2286 /// bytes.
2287 pub description: String,
2288 /// arbitrary user-defined machine-readable data of this IP policy rule. optional,
2289 /// max 4096 bytes.
2290 pub metadata: String,
2291 /// an IP or IP range specified in CIDR notation. IPv4 and IPv6 are both supported.
2292 pub cidr: String,
2293 /// object describing the IP policy this IP Policy Rule belongs to
2294 pub ip_policy: Ref,
2295 /// the action to apply to the policy rule, either `allow` or `deny`
2296 pub action: String,
2297}
2298
2299#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2300pub struct IPPolicyRuleList {
2301 /// the list of all IP policy rules on this account
2302 pub ip_policy_rules: Vec<IPPolicyRule>,
2303 /// URI of the IP policy rule list API resource
2304 pub uri: String,
2305 /// URI of the next page, or null if there is no next page
2306 pub next_page_uri: Option<String>,
2307}
2308
2309#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2310pub struct IPRestrictionCreate {
2311 /// human-readable description of this IP restriction. optional, max 255 bytes.
2312 pub description: String,
2313 /// arbitrary user-defined machine-readable data of this IP restriction. optional,
2314 /// max 4096 bytes.
2315 pub metadata: String,
2316 /// true if the IP restriction will be enforced. if false, only warnings will be
2317 /// issued
2318 pub enforced: bool,
2319 /// the type of IP restriction. this defines what traffic will be restricted with
2320 /// the attached policies. four values are currently supported: `dashboard`, `api`,
2321 /// `agent`, and `endpoints`
2322 pub r#type: String,
2323 /// the set of IP policy identifiers that are used to enforce the restriction
2324 pub ip_policy_ids: Vec<String>,
2325}
2326
2327#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2328pub struct IPRestrictionUpdate {
2329 pub id: String,
2330 /// human-readable description of this IP restriction. optional, max 255 bytes.
2331 pub description: Option<String>,
2332 /// arbitrary user-defined machine-readable data of this IP restriction. optional,
2333 /// max 4096 bytes.
2334 pub metadata: Option<String>,
2335 /// true if the IP restriction will be enforced. if false, only warnings will be
2336 /// issued
2337 pub enforced: Option<bool>,
2338 /// the set of IP policy identifiers that are used to enforce the restriction
2339 pub ip_policy_ids: Vec<String>,
2340}
2341
2342#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2343pub struct IPRestriction {
2344 /// unique identifier for this IP restriction
2345 pub id: String,
2346 /// URI of the IP restriction API resource
2347 pub uri: String,
2348 /// timestamp when the IP restriction was created, RFC 3339 format
2349 pub created_at: String,
2350 /// human-readable description of this IP restriction. optional, max 255 bytes.
2351 pub description: String,
2352 /// arbitrary user-defined machine-readable data of this IP restriction. optional,
2353 /// max 4096 bytes.
2354 pub metadata: String,
2355 /// true if the IP restriction will be enforced. if false, only warnings will be
2356 /// issued
2357 pub enforced: bool,
2358 /// the type of IP restriction. this defines what traffic will be restricted with
2359 /// the attached policies. four values are currently supported: `dashboard`, `api`,
2360 /// `agent`, and `endpoints`
2361 pub r#type: String,
2362 /// the set of IP policies that are used to enforce the restriction
2363 pub ip_policies: Vec<Ref>,
2364}
2365
2366#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2367pub struct IPRestrictionList {
2368 /// the list of all IP restrictions on this account
2369 pub ip_restrictions: Vec<IPRestriction>,
2370 /// URI of the IP restrictions list API resource
2371 pub uri: String,
2372 /// URI of the next page, or null if there is no next page
2373 pub next_page_uri: Option<String>,
2374}
2375
2376#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2377pub struct ReservedAddrCreate {
2378 /// human-readable description of what this reserved address will be used for
2379 pub description: String,
2380 /// arbitrary user-defined machine-readable data of this reserved address. Optional,
2381 /// max 4096 bytes.
2382 pub metadata: String,
2383 /// reserve the address in this geographic ngrok datacenter. Optional, default is
2384 /// us. (au, eu, ap, us, jp, in, sa)
2385 pub region: String,
2386}
2387
2388#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2389pub struct ReservedAddrUpdate {
2390 pub id: String,
2391 /// human-readable description of what this reserved address will be used for
2392 pub description: Option<String>,
2393 /// arbitrary user-defined machine-readable data of this reserved address. Optional,
2394 /// max 4096 bytes.
2395 pub metadata: Option<String>,
2396}
2397
2398#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2399pub struct ReservedAddr {
2400 /// unique reserved address resource identifier
2401 pub id: String,
2402 /// URI of the reserved address API resource
2403 pub uri: String,
2404 /// timestamp when the reserved address was created, RFC 3339 format
2405 pub created_at: String,
2406 /// human-readable description of what this reserved address will be used for
2407 pub description: String,
2408 /// arbitrary user-defined machine-readable data of this reserved address. Optional,
2409 /// max 4096 bytes.
2410 pub metadata: String,
2411 /// hostname:port of the reserved address that was assigned at creation time
2412 pub addr: String,
2413 /// reserve the address in this geographic ngrok datacenter. Optional, default is
2414 /// us. (au, eu, ap, us, jp, in, sa)
2415 pub region: String,
2416}
2417
2418#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2419pub struct ReservedAddrList {
2420 /// the list of all reserved addresses on this account
2421 pub reserved_addrs: Vec<ReservedAddr>,
2422 /// URI of the reserved address list API resource
2423 pub uri: String,
2424 /// URI of the next page, or null if there is no next page
2425 pub next_page_uri: Option<String>,
2426}
2427
2428#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2429pub struct ReservedDomainCreate {
2430 /// hostname of the reserved domain
2431 pub domain: String,
2432 /// deprecated: With the launch of the ngrok Global Network domains traffic is now
2433 /// handled globally. This field applied only to endpoints. Note that agents may
2434 /// still connect to specific regions. Optional, null by default. (au, eu, ap, us,
2435 /// jp, in, sa)
2436 pub region: String,
2437 /// human-readable description of what this reserved domain will be used for
2438 pub description: String,
2439 /// arbitrary user-defined machine-readable data of this reserved domain. Optional,
2440 /// max 4096 bytes.
2441 pub metadata: String,
2442 /// ID of a user-uploaded TLS certificate to use for connections to targeting this
2443 /// domain. Optional, mutually exclusive with `certificate_management_policy`.
2444 pub certificate_id: Option<String>,
2445 /// configuration for automatic management of TLS certificates for this domain, or
2446 /// null if automatic management is disabled. Optional, mutually exclusive with
2447 /// `certificate_id`.
2448 pub certificate_management_policy: Option<ReservedDomainCertPolicy>,
2449}
2450
2451#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2452pub struct ReservedDomainUpdate {
2453 pub id: String,
2454 /// human-readable description of what this reserved domain will be used for
2455 pub description: Option<String>,
2456 /// arbitrary user-defined machine-readable data of this reserved domain. Optional,
2457 /// max 4096 bytes.
2458 pub metadata: Option<String>,
2459 /// ID of a user-uploaded TLS certificate to use for connections to targeting this
2460 /// domain. Optional, mutually exclusive with `certificate_management_policy`.
2461 pub certificate_id: Option<String>,
2462 /// configuration for automatic management of TLS certificates for this domain, or
2463 /// null if automatic management is disabled. Optional, mutually exclusive with
2464 /// `certificate_id`.
2465 pub certificate_management_policy: Option<ReservedDomainCertPolicy>,
2466}
2467
2468#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2469pub struct ReservedDomain {
2470 /// unique reserved domain resource identifier
2471 pub id: String,
2472 /// URI of the reserved domain API resource
2473 pub uri: String,
2474 /// timestamp when the reserved domain was created, RFC 3339 format
2475 pub created_at: String,
2476 /// human-readable description of what this reserved domain will be used for
2477 pub description: String,
2478 /// arbitrary user-defined machine-readable data of this reserved domain. Optional,
2479 /// max 4096 bytes.
2480 pub metadata: String,
2481 /// hostname of the reserved domain
2482 pub domain: String,
2483 /// deprecated: With the launch of the ngrok Global Network domains traffic is now
2484 /// handled globally. This field applied only to endpoints. Note that agents may
2485 /// still connect to specific regions. Optional, null by default. (au, eu, ap, us,
2486 /// jp, in, sa)
2487 pub region: String,
2488 /// DNS CNAME target for a custom hostname, or null if the reserved domain is a
2489 /// subdomain of an ngrok owned domain (e.g. *.ngrok.app)
2490 pub cname_target: Option<String>,
2491 /// object referencing the TLS certificate used for connections to this domain. This
2492 /// can be either a user-uploaded certificate, the most recently issued automatic
2493 /// one, or null otherwise.
2494 pub certificate: Option<Ref>,
2495 /// configuration for automatic management of TLS certificates for this domain, or
2496 /// null if automatic management is disabled
2497 pub certificate_management_policy: Option<ReservedDomainCertPolicy>,
2498 /// status of the automatic certificate management for this domain, or null if
2499 /// automatic management is disabled
2500 pub certificate_management_status: Option<ReservedDomainCertStatus>,
2501 /// DNS CNAME target for the host _acme-challenge.example.com, where example.com is
2502 /// your reserved domain name. This is required to issue certificates for wildcard,
2503 /// non-ngrok reserved domains. Must be null for non-wildcard domains and ngrok
2504 /// subdomains.
2505 pub acme_challenge_cname_target: Option<String>,
2506}
2507
2508#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2509pub struct ReservedDomainList {
2510 /// the list of all reserved domains on this account
2511 pub reserved_domains: Vec<ReservedDomain>,
2512 /// URI of the reserved domain list API resource
2513 pub uri: String,
2514 /// URI of the next page, or null if there is no next page
2515 pub next_page_uri: Option<String>,
2516}
2517
2518#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2519pub struct ReservedDomainCertPolicy {
2520 /// certificate authority to request certificates from. The only supported value is
2521 /// letsencrypt.
2522 pub authority: String,
2523 /// type of private key to use when requesting certificates. Defaults to ecdsa, can
2524 /// be either rsa or ecdsa.
2525 pub private_key_type: String,
2526}
2527
2528#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2529pub struct ReservedDomainCertStatus {
2530 /// timestamp when the next renewal will be requested, RFC 3339 format
2531 pub renews_at: Option<String>,
2532 /// status of the certificate provisioning job, or null if the certificiate isn't
2533 /// being provisioned or renewed
2534 pub provisioning_job: Option<ReservedDomainCertJob>,
2535}
2536
2537#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2538pub struct ReservedDomainCertJob {
2539 /// if present, an error code indicating why provisioning is failing. It may be
2540 /// either a temporary condition (INTERNAL_ERROR), or a permanent one the user must
2541 /// correct (DNS_ERROR).
2542 pub error_code: Option<String>,
2543 /// a message describing the current status or error
2544 pub msg: String,
2545 /// timestamp when the provisioning job started, RFC 3339 format
2546 pub started_at: String,
2547 /// timestamp when the provisioning job will be retried
2548 pub retries_at: Option<String>,
2549}
2550
2551#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2552pub struct SSHCertificateAuthorityCreate {
2553 /// human-readable description of this SSH Certificate Authority. optional, max 255
2554 /// bytes.
2555 pub description: String,
2556 /// arbitrary user-defined machine-readable data of this SSH Certificate Authority.
2557 /// optional, max 4096 bytes.
2558 pub metadata: String,
2559 /// the type of private key to generate. one of `rsa`, `ecdsa`, `ed25519`
2560 pub private_key_type: String,
2561 /// the type of elliptic curve to use when creating an ECDSA key
2562 pub elliptic_curve: String,
2563 /// the key size to use when creating an RSA key. one of `2048` or `4096`
2564 pub key_size: i64,
2565}
2566
2567#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2568pub struct SSHCertificateAuthorityUpdate {
2569 pub id: String,
2570 /// human-readable description of this SSH Certificate Authority. optional, max 255
2571 /// bytes.
2572 pub description: Option<String>,
2573 /// arbitrary user-defined machine-readable data of this SSH Certificate Authority.
2574 /// optional, max 4096 bytes.
2575 pub metadata: Option<String>,
2576}
2577
2578#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2579pub struct SSHCertificateAuthority {
2580 /// unique identifier for this SSH Certificate Authority
2581 pub id: String,
2582 /// URI of the SSH Certificate Authority API resource
2583 pub uri: String,
2584 /// timestamp when the SSH Certificate Authority API resource was created, RFC 3339
2585 /// format
2586 pub created_at: String,
2587 /// human-readable description of this SSH Certificate Authority. optional, max 255
2588 /// bytes.
2589 pub description: String,
2590 /// arbitrary user-defined machine-readable data of this SSH Certificate Authority.
2591 /// optional, max 4096 bytes.
2592 pub metadata: String,
2593 /// raw public key for this SSH Certificate Authority
2594 pub public_key: String,
2595 /// the type of private key for this SSH Certificate Authority
2596 pub key_type: String,
2597}
2598
2599#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2600pub struct SSHCertificateAuthorityList {
2601 /// the list of all certificate authorities on this account
2602 pub ssh_certificate_authorities: Vec<SSHCertificateAuthority>,
2603 /// URI of the certificates authorities list API resource
2604 pub uri: String,
2605 /// URI of the next page, or null if there is no next page
2606 pub next_page_uri: Option<String>,
2607}
2608
2609#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2610pub struct SSHCredentialCreate {
2611 /// human-readable description of who or what will use the ssh credential to
2612 /// authenticate. Optional, max 255 bytes.
2613 pub description: String,
2614 /// arbitrary user-defined machine-readable data of this ssh credential. Optional,
2615 /// max 4096 bytes.
2616 pub metadata: String,
2617 /// optional list of ACL rules. If unspecified, the credential will have no
2618 /// restrictions. The only allowed ACL rule at this time is the `bind` rule. The
2619 /// `bind` rule allows the caller to restrict what domains, addresses, and labels
2620 /// the token is allowed to bind. For example, to allow the token to open a tunnel
2621 /// on example.ngrok.io your ACL would include the rule `bind:example.ngrok.io`.
2622 /// Bind rules for domains may specify a leading wildcard to match multiple domains
2623 /// with a common suffix. For example, you may specify a rule of
2624 /// `bind:*.example.com` which will allow `x.example.com`, `y.example.com`,
2625 /// `*.example.com`, etc. Bind rules for labels may specify a wildcard key and/or
2626 /// value to match multiple labels. For example, you may specify a rule of
2627 /// `bind:*=example` which will allow `x=example`, `y=example`, etc. A rule of `'*'`
2628 /// is equivalent to no acl at all and will explicitly permit all actions.
2629 pub acl: Vec<String>,
2630 /// the PEM-encoded public key of the SSH keypair that will be used to authenticate
2631 pub public_key: String,
2632 /// If supplied at credential creation, ownership will be assigned to the specified
2633 /// User or Bot. Only admins may specify an owner other than themselves. Defaults to
2634 /// the authenticated User or Bot.
2635 pub owner_id: Option<String>,
2636}
2637
2638#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2639pub struct SSHCredentialUpdate {
2640 pub id: String,
2641 /// human-readable description of who or what will use the ssh credential to
2642 /// authenticate. Optional, max 255 bytes.
2643 pub description: Option<String>,
2644 /// arbitrary user-defined machine-readable data of this ssh credential. Optional,
2645 /// max 4096 bytes.
2646 pub metadata: Option<String>,
2647 /// optional list of ACL rules. If unspecified, the credential will have no
2648 /// restrictions. The only allowed ACL rule at this time is the `bind` rule. The
2649 /// `bind` rule allows the caller to restrict what domains, addresses, and labels
2650 /// the token is allowed to bind. For example, to allow the token to open a tunnel
2651 /// on example.ngrok.io your ACL would include the rule `bind:example.ngrok.io`.
2652 /// Bind rules for domains may specify a leading wildcard to match multiple domains
2653 /// with a common suffix. For example, you may specify a rule of
2654 /// `bind:*.example.com` which will allow `x.example.com`, `y.example.com`,
2655 /// `*.example.com`, etc. Bind rules for labels may specify a wildcard key and/or
2656 /// value to match multiple labels. For example, you may specify a rule of
2657 /// `bind:*=example` which will allow `x=example`, `y=example`, etc. A rule of `'*'`
2658 /// is equivalent to no acl at all and will explicitly permit all actions.
2659 pub acl: Option<Vec<String>>,
2660}
2661
2662#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2663pub struct SSHCredential {
2664 /// unique ssh credential resource identifier
2665 pub id: String,
2666 /// URI of the ssh credential API resource
2667 pub uri: String,
2668 /// timestamp when the ssh credential was created, RFC 3339 format
2669 pub created_at: String,
2670 /// human-readable description of who or what will use the ssh credential to
2671 /// authenticate. Optional, max 255 bytes.
2672 pub description: String,
2673 /// arbitrary user-defined machine-readable data of this ssh credential. Optional,
2674 /// max 4096 bytes.
2675 pub metadata: String,
2676 /// the PEM-encoded public key of the SSH keypair that will be used to authenticate
2677 pub public_key: String,
2678 /// optional list of ACL rules. If unspecified, the credential will have no
2679 /// restrictions. The only allowed ACL rule at this time is the `bind` rule. The
2680 /// `bind` rule allows the caller to restrict what domains, addresses, and labels
2681 /// the token is allowed to bind. For example, to allow the token to open a tunnel
2682 /// on example.ngrok.io your ACL would include the rule `bind:example.ngrok.io`.
2683 /// Bind rules for domains may specify a leading wildcard to match multiple domains
2684 /// with a common suffix. For example, you may specify a rule of
2685 /// `bind:*.example.com` which will allow `x.example.com`, `y.example.com`,
2686 /// `*.example.com`, etc. Bind rules for labels may specify a wildcard key and/or
2687 /// value to match multiple labels. For example, you may specify a rule of
2688 /// `bind:*=example` which will allow `x=example`, `y=example`, etc. A rule of `'*'`
2689 /// is equivalent to no acl at all and will explicitly permit all actions.
2690 pub acl: Vec<String>,
2691 /// If supplied at credential creation, ownership will be assigned to the specified
2692 /// User or Bot. Only admins may specify an owner other than themselves. Defaults to
2693 /// the authenticated User or Bot.
2694 pub owner_id: Option<String>,
2695}
2696
2697#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2698pub struct SSHCredentialList {
2699 /// the list of all ssh credentials on this account
2700 pub ssh_credentials: Vec<SSHCredential>,
2701 /// URI of the ssh credential list API resource
2702 pub uri: String,
2703 /// URI of the next page, or null if there is no next page
2704 pub next_page_uri: Option<String>,
2705}
2706
2707#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2708pub struct SSHHostCertificateCreate {
2709 /// the ssh certificate authority that is used to sign this ssh host certificate
2710 pub ssh_certificate_authority_id: String,
2711 /// a public key in OpenSSH Authorized Keys format that this certificate signs
2712 pub public_key: String,
2713 /// the list of principals included in the ssh host certificate. This is the list of
2714 /// hostnames and/or IP addresses that are authorized to serve SSH traffic with this
2715 /// certificate. Dangerously, if no principals are specified, this certificate is
2716 /// considered valid for all hosts.
2717 pub principals: Vec<String>,
2718 /// The time when the host certificate becomes valid, in RFC 3339 format. Defaults
2719 /// to the current time if unspecified.
2720 pub valid_after: String,
2721 /// The time when this host certificate becomes invalid, in RFC 3339 format. If
2722 /// unspecified, a default value of one year in the future will be used. The OpenSSH
2723 /// certificates RFC calls this `valid_before`.
2724 pub valid_until: String,
2725 /// human-readable description of this SSH Host Certificate. optional, max 255
2726 /// bytes.
2727 pub description: String,
2728 /// arbitrary user-defined machine-readable data of this SSH Host Certificate.
2729 /// optional, max 4096 bytes.
2730 pub metadata: String,
2731}
2732
2733#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2734pub struct SSHHostCertificateUpdate {
2735 pub id: String,
2736 /// human-readable description of this SSH Host Certificate. optional, max 255
2737 /// bytes.
2738 pub description: Option<String>,
2739 /// arbitrary user-defined machine-readable data of this SSH Host Certificate.
2740 /// optional, max 4096 bytes.
2741 pub metadata: Option<String>,
2742}
2743
2744#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2745pub struct SSHHostCertificate {
2746 /// unique identifier for this SSH Host Certificate
2747 pub id: String,
2748 /// URI of the SSH Host Certificate API resource
2749 pub uri: String,
2750 /// timestamp when the SSH Host Certificate API resource was created, RFC 3339
2751 /// format
2752 pub created_at: String,
2753 /// human-readable description of this SSH Host Certificate. optional, max 255
2754 /// bytes.
2755 pub description: String,
2756 /// arbitrary user-defined machine-readable data of this SSH Host Certificate.
2757 /// optional, max 4096 bytes.
2758 pub metadata: String,
2759 /// a public key in OpenSSH Authorized Keys format that this certificate signs
2760 pub public_key: String,
2761 /// the key type of the `public_key`, one of `rsa`, `ecdsa` or `ed25519`
2762 pub key_type: String,
2763 /// the ssh certificate authority that is used to sign this ssh host certificate
2764 pub ssh_certificate_authority_id: String,
2765 /// the list of principals included in the ssh host certificate. This is the list of
2766 /// hostnames and/or IP addresses that are authorized to serve SSH traffic with this
2767 /// certificate. Dangerously, if no principals are specified, this certificate is
2768 /// considered valid for all hosts.
2769 pub principals: Vec<String>,
2770 /// the time when the ssh host certificate becomes valid, in RFC 3339 format.
2771 pub valid_after: String,
2772 /// the time after which the ssh host certificate becomes invalid, in RFC 3339
2773 /// format. the OpenSSH certificates RFC calls this `valid_before`.
2774 pub valid_until: String,
2775 /// the signed SSH certificate in OpenSSH Authorized Keys format. this value should
2776 /// be placed in a `-cert.pub` certificate file on disk that should be referenced in
2777 /// your `sshd_config` configuration file with a `HostCertificate` directive
2778 pub certificate: String,
2779}
2780
2781#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2782pub struct SSHHostCertificateList {
2783 /// the list of all ssh host certificates on this account
2784 pub ssh_host_certificates: Vec<SSHHostCertificate>,
2785 /// URI of the ssh host certificates list API resource
2786 pub uri: String,
2787 /// URI of the next page, or null if there is no next page
2788 pub next_page_uri: Option<String>,
2789}
2790
2791#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2792pub struct SSHUserCertificateCreate {
2793 /// the ssh certificate authority that is used to sign this ssh user certificate
2794 pub ssh_certificate_authority_id: String,
2795 /// a public key in OpenSSH Authorized Keys format that this certificate signs
2796 pub public_key: String,
2797 /// the list of principals included in the ssh user certificate. This is the list of
2798 /// usernames that the certificate holder may sign in as on a machine authorizing
2799 /// the signing certificate authority. Dangerously, if no principals are specified,
2800 /// this certificate may be used to log in as any user.
2801 pub principals: Vec<String>,
2802 /// A map of critical options included in the certificate. Only two critical options
2803 /// are currently defined by OpenSSH: `force-command` and `source-address`. See [the
2804 /// OpenSSH certificate protocol
2805 /// spec](https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.certkeys)
2806 /// for additional details.
2807 pub critical_options: HashMap<String, String>,
2808 /// A map of extensions included in the certificate. Extensions are additional
2809 /// metadata that can be interpreted by the SSH server for any purpose. These can be
2810 /// used to permit or deny the ability to open a terminal, do port forwarding, x11
2811 /// forwarding, and more. If unspecified, the certificate will include limited
2812 /// permissions with the following extension map: `{"permit-pty": "",
2813 /// "permit-user-rc": ""}` OpenSSH understands a number of predefined extensions.
2814 /// See [the OpenSSH certificate protocol
2815 /// spec](https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.certkeys)
2816 /// for additional details.
2817 pub extensions: HashMap<String, String>,
2818 /// The time when the user certificate becomes valid, in RFC 3339 format. Defaults
2819 /// to the current time if unspecified.
2820 pub valid_after: String,
2821 /// The time when this host certificate becomes invalid, in RFC 3339 format. If
2822 /// unspecified, a default value of 24 hours will be used. The OpenSSH certificates
2823 /// RFC calls this `valid_before`.
2824 pub valid_until: String,
2825 /// human-readable description of this SSH User Certificate. optional, max 255
2826 /// bytes.
2827 pub description: String,
2828 /// arbitrary user-defined machine-readable data of this SSH User Certificate.
2829 /// optional, max 4096 bytes.
2830 pub metadata: String,
2831}
2832
2833#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2834pub struct SSHUserCertificateUpdate {
2835 pub id: String,
2836 /// human-readable description of this SSH User Certificate. optional, max 255
2837 /// bytes.
2838 pub description: Option<String>,
2839 /// arbitrary user-defined machine-readable data of this SSH User Certificate.
2840 /// optional, max 4096 bytes.
2841 pub metadata: Option<String>,
2842}
2843
2844#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2845pub struct SSHUserCertificate {
2846 /// unique identifier for this SSH User Certificate
2847 pub id: String,
2848 /// URI of the SSH User Certificate API resource
2849 pub uri: String,
2850 /// timestamp when the SSH User Certificate API resource was created, RFC 3339
2851 /// format
2852 pub created_at: String,
2853 /// human-readable description of this SSH User Certificate. optional, max 255
2854 /// bytes.
2855 pub description: String,
2856 /// arbitrary user-defined machine-readable data of this SSH User Certificate.
2857 /// optional, max 4096 bytes.
2858 pub metadata: String,
2859 /// a public key in OpenSSH Authorized Keys format that this certificate signs
2860 pub public_key: String,
2861 /// the key type of the `public_key`, one of `rsa`, `ecdsa` or `ed25519`
2862 pub key_type: String,
2863 /// the ssh certificate authority that is used to sign this ssh user certificate
2864 pub ssh_certificate_authority_id: String,
2865 /// the list of principals included in the ssh user certificate. This is the list of
2866 /// usernames that the certificate holder may sign in as on a machine authorizing
2867 /// the signing certificate authority. Dangerously, if no principals are specified,
2868 /// this certificate may be used to log in as any user.
2869 pub principals: Vec<String>,
2870 /// A map of critical options included in the certificate. Only two critical options
2871 /// are currently defined by OpenSSH: `force-command` and `source-address`. See [the
2872 /// OpenSSH certificate protocol
2873 /// spec](https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.certkeys)
2874 /// for additional details.
2875 pub critical_options: HashMap<String, String>,
2876 /// A map of extensions included in the certificate. Extensions are additional
2877 /// metadata that can be interpreted by the SSH server for any purpose. These can be
2878 /// used to permit or deny the ability to open a terminal, do port forwarding, x11
2879 /// forwarding, and more. If unspecified, the certificate will include limited
2880 /// permissions with the following extension map: `{"permit-pty": "",
2881 /// "permit-user-rc": ""}` OpenSSH understands a number of predefined extensions.
2882 /// See [the OpenSSH certificate protocol
2883 /// spec](https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.certkeys)
2884 /// for additional details.
2885 pub extensions: HashMap<String, String>,
2886 /// the time when the ssh host certificate becomes valid, in RFC 3339 format.
2887 pub valid_after: String,
2888 /// the time after which the ssh host certificate becomes invalid, in RFC 3339
2889 /// format. the OpenSSH certificates RFC calls this `valid_before`.
2890 pub valid_until: String,
2891 /// the signed SSH certificate in OpenSSH Authorized Keys Format. this value should
2892 /// be placed in a `-cert.pub` certificate file on disk that should be referenced in
2893 /// your `sshd_config` configuration file with a `HostCertificate` directive
2894 pub certificate: String,
2895}
2896
2897#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2898pub struct SSHUserCertificateList {
2899 /// the list of all ssh user certificates on this account
2900 pub ssh_user_certificates: Vec<SSHUserCertificate>,
2901 /// URI of the ssh user certificates list API resource
2902 pub uri: String,
2903 /// URI of the next page, or null if there is no next page
2904 pub next_page_uri: Option<String>,
2905}
2906
2907#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2908pub struct TLSCertificateCreate {
2909 /// human-readable description of this TLS certificate. optional, max 255 bytes.
2910 pub description: String,
2911 /// arbitrary user-defined machine-readable data of this TLS certificate. optional,
2912 /// max 4096 bytes.
2913 pub metadata: String,
2914 /// chain of PEM-encoded certificates, leaf first. See [Certificate
2915 /// Bundles](https://ngrok.com/docs/cloud-edge/endpoints#certificate-chains).
2916 pub certificate_pem: String,
2917 /// private key for the TLS certificate, PEM-encoded. See [Private
2918 /// Keys](https://ngrok.com/docs/cloud-edge/endpoints#private-keys).
2919 pub private_key_pem: String,
2920}
2921
2922#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2923pub struct TLSCertificateUpdate {
2924 pub id: String,
2925 /// human-readable description of this TLS certificate. optional, max 255 bytes.
2926 pub description: Option<String>,
2927 /// arbitrary user-defined machine-readable data of this TLS certificate. optional,
2928 /// max 4096 bytes.
2929 pub metadata: Option<String>,
2930}
2931
2932#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2933pub struct TLSCertificate {
2934 /// unique identifier for this TLS certificate
2935 pub id: String,
2936 /// URI of the TLS certificate API resource
2937 pub uri: String,
2938 /// timestamp when the TLS certificate was created, RFC 3339 format
2939 pub created_at: String,
2940 /// human-readable description of this TLS certificate. optional, max 255 bytes.
2941 pub description: String,
2942 /// arbitrary user-defined machine-readable data of this TLS certificate. optional,
2943 /// max 4096 bytes.
2944 pub metadata: String,
2945 /// chain of PEM-encoded certificates, leaf first. See [Certificate
2946 /// Bundles](https://ngrok.com/docs/cloud-edge/endpoints#certificate-chains).
2947 pub certificate_pem: String,
2948 /// subject common name from the leaf of this TLS certificate
2949 pub subject_common_name: String,
2950 /// subject alternative names (SANs) from the leaf of this TLS certificate
2951 pub subject_alternative_names: TLSCertificateSANs,
2952 /// timestamp (in RFC 3339 format) when this TLS certificate was issued
2953 /// automatically, or null if this certificate was user-uploaded
2954 pub issued_at: Option<String>,
2955 /// timestamp when this TLS certificate becomes valid, RFC 3339 format
2956 pub not_before: String,
2957 /// timestamp when this TLS certificate becomes invalid, RFC 3339 format
2958 pub not_after: String,
2959 /// set of actions the private key of this TLS certificate can be used for
2960 pub key_usages: Vec<String>,
2961 /// extended set of actions the private key of this TLS certificate can be used for
2962 pub extended_key_usages: Vec<String>,
2963 /// type of the private key of this TLS certificate. One of rsa, ecdsa, or ed25519.
2964 pub private_key_type: String,
2965 /// issuer common name from the leaf of this TLS certificate
2966 pub issuer_common_name: String,
2967 /// serial number of the leaf of this TLS certificate
2968 pub serial_number: String,
2969 /// subject organization from the leaf of this TLS certificate
2970 pub subject_organization: String,
2971 /// subject organizational unit from the leaf of this TLS certificate
2972 pub subject_organizational_unit: String,
2973 /// subject locality from the leaf of this TLS certificate
2974 pub subject_locality: String,
2975 /// subject province from the leaf of this TLS certificate
2976 pub subject_province: String,
2977 /// subject country from the leaf of this TLS certificate
2978 pub subject_country: String,
2979}
2980
2981#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2982pub struct TLSCertificateList {
2983 /// the list of all TLS certificates on this account
2984 pub tls_certificates: Vec<TLSCertificate>,
2985 /// URI of the TLS certificates list API resource
2986 pub uri: String,
2987 /// URI of the next page, or null if there is no next page
2988 pub next_page_uri: Option<String>,
2989}
2990
2991#[derive(Clone, Debug, Default, Deserialize, Serialize)]
2992pub struct TLSCertificateSANs {
2993 /// set of additional domains (including wildcards) this TLS certificate is valid
2994 /// for
2995 pub dns_names: Vec<String>,
2996 /// set of IP addresses this TLS certificate is also valid for
2997 pub ips: Vec<String>,
2998}
2999
3000#[derive(Clone, Debug, Default, Deserialize, Serialize)]
3001pub struct Tunnel {
3002 /// unique tunnel resource identifier
3003 pub id: String,
3004 /// URL of the ephemeral tunnel's public endpoint
3005 pub public_url: String,
3006 /// timestamp when the tunnel was initiated in RFC 3339 format
3007 pub started_at: String,
3008 /// user-supplied metadata for the tunnel defined in the ngrok configuration file.
3009 /// See the tunnel [metadata configuration
3010 /// option](https://ngrok.com/docs/secure-tunnels/ngrok-agent/reference/config#common-tunnel-configuration-properties)
3011 /// In API version 0, this value was instead pulled from the top-level [metadata
3012 /// configuration
3013 /// option](https://ngrok.com/docs/secure-tunnels/ngrok-agent/reference/config#metadata).
3014 pub metadata: String,
3015 /// tunnel protocol for ephemeral tunnels. one of `http`, `https`, `tcp` or `tls`
3016 pub proto: String,
3017 /// identifier of tune region where the tunnel is running
3018 pub region: String,
3019 /// reference object pointing to the tunnel session on which this tunnel was started
3020 pub tunnel_session: Ref,
3021 /// the ephemeral endpoint this tunnel is associated with, if this is an
3022 /// agent-initiated tunnel
3023 pub endpoint: Option<Ref>,
3024 /// the labels the tunnel group backends will match against, if this is a backend
3025 /// tunnel
3026 pub labels: Option<HashMap<String, String>>,
3027 /// tunnel group backends served by this backend tunnel
3028 pub backends: Option<Vec<Ref>>,
3029 /// upstream address the ngrok agent forwards traffic over this tunnel to. this may
3030 /// be expressed as a URL or a network address.
3031 pub forwards_to: String,
3032}
3033
3034#[derive(Clone, Debug, Default, Deserialize, Serialize)]
3035pub struct TunnelList {
3036 /// the list of all online tunnels on this account
3037 pub tunnels: Vec<Tunnel>,
3038 /// URI of the tunnels list API resource
3039 pub uri: String,
3040 /// URI of the next page, or null if there is no next page
3041 pub next_page_uri: Option<String>,
3042}