@distilled.cloud/namespacelabs 0.0.0 → 1.0.0-rc.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +130 -4
  3. package/lib/.lazy.json +1 -0
  4. package/lib/_bundle/lazy.js +4 -0
  5. package/lib/_bundle/sdk.js +2 -0
  6. package/lib/_bundle/sdk.js.map +1 -0
  7. package/lib/credentials.d.ts +73 -0
  8. package/lib/credentials.d.ts.map +1 -0
  9. package/lib/credentials.js +1 -0
  10. package/lib/errors.d.ts +59 -0
  11. package/lib/errors.d.ts.map +1 -0
  12. package/lib/errors.js +1 -0
  13. package/lib/index.d.ts +44 -0
  14. package/lib/index.d.ts.map +1 -0
  15. package/lib/index.js +6 -0
  16. package/lib/pagination.d.ts +2 -0
  17. package/lib/pagination.d.ts.map +1 -0
  18. package/lib/pagination.js +1 -0
  19. package/lib/protocol.d.ts +19 -0
  20. package/lib/protocol.d.ts.map +1 -0
  21. package/lib/protocol.js +1 -0
  22. package/lib/retry.d.ts +12 -0
  23. package/lib/retry.d.ts.map +1 -0
  24. package/lib/retry.js +1 -0
  25. package/lib/services/buildkite_jobs.d.ts +129 -0
  26. package/lib/services/buildkite_jobs.d.ts.map +1 -0
  27. package/lib/services/buildkite_jobs.js +2 -0
  28. package/lib/services/buildkite_jobs.js.map +1 -0
  29. package/lib/services/buildkite_queue.d.ts +186 -0
  30. package/lib/services/buildkite_queue.d.ts.map +1 -0
  31. package/lib/services/buildkite_queue.js +2 -0
  32. package/lib/services/buildkite_queue.js.map +1 -0
  33. package/lib/services/index.d.ts +3 -0
  34. package/lib/services/index.d.ts.map +1 -0
  35. package/lib/services/index.js +2 -0
  36. package/lib/services.lazy/buildkite_jobs.js +1 -0
  37. package/lib/services.lazy/buildkite_queue.js +1 -0
  38. package/lib/services.lazy/index.js +3 -0
  39. package/lib/traits.d.ts +3 -0
  40. package/lib/traits.d.ts.map +1 -0
  41. package/lib/traits.js +1 -0
  42. package/lib/unstable-services/artifacts.d.ts +268 -0
  43. package/lib/unstable-services/artifacts.d.ts.map +1 -0
  44. package/lib/unstable-services/artifacts.js +2 -0
  45. package/lib/unstable-services/artifacts.js.map +1 -0
  46. package/lib/unstable-services/audit.d.ts +157 -0
  47. package/lib/unstable-services/audit.d.ts.map +1 -0
  48. package/lib/unstable-services/audit.js +2 -0
  49. package/lib/unstable-services/audit.js.map +1 -0
  50. package/lib/unstable-services/bazel.d.ts +181 -0
  51. package/lib/unstable-services/bazel.d.ts.map +1 -0
  52. package/lib/unstable-services/bazel.js +2 -0
  53. package/lib/unstable-services/bazel.js.map +1 -0
  54. package/lib/unstable-services/bazel_cache.d.ts +126 -0
  55. package/lib/unstable-services/bazel_cache.d.ts.map +1 -0
  56. package/lib/unstable-services/bazel_cache.js +2 -0
  57. package/lib/unstable-services/bazel_cache.js.map +1 -0
  58. package/lib/unstable-services/builder.d.ts +242 -0
  59. package/lib/unstable-services/builder.d.ts.map +1 -0
  60. package/lib/unstable-services/builder.js +2 -0
  61. package/lib/unstable-services/builder.js.map +1 -0
  62. package/lib/unstable-services/compute.d.ts +1124 -0
  63. package/lib/unstable-services/compute.d.ts.map +1 -0
  64. package/lib/unstable-services/compute.js +47 -0
  65. package/lib/unstable-services/compute.js.map +1 -0
  66. package/lib/unstable-services/compute_command.d.ts +120 -0
  67. package/lib/unstable-services/compute_command.d.ts.map +1 -0
  68. package/lib/unstable-services/compute_command.js +2 -0
  69. package/lib/unstable-services/compute_command.js.map +1 -0
  70. package/lib/unstable-services/compute_observability.d.ts +165 -0
  71. package/lib/unstable-services/compute_observability.d.ts.map +1 -0
  72. package/lib/unstable-services/compute_observability.js +2 -0
  73. package/lib/unstable-services/compute_observability.js.map +1 -0
  74. package/lib/unstable-services/compute_storage.d.ts +379 -0
  75. package/lib/unstable-services/compute_storage.d.ts.map +1 -0
  76. package/lib/unstable-services/compute_storage.js +33 -0
  77. package/lib/unstable-services/compute_storage.js.map +1 -0
  78. package/lib/unstable-services/compute_usage.d.ts +283 -0
  79. package/lib/unstable-services/compute_usage.d.ts.map +1 -0
  80. package/lib/unstable-services/compute_usage.js +2 -0
  81. package/lib/unstable-services/compute_usage.js.map +1 -0
  82. package/lib/unstable-services/egress.d.ts +191 -0
  83. package/lib/unstable-services/egress.d.ts.map +1 -0
  84. package/lib/unstable-services/egress.js +2 -0
  85. package/lib/unstable-services/egress.js.map +1 -0
  86. package/lib/unstable-services/experimental_compute_reservation.d.ts +672 -0
  87. package/lib/unstable-services/experimental_compute_reservation.d.ts.map +1 -0
  88. package/lib/unstable-services/experimental_compute_reservation.js +23 -0
  89. package/lib/unstable-services/experimental_compute_reservation.js.map +1 -0
  90. package/lib/unstable-services/experimental_remote_results.d.ts +496 -0
  91. package/lib/unstable-services/experimental_remote_results.d.ts.map +1 -0
  92. package/lib/unstable-services/experimental_remote_results.js +2 -0
  93. package/lib/unstable-services/experimental_remote_results.js.map +1 -0
  94. package/lib/unstable-services/github_image.d.ts +162 -0
  95. package/lib/unstable-services/github_image.d.ts.map +1 -0
  96. package/lib/unstable-services/github_image.js +2 -0
  97. package/lib/unstable-services/github_image.js.map +1 -0
  98. package/lib/unstable-services/github_jobs.d.ts +183 -0
  99. package/lib/unstable-services/github_jobs.d.ts.map +1 -0
  100. package/lib/unstable-services/github_jobs.js +2 -0
  101. package/lib/unstable-services/github_jobs.js.map +1 -0
  102. package/lib/unstable-services/github_profile.d.ts +296 -0
  103. package/lib/unstable-services/github_profile.d.ts.map +1 -0
  104. package/lib/unstable-services/github_profile.js +2 -0
  105. package/lib/unstable-services/github_profile.js.map +1 -0
  106. package/lib/unstable-services/gradle_cache.d.ts +125 -0
  107. package/lib/unstable-services/gradle_cache.d.ts.map +1 -0
  108. package/lib/unstable-services/gradle_cache.js +2 -0
  109. package/lib/unstable-services/gradle_cache.js.map +1 -0
  110. package/lib/unstable-services/httpcache.d.ts +125 -0
  111. package/lib/unstable-services/httpcache.d.ts.map +1 -0
  112. package/lib/unstable-services/httpcache.js +2 -0
  113. package/lib/unstable-services/httpcache.js.map +1 -0
  114. package/lib/unstable-services/iam_tenant.d.ts +457 -0
  115. package/lib/unstable-services/iam_tenant.d.ts.map +1 -0
  116. package/lib/unstable-services/iam_tenant.js +45 -0
  117. package/lib/unstable-services/iam_tenant.js.map +1 -0
  118. package/lib/unstable-services/iam_tenant_membership.d.ts +114 -0
  119. package/lib/unstable-services/iam_tenant_membership.d.ts.map +1 -0
  120. package/lib/unstable-services/iam_tenant_membership.js +2 -0
  121. package/lib/unstable-services/iam_tenant_membership.js.map +1 -0
  122. package/lib/unstable-services/iam_token.d.ts +257 -0
  123. package/lib/unstable-services/iam_token.d.ts.map +1 -0
  124. package/lib/unstable-services/iam_token.js +2 -0
  125. package/lib/unstable-services/iam_token.js.map +1 -0
  126. package/lib/unstable-services/image.d.ts +222 -0
  127. package/lib/unstable-services/image.d.ts.map +1 -0
  128. package/lib/unstable-services/image.js +2 -0
  129. package/lib/unstable-services/image.js.map +1 -0
  130. package/lib/unstable-services/index.d.ts +28 -0
  131. package/lib/unstable-services/index.d.ts.map +1 -0
  132. package/lib/unstable-services/index.js +27 -0
  133. package/lib/unstable-services/private_devbox.d.ts +1180 -0
  134. package/lib/unstable-services/private_devbox.d.ts.map +1 -0
  135. package/lib/unstable-services/private_devbox.js +81 -0
  136. package/lib/unstable-services/private_devbox.js.map +1 -0
  137. package/lib/unstable-services/private_user_sessions.d.ts +145 -0
  138. package/lib/unstable-services/private_user_sessions.d.ts.map +1 -0
  139. package/lib/unstable-services/private_user_sessions.js +2 -0
  140. package/lib/unstable-services/private_user_sessions.js.map +1 -0
  141. package/lib/unstable-services/registry.d.ts +373 -0
  142. package/lib/unstable-services/registry.d.ts.map +1 -0
  143. package/lib/unstable-services/registry.js +34 -0
  144. package/lib/unstable-services/registry.js.map +1 -0
  145. package/lib/unstable-services/testing.d.ts +160 -0
  146. package/lib/unstable-services/testing.d.ts.map +1 -0
  147. package/lib/unstable-services/testing.js +2 -0
  148. package/lib/unstable-services/testing.js.map +1 -0
  149. package/lib/unstable-services/vault.d.ts +203 -0
  150. package/lib/unstable-services/vault.d.ts.map +1 -0
  151. package/lib/unstable-services/vault.js +2 -0
  152. package/lib/unstable-services/vault.js.map +1 -0
  153. package/lib/unstable-services.lazy/artifacts.js +1 -0
  154. package/lib/unstable-services.lazy/audit.js +1 -0
  155. package/lib/unstable-services.lazy/bazel.js +1 -0
  156. package/lib/unstable-services.lazy/bazel_cache.js +1 -0
  157. package/lib/unstable-services.lazy/builder.js +1 -0
  158. package/lib/unstable-services.lazy/compute.js +4 -0
  159. package/lib/unstable-services.lazy/compute_command.js +1 -0
  160. package/lib/unstable-services.lazy/compute_observability.js +1 -0
  161. package/lib/unstable-services.lazy/compute_storage.js +4 -0
  162. package/lib/unstable-services.lazy/compute_usage.js +1 -0
  163. package/lib/unstable-services.lazy/egress.js +1 -0
  164. package/lib/unstable-services.lazy/experimental_compute_reservation.js +4 -0
  165. package/lib/unstable-services.lazy/experimental_remote_results.js +1 -0
  166. package/lib/unstable-services.lazy/github_image.js +1 -0
  167. package/lib/unstable-services.lazy/github_jobs.js +1 -0
  168. package/lib/unstable-services.lazy/github_profile.js +1 -0
  169. package/lib/unstable-services.lazy/gradle_cache.js +1 -0
  170. package/lib/unstable-services.lazy/httpcache.js +1 -0
  171. package/lib/unstable-services.lazy/iam_tenant.js +4 -0
  172. package/lib/unstable-services.lazy/iam_tenant_membership.js +1 -0
  173. package/lib/unstable-services.lazy/iam_token.js +1 -0
  174. package/lib/unstable-services.lazy/image.js +1 -0
  175. package/lib/unstable-services.lazy/index.js +3 -0
  176. package/lib/unstable-services.lazy/private_devbox.js +4 -0
  177. package/lib/unstable-services.lazy/private_user_sessions.js +1 -0
  178. package/lib/unstable-services.lazy/registry.js +4 -0
  179. package/lib/unstable-services.lazy/testing.js +1 -0
  180. package/lib/unstable-services.lazy/vault.js +1 -0
  181. package/package.json +89 -2
  182. package/src/credentials.ts +208 -0
  183. package/src/errors.ts +71 -0
  184. package/src/index.ts +50 -0
  185. package/src/pagination.ts +1 -0
  186. package/src/protocol.ts +83 -0
  187. package/src/retry.ts +28 -0
  188. package/src/services/buildkite_jobs.ts +230 -0
  189. package/src/services/buildkite_queue.ts +453 -0
  190. package/src/services/index.ts +3 -0
  191. package/src/traits.ts +36 -0
  192. package/src/unstable-services/artifacts.ts +769 -0
  193. package/src/unstable-services/audit.ts +323 -0
  194. package/src/unstable-services/bazel.ts +423 -0
  195. package/src/unstable-services/bazel_cache.ts +219 -0
  196. package/src/unstable-services/builder.ts +576 -0
  197. package/src/unstable-services/compute.ts +2991 -0
  198. package/src/unstable-services/compute_command.ts +220 -0
  199. package/src/unstable-services/compute_observability.ts +436 -0
  200. package/src/unstable-services/compute_storage.ts +1167 -0
  201. package/src/unstable-services/compute_usage.ts +738 -0
  202. package/src/unstable-services/egress.ts +516 -0
  203. package/src/unstable-services/experimental_compute_reservation.ts +1499 -0
  204. package/src/unstable-services/experimental_remote_results.ts +1165 -0
  205. package/src/unstable-services/github_image.ts +301 -0
  206. package/src/unstable-services/github_jobs.ts +389 -0
  207. package/src/unstable-services/github_profile.ts +729 -0
  208. package/src/unstable-services/gradle_cache.ts +271 -0
  209. package/src/unstable-services/httpcache.ts +271 -0
  210. package/src/unstable-services/iam_tenant.ts +1720 -0
  211. package/src/unstable-services/iam_tenant_membership.ts +253 -0
  212. package/src/unstable-services/iam_token.ts +788 -0
  213. package/src/unstable-services/image.ts +602 -0
  214. package/src/unstable-services/index.ts +28 -0
  215. package/src/unstable-services/private_devbox.ts +4256 -0
  216. package/src/unstable-services/private_user_sessions.ts +410 -0
  217. package/src/unstable-services/registry.ts +1242 -0
  218. package/src/unstable-services/testing.ts +394 -0
  219. package/src/unstable-services/vault.ts +522 -0
