@nirvana-labs/nirvana 1.1.2 → 1.3.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.
- package/CHANGELOG.md +30 -0
- package/README.md +7 -12
- package/package.json +1 -1
- package/resources/compute/compute.d.mts +2 -2
- package/resources/compute/compute.d.mts.map +1 -1
- package/resources/compute/compute.d.ts +2 -2
- package/resources/compute/compute.d.ts.map +1 -1
- package/resources/compute/compute.js +2 -2
- package/resources/compute/compute.js.map +1 -1
- package/resources/compute/compute.mjs +2 -2
- package/resources/compute/compute.mjs.map +1 -1
- package/resources/compute/index.d.mts +1 -1
- package/resources/compute/index.d.ts +1 -1
- package/resources/compute/index.js +2 -2
- package/resources/compute/index.js.map +1 -1
- package/resources/compute/index.mjs +1 -1
- package/resources/compute/vms/availability.d.mts +130 -0
- package/resources/compute/vms/availability.d.mts.map +1 -0
- package/resources/compute/vms/availability.d.ts +130 -0
- package/resources/compute/vms/availability.d.ts.map +1 -0
- package/resources/compute/vms/availability.js +56 -0
- package/resources/compute/vms/availability.js.map +1 -0
- package/resources/compute/vms/availability.mjs +52 -0
- package/resources/compute/vms/availability.mjs.map +1 -0
- package/resources/compute/vms/index.d.mts +1 -0
- package/resources/compute/vms/index.d.mts.map +1 -1
- package/resources/compute/vms/index.d.ts +1 -0
- package/resources/compute/vms/index.d.ts.map +1 -1
- package/resources/compute/vms/index.js +3 -1
- package/resources/compute/vms/index.js.map +1 -1
- package/resources/compute/vms/index.mjs +1 -0
- package/resources/compute/vms/index.mjs.map +1 -1
- package/resources/compute/vms/vms.d.mts +5 -1
- package/resources/compute/vms/vms.d.mts.map +1 -1
- package/resources/compute/vms/vms.d.ts +5 -1
- package/resources/compute/vms/vms.d.ts.map +1 -1
- package/resources/compute/vms/vms.js +5 -1
- package/resources/compute/vms/vms.js.map +1 -1
- package/resources/compute/vms/vms.mjs +5 -1
- package/resources/compute/vms/vms.mjs.map +1 -1
- package/resources/compute/vms/volumes.d.mts +1 -1
- package/resources/compute/vms/volumes.d.ts +1 -1
- package/resources/compute/volumes/availability.d.mts +61 -0
- package/resources/compute/volumes/availability.d.mts.map +1 -0
- package/resources/compute/volumes/availability.d.ts +61 -0
- package/resources/compute/volumes/availability.d.ts.map +1 -0
- package/resources/compute/volumes/availability.js +49 -0
- package/resources/compute/volumes/availability.js.map +1 -0
- package/resources/compute/volumes/availability.mjs +45 -0
- package/resources/compute/volumes/availability.mjs.map +1 -0
- package/resources/compute/volumes/index.d.mts +3 -0
- package/resources/compute/volumes/index.d.mts.map +1 -0
- package/resources/compute/volumes/index.d.ts +3 -0
- package/resources/compute/volumes/index.d.ts.map +1 -0
- package/resources/compute/volumes/index.js +9 -0
- package/resources/compute/volumes/index.js.map +1 -0
- package/resources/compute/volumes/index.mjs +4 -0
- package/resources/compute/volumes/index.mjs.map +1 -0
- package/resources/compute/volumes/volumes.d.mts +150 -0
- package/resources/compute/volumes/volumes.d.mts.map +1 -0
- package/resources/compute/volumes/volumes.d.ts +150 -0
- package/resources/compute/volumes/volumes.d.ts.map +1 -0
- package/resources/compute/volumes/volumes.js +83 -0
- package/resources/compute/volumes/volumes.js.map +1 -0
- package/resources/compute/volumes/volumes.mjs +78 -0
- package/resources/compute/volumes/volumes.mjs.map +1 -0
- package/resources/compute/volumes.d.mts +1 -145
- package/resources/compute/volumes.d.mts.map +1 -1
- package/resources/compute/volumes.d.ts +1 -145
- package/resources/compute/volumes.d.ts.map +1 -1
- package/resources/compute/volumes.js +2 -71
- package/resources/compute/volumes.js.map +1 -1
- package/resources/compute/volumes.mjs +1 -69
- package/resources/compute/volumes.mjs.map +1 -1
- package/resources/networking/index.d.mts +1 -1
- package/resources/networking/index.d.ts +1 -1
- package/resources/networking/index.js +2 -2
- package/resources/networking/index.js.map +1 -1
- package/resources/networking/index.mjs +1 -1
- package/resources/networking/networking.d.mts +2 -2
- package/resources/networking/networking.d.ts +2 -2
- package/resources/networking/networking.js +2 -2
- package/resources/networking/networking.js.map +1 -1
- package/resources/networking/networking.mjs +2 -2
- package/resources/networking/vpcs/availability.d.mts +62 -0
- package/resources/networking/vpcs/availability.d.mts.map +1 -0
- package/resources/networking/vpcs/availability.d.ts +62 -0
- package/resources/networking/vpcs/availability.d.ts.map +1 -0
- package/resources/networking/vpcs/availability.js +40 -0
- package/resources/networking/vpcs/availability.js.map +1 -0
- package/resources/networking/vpcs/availability.mjs +36 -0
- package/resources/networking/vpcs/availability.mjs.map +1 -0
- package/resources/networking/vpcs/index.d.mts +3 -0
- package/resources/networking/vpcs/index.d.mts.map +1 -0
- package/resources/networking/vpcs/index.d.ts +3 -0
- package/resources/networking/vpcs/index.d.ts.map +1 -0
- package/resources/networking/vpcs/index.js +9 -0
- package/resources/networking/vpcs/index.js.map +1 -0
- package/resources/networking/vpcs/index.mjs +4 -0
- package/resources/networking/vpcs/index.mjs.map +1 -0
- package/resources/networking/vpcs/vpcs.d.mts +157 -0
- package/resources/networking/vpcs/vpcs.d.mts.map +1 -0
- package/resources/networking/vpcs/vpcs.d.ts +157 -0
- package/resources/networking/vpcs/vpcs.d.ts.map +1 -0
- package/resources/networking/vpcs/vpcs.js +81 -0
- package/resources/networking/vpcs/vpcs.js.map +1 -0
- package/resources/networking/vpcs/vpcs.mjs +76 -0
- package/resources/networking/vpcs/vpcs.mjs.map +1 -0
- package/resources/networking/vpcs.d.mts +1 -152
- package/resources/networking/vpcs.d.mts.map +1 -1
- package/resources/networking/vpcs.d.ts +1 -152
- package/resources/networking/vpcs.d.ts.map +1 -1
- package/resources/networking/vpcs.js +2 -69
- package/resources/networking/vpcs.js.map +1 -1
- package/resources/networking/vpcs.mjs +1 -67
- package/resources/networking/vpcs.mjs.map +1 -1
- package/src/resources/compute/compute.ts +10 -10
- package/src/resources/compute/index.ts +1 -1
- package/src/resources/compute/vms/availability.ts +172 -0
- package/src/resources/compute/vms/index.ts +7 -0
- package/src/resources/compute/vms/vms.ts +19 -1
- package/src/resources/compute/vms/volumes.ts +1 -1
- package/src/resources/compute/volumes/availability.ts +91 -0
- package/src/resources/compute/volumes/index.ts +18 -0
- package/src/resources/compute/volumes/volumes.ts +213 -0
- package/src/resources/compute/volumes.ts +1 -191
- package/src/resources/networking/index.ts +1 -1
- package/src/resources/networking/networking.ts +2 -2
- package/src/resources/networking/vpcs/availability.ts +83 -0
- package/src/resources/networking/vpcs/index.ts +17 -0
- package/src/resources/networking/vpcs/vpcs.ts +220 -0
- package/src/resources/networking/vpcs.ts +1 -198
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,153 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import * as OperationsAPI from "../operations.js";
|
|
3
|
-
import * as Shared from "../shared.js";
|
|
4
|
-
import { APIPromise } from "../../core/api-promise.js";
|
|
5
|
-
import { RequestOptions } from "../../internal/request-options.js";
|
|
6
|
-
export declare class VPCs extends APIResource {
|
|
7
|
-
/**
|
|
8
|
-
* Create a VPC
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```ts
|
|
12
|
-
* const operation = await client.networking.vpcs.create({
|
|
13
|
-
* name: 'my-vpc',
|
|
14
|
-
* region: 'us-wdc-1',
|
|
15
|
-
* subnet_name: 'my-subnet',
|
|
16
|
-
* });
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
create(body: VPCCreateParams, options?: RequestOptions): APIPromise<OperationsAPI.Operation>;
|
|
20
|
-
/**
|
|
21
|
-
* Update a VPC
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* ```ts
|
|
25
|
-
* const operation = await client.networking.vpcs.update(
|
|
26
|
-
* 'vpc_id',
|
|
27
|
-
* );
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
|
-
update(vpcID: string, body: VPCUpdateParams, options?: RequestOptions): APIPromise<OperationsAPI.Operation>;
|
|
31
|
-
/**
|
|
32
|
-
* List all VPCs
|
|
33
|
-
*
|
|
34
|
-
* @example
|
|
35
|
-
* ```ts
|
|
36
|
-
* const vpcList = await client.networking.vpcs.list();
|
|
37
|
-
* ```
|
|
38
|
-
*/
|
|
39
|
-
list(options?: RequestOptions): APIPromise<VPCList>;
|
|
40
|
-
/**
|
|
41
|
-
* Delete a VPC
|
|
42
|
-
*
|
|
43
|
-
* @example
|
|
44
|
-
* ```ts
|
|
45
|
-
* const operation = await client.networking.vpcs.delete(
|
|
46
|
-
* 'vpc_id',
|
|
47
|
-
* );
|
|
48
|
-
* ```
|
|
49
|
-
*/
|
|
50
|
-
delete(vpcID: string, options?: RequestOptions): APIPromise<OperationsAPI.Operation>;
|
|
51
|
-
/**
|
|
52
|
-
* Get details about a VPC
|
|
53
|
-
*
|
|
54
|
-
* @example
|
|
55
|
-
* ```ts
|
|
56
|
-
* const vpc = await client.networking.vpcs.get('vpc_id');
|
|
57
|
-
* ```
|
|
58
|
-
*/
|
|
59
|
-
get(vpcID: string, options?: RequestOptions): APIPromise<VPC>;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Subnet of the VPC.
|
|
63
|
-
*/
|
|
64
|
-
export interface Subnet {
|
|
65
|
-
/**
|
|
66
|
-
* Unique identifier for the subnet.
|
|
67
|
-
*/
|
|
68
|
-
id: string;
|
|
69
|
-
/**
|
|
70
|
-
* CIDR block for the subnet.
|
|
71
|
-
*/
|
|
72
|
-
cidr: string;
|
|
73
|
-
/**
|
|
74
|
-
* When the subnet was created.
|
|
75
|
-
*/
|
|
76
|
-
created_at: string;
|
|
77
|
-
/**
|
|
78
|
-
* Name of the subnet.
|
|
79
|
-
*/
|
|
80
|
-
name: string;
|
|
81
|
-
/**
|
|
82
|
-
* When the subnet was updated.
|
|
83
|
-
*/
|
|
84
|
-
updated_at: string;
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* VPC details.
|
|
88
|
-
*/
|
|
89
|
-
export interface VPC {
|
|
90
|
-
/**
|
|
91
|
-
* Unique identifier for the VPC.
|
|
92
|
-
*/
|
|
93
|
-
id: string;
|
|
94
|
-
/**
|
|
95
|
-
* When the VPC was created.
|
|
96
|
-
*/
|
|
97
|
-
created_at: string;
|
|
98
|
-
/**
|
|
99
|
-
* IDs of the firewall rules associated with the VPC.
|
|
100
|
-
*/
|
|
101
|
-
firewall_rule_ids: Array<string>;
|
|
102
|
-
/**
|
|
103
|
-
* Name of the VPC.
|
|
104
|
-
*/
|
|
105
|
-
name: string;
|
|
106
|
-
/**
|
|
107
|
-
* Region the resource is in.
|
|
108
|
-
*/
|
|
109
|
-
region: Shared.RegionName;
|
|
110
|
-
/**
|
|
111
|
-
* Status of the resource.
|
|
112
|
-
*/
|
|
113
|
-
status: Shared.ResourceStatus;
|
|
114
|
-
/**
|
|
115
|
-
* Subnet of the VPC.
|
|
116
|
-
*/
|
|
117
|
-
subnet: Subnet;
|
|
118
|
-
/**
|
|
119
|
-
* When the VPC was updated.
|
|
120
|
-
*/
|
|
121
|
-
updated_at: string;
|
|
122
|
-
}
|
|
123
|
-
export interface VPCList {
|
|
124
|
-
items: Array<VPC>;
|
|
125
|
-
}
|
|
126
|
-
export interface VPCCreateParams {
|
|
127
|
-
/**
|
|
128
|
-
* Name of the VPC.
|
|
129
|
-
*/
|
|
130
|
-
name: string;
|
|
131
|
-
/**
|
|
132
|
-
* Region the resource is in.
|
|
133
|
-
*/
|
|
134
|
-
region: Shared.RegionName;
|
|
135
|
-
/**
|
|
136
|
-
* Name of the subnet to create.
|
|
137
|
-
*/
|
|
138
|
-
subnet_name: string;
|
|
139
|
-
}
|
|
140
|
-
export interface VPCUpdateParams {
|
|
141
|
-
/**
|
|
142
|
-
* Name of the VPC.
|
|
143
|
-
*/
|
|
144
|
-
name?: string;
|
|
145
|
-
/**
|
|
146
|
-
* Name of the subnet to create.
|
|
147
|
-
*/
|
|
148
|
-
subnet_name?: string;
|
|
149
|
-
}
|
|
150
|
-
export declare namespace VPCs {
|
|
151
|
-
export { type Subnet as Subnet, type VPC as VPC, type VPCList as VPCList, type VPCCreateParams as VPCCreateParams, type VPCUpdateParams as VPCUpdateParams, };
|
|
152
|
-
}
|
|
1
|
+
export * from "./vpcs/index.js";
|
|
153
2
|
//# sourceMappingURL=vpcs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vpcs.d.ts","sourceRoot":"","sources":["../../src/resources/networking/vpcs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vpcs.d.ts","sourceRoot":"","sources":["../../src/resources/networking/vpcs.ts"],"names":[],"mappings":""}
|
|
@@ -1,73 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const path_1 = require("../../internal/utils/path.js");
|
|
7
|
-
class VPCs extends resource_1.APIResource {
|
|
8
|
-
/**
|
|
9
|
-
* Create a VPC
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```ts
|
|
13
|
-
* const operation = await client.networking.vpcs.create({
|
|
14
|
-
* name: 'my-vpc',
|
|
15
|
-
* region: 'us-wdc-1',
|
|
16
|
-
* subnet_name: 'my-subnet',
|
|
17
|
-
* });
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
create(body, options) {
|
|
21
|
-
return this._client.post('/v1/networking/vpcs', { body, ...options });
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Update a VPC
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* ```ts
|
|
28
|
-
* const operation = await client.networking.vpcs.update(
|
|
29
|
-
* 'vpc_id',
|
|
30
|
-
* );
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
update(vpcID, body, options) {
|
|
34
|
-
return this._client.patch((0, path_1.path) `/v1/networking/vpcs/${vpcID}`, { body, ...options });
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* List all VPCs
|
|
38
|
-
*
|
|
39
|
-
* @example
|
|
40
|
-
* ```ts
|
|
41
|
-
* const vpcList = await client.networking.vpcs.list();
|
|
42
|
-
* ```
|
|
43
|
-
*/
|
|
44
|
-
list(options) {
|
|
45
|
-
return this._client.get('/v1/networking/vpcs', options);
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Delete a VPC
|
|
49
|
-
*
|
|
50
|
-
* @example
|
|
51
|
-
* ```ts
|
|
52
|
-
* const operation = await client.networking.vpcs.delete(
|
|
53
|
-
* 'vpc_id',
|
|
54
|
-
* );
|
|
55
|
-
* ```
|
|
56
|
-
*/
|
|
57
|
-
delete(vpcID, options) {
|
|
58
|
-
return this._client.delete((0, path_1.path) `/v1/networking/vpcs/${vpcID}`, options);
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Get details about a VPC
|
|
62
|
-
*
|
|
63
|
-
* @example
|
|
64
|
-
* ```ts
|
|
65
|
-
* const vpc = await client.networking.vpcs.get('vpc_id');
|
|
66
|
-
* ```
|
|
67
|
-
*/
|
|
68
|
-
get(vpcID, options) {
|
|
69
|
-
return this._client.get((0, path_1.path) `/v1/networking/vpcs/${vpcID}`, options);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
exports.VPCs = VPCs;
|
|
4
|
+
const tslib_1 = require("../../internal/tslib.js");
|
|
5
|
+
tslib_1.__exportStar(require("./vpcs/index.js"), exports);
|
|
73
6
|
//# sourceMappingURL=vpcs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vpcs.js","sourceRoot":"","sources":["../../src/resources/networking/vpcs.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"vpcs.js","sourceRoot":"","sources":["../../src/resources/networking/vpcs.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,0DAA6B"}
|
|
@@ -1,69 +1,3 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { path } from "../../internal/utils/path.mjs";
|
|
4
|
-
export class VPCs extends APIResource {
|
|
5
|
-
/**
|
|
6
|
-
* Create a VPC
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```ts
|
|
10
|
-
* const operation = await client.networking.vpcs.create({
|
|
11
|
-
* name: 'my-vpc',
|
|
12
|
-
* region: 'us-wdc-1',
|
|
13
|
-
* subnet_name: 'my-subnet',
|
|
14
|
-
* });
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
create(body, options) {
|
|
18
|
-
return this._client.post('/v1/networking/vpcs', { body, ...options });
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Update a VPC
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* ```ts
|
|
25
|
-
* const operation = await client.networking.vpcs.update(
|
|
26
|
-
* 'vpc_id',
|
|
27
|
-
* );
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
|
-
update(vpcID, body, options) {
|
|
31
|
-
return this._client.patch(path `/v1/networking/vpcs/${vpcID}`, { body, ...options });
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* List all VPCs
|
|
35
|
-
*
|
|
36
|
-
* @example
|
|
37
|
-
* ```ts
|
|
38
|
-
* const vpcList = await client.networking.vpcs.list();
|
|
39
|
-
* ```
|
|
40
|
-
*/
|
|
41
|
-
list(options) {
|
|
42
|
-
return this._client.get('/v1/networking/vpcs', options);
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Delete a VPC
|
|
46
|
-
*
|
|
47
|
-
* @example
|
|
48
|
-
* ```ts
|
|
49
|
-
* const operation = await client.networking.vpcs.delete(
|
|
50
|
-
* 'vpc_id',
|
|
51
|
-
* );
|
|
52
|
-
* ```
|
|
53
|
-
*/
|
|
54
|
-
delete(vpcID, options) {
|
|
55
|
-
return this._client.delete(path `/v1/networking/vpcs/${vpcID}`, options);
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Get details about a VPC
|
|
59
|
-
*
|
|
60
|
-
* @example
|
|
61
|
-
* ```ts
|
|
62
|
-
* const vpc = await client.networking.vpcs.get('vpc_id');
|
|
63
|
-
* ```
|
|
64
|
-
*/
|
|
65
|
-
get(vpcID, options) {
|
|
66
|
-
return this._client.get(path `/v1/networking/vpcs/${vpcID}`, options);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
2
|
+
export * from "./vpcs/index.mjs";
|
|
69
3
|
//# sourceMappingURL=vpcs.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vpcs.mjs","sourceRoot":"","sources":["../../src/resources/networking/vpcs.ts"],"names":[],"mappings":"AAAA,sFAAsF
|
|
1
|
+
{"version":3,"file":"vpcs.mjs","sourceRoot":"","sources":["../../src/resources/networking/vpcs.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
|
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
|
-
import * as VolumesAPI from './volumes';
|
|
5
|
-
import {
|
|
6
|
-
StorageType,
|
|
7
|
-
Volume,
|
|
8
|
-
VolumeCreateParams,
|
|
9
|
-
VolumeKind,
|
|
10
|
-
VolumeList,
|
|
11
|
-
VolumeUpdateParams,
|
|
12
|
-
Volumes,
|
|
13
|
-
} from './volumes';
|
|
14
4
|
import * as VMsAPI from './vms/vms';
|
|
15
5
|
import {
|
|
16
6
|
CPUConfig,
|
|
@@ -23,6 +13,16 @@ import {
|
|
|
23
13
|
VMUpdateParams,
|
|
24
14
|
VMs,
|
|
25
15
|
} from './vms/vms';
|
|
16
|
+
import * as VolumesAPI from './volumes/volumes';
|
|
17
|
+
import {
|
|
18
|
+
StorageType,
|
|
19
|
+
Volume,
|
|
20
|
+
VolumeCreateParams,
|
|
21
|
+
VolumeKind,
|
|
22
|
+
VolumeList,
|
|
23
|
+
VolumeUpdateParams,
|
|
24
|
+
Volumes,
|
|
25
|
+
} from './volumes/volumes';
|
|
26
26
|
|
|
27
27
|
export class Compute extends APIResource {
|
|
28
28
|
vms: VMsAPI.VMs = new VMsAPI.VMs(this._client);
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import * as Shared from '../../shared';
|
|
5
|
+
import * as VMsAPI from './vms';
|
|
6
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
7
|
+
import { buildHeaders } from '../../../internal/headers';
|
|
8
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
9
|
+
import { path } from '../../../internal/utils/path';
|
|
10
|
+
|
|
11
|
+
export class Availability extends APIResource {
|
|
12
|
+
/**
|
|
13
|
+
* Check VM Create Availability
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* const availability =
|
|
18
|
+
* await client.compute.vms.availability.create({
|
|
19
|
+
* boot_volume: { size: 100 },
|
|
20
|
+
* cpu_config: { vcpu: 2 },
|
|
21
|
+
* memory_config: { size: 2 },
|
|
22
|
+
* name: 'my-vm',
|
|
23
|
+
* os_image_name: 'ubuntu-noble-2025-04-03',
|
|
24
|
+
* public_ip_enabled: true,
|
|
25
|
+
* region: 'us-wdc-1',
|
|
26
|
+
* ssh_key: {
|
|
27
|
+
* public_key:
|
|
28
|
+
* 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',
|
|
29
|
+
* },
|
|
30
|
+
* subnet_id: '123e4567-e89b-12d3-a456-426614174000',
|
|
31
|
+
* });
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
create(body: AvailabilityCreateParams, options?: RequestOptions): APIPromise<string> {
|
|
35
|
+
return this._client.post('/v1/compute/vms/availability', {
|
|
36
|
+
body,
|
|
37
|
+
...options,
|
|
38
|
+
headers: buildHeaders([{ Accept: 'text/plain' }, options?.headers]),
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check VM Update Availability
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* const availability =
|
|
48
|
+
* await client.compute.vms.availability.update('vm_id');
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
update(vmID: string, body: AvailabilityUpdateParams, options?: RequestOptions): APIPromise<string> {
|
|
52
|
+
return this._client.patch(path`/v1/compute/vms/${vmID}/availability`, {
|
|
53
|
+
body,
|
|
54
|
+
...options,
|
|
55
|
+
headers: buildHeaders([{ Accept: 'text/plain' }, options?.headers]),
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export type AvailabilityCreateResponse = string;
|
|
61
|
+
|
|
62
|
+
export type AvailabilityUpdateResponse = string;
|
|
63
|
+
|
|
64
|
+
export interface AvailabilityCreateParams {
|
|
65
|
+
/**
|
|
66
|
+
* Boot volume for the VM.
|
|
67
|
+
*/
|
|
68
|
+
boot_volume: AvailabilityCreateParams.BootVolume;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* CPU configuration for the VM.
|
|
72
|
+
*/
|
|
73
|
+
cpu_config: VMsAPI.CPUConfig;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Memory configuration for the VM.
|
|
77
|
+
*/
|
|
78
|
+
memory_config: VMsAPI.MemoryConfig;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Name of the VM.
|
|
82
|
+
*/
|
|
83
|
+
name: string;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Name of the OS Image to use for the VM.
|
|
87
|
+
*/
|
|
88
|
+
os_image_name: string;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Whether to enable public IP for the VM.
|
|
92
|
+
*/
|
|
93
|
+
public_ip_enabled: boolean;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Region the resource is in.
|
|
97
|
+
*/
|
|
98
|
+
region: Shared.RegionName;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Public SSH key configuration for the VM.
|
|
102
|
+
*/
|
|
103
|
+
ssh_key: VMsAPI.SSHKey;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* ID of the subnet to use for the VM.
|
|
107
|
+
*/
|
|
108
|
+
subnet_id: string;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Data volumes for the VM.
|
|
112
|
+
*/
|
|
113
|
+
data_volumes?: Array<AvailabilityCreateParams.DataVolume>;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export namespace AvailabilityCreateParams {
|
|
117
|
+
/**
|
|
118
|
+
* Boot volume for the VM.
|
|
119
|
+
*/
|
|
120
|
+
export interface BootVolume {
|
|
121
|
+
/**
|
|
122
|
+
* Size of the volume in GB.
|
|
123
|
+
*/
|
|
124
|
+
size: number;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* VM data volume create request.
|
|
129
|
+
*/
|
|
130
|
+
export interface DataVolume {
|
|
131
|
+
/**
|
|
132
|
+
* Name of the volume.
|
|
133
|
+
*/
|
|
134
|
+
name: string;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Size of the volume in GB.
|
|
138
|
+
*/
|
|
139
|
+
size: number;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export interface AvailabilityUpdateParams {
|
|
144
|
+
/**
|
|
145
|
+
* CPU configuration for the VM.
|
|
146
|
+
*/
|
|
147
|
+
cpu_config?: VMsAPI.CPUConfig;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Memory configuration for the VM.
|
|
151
|
+
*/
|
|
152
|
+
memory_config?: VMsAPI.MemoryConfig;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Name of the VM.
|
|
156
|
+
*/
|
|
157
|
+
name?: string;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Whether to enable public IP for the VM.
|
|
161
|
+
*/
|
|
162
|
+
public_ip_enabled?: boolean;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export declare namespace Availability {
|
|
166
|
+
export {
|
|
167
|
+
type AvailabilityCreateResponse as AvailabilityCreateResponse,
|
|
168
|
+
type AvailabilityUpdateResponse as AvailabilityUpdateResponse,
|
|
169
|
+
type AvailabilityCreateParams as AvailabilityCreateParams,
|
|
170
|
+
type AvailabilityUpdateParams as AvailabilityUpdateParams,
|
|
171
|
+
};
|
|
172
|
+
}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
export {
|
|
4
|
+
Availability,
|
|
5
|
+
type AvailabilityCreateResponse,
|
|
6
|
+
type AvailabilityUpdateResponse,
|
|
7
|
+
type AvailabilityCreateParams,
|
|
8
|
+
type AvailabilityUpdateParams,
|
|
9
|
+
} from './availability';
|
|
3
10
|
export { OSImages, type OSImageListResponse } from './os-images';
|
|
4
11
|
export {
|
|
5
12
|
VMs,
|
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
import { APIResource } from '../../../core/resource';
|
|
4
4
|
import * as OperationsAPI from '../../operations';
|
|
5
5
|
import * as Shared from '../../shared';
|
|
6
|
+
import * as AvailabilityAPI from './availability';
|
|
7
|
+
import {
|
|
8
|
+
Availability,
|
|
9
|
+
AvailabilityCreateParams,
|
|
10
|
+
AvailabilityCreateResponse,
|
|
11
|
+
AvailabilityUpdateParams,
|
|
12
|
+
AvailabilityUpdateResponse,
|
|
13
|
+
} from './availability';
|
|
6
14
|
import * as OSImagesAPI from './os-images';
|
|
7
15
|
import { OSImageListResponse, OSImages } from './os-images';
|
|
8
16
|
import * as VolumesAPI from './volumes';
|
|
@@ -12,6 +20,7 @@ import { RequestOptions } from '../../../internal/request-options';
|
|
|
12
20
|
import { path } from '../../../internal/utils/path';
|
|
13
21
|
|
|
14
22
|
export class VMs extends APIResource {
|
|
23
|
+
availability: AvailabilityAPI.Availability = new AvailabilityAPI.Availability(this._client);
|
|
15
24
|
volumes: VolumesAPI.Volumes = new VolumesAPI.Volumes(this._client);
|
|
16
25
|
osImages: OSImagesAPI.OSImages = new OSImagesAPI.OSImages(this._client);
|
|
17
26
|
|
|
@@ -30,7 +39,7 @@ export class VMs extends APIResource {
|
|
|
30
39
|
* region: 'us-wdc-1',
|
|
31
40
|
* ssh_key: {
|
|
32
41
|
* public_key:
|
|
33
|
-
* 'ssh-
|
|
42
|
+
* 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',
|
|
34
43
|
* },
|
|
35
44
|
* subnet_id: '123e4567-e89b-12d3-a456-426614174000',
|
|
36
45
|
* });
|
|
@@ -324,6 +333,7 @@ export interface VMUpdateParams {
|
|
|
324
333
|
public_ip_enabled?: boolean;
|
|
325
334
|
}
|
|
326
335
|
|
|
336
|
+
VMs.Availability = Availability;
|
|
327
337
|
VMs.Volumes = Volumes;
|
|
328
338
|
VMs.OSImages = OSImages;
|
|
329
339
|
|
|
@@ -339,6 +349,14 @@ export declare namespace VMs {
|
|
|
339
349
|
type VMUpdateParams as VMUpdateParams,
|
|
340
350
|
};
|
|
341
351
|
|
|
352
|
+
export {
|
|
353
|
+
Availability as Availability,
|
|
354
|
+
type AvailabilityCreateResponse as AvailabilityCreateResponse,
|
|
355
|
+
type AvailabilityUpdateResponse as AvailabilityUpdateResponse,
|
|
356
|
+
type AvailabilityCreateParams as AvailabilityCreateParams,
|
|
357
|
+
type AvailabilityUpdateParams as AvailabilityUpdateParams,
|
|
358
|
+
};
|
|
359
|
+
|
|
342
360
|
export { Volumes as Volumes };
|
|
343
361
|
|
|
344
362
|
export { OSImages as OSImages, type OSImageListResponse as OSImageListResponse };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../../core/resource';
|
|
4
|
-
import * as VolumesAPI from '../volumes';
|
|
4
|
+
import * as VolumesAPI from '../volumes/volumes';
|
|
5
5
|
import { APIPromise } from '../../../core/api-promise';
|
|
6
6
|
import { RequestOptions } from '../../../internal/request-options';
|
|
7
7
|
import { path } from '../../../internal/utils/path';
|