@scaleway/sdk-instance 1.0.2
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/LICENSE +191 -0
- package/dist/index.gen.cjs +4 -0
- package/dist/index.gen.d.ts +5 -0
- package/dist/index.gen.js +4 -0
- package/dist/v1/api.gen.cjs +1170 -0
- package/dist/v1/api.gen.d.ts +507 -0
- package/dist/v1/api.gen.js +1170 -0
- package/dist/v1/api.utils.cjs +277 -0
- package/dist/v1/api.utils.d.ts +95 -0
- package/dist/v1/api.utils.js +277 -0
- package/dist/v1/content.gen.cjs +44 -0
- package/dist/v1/content.gen.d.ts +21 -0
- package/dist/v1/content.gen.js +44 -0
- package/dist/v1/index.cjs +15 -0
- package/dist/v1/index.d.ts +4 -0
- package/dist/v1/index.gen.d.ts +5 -0
- package/dist/v1/index.js +15 -0
- package/dist/v1/marshalling.gen.cjs +1853 -0
- package/dist/v1/marshalling.gen.d.ts +99 -0
- package/dist/v1/marshalling.gen.js +1853 -0
- package/dist/v1/types.gen.d.ts +2638 -0
- package/dist/v1/types.private.gen.d.ts +244 -0
- package/dist/v1/types.utils.d.ts +35 -0
- package/dist/v1/validation-rules.gen.d.ts +10 -0
- package/package.json +51 -0
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import type { Zone as ScwZone } from '@scaleway/sdk-client';
|
|
2
|
+
import type { Arch, BootType, Image, PlacementGroup, PrivateNIC, SecurityGroup, SecurityGroupPolicy, SecurityGroupRule, SecurityGroupRuleAction, SecurityGroupRuleDirection, SecurityGroupRuleProtocol, SecurityGroupSummary, Server, ServerAction, ServerIp, ServerIpv6, ServerLocation, ServerMaintenance, ServerState, ServerSummary, Snapshot, SnapshotBaseVolume, SnapshotState, Volume, VolumeVolumeType } from './types.gen';
|
|
3
|
+
export interface SetImageResponse {
|
|
4
|
+
image?: Image;
|
|
5
|
+
}
|
|
6
|
+
export type SetSecurityGroupRequest = {
|
|
7
|
+
/**
|
|
8
|
+
* Zone to target. If none is passed will use default zone from the config.
|
|
9
|
+
*/
|
|
10
|
+
zone?: ScwZone;
|
|
11
|
+
/**
|
|
12
|
+
* UUID of the security group.
|
|
13
|
+
*/
|
|
14
|
+
id: string;
|
|
15
|
+
/**
|
|
16
|
+
* Name of the security group.
|
|
17
|
+
*/
|
|
18
|
+
name: string;
|
|
19
|
+
/**
|
|
20
|
+
* Tags of the security group.
|
|
21
|
+
*/
|
|
22
|
+
tags?: string[];
|
|
23
|
+
/**
|
|
24
|
+
* Creation date of the security group (will be ignored).
|
|
25
|
+
*/
|
|
26
|
+
creationDate?: Date;
|
|
27
|
+
/**
|
|
28
|
+
* Modification date of the security group (will be ignored).
|
|
29
|
+
*/
|
|
30
|
+
modificationDate?: Date;
|
|
31
|
+
/**
|
|
32
|
+
* Description of the security group.
|
|
33
|
+
*/
|
|
34
|
+
description: string;
|
|
35
|
+
/**
|
|
36
|
+
* True to block SMTP on IPv4 and IPv6. This feature is read only, please open a support ticket if you need to make it configurable.
|
|
37
|
+
*/
|
|
38
|
+
enableDefaultSecurity: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Default inbound policy.
|
|
41
|
+
*/
|
|
42
|
+
inboundDefaultPolicy?: SecurityGroupPolicy;
|
|
43
|
+
/**
|
|
44
|
+
* Default outbound policy.
|
|
45
|
+
*/
|
|
46
|
+
outboundDefaultPolicy?: SecurityGroupPolicy;
|
|
47
|
+
/**
|
|
48
|
+
* Security groups Organization ID.
|
|
49
|
+
*/
|
|
50
|
+
organization?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Security group Project ID.
|
|
53
|
+
*/
|
|
54
|
+
project?: string;
|
|
55
|
+
/**
|
|
56
|
+
* @deprecated Please use project_default instead.
|
|
57
|
+
*/
|
|
58
|
+
organizationDefault?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* True use this security group for future Instances created in this project.
|
|
61
|
+
*/
|
|
62
|
+
projectDefault: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Instances attached to this security group.
|
|
65
|
+
*/
|
|
66
|
+
servers?: ServerSummary[];
|
|
67
|
+
/**
|
|
68
|
+
* True to set the security group as stateful.
|
|
69
|
+
*/
|
|
70
|
+
stateful: boolean;
|
|
71
|
+
};
|
|
72
|
+
export interface SetSecurityGroupResponse {
|
|
73
|
+
securityGroup?: SecurityGroup;
|
|
74
|
+
}
|
|
75
|
+
export type SetSecurityGroupRuleRequest = {
|
|
76
|
+
/**
|
|
77
|
+
* Zone to target. If none is passed will use default zone from the config.
|
|
78
|
+
*/
|
|
79
|
+
zone?: ScwZone;
|
|
80
|
+
securityGroupId: string;
|
|
81
|
+
securityGroupRuleId: string;
|
|
82
|
+
id: string;
|
|
83
|
+
protocol?: SecurityGroupRuleProtocol;
|
|
84
|
+
direction?: SecurityGroupRuleDirection;
|
|
85
|
+
action?: SecurityGroupRuleAction;
|
|
86
|
+
ipRange: string;
|
|
87
|
+
destPortFrom?: number;
|
|
88
|
+
destPortTo?: number;
|
|
89
|
+
position: number;
|
|
90
|
+
editable: boolean;
|
|
91
|
+
};
|
|
92
|
+
export interface SetSecurityGroupRuleResponse {
|
|
93
|
+
rule?: SecurityGroupRule;
|
|
94
|
+
}
|
|
95
|
+
export type SetServerRequest = {
|
|
96
|
+
/**
|
|
97
|
+
* Zone to target. If none is passed will use default zone from the config.
|
|
98
|
+
*/
|
|
99
|
+
zone?: ScwZone;
|
|
100
|
+
/**
|
|
101
|
+
* Instance unique ID.
|
|
102
|
+
*/
|
|
103
|
+
id: string;
|
|
104
|
+
/**
|
|
105
|
+
* Instance name.
|
|
106
|
+
*/
|
|
107
|
+
name: string;
|
|
108
|
+
/**
|
|
109
|
+
* Instance Organization ID.
|
|
110
|
+
*/
|
|
111
|
+
organization?: string;
|
|
112
|
+
/**
|
|
113
|
+
* Instance Project ID.
|
|
114
|
+
*/
|
|
115
|
+
project?: string;
|
|
116
|
+
/**
|
|
117
|
+
* Provide a list of allowed actions on the server.
|
|
118
|
+
*/
|
|
119
|
+
allowedActions?: ServerAction[];
|
|
120
|
+
/**
|
|
121
|
+
* Tags associated with the Instance.
|
|
122
|
+
*/
|
|
123
|
+
tags?: string[];
|
|
124
|
+
/**
|
|
125
|
+
* Instance commercial type (eg. GP1-M).
|
|
126
|
+
*/
|
|
127
|
+
commercialType: string;
|
|
128
|
+
/**
|
|
129
|
+
* Instance creation date.
|
|
130
|
+
*/
|
|
131
|
+
creationDate?: Date;
|
|
132
|
+
/**
|
|
133
|
+
* True if a dynamic IPv4 is required.
|
|
134
|
+
*/
|
|
135
|
+
dynamicIpRequired: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* @deprecated True to configure the instance so it uses the new routed IP mode (once this is set to True you cannot set it back to False).
|
|
138
|
+
*/
|
|
139
|
+
routedIpEnabled?: boolean;
|
|
140
|
+
/**
|
|
141
|
+
* @deprecated True if IPv6 is enabled (deprecated and always `False` when `routed_ip_enabled` is `True`).
|
|
142
|
+
*/
|
|
143
|
+
enableIpv6?: boolean;
|
|
144
|
+
/**
|
|
145
|
+
* Instance host name.
|
|
146
|
+
*/
|
|
147
|
+
hostname: string;
|
|
148
|
+
/**
|
|
149
|
+
* Provide information on the Instance image.
|
|
150
|
+
*/
|
|
151
|
+
image?: Image;
|
|
152
|
+
/**
|
|
153
|
+
* Instance protection option is activated.
|
|
154
|
+
*/
|
|
155
|
+
protected: boolean;
|
|
156
|
+
/**
|
|
157
|
+
* @deprecated Instance private IP address (deprecated and always `null` when `routed_ip_enabled` is `True`).
|
|
158
|
+
*/
|
|
159
|
+
privateIp?: string;
|
|
160
|
+
/**
|
|
161
|
+
* @deprecated Information about the public IP (deprecated in favor of `public_ips`).
|
|
162
|
+
*/
|
|
163
|
+
publicIp?: ServerIp;
|
|
164
|
+
/**
|
|
165
|
+
* Information about all the public IPs attached to the server.
|
|
166
|
+
*/
|
|
167
|
+
publicIps?: ServerIp[];
|
|
168
|
+
/**
|
|
169
|
+
* Instance modification date.
|
|
170
|
+
*/
|
|
171
|
+
modificationDate?: Date;
|
|
172
|
+
/**
|
|
173
|
+
* Instance state.
|
|
174
|
+
*/
|
|
175
|
+
state?: ServerState;
|
|
176
|
+
/**
|
|
177
|
+
* Instance location.
|
|
178
|
+
*/
|
|
179
|
+
location?: ServerLocation;
|
|
180
|
+
/**
|
|
181
|
+
* @deprecated Instance IPv6 address (deprecated when `routed_ip_enabled` is `True`).
|
|
182
|
+
*/
|
|
183
|
+
ipv6?: ServerIpv6;
|
|
184
|
+
/**
|
|
185
|
+
* Instance boot type.
|
|
186
|
+
*/
|
|
187
|
+
bootType?: BootType;
|
|
188
|
+
/**
|
|
189
|
+
* Instance volumes.
|
|
190
|
+
*/
|
|
191
|
+
volumes?: Record<string, Volume>;
|
|
192
|
+
/**
|
|
193
|
+
* Instance security group.
|
|
194
|
+
*/
|
|
195
|
+
securityGroup?: SecurityGroupSummary;
|
|
196
|
+
/**
|
|
197
|
+
* Instance planned maintenances.
|
|
198
|
+
*/
|
|
199
|
+
maintenances?: ServerMaintenance[];
|
|
200
|
+
/**
|
|
201
|
+
* Instance state_detail.
|
|
202
|
+
*/
|
|
203
|
+
stateDetail: string;
|
|
204
|
+
/**
|
|
205
|
+
* Instance architecture (refers to the CPU architecture used for the Instance, e.g. x86_64, arm64).
|
|
206
|
+
*/
|
|
207
|
+
arch?: Arch;
|
|
208
|
+
/**
|
|
209
|
+
* Instance placement group.
|
|
210
|
+
*/
|
|
211
|
+
placementGroup?: PlacementGroup;
|
|
212
|
+
/**
|
|
213
|
+
* Instance private NICs.
|
|
214
|
+
*/
|
|
215
|
+
privateNics?: PrivateNIC[];
|
|
216
|
+
/**
|
|
217
|
+
* The public_key value of this key is used to encrypt the admin password. When set to an empty string, reset this value and admin_password_encrypted_value to an empty string so a new password may be generated.
|
|
218
|
+
*/
|
|
219
|
+
adminPasswordEncryptionSshKeyId?: string;
|
|
220
|
+
};
|
|
221
|
+
export interface SetServerResponse {
|
|
222
|
+
server?: Server;
|
|
223
|
+
}
|
|
224
|
+
export type SetSnapshotRequest = {
|
|
225
|
+
/**
|
|
226
|
+
* Zone to target. If none is passed will use default zone from the config.
|
|
227
|
+
*/
|
|
228
|
+
zone?: ScwZone;
|
|
229
|
+
snapshotId: string;
|
|
230
|
+
id: string;
|
|
231
|
+
name: string;
|
|
232
|
+
organization?: string;
|
|
233
|
+
volumeType?: VolumeVolumeType;
|
|
234
|
+
size: number;
|
|
235
|
+
state?: SnapshotState;
|
|
236
|
+
baseVolume?: SnapshotBaseVolume;
|
|
237
|
+
creationDate?: Date;
|
|
238
|
+
modificationDate?: Date;
|
|
239
|
+
project?: string;
|
|
240
|
+
tags?: string[];
|
|
241
|
+
};
|
|
242
|
+
export interface SetSnapshotResponse {
|
|
243
|
+
snapshot?: Snapshot;
|
|
244
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Zone } from '@scaleway/sdk-client';
|
|
2
|
+
import type { Server } from './types.gen';
|
|
3
|
+
export interface AttachVolumeRequest {
|
|
4
|
+
zone?: Zone;
|
|
5
|
+
serverId: string;
|
|
6
|
+
volumeId: string;
|
|
7
|
+
}
|
|
8
|
+
/** Contains the updated server after attaching a volume. */
|
|
9
|
+
export interface AttachVolumeResponse {
|
|
10
|
+
server?: Server;
|
|
11
|
+
}
|
|
12
|
+
export interface DetachVolumeRequest {
|
|
13
|
+
zone?: Zone;
|
|
14
|
+
volumeId: string;
|
|
15
|
+
}
|
|
16
|
+
/** Contains the updated server after detaching a volume. */
|
|
17
|
+
export interface DetachVolumeResponse {
|
|
18
|
+
server?: Server;
|
|
19
|
+
}
|
|
20
|
+
export interface GetServerUserDataRequest {
|
|
21
|
+
/** Zone to target. If none is passed will use default zone from the config */
|
|
22
|
+
zone?: Zone;
|
|
23
|
+
serverId: string;
|
|
24
|
+
/** The user data key to get */
|
|
25
|
+
key: string;
|
|
26
|
+
}
|
|
27
|
+
export interface SetServerUserDataRequest {
|
|
28
|
+
/** Zone to target. If none is passed will use default zone from the config */
|
|
29
|
+
zone?: Zone;
|
|
30
|
+
serverId: string;
|
|
31
|
+
/** The user data key to set */
|
|
32
|
+
key: string;
|
|
33
|
+
/** The data encoded in base64 */
|
|
34
|
+
content: string;
|
|
35
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@scaleway/sdk-instance",
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "Scaleway SDK instance",
|
|
5
|
+
"types": "dist/index.d.ts",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"type": "module",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.gen.d.ts",
|
|
13
|
+
"import": "./dist/index.gen.js",
|
|
14
|
+
"require": "./dist/index.gen.cjs",
|
|
15
|
+
"default": "./dist/index.gen.js"
|
|
16
|
+
},
|
|
17
|
+
"./*": {
|
|
18
|
+
"types": "./dist/*/index.gen.d.ts",
|
|
19
|
+
"import": "./dist/*/index.gen.js",
|
|
20
|
+
"require": "./dist/*/index.gen.cjs",
|
|
21
|
+
"default": "./dist/*/index.gen.js"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"directory": "packages_generated/instance"
|
|
27
|
+
},
|
|
28
|
+
"engines": {
|
|
29
|
+
"node": ">=20.18.3"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@scaleway/random-name": "5.1.1",
|
|
33
|
+
"@scaleway/sdk-std": "1.0.1"
|
|
34
|
+
},
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"@scaleway/sdk-client": "^1.2.1"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@scaleway/sdk-client": "^1.2.1"
|
|
40
|
+
},
|
|
41
|
+
"bundledDependencies": [
|
|
42
|
+
"@scaleway/random-name"
|
|
43
|
+
],
|
|
44
|
+
"scripts": {
|
|
45
|
+
"package:check": "pnpm publint",
|
|
46
|
+
"typecheck": "tsc --noEmit",
|
|
47
|
+
"type:generate": "tsc --declaration -p tsconfig.build.json",
|
|
48
|
+
"build": "vite build --config vite.config.ts && pnpm run type:generate",
|
|
49
|
+
"build:profile": "npx vite-bundle-visualizer -c vite.config.ts"
|
|
50
|
+
}
|
|
51
|
+
}
|