@@ -0,0 +1,1124 @@
1
+ import * as API from "@distilled.cloud/core/api";
2
+ import * as S from "@distilled.cloud/core/schema-lite";
3
+ import type * as Redacted from "effect/Redacted";
4
+ import { type NamespaceLabsOpError, type NamespaceLabsOpContext } from "../protocol.ts";
5
+ export type { NamespaceLabsOpError, NamespaceLabsOpContext };
6
+ declare const AlreadyExists_base: S.TaggedErrorClass<"AlreadyExists", {
7
+ readonly message: any;
8
+ readonly body: any;
9
+ readonly headers: any;
10
+ }> & (new (...args: any[]) => {
11
+ "@distilled.cloud/error/categories": {
12
+ ConflictError: true;
13
+ };
14
+ });
15
+ export declare class AlreadyExists extends /*@__PURE__*/ AlreadyExists_base {
16
+ }
17
+ declare const FailedPrecondition_base: S.TaggedErrorClass<"FailedPrecondition", {
18
+ readonly message: any;
19
+ readonly body: any;
20
+ readonly headers: any;
21
+ }> & (new (...args: any[]) => {
22
+ "@distilled.cloud/error/categories": {
23
+ BadRequestError: true;
24
+ };
25
+ });
26
+ export declare class FailedPrecondition extends /*@__PURE__*/ FailedPrecondition_base {
27
+ }
28
+ declare const InvalidArgument_base: S.TaggedErrorClass<"InvalidArgument", {
29
+ readonly message: any;
30
+ readonly body: any;
31
+ readonly headers: any;
32
+ }> & (new (...args: any[]) => {
33
+ "@distilled.cloud/error/categories": {
34
+ BadRequestError: true;
35
+ };
36
+ });
37
+ export declare class InvalidArgument extends /*@__PURE__*/ InvalidArgument_base {
38
+ }
39
+ declare const NotFound_base: S.TaggedErrorClass<"NotFound", {
40
+ readonly message: any;
41
+ readonly body: any;
42
+ readonly headers: any;
43
+ }> & (new (...args: any[]) => {
44
+ "@distilled.cloud/error/categories": {
45
+ BadRequestError: true;
46
+ };
47
+ });
48
+ export declare class NotFound extends /*@__PURE__*/ NotFound_base {
49
+ }
50
+ declare const PermissionDenied_base: S.TaggedErrorClass<"PermissionDenied", {
51
+ readonly message: any;
52
+ readonly body: any;
53
+ readonly headers: any;
54
+ }> & (new (...args: any[]) => {
55
+ "@distilled.cloud/error/categories": {
56
+ AuthError: true;
57
+ };
58
+ });
59
+ export declare class PermissionDenied extends /*@__PURE__*/ PermissionDenied_base {
60
+ }
61
+ declare const ResourceExhausted_base: S.TaggedErrorClass<"ResourceExhausted", {
62
+ readonly message: any;
63
+ readonly body: any;
64
+ readonly headers: any;
65
+ readonly retryAfter: any;
66
+ }> & (new (...args: any[]) => {
67
+ "@distilled.cloud/error/categories": {
68
+ ThrottlingError: true;
69
+ };
70
+ });
71
+ export declare class ResourceExhausted extends /*@__PURE__*/ ResourceExhausted_base {
72
+ }
73
+ declare const Unauthenticated_base: S.TaggedErrorClass<"Unauthenticated", {
74
+ readonly message: any;
75
+ readonly body: any;
76
+ readonly headers: any;
77
+ }> & (new (...args: any[]) => {
78
+ "@distilled.cloud/error/categories": {
79
+ AuthError: true;
80
+ };
81
+ });
82
+ export declare class Unauthenticated extends /*@__PURE__*/ Unauthenticated_base {
83
+ }
84
+ export type StringList = Array<string>;
85
+ export interface HttpMatchRuleHttpMatch {
86
+ /** If empty, matches any method. */
87
+ method?: StringList | undefined;
88
+ /** If empty, matches any path. */
89
+ path?: string | undefined;
90
+ }
91
+ /** Configures which HTTP requests match an ingress rule, and whether authentication is required. */
92
+ export interface HttpMatchRule {
93
+ /** The HTTP method and path pattern to match. */
94
+ match?: HttpMatchRuleHttpMatch | undefined;
95
+ /** If true, requests matching this rule do not require authentication. By default, all requests require a valid Bearer token. */
96
+ doesNotRequireAuth?: boolean | undefined;
97
+ }
98
+ export type HttpMatchRuleList = Array<HttpMatchRule>;
99
+ export interface ExportedPortBackend {
100
+ port?: number | undefined;
101
+ /** Optional IP address of the backend. When unset, the ingress targets the instance itself (i.e. loopback). Set this to route ingress traffic to a non-loopback endpoint reachable from the instance, e.g. a Kubernetes Service's LoadBalancer IP. */
102
+ ipAddress?: string | undefined;
103
+ }
104
+ export interface IngressRequest {
105
+ /** Ingresses configured through this message always terminate HTTPS and proxy cleartext HTTP to the backend. A name is an string that matches the regular expression `[a-z0-9]([a-z0-9-_]*[a-z0-9])?`. */
106
+ name?: string | undefined;
107
+ httpMatchRule?: HttpMatchRuleList | undefined;
108
+ exportedPortBackend?: ExportedPortBackend | undefined;
109
+ /** Routes all first-level sub domains of the instance wildcard domain to this ingress. Requires the hosting instance to have a wildcard domain (enabled via CreateInstanceRequest.experimental.enable_wildcard_domain). */
110
+ wildcard?: boolean | undefined;
111
+ }
112
+ export type IngressRequestList = Array<IngressRequest>;
113
+ export interface CreateIngressRequest {
114
+ instanceId?: string | undefined;
115
+ ingresses?: IngressRequestList | undefined;
116
+ }
117
+ export interface AllocatedIngress {
118
+ name: string;
119
+ fqdn: string;
120
+ description: string;
121
+ ingressId: string;
122
+ }
123
+ export type AllocatedIngressList = Array<AllocatedIngress>;
124
+ export interface CreateIngressResponse {
125
+ allocatedIngresses: AllocatedIngressList;
126
+ }
127
+ /** Labels are key/value pairs attached to entities such as tenants. */
128
+ export interface Label {
129
+ /** A name is an string up to 63 bytes that matches the regular expression `^[a-z]([a-z0-9-.]*[a-z0-9])?$`. */
130
+ name?: string | undefined;
131
+ /** Label values are arbitrary values up to 255 bytes. */
132
+ value?: string | undefined;
133
+ }
134
+ export type LabelList = Array<Label>;
135
+ /** Defines an instance shape: the combination of CPU, RAM and Disk that the instance should use. The size of the ephemeral disk automatically scales with the selected CPU/RAM allocation. See also https://namespace.so/docs/architecture/compute/machine-shapes#storage-allocation Usable values are constrained by policy, and are typically only settable in values as powers of two. */
136
+ export interface InstanceShape {
137
+ /** Number of virtual CPUs. Typically a power of two (e.g. 2, 4, 8, 16). */
138
+ virtualCpu?: number | undefined;
139
+ /** Memory in megabytes. Typically scales with CPU (e.g. 2048 per vCPU). */
140
+ memoryMegabytes?: number | undefined;
141
+ /** Architecture of the instance, e.g. "amd64" or "arm64". */
142
+ machineArch?: string | undefined;
143
+ /** Operating system of the instance, e.g. "linux" or "macos". */
144
+ os?: string | undefined;
145
+ /** Provide additional constraints to instance selection. Available selectors: https://namespace.so/docs/architecture/compute/macos#available-selectors */
146
+ selectors?: LabelList | undefined;
147
+ }
148
+ export type CreateInstanceRequestFeature = "FEATURE_UNKNOWN" | "FEATURE_KUBERNETES" | "FEATURE_KUBERNETES_INGRESS_MANAGER";
149
+ export type CreateInstanceRequestFeatureList = Array<CreateInstanceRequestFeature | (string & {})>;
150
+ export interface CreateInstanceRequestFeatureConfiguration {
151
+ /** If set, also runs a single-node Kubernetes in this instance. Must be set to a specific Kubernetes major+minor version, e.g. "1.26" or "1.28". */
152
+ enableKubernetesVersion?: string | undefined;
153
+ /** Automatically expose ingresses annotated with "kubernetes.namespace.so/expose: true" as authenticated HTTP endpoints. */
154
+ enableKubernetesIngressManager?: boolean | undefined;
155
+ /** Overrides the kubelet --max-pods value. Must be <= 250. */
156
+ kubernetesMaxPods?: number | undefined;
157
+ }
158
+ export type StringMap = {
159
+ [key: string]: string | undefined;
160
+ };
161
+ export interface EnvironmentVariable {
162
+ /** Required: Name under which the environment variable will be available, e.g. "FOOBAR_VAR_NAME". */
163
+ name?: string | undefined;
164
+ /** Optional: If set, use this static value for the environment variable. */
165
+ value?: string | undefined;
166
+ /** Optional: If set, overrides value. Namespace will dynamically resolve the secret on instance creation. By default, no secrets are resolved unless requested explicitly. */
167
+ fromSecretId?: string | undefined;
168
+ }
169
+ export type EnvironmentVariableList = Array<EnvironmentVariable>;
170
+ export type ContainerPortProto = "PROTO_UNKNOWN" | "HTTP" | "TCP" | "H2C" | "TLS_PASSTHROUGH";
171
+ /** Configures client authentication for TLS-terminating TCP ingress. */
172
+ export type IngressClientAuthentication = "INGRESS_CLIENT_AUTHENTICATION_UNSPECIFIED" | "INGRESS_CLIENT_AUTHENTICATION_NONE" | "INGRESS_CLIENT_AUTHENTICATION_MTLS";
173
+ export interface ContainerPort {
174
+ /** The protocol the port being expose uses. Must be set. If the protocol is set to `HTTP` or `H2C` then the platform exposes the port using a HTTPS-terminating reverse proxy, which then communicates using cleartext HTTP/1.1 or HTTP/2 respectively with the container. If the protocol is `TCP` then the platform terminates TLS and proxies the resulting TCP stream. Client authentication is configured separately. If the protocol is `TLS_PASSTHROUGH`, the platform routes the encrypted stream using SNI and the container terminates TLS. TLS passthrough ports must be declared during instance creation. Example: `HTTP` */
175
+ proto?: ContainerPortProto | (string & {}) | undefined;
176
+ /** The port the container is listening on. For example, if exposing a HTTP server, with `proto=HTTP`, the port the http server is listening on. Example: `3000` */
177
+ containerPort?: number | undefined;
178
+ /** If a name is provided, it is used to generate the Internet-facing server name used to access this port. If it's not provided, a random id is used. */
179
+ name?: string | undefined;
180
+ /** A set of rules that configure the ingress when accessing this exported port. Only settable with `proto` is `HTTP`. */
181
+ httpMatchRule?: HttpMatchRuleList | undefined;
182
+ /** Configures client authentication when `proto` is `TCP`. MTLS is incompatible with TLS_PASSTHROUGH, where NONE and UNSPECIFIED have equivalent behavior. Must not be set for HTTP or H2C. TCP defaults to requiring mTLS. TCP ports without client authentication must be declared during instance creation. */
183
+ clientAuthentication?: IngressClientAuthentication | (string & {}) | undefined;
184
+ }
185
+ export type ContainerPortList = Array<ContainerPort>;
186
+ export type ContainerRequestNetwork = "NETWORK_UNKNOWN" | "BRIDGE" | "HOST";
187
+ export interface ContainerRequestExperimentalFeaturesHostMount {
188
+ hostPath?: string | undefined;
189
+ containerPath?: string | undefined;
190
+ readonly?: boolean | undefined;
191
+ }
192
+ export type ContainerRequestExperimentalFeaturesHostMountList = Array<ContainerRequestExperimentalFeaturesHostMount>;
193
+ export interface AWSCredentials {
194
+ /** Amazon Resource Name of the IAM role to assume. The IAM role must be [set up for federated access from Namespace](https://namespace.so/docs/federation/aws#accessing-aws-resources-from-namespace) including an appropriate trust policy. */
195
+ assumeRoleArn?: string | undefined;
196
+ }
197
+ export interface ContainerRequestExperimentalFeaturesImagePullCredentials {
198
+ /** Namespace will federate with AWS to obtain an [ECR authorization token](https://docs.aws.amazon.com/AmazonECR/latest/APIReference/API_GetAuthorizationToken.html). Make sure to grant the required `ecr:*` permissions to the federated IAM role. */
199
+ awsEcr?: AWSCredentials | undefined;
200
+ }
201
+ export interface ContainerRequestExperimentalFeaturesPushEphemeralDiskAsImage {
202
+ /** E.g. nscr.io/foobar/myimage */
203
+ targetImageRef?: string | undefined;
204
+ }
205
+ export interface ContainerRequestExperimentalFeaturesSidecarVolume {
206
+ /** Optional. */
207
+ name?: string | undefined;
208
+ imageRef?: string | undefined;
209
+ containerPath?: string | undefined;
210
+ }
211
+ export type ContainerRequestExperimentalFeaturesSidecarVolumeList = Array<ContainerRequestExperimentalFeaturesSidecarVolume>;
212
+ export interface ContainerRequestExperimentalFeatures {
213
+ /** Array of log file patterns to retain. Globbing is supported. */
214
+ includeLogs?: StringList | undefined;
215
+ /** A series of bind mounts to apply to the container. Can be used for cross-container communication. */
216
+ hostMount?: ContainerRequestExperimentalFeaturesHostMountList | undefined;
217
+ /** Run the container with all capabilities. Deprecated: use privileged under the ContainerRequest. */
218
+ privileged?: boolean | undefined;
219
+ /** Reach out to the Namespace team to learn more about this capability. */
220
+ exportedUnixSockets?: StringMap | undefined;
221
+ /** Additional credentials that can be used to pull the image used to back this container. Prefer using `CreateInstanceRequest.additional_registries` to provide persistent pull credentials for the instance. */
222
+ imagePullCredentials?: ContainerRequestExperimentalFeaturesImagePullCredentials | undefined;
223
+ /** Store the contents of the run (and only the contents of the ephemeral disk) as a new container image. Can only push to `nscr.io`. */
224
+ pushEphemeralDiskAsImage?: ContainerRequestExperimentalFeaturesPushEphemeralDiskAsImage | undefined;
225
+ /** Set of capabilities to add to the container, e.g. NET_CAP. */
226
+ capAdd?: StringList | undefined;
227
+ /** Set of capabilities to drop. */
228
+ capDrop?: StringList | undefined;
229
+ /** Set of devices to expose to the container. */
230
+ devices?: StringList | undefined;
231
+ /** A set of volumes that get mounted into arbitrary paths within the container namespace. Always read only. */
232
+ sidecarVolumes?: ContainerRequestExperimentalFeaturesSidecarVolumeList | undefined;
233
+ /** Chat with support@namespace.so about this setting. */
234
+ incrementalLoading?: boolean | undefined;
235
+ /** Chat with support@namespace.so about this setting. */
236
+ sandboxLike?: boolean | undefined;
237
+ /** Add a process supervisor. */
238
+ useInit?: boolean | undefined;
239
+ }
240
+ export type VolumeRequestPersistencyKind = "PERSISTENCY_UNKNOWN" | "PERSISTENT" | "CACHE";
241
+ export interface VolumeRequest {
242
+ /** The absolute path where the volume is mounted inside the instance. */
243
+ mountPoint?: string | undefined;
244
+ /** A logical identifier for volume reuse across instances. For CACHE volumes, the platform attempts to mount a recently used volume with the same tag. For PERSISTENT volumes, the tag maps to a named durable volume. */
245
+ tag?: string | undefined;
246
+ /** The requested size of the volume in megabytes. */
247
+ sizeMb?: string | undefined;
248
+ /** The persistency kind of the volume. */
249
+ persistencyKind?: VolumeRequestPersistencyKind | (string & {}) | undefined;
250
+ /** If set, initializes the volume from the specified snapshot. Only supported for PERSISTENT volumes. If set on a CACHE volume, the request will fail. For persistent volumes, a new snapshot is created starting from the specified snapshot ID. */
251
+ fromSnapshotId?: string | undefined;
252
+ /** The filesystem to use for a CACHE volume. Supported values are "ext4" and "xfs" on Linux. If unset, the operating system default is used. XFS requires linux/amd64 and enrollment in the instance.cache_volumes.xfs experiment; requests for XFS are rejected when it is disabled. This field is not supported for PERSISTENT volumes. */
253
+ filesystem?: string | undefined;
254
+ }
255
+ export type VolumeRequestList = Array<VolumeRequest>;
256
+ export type ContainerRequestWorkloadType = "WORKLOAD_TYPE_UNKNOWN" | "JOB" | "SERVICE";
257
+ /** A volume that gets mounted into arbitrary paths within the container namespace. Always read only. */
258
+ export interface ContainerRequestSidecarVolume {
259
+ /** Optional name for the sidecar volume. */
260
+ name?: string | undefined;
261
+ /** Image reference for the container image that backs this sidecar volume. */
262
+ imageRef?: string | undefined;
263
+ /** Path within the container where this volume will be mounted. */
264
+ containerPath?: string | undefined;
265
+ }
266
+ export type ContainerRequestSidecarVolumeList = Array<ContainerRequestSidecarVolume>;
267
+ export interface ContainerRequest {
268
+ /** A name of the container being created. Must be unique within the instance. Must match the regular expression `[a-z0-9]([a-z0-9-]*[a-z0-9])?`. */
269
+ name?: string | undefined;
270
+ /** An image reference to the container image used to back this container. Ideally image references that are specified are fully resolved and "pinned", i.e. their digest is also specified. If no resolved image is provided, it is resolved during creation time, which may add latency to the creation request. Example: `ubuntu:22.04@sha256:dfd64a3b4296d8c9b62aa3309984f8620b98d87e47492599ee20739e8eb54fbf` */
271
+ imageRef?: string | undefined;
272
+ /** The ID of a Namespace-managed image. The ID is resolved to a pinned image reference during instance creation. Mutually exclusive with `image_ref`. Supported values: - `builtin:base` - `builtin:agents` */
273
+ knownImageId?: string | undefined;
274
+ /** The filesystem for the container's private writable root disk: "ext4" or "xfs" on Linux. If unset, existing container root behavior is preserved. Only supported when creating the instance, not by StartContainers. Reach out to Namespace to enable XFS support for your workspace. XFS is not currently supported by Linux on Apple Silicon (LiMa). */
275
+ rootFilesystem?: string | undefined;
276
+ /** A set of arguments to pass to the container's entrypoint. If `entrypoint` is not set, these are passed to the image's default ENTRYPOINT. Example: `["--foobar"]` */
277
+ args?: StringList | undefined;
278
+ /** If specified, overrides the image's entrypoint. */
279
+ entrypoint?: StringList | undefined;
280
+ /** A set of environment values to be used as the container's environment. These set of environment variables are added in addition to a system-specified set of environment variables. Example: `{"FOOBAR": "1"}` This API will always be supported, but you may want to consider `env_vars` instead as a more complete API. */
281
+ environment?: StringMap | undefined;
282
+ /** A set of environment values to be used as the container's environment. These set of environment variables are added in addition to a system-specified set of environment variables. Example: `{"FOOBAR": "1"}` Can also refer to different source values, e.g. secrets. By default, no secrets are injected. */
283
+ envVars?: EnvironmentVariableList | undefined;
284
+ /** If set, makes docker available to the container. Any containers that are started by the container via the Docker API are then run as containers alongside this container, not as children. Bind mounts work across containers by using container-aware bind mount resolution. Example: `/var/run/docker.sock` */
285
+ dockerSockPath?: string | undefined;
286
+ /** If set, injects Namespace metadata and credentials into the container at the specified path. This includes the workload token and instance metadata, and sets the following environment variables: - `NSC_INSTANCE_ID`: the ID of the parent instance. - `NSC_ENDPOINT`: the regional Compute API endpoint. - `NSC_TOKEN_FILE`: path to the injected token file. Can be used to allow the container to call Namespace APIs as the instance. Example: `/var/run/nsc` */
287
+ nscStatePath?: string | undefined;
288
+ /** If set, exposes guest-managed nsc binaries at the specified path. */
289
+ nscBinsPath?: string | undefined;
290
+ /** If set, mounts available secrets at the specified path. */
291
+ secretsPath?: string | undefined;
292
+ /** A set of container ports to make available through the public ingress. */
293
+ exportPorts?: ContainerPortList | undefined;
294
+ /** By default containers run in a bridge network, with NAT. This allows containers to listen on arbitrary ports without requiring coordination. The container can be run in the instance networking by specifying `HOST`. */
295
+ network?: ContainerRequestNetwork | (string & {}) | undefined;
296
+ /** A list of experimental features to enable in this container. */
297
+ experimental?: ContainerRequestExperimentalFeatures | undefined;
298
+ /** Run the container with all capabilities. */
299
+ privileged?: boolean | undefined;
300
+ /** A set of volumes to be attached to this container. */
301
+ volumes?: VolumeRequestList | undefined;
302
+ /** When a container terminates, the instance where it runs in will also terminate. If the workload type is set to `service`, the instance will always be marked as failed, regardless of the exit code of the container. */
303
+ workloadType?: ContainerRequestWorkloadType | (string & {}) | undefined;
304
+ /** A set of volumes that get mounted into the container at the specified paths. These volumes are always read-only. */
305
+ sidecarVolumes?: ContainerRequestSidecarVolumeList | undefined;
306
+ }
307
+ export type ContainerRequestList = Array<ContainerRequest>;
308
+ export type IngressMode = "MODE_UNKNOWN" | "HTTP" | "TCP" | "TLS_PASSTHROUGH";
309
+ /** Describes a platform-managed, Internet-facing endpoint that routes traffic to a service running inside an instance. Use CreateInstanceRequest.ingresses for ports exposed directly by the instance, including native applications on platforms such as macOS. Use ContainerRequest.export_ports for ports owned by containers. Traffic and TLS boundaries: ``` HTTP [client] --HTTPS------> [Namespace ingress] --HTTP--> [backend] TCP [client] --TLS/mTLS---> [Namespace ingress] --TCP---> [backend] TLS [client] --TLS (routed by SNI, not terminated)------> [backend] ``` Each generated server name routes only to its declared instance and port; no other instance ports are exposed by that ingress. In HTTP and TCP modes, TLS terminates at Namespace and the ingress-to-backend protocol is cleartext HTTP or TCP. TLS passthrough preserves end-to-end encryption: Namespace uses the SNI hostname for routing but does not terminate TLS. HTTP requests require a valid Namespace bearer token with access to the instance by default. HttpMatchRule can explicitly make matching requests unauthenticated. TCP defaults to requiring a Namespace-issued mTLS client certificate with access to the instance; NONE allows any TLS client to connect. In TLS passthrough mode the backend is responsible for server and client authentication. */
310
+ export interface Ingress {
311
+ /** The name used to generate the Internet-facing server name. */
312
+ name?: string | undefined;
313
+ /** The ingress behavior. Must be set. */
314
+ mode?: IngressMode | (string & {}) | undefined;
315
+ /** The port the instance is listening on. */
316
+ port?: number | undefined;
317
+ /** HTTP routing and authentication rules. Only supported in HTTP mode. */
318
+ httpMatchRule?: HttpMatchRuleList | undefined;
319
+ /** Routes all first-level subdomains of the instance wildcard domain to this ingress. Requires the instance wildcard domain to be enabled via experimental.enable_wildcard_domain. Only supported in HTTP mode and mutually exclusive with name. */
320
+ wildcard?: boolean | undefined;
321
+ /** Configures client authentication in TCP mode. MTLS is incompatible with TLS_PASSTHROUGH, where the backend terminates and authenticates TLS; NONE and UNSPECIFIED have equivalent behavior in passthrough mode. Must not be set in HTTP mode. TCP defaults to requiring mTLS. */
322
+ clientAuthentication?: IngressClientAuthentication | (string & {}) | undefined;
323
+ }
324
+ export type IngressList = Array<Ingress>;
325
+ export type ApplicationRequestWorkloadType = "WORKLOAD_TYPE_UNKNOWN" | "JOB";
326
+ export interface ApplicationRequestExperimentalFeatures {
327
+ /** Array of log file patterns to retain. Globbing is supported. */
328
+ includeLogs?: StringList | undefined;
329
+ }
330
+ /** Specifies an application to run on an instance without containerization. The application binary is distributed as a container image (OCI) pushed to the workspace's private registry (`nscr.io`). Only the image filesystem is used; ENTRYPOINT/CMD from the image config are not respected. **Example** (macOS): [macrun](https://github.com/namespacelabs/examples/tree/master/go/macrun). */
331
+ export interface ApplicationRequest {
332
+ /** A name of the application being created. Must be unique. */
333
+ name?: string | undefined;
334
+ /** Optional image with application distribution to be mounted on the instance. The image filesystem is extracted and made available to the `command` below. ENTRYPOINT/CMD specified in the image config are not respected. Example: `nscr.io/abc012abc012/foobar` */
335
+ imageRef?: string | undefined;
336
+ /** Command to execute. May be: * Absolute (refers to a pre-installed binary in the base image). Example: `/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild`. * Relative to the image specified above. Example: `./postgres`. * Resolved from $PATH (using the default $PATH of the base image) Example: `xcrun`. */
337
+ command?: string | undefined;
338
+ /** A set of arguments to pass to the application. Example: `["--foobar"]` */
339
+ args?: StringList | undefined;
340
+ /** A set of environment values to be used as the container's environment. These set of environment variables are added in addition to a system-specified set of environment variables. Example: `{"FOOBAR": "1"}` This API will always be supported, but you may want to consider `env_vars` instead as a more complete API. */
341
+ environment?: StringMap | undefined;
342
+ /** A set of environment values to be used as the container's environment. These set of environment variables are added in addition to a system-specified set of environment variables. Example: `{"FOOBAR": "1"}` Can also refer to different source values, e.g. secrets. */
343
+ envVars?: EnvironmentVariableList | undefined;
344
+ /** When a container terminates, the instance where it runs in will also terminate. If the workload type is set to `service`, the instance will always be marked as failed, regardless of the exit code of the container. */
345
+ workloadType?: ApplicationRequestWorkloadType | (string & {}) | undefined;
346
+ /** A list of experimental features to enable in this container. */
347
+ experimental?: ApplicationRequestExperimentalFeatures | undefined;
348
+ }
349
+ export type ApplicationRequestList = Array<ApplicationRequest>;
350
+ export interface CreateInstanceRequestExperimentalFeaturesDisk {
351
+ name?: string | undefined;
352
+ imageRef?: string | undefined;
353
+ }
354
+ export type CreateInstanceRequestExperimentalFeaturesDiskList = Array<CreateInstanceRequestExperimentalFeaturesDisk>;
355
+ export interface CreateInstanceRequestExperimentalFeaturesContainerdShim {
356
+ name?: string | undefined;
357
+ runtimeType?: string | undefined;
358
+ addToPath?: StringList | undefined;
359
+ binaryName?: string | undefined;
360
+ root?: string | undefined;
361
+ }
362
+ export type CreateInstanceRequestExperimentalFeaturesContainerdShimList = Array<CreateInstanceRequestExperimentalFeaturesContainerdShim>;
363
+ export interface CreateInstanceRequestExperimentalFeaturesTlsBackedPort {
364
+ name?: string | undefined;
365
+ port?: number | undefined;
366
+ /** If this is false, TLS is used in passthrough mode. */
367
+ terminateTls?: boolean | undefined;
368
+ /** Only applies when terminate_tls is true. Defaults to mTLS. */
369
+ clientAuthentication?: IngressClientAuthentication | (string & {}) | undefined;
370
+ }
371
+ export type CreateInstanceRequestExperimentalFeaturesTlsBackedPortList = Array<CreateInstanceRequestExperimentalFeaturesTlsBackedPort>;
372
+ export interface CreateInstanceRequestExperimentalFeaturesPrewarmContainerImage {
373
+ /** The target containerd that the image should be warmed up to. Use "default" for containers started by Namespace; "moby" for Docker containers and "k8s" for Kubernetes. */
374
+ containerdNamespace?: string | undefined;
375
+ /** A fully qualified image reference, including digest. Only fully specified images will be part of optimized profiles. Non-fully qualified references are silently dropped. */
376
+ imageRef?: string | undefined;
377
+ }
378
+ export type CreateInstanceRequestExperimentalFeaturesPrewarmContainerImageList = Array<CreateInstanceRequestExperimentalFeaturesPrewarmContainerImage>;
379
+ export interface CreateInstanceRequestExperimentalFeaturesDirectoryRequest {
380
+ absPath?: string | undefined;
381
+ mode?: number | undefined;
382
+ }
383
+ export type CreateInstanceRequestExperimentalFeaturesDirectoryRequestList = Array<CreateInstanceRequestExperimentalFeaturesDirectoryRequest>;
384
+ /** Deprecated: use the top-most message. */
385
+ export interface CreateInstanceRequestExperimentalFeaturesContainerCache {
386
+ /** Which cache volume to use to store container images. */
387
+ cacheVolumeTag?: string | undefined;
388
+ /** If this is a separate volume, the size of the volume is required. Must not be set if this is an existing tag. */
389
+ sizeMb?: string | undefined;
390
+ /** If this is an existing volume (i.e. for which a volume request exists), the relative path within that volume to use. Optional. */
391
+ relativePath?: string | undefined;
392
+ }
393
+ export interface CreateInstanceRequestExperimentalFeaturesHookCommand {
394
+ command?: string | undefined;
395
+ /** A set of arguments to pass to the command invocation. Example: `["--foobar"]` */
396
+ args?: StringList | undefined;
397
+ /** A set of environment values to be used as the command's environment. These set of environment variables are added in addition to a system-specified set of environment variables. Example: `{"FOOBAR": "1"}` */
398
+ environment?: StringMap | undefined;
399
+ }
400
+ export interface CreateInstanceRequestExperimentalFeaturesHook {
401
+ /** If set, execute this command during the hook. */
402
+ command?: CreateInstanceRequestExperimentalFeaturesHookCommand | undefined;
403
+ }
404
+ export type CreateInstanceRequestExperimentalFeaturesHookList = Array<CreateInstanceRequestExperimentalFeaturesHook>;
405
+ export interface CreateInstanceRequestExperimentalFeaturesPrometheusMetricsSink {
406
+ url?: string | undefined;
407
+ bearerTokenSecretRef?: string | undefined;
408
+ basicAuthUsername?: string | undefined;
409
+ basicAuthPasswordSecretRef?: string | Redacted.Redacted<string> | undefined;
410
+ }
411
+ export interface CreateInstanceRequestExperimentalFeatures {
412
+ /** A list of private features used to enable experimental behavior in a instance. For more details chat with the Namespace team. */
413
+ privateFeature?: StringList | undefined;
414
+ /** Attach the specified disks as additional read-only volumes to the new instance. Disks are specified as container image sources, which are converted into a flattened filesystem that is then made available as block storage that is attached to the VM that backs the instance. */
415
+ disks?: CreateInstanceRequestExperimentalFeaturesDiskList | undefined;
416
+ /** Configure `containerd` with an additional set of shims. */
417
+ containerdShims?: CreateInstanceRequestExperimentalFeaturesContainerdShimList | undefined;
418
+ /** Export a set of ports using a TLS frontend. Because TLS allows a proxy to perform SNI-based routing, different services can be backed by a single TLS ingress. */
419
+ tlsBackedPorts?: CreateInstanceRequestExperimentalFeaturesTlsBackedPortList | undefined;
420
+ /** Request that the following set of container images be prewarmed in `containerd`. This is strictly best-effort. */
421
+ prewarmContainerImages?: CreateInstanceRequestExperimentalFeaturesPrewarmContainerImageList | undefined;
422
+ /** Register a wildcard domain for ingress directed at this new instance. */
423
+ enableWildcardDomain?: boolean | undefined;
424
+ /** Reach out to the Namespace team to learn more about this capability. A union of these set of volumes and the volumes defined in CreateInstanceRequest are used. */
425
+ volumes?: VolumeRequestList | undefined;
426
+ /** Reach out to the Namespace team to learn more about this capability. */
427
+ ensureDirectory?: CreateInstanceRequestExperimentalFeaturesDirectoryRequestList | undefined;
428
+ /** Reach out to the Namespace team to learn more about this capability. */
429
+ uniqueTag?: string | undefined;
430
+ /** Reach out to the Namespace team to learn more about this capability. */
431
+ exportedUnixSockets?: StringMap | undefined;
432
+ /** Enable container caching. */
433
+ containerCache?: CreateInstanceRequestExperimentalFeaturesContainerCache | undefined;
434
+ /** Hooks to trigger before any programs (containers or applications) are started. */
435
+ preStartHook?: CreateInstanceRequestExperimentalFeaturesHookList | undefined;
436
+ /** Hooks to trigger before the instance shuts down. */
437
+ preShutdownHook?: CreateInstanceRequestExperimentalFeaturesHookList | undefined;
438
+ /** Public keys to enroll for SSH access to the created instance. */
439
+ authorizedSshKeys?: StringList | undefined;
440
+ /** Base image ID to use for a macOS instance. */
441
+ macosBaseImageId?: string | undefined;
442
+ /** Reach out to the Namespace team to learn more about this capability. */
443
+ internal?: StringMap | undefined;
444
+ /** Sets the instance and any containers up with required configuration to use Nested Virtualization (e.g. KVM) Only supported on Linux */
445
+ nestedVirtualization?: boolean | undefined;
446
+ /** Reach out to the Namespace team to learn more about this capability. */
447
+ prometheusMetricsSink?: CreateInstanceRequestExperimentalFeaturesPrometheusMetricsSink | undefined;
448
+ /** Select a named compute configuration from workspace policy. Its configured SKU and hypervisor override request settings, and its features are added to the request. Explicit request placement overrides configuration placement. Resource sizes are unchanged. Unknown names fail. */
449
+ withConfiguration?: string | undefined;
450
+ }
451
+ export type ContainerCache = CreateInstanceRequestExperimentalFeaturesContainerCache;
452
+ export interface ResolvableValue {
453
+ static?: string | undefined;
454
+ fromSecretId?: string | undefined;
455
+ }
456
+ export interface HttpHeader {
457
+ name?: string | undefined;
458
+ value?: string | undefined;
459
+ valueFrom?: ResolvableValue | undefined;
460
+ }
461
+ export type HttpHeaderList = Array<HttpHeader>;
462
+ export interface HttpCallbackEndpoint {
463
+ postUrl?: string | undefined;
464
+ headers?: HttpHeaderList | undefined;
465
+ /** If present, the body of the callback response will be signed and provided as an HMAC hash using the specified secret. The X-Namespace-Signature header will include a value of the form `ts=<timestamp>,sha256=<hmac>`, where <hmac> is a SHA256-signed message consisting of `<timestamp>,<response body>`. */
466
+ signWithSecretId?: string | undefined;
467
+ }
468
+ export interface AdditionalRegistryAuthenticatorBasic {
469
+ username?: string | undefined;
470
+ passwordSecretRef?: string | Redacted.Redacted<string> | undefined;
471
+ }
472
+ export interface AdditionalRegistryAuthenticatorOpenIDFederation {
473
+ /** Required. */
474
+ username?: string | undefined;
475
+ /** Optional. If not set, the audience will be the address of the target registry. */
476
+ audience?: string | undefined;
477
+ }
478
+ export interface AdditionalRegistryAuthenticatorAssumeRoleFromAwsFederation {
479
+ /** Amazon Resource Name of the IAM role to assume. The IAM role must be [set up for federated access from Namespace](https://namespace.so/docs/federation/aws#accessing-aws-resources-from-namespace) including an appropriate trust policy. */
480
+ roleArn?: string | undefined;
481
+ }
482
+ export interface AdditionalRegistryAuthenticatorGcpWorkloadIdentityFederation {
483
+ /** Required. Full resource name of the GCP Workload Identity Provider, used as the Security Token Service (STS) token-exchange audience. E.g. "//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/providers/PROVIDER_ID". The provider must be configured to trust the issuer `https://federation.namespaceapis.com`. */
484
+ audience?: string | undefined;
485
+ /** Optional. Email of the service account to impersonate after federation (e.g. "name@project.iam.gserviceaccount.com"). If set, the federated identity must hold `roles/iam.workloadIdentityUser` on this service account, and the service account must hold `roles/artifactregistry.reader`. If empty, the federated identity accesses the registry directly and must itself hold `roles/artifactregistry.reader`. */
486
+ serviceAccountEmail?: string | undefined;
487
+ /** Optional. The username to use for the registry authentication. Defaults to "oauth2accesstoken". */
488
+ username?: string | undefined;
489
+ }
490
+ export interface AdditionalRegistryAuthenticator {
491
+ /** A pair of username and password to use when pulling images. */
492
+ basic?: AdditionalRegistryAuthenticatorBasic | undefined;
493
+ /** Instruct Namespace to generate an OIDC token to access the registry. The generated access token will be signed by the issuer `https://federation.namespaceapis.com`. */
494
+ openid?: AdditionalRegistryAuthenticatorOpenIDFederation | undefined;
495
+ /** Namespace will federate with AWS to obtain an [ECR authorization token](https://docs.aws.amazon.com/AmazonECR/latest/APIReference/API_GetAuthorizationToken.html). Make sure to grant the required `ecr:*` permissions to the federated IAM role. */
496
+ ecrTokenFromAwsFederation?: AdditionalRegistryAuthenticatorAssumeRoleFromAwsFederation | undefined;
497
+ /** Namespace will federate with Google Cloud Workload Identity Federation to obtain a short-lived access token usable with Google Artifact Registry (or Container Registry). Namespace performs the STS token-exchange and, if requested, service account impersonation server-side. */
498
+ gcpWorkloadIdentityFederation?: AdditionalRegistryAuthenticatorGcpWorkloadIdentityFederation | undefined;
499
+ }
500
+ export interface AdditionalRegistry {
501
+ authentication?: AdditionalRegistryAuthenticator | undefined;
502
+ }
503
+ export type AdditionalRegistryMap = {
504
+ [key: string]: AdditionalRegistry | undefined;
505
+ };
506
+ /** Defines a permission grant on a resource. Permissions are used to restrict what a token is allowed to do. See https://namespace.so/docs/security/permissions for a list of available resource types and actions. */
507
+ export interface Permission {
508
+ /** The type of resource this permission applies to, e.g. "instance", "vault/object", "token/revokable". */
509
+ resourceType?: string | undefined;
510
+ /** The specific resource ID, or empty for all resources of this type. */
511
+ resourceId?: string | undefined;
512
+ /** The set of actions allowed on the resource, e.g. "create", "list", "describe". */
513
+ actions?: StringList | undefined;
514
+ }
515
+ export type PermissionList = Array<Permission>;
516
+ export type EgressPolicySpecMode = "MODE_UNKNOWN" | "DISABLED" | "ALLOW_ALL" | "ADVISORY" | "BLOCK";
517
+ export type EgressPolicySpecRuleRuleOp = "RULE_OP_UNKNOWN" | "ALLOW" | "PROXY" | "INJECT";
518
+ export interface EgressPolicySpecMatcher {
519
+ matchDomains?: StringList | undefined;
520
+ }
521
+ export interface EgressPolicySpecAllowOpts {
522
+ }
523
+ export interface EgressPolicySpecProxyOpts {
524
+ viaDomain?: string | undefined;
525
+ }
526
+ export interface EgressPolicySpecInjectOptsFromEndpoint {
527
+ url?: string | undefined;
528
+ headers?: HttpHeaderList | undefined;
529
+ }
530
+ export type EgressPolicySpecInjectOptsResolutionPolicy = "RESOLUTION_POLICY_UNKNOWN" | "RESOLUTION_POLICY_ONCE" | "RESOLUTION_POLICY_WHEN_STALE";
531
+ export interface EgressPolicySpecInjectOpts {
532
+ headerName?: string | undefined;
533
+ /** Exactly one value source must be set. */
534
+ fromSecretId?: string | undefined;
535
+ /** Plaintext value. */
536
+ value?: string | undefined;
537
+ /** Fetches the value to inject from an HTTP endpoint using GET. */
538
+ fromEndpoint?: EgressPolicySpecInjectOptsFromEndpoint | undefined;
539
+ resolutionPolicy?: EgressPolicySpecInjectOptsResolutionPolicy | (string & {}) | undefined;
540
+ }
541
+ export interface EgressPolicySpecRule {
542
+ op?: EgressPolicySpecRuleRuleOp | (string & {}) | undefined;
543
+ matcher?: EgressPolicySpecMatcher | undefined;
544
+ allow?: EgressPolicySpecAllowOpts | undefined;
545
+ proxy?: EgressPolicySpecProxyOpts | undefined;
546
+ inject?: EgressPolicySpecInjectOpts | undefined;
547
+ }
548
+ export type EgressPolicySpecRuleList = Array<EgressPolicySpecRule>;
549
+ export interface EgressPolicySpec {
550
+ mode?: EgressPolicySpecMode | (string & {}) | undefined;
551
+ /** Enables HTTP and HTTPS interception for PROXY and INJECT rules. */
552
+ deepPacketInspection?: boolean | undefined;
553
+ /** Rules applied in order to outbound connections. */
554
+ rules?: EgressPolicySpecRuleList | undefined;
555
+ /** Tags of Namespace-managed egress rulesets appended to rules. */
556
+ additionalRulesets?: StringList | undefined;
557
+ /** Deprecated. Only supported in inline egress policies during instance creation. Use `ALLOW` rules instead. */
558
+ allowedEgressDomains?: StringList | undefined;
559
+ }
560
+ export interface CreateInstanceRequestNetworkPolicy {
561
+ /** Inline egress policy configuration, defining behavior via mode and rules. */
562
+ egress?: EgressPolicySpec | undefined;
563
+ /** Tag of a pre-configured workspace egress policy to apply. Mutually exclusive with 'egress'. */
564
+ egressPolicyTag?: string | undefined;
565
+ }
566
+ export interface CreateInstanceRequest {
567
+ /** The shape of the instance to be created. */
568
+ shape?: InstanceShape | undefined;
569
+ /** A list of features that should be enabled in this instance. Deprecated: use feature_configuration below instead. */
570
+ features?: CreateInstanceRequestFeatureList | undefined;
571
+ /** A list of features that should be enabled in this instance. */
572
+ featureConfiguration?: CreateInstanceRequestFeatureConfiguration | undefined;
573
+ /** A human-facing description of the purpose of this instance. Used for debugging purposes. */
574
+ documentedPurpose?: string | undefined;
575
+ /** A set of labels that are attached to the new instance. Instances can be queried based on labels, see also ListInstancesRequest. */
576
+ labels?: LabelList | undefined;
577
+ /** Descriptive user metadata, separate from labels and attachments. Returned in instance metadata and searchable using ListInstances.annotation_filter. Uses the same name, value, and total-size limits as AnnotationOperation. */
578
+ annotations?: StringMap | undefined;
579
+ /** Timestamp of when this instance should be released (in UTC). Requested deadlines can be modified by policy. For example, if a workspace is configured with a maximum deadline of 24h, and a instance is created with a requested deadline of 48h, the resulting instance will have a deadline of 24h. When a instance hits its deadline, processes within will receive a `SIGTERM` and have a maximum time to shutdown gracefully before the instance is destroyed. Note: In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. */
580
+ deadline?: string | undefined;
581
+ /** Deprecated and ignored; it used to allow creation queueing. */
582
+ interactive?: boolean | undefined;
583
+ /** Requests that the new instance be created in the specified region. Typically a region is not set. In that case, the Namespace platform makes a placement a decision on behalf of users based on the type of workload, tenant policies and available global capacity. */
584
+ region?: string | undefined;
585
+ /** Ordered placement selectors. Each entry must be one of: - `cell:<cell-name>` (for example `cell:iad2-a`) - `site:<site-name>` (for example `site:iad2`) - `continent:<continent-name>` (for example `continent:us`) - `any` */
586
+ placement?: StringList | undefined;
587
+ /** Start the specified containers as part of instance creation. Containers are deployed to `containerd` directly. See ContainerRequest for more details. Only supported on Linux platform. */
588
+ containers?: ContainerRequestList | undefined;
589
+ /** Ingresses backed by ports exposed directly by the instance. Unlike container export ports, these can target any supported platform. */
590
+ ingresses?: IngressList | undefined;
591
+ /** Domain used to construct ingress hostnames for the instance. The workspace must be configured to allow the requested domain. */
592
+ ingressBaseDomain?: string | undefined;
593
+ /** Start the specified applications on the instance without using containerization. See ApplicationRequest for details. */
594
+ applications?: ApplicationRequestList | undefined;
595
+ /** A set of experimental features that should be attached to this instance. Experimental features may be removed or modified at any time by the Namespace team. */
596
+ experimental?: CreateInstanceRequestExperimentalFeatures | undefined;
597
+ /** Attach storage to the instance, notably, cache volumes. See https://namespace.so/docs/architecture/storage/cache-volumes for details. */
598
+ volumes?: VolumeRequestList | undefined;
599
+ /** Enable container caching. Container caching is only available on Linux. */
600
+ containerCache?: CreateInstanceRequestExperimentalFeaturesContainerCache | undefined;
601
+ /** We'll HTTP POST on this URL whenever the instance changes state. The body of the post will be application/json with a serialized InstanceEventMetadata. */
602
+ httpEventCallback?: HttpCallbackEndpoint | undefined;
603
+ /** Additional authenticated registries that can be targeted when pulling images. The map key is the registry address. */
604
+ additionalRegistries?: AdditionalRegistryMap | undefined;
605
+ /** The set of permissions to grant to the workload running in this instance. If not specified, inherits the tenant's default workload permissions. If the tenant token used to authenticate this request does not itself grant a requested permission, the request fails with `PermissionDenied`. See https://namespace.so/docs/security/permissions for available permissions. */
606
+ workloadPermissions?: PermissionList | undefined;
607
+ /** Network policy to apply to the instance. See https://namespace.so/docs/architecture/networking/security for details. */
608
+ networkPolicy?: CreateInstanceRequestNetworkPolicy | undefined;
609
+ }
610
+ export type InstanceMetadataStatus = "STATUS_UNKNOWN" | "PENDING" | "CREATING" | "RUNNING" | "DESTROYED" | "DESTROYING" | "SUSPENDING" | "SUSPENDED" | "ERROR";
611
+ export type InstanceMetadataServiceStatus = "STATUS_UNKNOWN" | "PENDING" | "READY";
612
+ export type InstanceMetadataServiceEndpointKind = "ENDPOINT_KIND_UNKNOWN" | "HTTPS" | "PROXY_OVER_SECURE_WEBSOCKET";
613
+ /** A service represents an internal service that is proxiable when an authenticated request is performed that proves that the caller has access to the instance. Access to services does not follow the gRPC service model, and goes over Namespace's programmable ingress directly, being a mix of either WebSocket- or HTTP-backed implementations. */
614
+ export interface InstanceMetadataService {
615
+ /** The name of the service, e.g. "ssh", "docker" or "containerd". */
616
+ name: string;
617
+ /** It's current status, one of PENDING or READY. Note: It's not guaranteed that all services emit a PENDING state before becoming READY. The fact that they're starting can sometimes result in a lack of a ServiceState entry for that service. */
618
+ status: InstanceMetadataServiceStatus;
619
+ /** Identifies what application transport this endpoint implements. */
620
+ endpointKind: InstanceMetadataServiceEndpointKind;
621
+ /** The application-specific endpoint. Typically a URL. Example: `wss://gate.fra1.nscluster.cloud/ui3e3e3g7cfrg/22` */
622
+ endpoint: string;
623
+ }
624
+ export type InstanceMetadataServiceList = Array<InstanceMetadataService>;
625
+ export interface InstanceMetadataHWDeployment {
626
+ /** In which continent was the instance deployed to, one of "us" or "eu". */
627
+ geoContinent: string;
628
+ /** What hardware platform was the instance deployed to, one of "a1", "a2", "mac-m2", "mac-m4" or "arm2". */
629
+ majorHwplatform: string;
630
+ }
631
+ export interface InstanceMetadata {
632
+ /** The ID of the instance created. */
633
+ instanceId: string;
634
+ /** The timestamp of when the instance was created (in UTC). */
635
+ createdAt?: string | undefined;
636
+ /** The timestamp of when the instance became ready/running (in UTC). Not set if the instance is one of PENDING or CREATING states. */
637
+ readyAt?: string | undefined;
638
+ /** The timestamp of when the instance was destroyed (in UTC). Not set if the instance is one of PENDING, CREATING or RUNNING states. */
639
+ destroyedAt?: string | undefined;
640
+ /** The computed deadline of the instance (in UTC). The instance will be destroyed when it hits its deadline. */
641
+ deadline?: string | undefined;
642
+ /** The user specified documented purpose. */
643
+ documentedPurpose: string;
644
+ /** The user specified instance shape (cpu, memory, disk). */
645
+ shape?: InstanceShape | undefined;
646
+ /** The status the instance is in. */
647
+ status: InstanceMetadataStatus;
648
+ /** The region-specific base ingress domain used to back created ingresses. Example: `fra1.nscluster.cloud`. */
649
+ ingressDomain: string;
650
+ /** The user specified instance labels. */
651
+ labels: LabelList;
652
+ /** Descriptive user metadata, separate from labels and attachments. Not used for policy matching or workload identity claims. */
653
+ annotations: StringMap;
654
+ /** If the used authorization token has a `creator_id`, it is retained for debugging purposes. */
655
+ creatorId: string;
656
+ /** Maintain state of each of the exported system services in this instance. Examples of system services are `buildkit`, `kubernetes`, etc. */
657
+ services: InstanceMetadataServiceList;
658
+ /** Information related to where the instance is running, or ran, including geography, and hw platform. */
659
+ hwDeployment?: InstanceMetadataHWDeployment | undefined;
660
+ }
661
+ export interface InstanceExtendedMetadataSshMetadata {
662
+ /** The proxy endpoint to connect to for SSH access. */
663
+ sshProxyEndpoint: string;
664
+ /** A short-lived private key that can be used for SSH authentication. Access is restricted to this specific instance. */
665
+ sshPrivateKey: string | Redacted.Redacted<string>;
666
+ }
667
+ export interface InstanceExtendedMetadataKubernetesInstanceMetadata {
668
+ /** The Kubernetes API server endpoint address. */
669
+ endpointAddress: string;
670
+ /** PEM-encoded CA certificate for verifying the API server. */
671
+ certificateAuthorityData: string;
672
+ /** PEM-encoded client certificate for authenticating to the API server. */
673
+ clientCertificateData: string;
674
+ /** PEM-encoded client key for authenticating to the API server. */
675
+ clientKeyData: string | Redacted.Redacted<string>;
676
+ /** The Kubernetes distribution running in the instance, e.g. "k3s". */
677
+ kubernetesDistribution: string;
678
+ }
679
+ export interface InstanceExtendedMetadataAllocatedTlsBackedPort {
680
+ /** The name specified in the Ingress request. */
681
+ name: string;
682
+ /** The allocated port number. */
683
+ port: number;
684
+ /** The SNI server name to use when connecting. */
685
+ serverName: string;
686
+ /** The effective ingress mode. */
687
+ mode: IngressMode;
688
+ /** The effective client authentication mode. */
689
+ clientAuthentication: IngressClientAuthentication;
690
+ }
691
+ export type InstanceExtendedMetadataAllocatedTlsBackedPortList = Array<InstanceExtendedMetadataAllocatedTlsBackedPort>;
692
+ /** Extended metadata returned by CreateInstance and DescribeInstance. Includes credentials and endpoints for accessing services running within the instance. */
693
+ export interface InstanceExtendedMetadata {
694
+ /** SSH access metadata. Set when the instance supports SSH access. */
695
+ sshMetadata?: InstanceExtendedMetadataSshMetadata | undefined;
696
+ /** Kubernetes access metadata. Set when Kubernetes is enabled. */
697
+ kubernetesMetadata?: InstanceExtendedMetadataKubernetesInstanceMetadata | undefined;
698
+ /** Allocated TCP and TLS passthrough ports. */
699
+ tlsBackedPort: InstanceExtendedMetadataAllocatedTlsBackedPortList;
700
+ /** The regional API endpoint for the CommandService, used to execute commands in containers running on this instance. */
701
+ commandServiceEndpoint: string;
702
+ }
703
+ /** Endpoint information for the workspace's private container registry. Images pushed to this registry are accessible from instances in the workspace. */
704
+ export interface ImageRegistry {
705
+ /** The registry hostname, e.g. "nscr.io". */
706
+ endpointAddress: string;
707
+ /** The repository path within the registry that is scoped to this workspace. */
708
+ repository: string;
709
+ }
710
+ export interface AllocatedContainerExportedContainerPort {
711
+ /** The original specified protocol. */
712
+ proto: ContainerPortProto;
713
+ /** The original specified container port. */
714
+ containerPort: number;
715
+ /** The original specified http rules. */
716
+ httpMatchRule: HttpMatchRuleList;
717
+ /** If required, the port exposed within the instance that translates to the container port above. This port is available in host networking only. */
718
+ exportedPort: number;
719
+ /** The fully qualified domain that is configured in the public ingress to map back to this exposed port. Check `endpoint` for the hostname and port required to connect to the port. */
720
+ fqdn: string;
721
+ /** The endpoint to use to connect to the exported port. May include a port number as well, e.g. "foo-xyz.ord.namespaced.app:444". */
722
+ endpoint: string;
723
+ /** The effective client authentication mode. */
724
+ clientAuthentication: IngressClientAuthentication;
725
+ }
726
+ export type AllocatedContainerExportedContainerPortList = Array<AllocatedContainerExportedContainerPort>;
727
+ export interface AllocatedContainer {
728
+ /** A Namespace-allocated ID for this container. */
729
+ id: string;
730
+ /** The user specified container name. */
731
+ name: string;
732
+ /** The allocated exported ports, which include the allocated public ingress URLs. */
733
+ exportedPort: AllocatedContainerExportedContainerPortList;
734
+ /** The resolved image reference used to back this container. */
735
+ imageRef: string;
736
+ }
737
+ export type AllocatedContainerList = Array<AllocatedContainer>;
738
+ export interface DescribeInstanceResponseExperimentalFeatures {
739
+ /** If `enable_wildcard_certificate` is set, the certificate that is being generated for this instance. E.g. `*.{instanceid}.foobar.com`. */
740
+ instanceWildcardDomain: string;
741
+ }
742
+ /** A typed blob that can be attached to an instance. */
743
+ export interface Attachment {
744
+ typeUrl: string;
745
+ content: string;
746
+ }
747
+ export type AttachmentList = Array<Attachment>;
748
+ export interface DescribeInstanceResponseShutdownReason {
749
+ /** If the shutdown reason is a container termination, this code will contain the exit code of the container. */
750
+ errorCode: number;
751
+ errorMessage: string;
752
+ containerNscId: string;
753
+ containerName: string;
754
+ containerFailedReason: string;
755
+ }
756
+ export type DescribeInstanceResponseShutdownReasonList = Array<DescribeInstanceResponseShutdownReason>;
757
+ export interface CreateInstanceResponse {
758
+ /** A fully qualified URL that points to the instance summary in the dashboard. E.g. `https://cloud.namespace.so/01gr490qvbntkjn9jwypnd4g04/instance/ui3e3e3g7cfrg`. */
759
+ instanceUrl: string;
760
+ /** InstanceMetadata include both creation time specified fields such as labels, and status-like properties like the destroyed timestamp if the instance is no longer running. */
761
+ metadata?: InstanceMetadata | undefined;
762
+ /** Service-specific metadata which may include credentials. E.g. SSH or Kubernetes endpoint information. */
763
+ extendedMetadata?: InstanceExtendedMetadata | undefined;
764
+ /** Endpoint information of the private Container Registry that is usable with this instance. Instances are pre-configured to access workspace-owned images in this registry. */
765
+ registry?: ImageRegistry | undefined;
766
+ /** If the instance creation specified a set of containers, specifies the corresponding allocated containers. */
767
+ containers: AllocatedContainerList;
768
+ /** A set of experimental features attached to this instance. Experimental features may be removed or modified at any time by the Namespace team. */
769
+ experimental?: DescribeInstanceResponseExperimentalFeatures | undefined;
770
+ /** A list of metadata that is attached to the instance. */
771
+ attachments: AttachmentList;
772
+ /** The instance's container cache configuration, if one exists. */
773
+ containerCache?: CreateInstanceRequestExperimentalFeaturesContainerCache | undefined;
774
+ /** A list of reasons why an instance terminated. Usually, this only contains one entry. If there were multiple concurrent causes that triggered a shutdown, each would be noted here. */
775
+ shutdownReasons: DescribeInstanceResponseShutdownReasonList;
776
+ /** The set of permissions granted to the workload running in this instance. */
777
+ workloadPermissions: PermissionList;
778
+ }
779
+ export interface DeleteIngressRequest {
780
+ instanceId?: string | undefined;
781
+ /** Use the ID returned by create/list. */
782
+ ingressId?: string | undefined;
783
+ }
784
+ export interface DeleteIngressResponse {
785
+ }
786
+ export interface DescribeInstanceRequest {
787
+ /** The ID of instance which this call targets. */
788
+ instanceId?: string | undefined;
789
+ }
790
+ export interface DescribeInstanceResponse {
791
+ /** A fully qualified URL that points to the instance summary in the dashboard. E.g. `https://cloud.namespace.so/01gr490qvbntkjn9jwypnd4g04/instance/ui3e3e3g7cfrg`. */
792
+ instanceUrl: string;
793
+ /** InstanceMetadata include both creation time specified fields such as labels, and status-like properties like the destroyed timestamp if the instance is no longer running. */
794
+ metadata?: InstanceMetadata | undefined;
795
+ /** Service-specific metadata which may include credentials. E.g. SSH or Kubernetes endpoint information. */
796
+ extendedMetadata?: InstanceExtendedMetadata | undefined;
797
+ /** Endpoint information of the private Container Registry that is usable with this instance. Instances are pre-configured to access workspace-owned images in this registry. */
798
+ registry?: ImageRegistry | undefined;
799
+ /** If the instance creation specified a set of containers, specifies the corresponding allocated containers. */
800
+ containers: AllocatedContainerList;
801
+ /** A set of experimental features attached to this instance. Experimental features may be removed or modified at any time by the Namespace team. */
802
+ experimental?: DescribeInstanceResponseExperimentalFeatures | undefined;
803
+ /** A list of metadata that is attached to the instance. */
804
+ attachments: AttachmentList;
805
+ /** The instance's container cache configuration, if one exists. */
806
+ containerCache?: CreateInstanceRequestExperimentalFeaturesContainerCache | undefined;
807
+ /** A list of reasons why an instance terminated. Usually, this only contains one entry. If there were multiple concurrent causes that triggered a shutdown, each would be noted here. */
808
+ shutdownReasons: DescribeInstanceResponseShutdownReasonList;
809
+ /** The set of permissions granted to the workload running in this instance. */
810
+ workloadPermissions: PermissionList;
811
+ }
812
+ export interface DestroyInstanceRequest {
813
+ /** The ID of instance which this call targets. */
814
+ instanceId?: string | undefined;
815
+ /** The reason of destruction is persisted with the instance and can be retrieved later. */
816
+ reason?: string | undefined;
817
+ }
818
+ export interface DestroyInstanceResponse {
819
+ }
820
+ export interface ExtendInstanceRequest {
821
+ /** The ID of the instance which should be extended. */
822
+ instanceId?: string | undefined;
823
+ /** The duration this instance should be extended by. Note: In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. */
824
+ extendBy?: string | undefined;
825
+ /** The minimum duration this instance should be running. Note: In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. */
826
+ ensureMinimum?: string | undefined;
827
+ /** The new deadline (in UTC) at which the instance is destroyed. Note: In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. */
828
+ newDeadline?: string | undefined;
829
+ }
830
+ export interface ExtendInstanceResponse {
831
+ /** The new deadline at which the instance is destroyed. */
832
+ newDeadline?: string | undefined;
833
+ }
834
+ export type GetInstanceMetricsRequestMetricResource = "METRIC_UNSPECIFIED" | "CPU" | "CPU_BREAKDOWN" | "IO_WAIT" | "MEMORY" | "STORAGE";
835
+ export type GetInstanceMetricsRequestMetricResourceList = Array<GetInstanceMetricsRequestMetricResource | (string & {})>;
836
+ export interface GetInstanceMetricsRequest {
837
+ instanceId?: string | undefined;
838
+ /** If set, only metrics data on or after this timestamp will be returned. Note: In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. */
839
+ startTimestamp?: string | undefined;
840
+ /** If set, only metrics data up to this timestamp will be returned. Note: In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. */
841
+ endTimestamp?: string | undefined;
842
+ /** Specifies which metrics should be returned. */
843
+ metricResource?: GetInstanceMetricsRequestMetricResourceList | undefined;
844
+ }
845
+ export type DoubleList = Array<number>;
846
+ export interface TimeSeriesDoubles {
847
+ values: DoubleList;
848
+ }
849
+ export type TimeSeriesDoublesMap = {
850
+ [key: string]: TimeSeriesDoubles | undefined;
851
+ };
852
+ export interface TimeSeriesIntegers {
853
+ values: StringList;
854
+ }
855
+ export type TimeSeriesIntegersMap = {
856
+ [key: string]: TimeSeriesIntegers | undefined;
857
+ };
858
+ export type TimeSeriesStrings = TimeSeriesIntegers;
859
+ export type TimeSeriesStringsMap = {
860
+ [key: string]: TimeSeriesIntegers | undefined;
861
+ };
862
+ /** Represents a time series of data, associating multiple string-keyed data points to each timestamp. Each data point N has a timestamp stored in timestamps[N]. Data associated with that timestamp is then stored in: - doubles[key].values[N] if the data is represented as a double - integers[key].values[N] if the data is represented as a int64 - strings[key].values[N] if the data is represented as a string The API that returns a TimeSeries describes which keys will be present. */
863
+ export interface TimeSeries {
864
+ /** timestamps are represented as the number of nanoseconds elapsed since January 1, 1970 UTC. */
865
+ timestamps: StringList;
866
+ doubles: TimeSeriesDoublesMap;
867
+ integers: TimeSeriesIntegersMap;
868
+ strings: TimeSeriesStringsMap;
869
+ }
870
+ export type TimeSeriesList = Array<TimeSeries>;
871
+ export interface GetInstanceMetricsResponse {
872
+ /** The requested metrics will be returned in one or more time series. The assignment of metrics to time series is implementation defined and can change over time, so the client should iterate all time_series when looking for a particular metric. */
873
+ timeSeries: TimeSeriesList;
874
+ }
875
+ export interface GetKubernetesConfigRequest {
876
+ instanceId?: string | undefined;
877
+ }
878
+ export interface GetKubernetesConfigResponse {
879
+ kubeconfig: string | Redacted.Redacted<string>;
880
+ }
881
+ export interface GetNetworkConfigurationRequest {
882
+ }
883
+ export type GetNetworkConfigurationResponseCIDRKind = "KIND_UNKNOWN" | "NAMESPACE_MANAGED" | "EXTERNAL_TRANSIT_PROVIDER" | "DEDICATED";
884
+ export interface GetNetworkConfigurationResponseCIDR {
885
+ kind: GetNetworkConfigurationResponseCIDRKind;
886
+ cidr: string;
887
+ /** Network segment to attach a workload to in order to egress through this address. Only set for DEDICATED. Empty means the default pool. */
888
+ segment: string;
889
+ }
890
+ export type GetNetworkConfigurationResponseCIDRList = Array<GetNetworkConfigurationResponseCIDR>;
891
+ export interface GetNetworkConfigurationResponseEgress {
892
+ /** Possible source addresses used by instances running in this workspace (tenant). */
893
+ egressCidrs: GetNetworkConfigurationResponseCIDRList;
894
+ }
895
+ export interface GetNetworkConfigurationResponse {
896
+ egress?: GetNetworkConfigurationResponseEgress | undefined;
897
+ }
898
+ export interface GetRemoteDesktopConfigRequest {
899
+ /** Required: which instance to provide remote desktop configuration for. */
900
+ instanceId?: string | undefined;
901
+ }
902
+ export interface GetRemoteDesktopConfigResponseVNCConfig {
903
+ /** The VNC endpoint exposed by the instance ingress. */
904
+ endpoint: string;
905
+ /** The username to use when authenticating to the VNC server, if required. */
906
+ username: string;
907
+ /** The password to use when authenticating to the VNC server, if required. */
908
+ password: string | Redacted.Redacted<string>;
909
+ }
910
+ export interface GetRemoteDesktopConfigResponseRDPConfig {
911
+ /** The RDP endpoint exposed by the instance ingress. */
912
+ endpoint: string;
913
+ /** The username to use when authenticating to the RDP server. */
914
+ username: string;
915
+ /** The password to use when authenticating to the RDP server. */
916
+ password: string | Redacted.Redacted<string>;
917
+ }
918
+ export interface GetRemoteDesktopConfigResponse {
919
+ /** The configuration to use when accessing the instance's remote display using VNC. If the instance does not expose a VNC service, this field is not set. */
920
+ vnc?: GetRemoteDesktopConfigResponseVNCConfig | undefined;
921
+ /** The configuration to use when accessing the instance's remote display using RDP. If the instance does not expose an RDP service, this field is not set. */
922
+ rdp?: GetRemoteDesktopConfigResponseRDPConfig | undefined;
923
+ }
924
+ export interface GetSSHConfigRequest {
925
+ /** Required: which instance to provide and SSH configuration for. */
926
+ instanceId?: string | undefined;
927
+ /** Optional: Specify a container name to connect to. The resulting connection endpoint will open a session in that container, if present. */
928
+ targetContainer?: string | undefined;
929
+ }
930
+ export type BlobList = Array<string>;
931
+ export interface GetSSHConfigResponse {
932
+ /** If set, this private key can be used to establish an SSH session to the instance. Any private key returned here has limited access rights, restricted to a single instance. */
933
+ sshPrivateKey: string | Redacted.Redacted<string>;
934
+ /** Which username to use when establishing an SSH session. E.g. You can start a session from a terminal using `ssh <username>@<endpoint>`. */
935
+ username: string;
936
+ /** This SSH endpoint can be used to establish an SSH session with the instance. Make sure to also configure the corresponding username. */
937
+ endpoint: string;
938
+ /** The SSH server public host keys, encoded in the OpenSSH public key format. Clients can use these keys to verify the server at endpoint. */
939
+ sshHostKeys: BlobList;
940
+ }
941
+ export interface GetVNCConfigRequest {
942
+ /** Required: which instance to provide VNC configuration for. */
943
+ instanceId?: string | undefined;
944
+ }
945
+ export interface GetVNCConfigResponse {
946
+ /** The VNC endpoint exposed by the instance ingress. */
947
+ endpoint: string;
948
+ /** The username to use when authenticating to the VNC server, if required. */
949
+ username: string;
950
+ /** The password to use when authenticating to the VNC server, if required. */
951
+ password: string | Redacted.Redacted<string>;
952
+ }
953
+ export interface ListIngressesRequest {
954
+ instanceId?: string | undefined;
955
+ }
956
+ export interface ListIngressesResponse {
957
+ allocatedIngresses: AllocatedIngressList;
958
+ }
959
+ export type StringMatcherOperator = "OPERATOR_UNKNOWN" | "IS_ANY_OF" | "IS_NOT";
960
+ export interface StringMatcher {
961
+ values?: StringList | undefined;
962
+ op?: StringMatcherOperator | (string & {}) | undefined;
963
+ }
964
+ export interface ListInstanceNotificationsRequest {
965
+ /** Optional filter to match instance IDs. If not set, returns events for all instances. */
966
+ instanceIds?: StringMatcher | undefined;
967
+ /** The maximum number of events to return. The list of events returned is always capped to an internal number. */
968
+ limit?: string | undefined;
969
+ /** If set to true, only pending events that have not yet been delivered are returned. */
970
+ onlyPendingEvents?: boolean | undefined;
971
+ }
972
+ export interface InstanceEventMetadata {
973
+ emittedAt?: string | undefined;
974
+ tenantId: string;
975
+ instanceId: string;
976
+ status: InstanceMetadataStatus;
977
+ labels: LabelList;
978
+ }
979
+ export type InstanceEventMetadataList = Array<InstanceEventMetadata>;
980
+ export interface ListInstanceNotificationsResponse {
981
+ /** The list of events, ordered by emitted time in descending order (most recent first). Each instance has at most one event in the response. */
982
+ events: InstanceEventMetadataList;
983
+ }
984
+ export type LabelFilterEntryLabelFilterOp = "UNKNOWN" | "EQUAL" | "NOT_EQUAL" | "EXIST";
985
+ export interface LabelFilterEntry {
986
+ name?: string | undefined;
987
+ value?: string | undefined;
988
+ op?: LabelFilterEntryLabelFilterOp | (string & {}) | undefined;
989
+ }
990
+ export type LabelFilterEntryList = Array<LabelFilterEntry>;
991
+ export interface ListInstancesRequest {
992
+ /** If a previous response returned a `pagination_cursor`, it can be specified to continue reading results with the same arguments as the original call. */
993
+ paginationCursor?: string | undefined;
994
+ /** The maximum number of entries to return as part of this ListInstances request. A maximum number of entries may also be specified when `pagination_cursor` is set. We won't return more than `max_entries`, but may return fewer. */
995
+ maxEntries?: string | undefined;
996
+ /** If not set, only returns instances in the PENDING, CREATING or RUNNING states. If set, also includes instances in the DESTROYED and ERROR states. */
997
+ includeCompleteRuns?: boolean | undefined;
998
+ /** Don't return instances that were created before the specified timestamp (in UTC). Note: In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. */
999
+ notOlderThan?: string | undefined;
1000
+ /** Only return instances that match the specified filter. */
1001
+ labelFilter?: LabelFilterEntryList | undefined;
1002
+ /** All annotation filters must match. Independent of label_filter, which must also match when specified. Only EQUAL, NOT_EQUAL, and EXIST are accepted. NOT_EQUAL also matches instances where the annotation is absent. */
1003
+ annotationFilter?: LabelFilterEntryList | undefined;
1004
+ }
1005
+ export type InstanceMetadataList = Array<InstanceMetadata>;
1006
+ export interface ListInstancesResponse {
1007
+ /** The list of instances that match the filter. */
1008
+ instances: InstanceMetadataList;
1009
+ /** If set, there are additional results. Pass the same cursor to a subsequent ListInstances call to continue fetching results. */
1010
+ paginationCursor: string;
1011
+ }
1012
+ export interface ReleaseUniqueTagRequest {
1013
+ /** The name of the unique tag to release. */
1014
+ uniqueTag?: string | undefined;
1015
+ /** If set, only release the unique tag if the currently associated instance ID matches this constraint. When running a container with `nsc_state_path` set, the parent instance ID is available via the environment variable NSC_INSTANCE_ID. */
1016
+ ifInstanceId?: StringMatcher | undefined;
1017
+ }
1018
+ export interface ReleaseUniqueTagResponse {
1019
+ /** The ID of the instance that was released from the tag. If no instance was released, this field is not set. */
1020
+ instanceId: string;
1021
+ }
1022
+ export interface StartContainersRequest {
1023
+ /** The ID of instance which this call targets. */
1024
+ instanceId?: string | undefined;
1025
+ /** The set of additional containers that should be started in the target instance. */
1026
+ containers?: ContainerRequestList | undefined;
1027
+ }
1028
+ export interface StartContainersResponse {
1029
+ /** The corresponding set of allocated containers. Containers are returned in the same order they are requested. */
1030
+ containers: AllocatedContainerList;
1031
+ }
1032
+ export type AnnotationOperationOperator = "UNKNOWN" | "UPSERT" | "REMOVE";
1033
+ export interface AnnotationOperation {
1034
+ /** Only UPSERT and REMOVE are accepted. */
1035
+ op?: AnnotationOperationOperator | (string & {}) | undefined;
1036
+ /** A DNS-subdomain name, at most 253 bytes. Required for both operations. */
1037
+ name?: string | undefined;
1038
+ /** At most 1024 bytes. The complete annotation set is limited to 2048 bytes across names and values. REMOVE requires an empty value; removing an absent annotation is a no-op. */
1039
+ value?: string | undefined;
1040
+ }
1041
+ export type AnnotationOperationList = Array<AnnotationOperation>;
1042
+ export interface UpdateInstanceAnnotationsRequest {
1043
+ instanceId?: string | undefined;
1044
+ /** Applied in order. Later operations may overwrite earlier operations on the same annotation. If any operation is invalid, no changes are persisted. */
1045
+ operations?: AnnotationOperationList | undefined;
1046
+ }
1047
+ export interface UpdateInstanceAnnotationsResponse {
1048
+ /** The complete set of annotations after the update. */
1049
+ annotations: StringMap;
1050
+ }
1051
+ export interface WaitInstanceSyncRequest {
1052
+ /** The ID of instance which this call targets. */
1053
+ instanceId?: string | undefined;
1054
+ /** If set to true, we don't fail the request if the instance is destroyed while waiting. */
1055
+ destroyedOk?: boolean | undefined;
1056
+ /** The ID of the container to wait for. This is the Namespace-allocated ID returned when a container is created. */
1057
+ containerId?: string | undefined;
1058
+ /** The name of the container to wait for. This is the user-specified name provided in ContainerRequest.name during instance creation or StartContainers. If both container_id and container_name are set, container_name takes precedence. */
1059
+ containerName?: string | undefined;
1060
+ }
1061
+ export interface WaitInstanceSyncResponse {
1062
+ /** The up-to-date metadata of the specified instance. */
1063
+ metadata?: InstanceMetadata | undefined;
1064
+ /** If a container is specified, its status. */
1065
+ containerStatus: string;
1066
+ }
1067
+ export type CreateIngressError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
1068
+ /** Exposes a backend within the instance to the public internet. Typically used to serve public HTTPS-termination ingress that is backed by a container running inside the instance. See https://namespace.so/docs/architecture/networking/ingress for details. ### Errors - If the instance does not exist, a `NotFound` status is returned. */
1069
+ export declare const createIngress: API.OperationMethod<CreateIngressRequest, CreateIngressResponse, CreateIngressError, NamespaceLabsOpContext>;
1070
+ export type CreateInstanceError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
1071
+ /** Creates a new instance. Instances are micro-vm backed environments which are optimized to run containers. Each instance is deployed with `containerd`, and with optionally `dockerd` and Kubernetes. Instances can run one or more containers. Containers can be started using one of two mechanisms: - Namespace managed containers: containers are specified at creation time via the `containers` field, or at runtime via the `StartContainers` method. Managed containers have logs and metrics automatically collected, and Namespace's infrastructure optimizes future startup time of repeated use of the same containers. These containers are handled as "critical" and their lifetime is tied to the VMs -- if they fail, either due to early exit, OOM, etc, the instance also fails. Namespace managed containers are always run on containerd directly, in the `default` namespace. - User-managed containers: after an instance is created, you can use the containerd or Docker APIs to create and manage containers yourself. These containers are not marked required, so it's up to a user to take action to terminate a VM on container failure. Instances that are running can be accessed via the region ingress. Endpoints per exposed service are returned as part of the instance creation. For example, proxies are exposed that allow direct access to `containerd`, `docker`, etc services which are usually only exposed over Unix sockets. The creation of an instance produces a set of metadata: InstanceMetadata is also available in ListInstances requests, but the remainder of metadata (e.g. extended metadata) is only available at creation time, or if DescribeInstance is called. Instance creation is non-blocking. After an instance is created call WaitInstance to observe the states instance creation goes through. ### Errors - If the workspace is out of resources, a `ResourceExhausted` status is returned. - If the request refers to an invalid argument, e.g. a non-existing region, an `InvalidArgument` status is returned. */
1072
+ export declare const createInstance: API.OperationMethod<CreateInstanceRequest, CreateInstanceResponse, CreateInstanceError, NamespaceLabsOpContext>;
1073
+ export type DeleteIngressError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
1074
+ /** Removes a previously created ingress from the instance. ### Errors - If the instance or ingress does not exist, a `NotFound` status is returned. - If the instance is already terminated, or the ingress is managed declaratively, a `FailedPrecondition` status is returned. */
1075
+ export declare const deleteIngress: API.OperationMethod<DeleteIngressRequest, DeleteIngressResponse, DeleteIngressError, NamespaceLabsOpContext>;
1076
+ export type DescribeInstanceError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
1077
+ /** Obtains the metadata (including extra metadata) of a previously created instance. ### Errors - If the instance does not exist, a `NotFound` status is returned. */
1078
+ export declare const describeInstance: API.OperationMethod<DescribeInstanceRequest, DescribeInstanceResponse, DescribeInstanceError, NamespaceLabsOpContext>;
1079
+ export type DestroyInstanceError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
1080
+ /** Destroys a previously created instance. ### Errors - If the instance does not exist, a `NotFound` status is returned. */
1081
+ export declare const destroyInstance: API.OperationMethod<DestroyInstanceRequest, DestroyInstanceResponse, DestroyInstanceError, NamespaceLabsOpContext>;
1082
+ export type ExtendInstanceError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
1083
+ /** Extend the lifetime of an instance by the provided duration. ### Errors - If the instance does not exist, a `NotFound` status is returned. */
1084
+ export declare const extendInstance: API.OperationMethod<ExtendInstanceRequest, ExtendInstanceResponse, ExtendInstanceError, NamespaceLabsOpContext>;
1085
+ export type GetInstanceMetricsError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
1086
+ /** Returns metrics that represent resource usage by the specified instance. Metrics can also be queried from instances that are still running. See https://namespace.so/docs/architecture/compute/observability for details. ### Errors - If the instance does not exist, a `NotFound` status is returned. */
1087
+ export declare const getInstanceMetrics: API.OperationMethod<GetInstanceMetricsRequest, GetInstanceMetricsResponse, GetInstanceMetricsError, NamespaceLabsOpContext>;
1088
+ export type GetKubernetesConfigError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
1089
+ /** Returns a configuration that can be used by `kubectl` to access Kubernetes inside the specified instance. ### Errors - If the instance does not exist, a `NotFound` status is returned. - If the instance is not running Kubernetes, an `FailedPrecondition` status is returned. */
1090
+ export declare const getKubernetesConfig: API.OperationMethod<GetKubernetesConfigRequest, GetKubernetesConfigResponse, GetKubernetesConfigError, NamespaceLabsOpContext>;
1091
+ export type GetNetworkConfigurationError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
1092
+ /** Returns the network configuration used within the target workspace. See https://namespace.so/docs/architecture/networking for details. */
1093
+ export declare const getNetworkConfiguration: API.OperationMethod<GetNetworkConfigurationRequest, GetNetworkConfigurationResponse, GetNetworkConfigurationError, NamespaceLabsOpContext>;
1094
+ export type GetRemoteDesktopConfigError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
1095
+ /** Returns configurations that can be used to access the instance's remote display using VNC or RDP. The caller's authentication token must also grant access to the instance ingress when connecting to the returned endpoints. ### Errors - If the instance does not exist, a `NotFound` status is returned. - If the instance does not expose a VNC or RDP service, a `FailedPrecondition` status is returned. */
1096
+ export declare const getRemoteDesktopConfig: API.OperationMethod<GetRemoteDesktopConfigRequest, GetRemoteDesktopConfigResponse, GetRemoteDesktopConfigError, NamespaceLabsOpContext>;
1097
+ export type GetSSHConfigError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
1098
+ /** Returns a configuration that can be used to access the instance with SSH. See https://namespace.so/docs/architecture/compute/ssh-remote-display for details. ### Errors - If the instance does not exist, a `NotFound` status is returned. */
1099
+ export declare const getSSHConfig: API.OperationMethod<GetSSHConfigRequest, GetSSHConfigResponse, GetSSHConfigError, NamespaceLabsOpContext>;
1100
+ export type GetVNCConfigError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
1101
+ /** Returns a configuration that can be used to access the instance's remote display using VNC. The caller's authentication token must also grant access to the instance ingress when connecting to the returned endpoint. ### Errors - If the instance does not exist, a `NotFound` status is returned. - If the instance does not expose a VNC service, a `FailedPrecondition` status is returned. */
1102
+ export declare const getVNCConfig: API.OperationMethod<GetVNCConfigRequest, GetVNCConfigResponse, GetVNCConfigError, NamespaceLabsOpContext>;
1103
+ export type ListIngressesError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
1104
+ /** Returns the list of backends exposed from the instance to the public internet. This includes ingresses created using `CreateIngress` above or ingresses declaratively exposed using FEATURE_KUBERNETES_INGRESS_MANAGER feature. ### Errors - If the instance does not exist, a `NotFound` status is returned. - If the instance is already terminated, a `FailedPrecondition` status is returned. */
1105
+ export declare const listIngresses: API.OperationMethod<ListIngressesRequest, ListIngressesResponse, ListIngressesError, NamespaceLabsOpContext>;
1106
+ export type ListInstanceNotificationsError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
1107
+ /** Returns a list of instance notification events. Each instance has at most one event in the response, representing its most recent state change. Events can be filtered by instance ID. */
1108
+ export declare const listInstanceNotifications: API.OperationMethod<ListInstanceNotificationsRequest, ListInstanceNotificationsResponse, ListInstanceNotificationsError, NamespaceLabsOpContext>;
1109
+ export type ListInstancesError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
1110
+ /** Returns a list of all instances that match the specified filter. */
1111
+ export declare const listInstances: API.PaginatedOperationMethod<ListInstancesRequest, ListInstancesResponse, ListInstancesError, NamespaceLabsOpContext, InstanceMetadata>;
1112
+ export type ReleaseUniqueTagError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
1113
+ /** Release the currently associated instance ID from a unique tag. Tags are only unique per region. Make sure to select the correct ComputeService endpoint. When calling this service from within an instance, `NSC_ENDPOINT` will point to the ComputeService endpoint for the current region. Our [SDK](https://github.com/namespacelabs/integrations?tab=readme-ov-file#namespace-integrations) handles this automatically. ### Errors - If the unique tag does not exist, a `NotFound` status is returned. */
1114
+ export declare const releaseUniqueTag: API.OperationMethod<ReleaseUniqueTagRequest, ReleaseUniqueTagResponse, ReleaseUniqueTagError, NamespaceLabsOpContext>;
1115
+ export type StartContainersError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
1116
+ /** Adds the specified set of containers to a running instance. ### Errors - If the instance does not exist, a `NotFound` status is returned. */
1117
+ export declare const startContainers: API.OperationMethod<StartContainersRequest, StartContainersResponse, StartContainersError, NamespaceLabsOpContext>;
1118
+ export type UpdateInstanceAnnotationsError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
1119
+ /** Atomically applies user annotation operations in order without restarting the instance. Annotations are descriptive metadata, separate from labels and attachments; they are not used for policy matching or workload identity claims. Updates are rejected once the instance is shutting down, being destroyed, terminated, or has failed. Existing annotations remain readable after termination. Updated annotations are returned by DescribeInstance and ListInstances and can be queried using ListInstances.annotation_filter, including after termination. Requires the instance/update_annotations permission for this instance. Returns NotFound if the instance does not exist, or InvalidArgument for invalid annotations, operation types, or operation payloads. Returns FailedPrecondition if the instance is terminating or has terminated. */
1120
+ export declare const updateInstanceAnnotations: API.OperationMethod<UpdateInstanceAnnotationsRequest, UpdateInstanceAnnotationsResponse, UpdateInstanceAnnotationsError, NamespaceLabsOpContext>;
1121
+ export type WaitInstanceSyncError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
1122
+ /** Waits until an instance reaches the RUNNING state and returns the instance metadata. To receive intermediate state updates during instance creation process use the streaming version of this method -- `WaitInstance`. ### Errors - If the instance does not exist, a `NotFound` status is returned. */
1123
+ export declare const waitInstanceSync: API.OperationMethod<WaitInstanceSyncRequest, WaitInstanceSyncResponse, WaitInstanceSyncError, NamespaceLabsOpContext>;
1124
+ //# sourceMappingURL=compute.d.ts.map