@origincloud/compute 0.0.0-stage → 0.4.0

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 (48) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +24 -2
  3. package/dist/longrunning/v1beta1/index.d.ts +2 -0
  4. package/dist/longrunning/v1beta1/index.d.ts.map +1 -0
  5. package/dist/longrunning/v1beta1/index.js +3 -0
  6. package/dist/longrunning/v1beta1/index.js.map +1 -0
  7. package/dist/longrunning/v1beta1/operations.d.ts +63 -0
  8. package/dist/longrunning/v1beta1/operations.d.ts.map +1 -0
  9. package/dist/longrunning/v1beta1/operations.js +54 -0
  10. package/dist/longrunning/v1beta1/operations.js.map +1 -0
  11. package/dist/v1beta1/catalog.d.ts +146 -0
  12. package/dist/v1beta1/catalog.d.ts.map +1 -0
  13. package/dist/v1beta1/catalog.js +86 -0
  14. package/dist/v1beta1/catalog.js.map +1 -0
  15. package/dist/v1beta1/image.d.ts +172 -0
  16. package/dist/v1beta1/image.d.ts.map +1 -0
  17. package/dist/v1beta1/image.js +115 -0
  18. package/dist/v1beta1/image.js.map +1 -0
  19. package/dist/v1beta1/index.d.ts +7 -0
  20. package/dist/v1beta1/index.d.ts.map +1 -0
  21. package/dist/v1beta1/index.js +8 -0
  22. package/dist/v1beta1/index.js.map +1 -0
  23. package/dist/v1beta1/instance.d.ts +398 -0
  24. package/dist/v1beta1/instance.d.ts.map +1 -0
  25. package/dist/v1beta1/instance.js +253 -0
  26. package/dist/v1beta1/instance.js.map +1 -0
  27. package/dist/v1beta1/key_pair.d.ts +126 -0
  28. package/dist/v1beta1/key_pair.d.ts.map +1 -0
  29. package/dist/v1beta1/key_pair.js +95 -0
  30. package/dist/v1beta1/key_pair.js.map +1 -0
  31. package/dist/v1beta1/public_image.d.ts +94 -0
  32. package/dist/v1beta1/public_image.d.ts.map +1 -0
  33. package/dist/v1beta1/public_image.js +56 -0
  34. package/dist/v1beta1/public_image.js.map +1 -0
  35. package/dist/v1beta1/volume_attachment.d.ts +156 -0
  36. package/dist/v1beta1/volume_attachment.d.ts.map +1 -0
  37. package/dist/v1beta1/volume_attachment.js +125 -0
  38. package/dist/v1beta1/volume_attachment.js.map +1 -0
  39. package/package.json +40 -4
  40. package/src/longrunning/v1beta1/index.ts +3 -0
  41. package/src/longrunning/v1beta1/operations.ts +103 -0
  42. package/src/v1beta1/catalog.ts +208 -0
  43. package/src/v1beta1/image.ts +269 -0
  44. package/src/v1beta1/index.ts +8 -0
  45. package/src/v1beta1/instance.ts +541 -0
  46. package/src/v1beta1/key_pair.ts +216 -0
  47. package/src/v1beta1/public_image.ts +137 -0
  48. package/src/v1beta1/volume_attachment.ts +241 -0
@@ -0,0 +1,125 @@
1
+ // Code generated by the SDK's generator (generator/). DO NOT EDIT.
2
+ // source: origincloud/compute/v1beta1/volume_attachment.proto
3
+ import { Operation, newRequestId, pathValue, query, } from "@origincloud/core";
4
+ /**
5
+ * Calls VolumeAttachmentService.
6
+ *
7
+ * Volume attachments: which volumes of the persistent volume service an
8
+ * instance holds, and the device names its guest sees them under. Creating
9
+ * one attaches a volume, deleting it detaches the volume.
10
+ */
11
+ export class VolumeAttachmentClient {
12
+ /**
13
+ * The endpoint the client sends its calls to, which also serves the
14
+ * operations its methods answer with.
15
+ */
16
+ service;
17
+ /** A client of VolumeAttachmentService that sends its calls through `client`. */
18
+ constructor(client) {
19
+ this.service = client.service("compute", true);
20
+ }
21
+ /** Returns a volume attachment. A detached attachment isn't found. */
22
+ async getVolumeAttachment(request, options) {
23
+ const p0 = pathValue("name", request.name, "projects/*/zones/*/instances/*/volumeAttachments/*");
24
+ return this.service.call({
25
+ method: "GET",
26
+ path: `/v1beta1/${p0}`,
27
+ query: query(request, ["name"]),
28
+ idempotent: true,
29
+ }, options);
30
+ }
31
+ /**
32
+ * Lists an instance's volume attachments, the boot volume's first, then
33
+ * by device name. With `-` for the instance, lists every instance's in the
34
+ * zone, which with `volume` finds the instance holding a volume.
35
+ * Detached attachments aren't listed.
36
+ */
37
+ async listVolumeAttachments(request, options) {
38
+ const p0 = pathValue("parent", request.parent, "projects/*/zones/*/instances/*");
39
+ return this.service.call({
40
+ method: "GET",
41
+ path: `/v1beta1/${p0}/volumeAttachments`,
42
+ query: query(request, ["parent"]),
43
+ idempotent: true,
44
+ }, options);
45
+ }
46
+ /**
47
+ * Iterates over everything listVolumeAttachments lists from the request's page on,
48
+ * fetching the next page as the loop reaches it. A page that fails ends
49
+ * the iteration with its error.
50
+ */
51
+ async *allVolumeAttachments(request, options) {
52
+ for (let page = request;;) {
53
+ const response = await this.listVolumeAttachments(page, options);
54
+ yield* response.volumeAttachments ?? [];
55
+ if (!response.nextPageToken)
56
+ return;
57
+ page = { ...page, pageToken: response.nextPageToken };
58
+ }
59
+ }
60
+ /**
61
+ * Attaches an `AVAILABLE` volume to a `RUNNING` or `STOPPED` instance in
62
+ * the same project and zone. On a stopped instance the disk appears at
63
+ * the next start, and the operation is done at once. On a running one it
64
+ * is added live, and the operation is done once the guest sees it, or
65
+ * failed if it couldn't be added, which leaves the volume available.
66
+ *
67
+ * It answers with an operation to wait on, whose result is the VolumeAttachment.
68
+ */
69
+ async createVolumeAttachment(request, options) {
70
+ if (!request.requestId)
71
+ request = { ...request, requestId: newRequestId() };
72
+ const p0 = pathValue("parent", request.parent, "projects/*/zones/*/instances/*");
73
+ const op = await this.service.call({
74
+ method: "POST",
75
+ path: `/v1beta1/${p0}/volumeAttachments`,
76
+ body: request.volumeAttachment,
77
+ query: query(request, ["parent", "volumeAttachment"]),
78
+ idempotent: true,
79
+ }, options);
80
+ return new Operation(this.service, op, "origincloud.compute.v1beta1.VolumeAttachment");
81
+ }
82
+ /**
83
+ * Detaches a volume, which then is `AVAILABLE` again. The boot volume
84
+ * can't be detached. On a running instance the device is removed live;
85
+ * if the guest doesn't release it, the operation fails and the volume
86
+ * stays attached. The operation is done once the volume is detached.
87
+ *
88
+ * It answers with an operation to wait on, which has no result.
89
+ */
90
+ async deleteVolumeAttachment(request, options) {
91
+ if (!request.requestId)
92
+ request = { ...request, requestId: newRequestId() };
93
+ const p0 = pathValue("name", request.name, "projects/*/zones/*/instances/*/volumeAttachments/*");
94
+ const op = await this.service.call({
95
+ method: "DELETE",
96
+ path: `/v1beta1/${p0}`,
97
+ query: query(request, ["name"]),
98
+ idempotent: true,
99
+ }, options);
100
+ return new Operation(this.service, op, "google.protobuf.Empty");
101
+ }
102
+ }
103
+ /** Where the attachment is. */
104
+ export const VolumeAttachment_State = {
105
+ /** Not set. */
106
+ STATE_UNSPECIFIED: "STATE_UNSPECIFIED",
107
+ /** The volume is being created or claimed for the instance. */
108
+ CREATING: "CREATING",
109
+ /** Being added to the running guest. */
110
+ ATTACHING: "ATTACHING",
111
+ /** Attached. */
112
+ ATTACHED: "ATTACHED",
113
+ /** Being removed from the running guest. */
114
+ DETACHING: "DETACHING",
115
+ /** Being released, as the instance is terminated. */
116
+ RELEASING: "RELEASING",
117
+ /**
118
+ * The platform stopped trying to release the volume, which may still
119
+ * be held.
120
+ */
121
+ RELEASE_ABANDONED: "RELEASE_ABANDONED",
122
+ /** The volume couldn't be attached, and was released. */
123
+ FAILED: "FAILED",
124
+ };
125
+ //# sourceMappingURL=volume_attachment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"volume_attachment.js","sourceRoot":"","sources":["../../src/v1beta1/volume_attachment.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,8DAA8D;AAE9D,OAAO,EAKL,SAAS,EAET,YAAY,EACZ,SAAS,EACT,KAAK,GACN,MAAM,mBAAmB,CAAC;AAG3B;;;;;;GAMG;AACH,MAAM,OAAO,sBAAsB;IACjC;;;OAGG;IACM,OAAO,CAAU;IAE1B,iFAAiF;IACjF,YAAY,MAAc;QACxB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IACjD,CAAC;IAED,sEAAsE;IACtE,KAAK,CAAC,mBAAmB,CAAC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AC,CAAC;IAC5F,CAAC;CACF;AA2BD,+BAA+B;AAC/B,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,eAAe;IACf,iBAAiB,EAAE,mBAAmB;IACtC,+DAA+D;IAC/D,QAAQ,EAAE,UAAU;IACpB,wCAAwC;IACxC,SAAS,EAAE,WAAW;IACtB,gBAAgB;IAChB,QAAQ,EAAE,UAAU;IACpB,4CAA4C;IAC5C,SAAS,EAAE,WAAW;IACtB,qDAAqD;IACrD,SAAS,EAAE,WAAW;IACtB;;;OAGG;IACH,iBAAiB,EAAE,mBAAmB;IACtC,yDAAyD;IACzD,MAAM,EAAE,QAAQ;CACR,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,42 @@
1
1
  {
2
2
  "name": "@origincloud/compute",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.4.0",
4
+ "description": "Origin Cloud's compute service: instances, images, key pairs, volume attachments and the instance catalog.",
5
+ "license": "Apache-2.0",
6
+ "homepage": "https://github.com/origincloudhq/sdk-typescript#readme",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/origincloudhq/sdk-typescript.git",
10
+ "directory": "packages/compute"
11
+ },
12
+ "bugs": "https://github.com/origincloudhq/sdk-typescript/issues",
13
+ "keywords": [
14
+ "origincloud",
15
+ "origin-cloud",
16
+ "sdk",
17
+ "compute"
18
+ ],
19
+ "type": "module",
20
+ "sideEffects": false,
21
+ "engines": {
22
+ "node": ">=20"
23
+ },
24
+ "exports": {
25
+ "./*": {
26
+ "types": "./dist/*/index.d.ts",
27
+ "default": "./dist/*/index.js"
28
+ },
29
+ "./package.json": "./package.json"
30
+ },
31
+ "files": [
32
+ "dist",
33
+ "src",
34
+ "!dist/**/*.tsbuildinfo"
35
+ ],
36
+ "peerDependencies": {
37
+ "@origincloud/core": "^0.4.0"
38
+ },
39
+ "devDependencies": {
40
+ "@origincloud/core": "^0.4.0"
41
+ }
42
+ }
@@ -0,0 +1,3 @@
1
+ // Code generated by the SDK's generator (generator/). DO NOT EDIT.
2
+
3
+ export * from "./operations.js";
@@ -0,0 +1,103 @@
1
+ // Code generated by the SDK's generator (generator/). DO NOT EDIT.
2
+ // source: origincloud/longrunning/v1beta1/operations.proto
3
+
4
+ import {
5
+ type CallOptions,
6
+ type Client,
7
+ type LongrunningOperation,
8
+ type Service,
9
+ pathValue,
10
+ query,
11
+ } from "@origincloud/core";
12
+
13
+ /**
14
+ * Calls OperationService.
15
+ *
16
+ * The long-running operations of a service: what its creates, updates and
17
+ * deletes answer with, until their resource settles. Every service serves
18
+ * this at its own host, for the operations its own methods return.
19
+ *
20
+ * An operation is done when its resource reaches the state its method
21
+ * promises, or failed when it can't get there; that outcome never changes
22
+ * afterwards, whatever later happens to the resource. It can be read for a
23
+ * day after it is done.
24
+ */
25
+ export class OperationClient {
26
+ /**
27
+ * The endpoint the client sends its calls to, which also serves the
28
+ * operations its methods answer with.
29
+ */
30
+ readonly service: Service;
31
+
32
+ /**
33
+ * A client of OperationService at the compute host, which serves the
34
+ * operations the compute methods answer with.
35
+ */
36
+ constructor(client: Client) {
37
+ this.service = client.service("compute", true);
38
+ }
39
+
40
+ /** Returns an operation as it is now. */
41
+ async getOperation(request: GetOperationRequest, options?: CallOptions): Promise<LongrunningOperation> {
42
+ const p0 = pathValue("name", request.name, "projects/*/zones/*/operations/*");
43
+ return this.service.call<LongrunningOperation>(
44
+ {
45
+ method: "GET",
46
+ path: `/v1beta1/${p0}`,
47
+ query: query(request, ["name"]),
48
+ idempotent: true,
49
+ },
50
+ options,
51
+ );
52
+ }
53
+
54
+ /**
55
+ * Waits until an operation is done or `timeout` has passed, whichever
56
+ * comes first, and returns it as it is then. It only reads, so a client
57
+ * may repeat it after a transport error.
58
+ */
59
+ async waitOperation(request: WaitOperationRequest, options?: CallOptions): Promise<LongrunningOperation> {
60
+ const p0 = pathValue("name", request.name, "projects/*/zones/*/operations/*");
61
+ return this.service.call<LongrunningOperation>(
62
+ {
63
+ method: "POST",
64
+ path: `/v1beta1/${p0}:wait`,
65
+ body: request,
66
+ idempotent: true,
67
+ },
68
+ options,
69
+ );
70
+ }
71
+ }
72
+
73
+ /** The request for GetOperation. */
74
+ export interface GetOperationRequest {
75
+ /**
76
+ * The operation to return, `projects/{project}/zones/{zone}/operations/{operation}`,
77
+ * exactly as a method returned it.
78
+ */
79
+ name?: string;
80
+ }
81
+
82
+ /** The request for WaitOperation. */
83
+ export interface WaitOperationRequest {
84
+ /** The operation to wait for, exactly as a method returned it. */
85
+ name?: string;
86
+ /** The longest to wait, at most a minute; a minute when not set. */
87
+ timeout?: string;
88
+ }
89
+
90
+ /** What an operation is about. */
91
+ export interface OperationMetadata {
92
+ /** The resource the operation acts on. */
93
+ target?: string;
94
+ /**
95
+ * What it does, as the method that started it names it: for example
96
+ * `create`, `update` or `delete`.
97
+ */
98
+ verb?: string;
99
+ /** When it was accepted. */
100
+ createTime?: string;
101
+ /** When it finished; empty while it hasn't. */
102
+ endTime?: string;
103
+ }
@@ -0,0 +1,208 @@
1
+ // Code generated by the SDK's generator (generator/). DO NOT EDIT.
2
+ // source: origincloud/compute/v1beta1/catalog.proto
3
+
4
+ import { type CallOptions, type Client, type Service, pathValue, query } from "@origincloud/core";
5
+
6
+ /**
7
+ * Calls InstanceTypeService.
8
+ *
9
+ * The catalog of instance types: every size the platform publishes, each
10
+ * saying whether an instance can be launched as it right now. Not scoped to
11
+ * an organisation or a project; no permission is needed.
12
+ */
13
+ export class InstanceTypeClient {
14
+ /**
15
+ * The endpoint the client sends its calls to, which also serves the
16
+ * operations its methods answer with.
17
+ */
18
+ readonly service: Service;
19
+
20
+ /** A client of InstanceTypeService that sends its calls through `client`. */
21
+ constructor(client: Client) {
22
+ this.service = client.service("compute", true);
23
+ }
24
+
25
+ /** Returns an instance type. */
26
+ async getInstanceType(request: GetInstanceTypeRequest, options?: CallOptions): Promise<InstanceType> {
27
+ const p0 = pathValue("name", request.name, "instanceTypes/*");
28
+ return this.service.call<InstanceType>(
29
+ {
30
+ method: "GET",
31
+ path: `/v1beta1/${p0}`,
32
+ query: query(request, ["name"]),
33
+ idempotent: true,
34
+ },
35
+ options,
36
+ );
37
+ }
38
+
39
+ /**
40
+ * Lists every instance type, including those no longer offered, which
41
+ * instances launched as them still report: check `available` before
42
+ * launching as one.
43
+ */
44
+ async listInstanceTypes(request: ListInstanceTypesRequest, options?: CallOptions): Promise<ListInstanceTypesResponse> {
45
+ return this.service.call<ListInstanceTypesResponse>(
46
+ {
47
+ method: "GET",
48
+ path: `/v1beta1/instanceTypes`,
49
+ query: query(request, []),
50
+ idempotent: true,
51
+ },
52
+ options,
53
+ );
54
+ }
55
+ }
56
+
57
+ /**
58
+ * Calls ImageFamilyService.
59
+ *
60
+ * The catalog of image families: stable names that each launch whichever
61
+ * public image is current for them, so a launch gets the latest build
62
+ * without naming an image. Not scoped to an organisation or a project; no
63
+ * permission is needed.
64
+ */
65
+ export class ImageFamilyClient {
66
+ /**
67
+ * The endpoint the client sends its calls to, which also serves the
68
+ * operations its methods answer with.
69
+ */
70
+ readonly service: Service;
71
+
72
+ /** A client of ImageFamilyService that sends its calls through `client`. */
73
+ constructor(client: Client) {
74
+ this.service = client.service("compute", true);
75
+ }
76
+
77
+ /** Returns an image family. */
78
+ async getImageFamily(request: GetImageFamilyRequest, options?: CallOptions): Promise<ImageFamily> {
79
+ const p0 = pathValue("name", request.name, "imageFamilies/*");
80
+ return this.service.call<ImageFamily>(
81
+ {
82
+ method: "GET",
83
+ path: `/v1beta1/${p0}`,
84
+ query: query(request, ["name"]),
85
+ idempotent: true,
86
+ },
87
+ options,
88
+ );
89
+ }
90
+
91
+ /**
92
+ * Lists every image family, including those no longer offered: check
93
+ * `available` before launching from one.
94
+ */
95
+ async listImageFamilies(request: ListImageFamiliesRequest, options?: CallOptions): Promise<ListImageFamiliesResponse> {
96
+ return this.service.call<ListImageFamiliesResponse>(
97
+ {
98
+ method: "GET",
99
+ path: `/v1beta1/imageFamilies`,
100
+ query: query(request, []),
101
+ idempotent: true,
102
+ },
103
+ options,
104
+ );
105
+ }
106
+ }
107
+
108
+ /** A size an instance is launched as. */
109
+ export interface InstanceType {
110
+ /** The type's resource name, `instanceTypes/gp1.core.2`. */
111
+ name?: string;
112
+ /** The name the console shows. */
113
+ displayName?: string;
114
+ /** The hardware kind, such as `gp1`. */
115
+ kind?: string;
116
+ /** How its vCPUs are allocated, such as `core`: dedicated and guaranteed. */
117
+ cpuAllocationMode?: string;
118
+ /** The vCPUs an instance of the type has. */
119
+ vcpu?: number;
120
+ /** The memory an instance of the type has, in MiB. */
121
+ memoryMib?: number;
122
+ /**
123
+ * The most an instance of the type reads and writes across all its
124
+ * volumes together, in megabits per second; 0 when it isn't limited.
125
+ */
126
+ storageBandwidthMbit?: number;
127
+ /**
128
+ * The rate an instance of the type can burst to above
129
+ * `storageBandwidthMbit`, in megabits per second, for 60 seconds of
130
+ * traffic at that rate, which staying under the limit refills; 0 when it
131
+ * can't burst.
132
+ */
133
+ storageBurstBandwidthMbit?: number;
134
+ /**
135
+ * Whether an instance can be launched as, or changed to, the type now. A
136
+ * type listed but not available is no longer offered; instances already
137
+ * of the type keep running.
138
+ */
139
+ available?: boolean;
140
+ }
141
+
142
+ /**
143
+ * A stable name for the current public image of an operating system
144
+ * release.
145
+ */
146
+ export interface ImageFamily {
147
+ /**
148
+ * The family's resource name, `imageFamilies/ubuntu-24-04-minimal`.
149
+ * Never renamed, and never reused for another release.
150
+ */
151
+ name?: string;
152
+ /** The name the console shows. */
153
+ displayName?: string;
154
+ /** What the family's images hold. */
155
+ description?: string;
156
+ /** Who publishes the release, such as `Canonical`. */
157
+ vendor?: string;
158
+ /** The operating system, such as `ubuntu`. */
159
+ os?: string;
160
+ /** The release, such as `24.04`. */
161
+ osVersion?: string;
162
+ /**
163
+ * When the vendor stops supporting the release; empty when no date is
164
+ * known. Advisory: launches aren't refused after it.
165
+ */
166
+ supportEndTime?: string;
167
+ /**
168
+ * Whether an instance can be launched from the family now. Instances
169
+ * launched from a family no longer offered are unaffected.
170
+ */
171
+ available?: boolean;
172
+ }
173
+
174
+ /** The request for GetInstanceType. */
175
+ export interface GetInstanceTypeRequest {
176
+ /** The type to return, `instanceTypes/{instance_type}`. */
177
+ name?: string;
178
+ }
179
+
180
+ /**
181
+ * The request for ListInstanceTypes. The catalog is small and bounded by
182
+ * the platform, so it comes in one page.
183
+ */
184
+ export interface ListInstanceTypesRequest {}
185
+
186
+ /** The response for ListInstanceTypes. */
187
+ export interface ListInstanceTypesResponse {
188
+ /** Every instance type, by kind, then by size. */
189
+ instanceTypes?: InstanceType[];
190
+ }
191
+
192
+ /** The request for GetImageFamily. */
193
+ export interface GetImageFamilyRequest {
194
+ /** The family to return, `imageFamilies/{image_family}`. */
195
+ name?: string;
196
+ }
197
+
198
+ /**
199
+ * The request for ListImageFamilies. The catalog is small and bounded by
200
+ * the platform, so it comes in one page.
201
+ */
202
+ export interface ListImageFamiliesRequest {}
203
+
204
+ /** The response for ListImageFamilies. */
205
+ export interface ListImageFamiliesResponse {
206
+ /** Every image family, by name. */
207
+ imageFamilies?: ImageFamily[];
208
+ }