@scaleway/sdk 1.14.0 → 1.16.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/dist/api/account/v2/api.gen.js +77 -60
- package/dist/api/applesilicon/v1alpha1/api.gen.js +174 -152
- package/dist/api/baremetal/v1/api.gen.js +434 -378
- package/dist/api/baremetal/v1/api.utils.js +19 -22
- package/dist/api/billing/v2alpha1/api.gen.js +21 -17
- package/dist/api/cockpit/v1beta1/api.gen.js +308 -232
- package/dist/api/container/v1beta1/api.gen.js +384 -337
- package/dist/api/domain/v2beta1/api.gen.js +754 -668
- package/dist/api/flexibleip/v1alpha1/api.gen.js +164 -151
- package/dist/api/function/v1beta1/api.gen.js +467 -407
- package/dist/api/iam/v1alpha1/api.gen.js +641 -557
- package/dist/api/instance/v1/api.gen.js +803 -677
- package/dist/api/instance/v1/api.utils.js +337 -325
- package/dist/api/instance/v1/content.gen.js +4 -1
- package/dist/api/instance/v1/index.js +1 -1
- package/dist/api/instance/v1/marshalling.gen.js +27 -4
- package/dist/api/iot/v1/api.gen.js +508 -452
- package/dist/api/ipfs/index.js +2 -0
- package/dist/api/ipfs/v1alpha1/api.gen.js +197 -0
- package/dist/api/ipfs/v1alpha1/content.gen.js +7 -0
- package/dist/api/ipfs/v1alpha1/index.gen.js +5 -0
- package/dist/api/ipfs/v1alpha1/marshalling.gen.js +125 -0
- package/dist/api/k8s/v1/api.gen.js +403 -342
- package/dist/api/k8s/v1/api.utils.js +7 -10
- package/dist/api/k8s/v1/marshalling.gen.js +19 -1
- package/dist/api/k8s/v1/validation-rules.gen.js +10 -1
- package/dist/api/lb/v1/api.gen.js +1501 -1363
- package/dist/api/lb/v1/api.utils.js +71 -75
- package/dist/api/lb/v1/marshalling.gen.js +6 -0
- package/dist/api/marketplace/v1/api.gen.js +35 -32
- package/dist/api/marketplace/v2/api.gen.js +117 -102
- package/dist/api/mnq/v1alpha1/api.gen.js +154 -137
- package/dist/api/rdb/v1/api.gen.js +897 -819
- package/dist/api/redis/v1/api.gen.js +358 -333
- package/dist/api/redis/v1/marshalling.gen.js +1 -0
- package/dist/api/registry/v1/api.gen.js +211 -189
- package/dist/api/secret/v1alpha1/api.gen.js +295 -246
- package/dist/api/secret/v1alpha1/marshalling.gen.js +10 -1
- package/dist/api/tem/v1alpha1/api.gen.js +182 -147
- package/dist/api/tem/v1alpha1/marshalling.gen.js +32 -1
- package/dist/api/test/v1/api.gen.js +116 -104
- package/dist/api/vpc/v1/api.gen.js +74 -65
- package/dist/api/vpc/v2/api.gen.js +200 -178
- package/dist/api/vpc/v2/marshalling.gen.js +1 -0
- package/dist/api/vpcgw/v1/api.gen.js +575 -501
- package/dist/api/webhosting/v1alpha1/api.gen.js +127 -117
- package/dist/api/webhosting/v1alpha1/content.gen.js +1 -1
- package/dist/index.cjs +924 -453
- package/dist/index.d.ts +2152 -1558
- package/dist/index.js +28 -26
- package/dist/internal/logger/console-logger.js +4 -5
- package/dist/scw/constants.js +1 -1
- package/dist/scw/errors/scw-error.js +2 -2
- package/package.json +2 -2
|
@@ -11,17 +11,18 @@ const jsonContentHeaders = {
|
|
|
11
11
|
|
|
12
12
|
/** Instance API. */
|
|
13
13
|
class API extends API$1 {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
14
|
+
/** Lists the available zones of the API. */
|
|
15
|
+
static LOCALITIES = ['fr-par-1', 'fr-par-2', 'fr-par-3', 'nl-ams-1', 'nl-ams-2', 'nl-ams-3', 'pl-waw-1', 'pl-waw-2'];
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Get availability. Get availability for all Instance types.
|
|
19
|
+
*
|
|
20
|
+
* @param request - The request {@link GetServerTypesAvailabilityRequest}
|
|
21
|
+
* @returns A Promise of GetServerTypesAvailabilityResponse
|
|
22
|
+
*/
|
|
23
|
+
getServerTypesAvailability = (() => {
|
|
24
|
+
var _this = this;
|
|
25
|
+
return function (request) {
|
|
25
26
|
if (request === void 0) {
|
|
26
27
|
request = {};
|
|
27
28
|
}
|
|
@@ -31,805 +32,930 @@ class API extends API$1 {
|
|
|
31
32
|
urlParams: urlParams(['page', request.page], ['per_page', request.perPage ?? _this.client.settings.defaultPageSize])
|
|
32
33
|
}, unmarshalGetServerTypesAvailabilityResponse);
|
|
33
34
|
};
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
})();
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* List Instance types. List available Instance types and their technical
|
|
39
|
+
* details.
|
|
40
|
+
*
|
|
41
|
+
* @param request - The request {@link ListServersTypesRequest}
|
|
42
|
+
* @returns A Promise of ListServersTypesResponse
|
|
43
|
+
*/
|
|
44
|
+
listServersTypes = (() => {
|
|
45
|
+
var _this2 = this;
|
|
46
|
+
return function (request) {
|
|
42
47
|
if (request === void 0) {
|
|
43
48
|
request = {};
|
|
44
49
|
}
|
|
45
|
-
return
|
|
50
|
+
return _this2.client.fetch({
|
|
46
51
|
method: 'GET',
|
|
47
|
-
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ??
|
|
48
|
-
urlParams: urlParams(['page', request.page], ['per_page', request.perPage ??
|
|
52
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this2.client.settings.defaultZone)}/products/servers`,
|
|
53
|
+
urlParams: urlParams(['page', request.page], ['per_page', request.perPage ?? _this2.client.settings.defaultPageSize])
|
|
49
54
|
}, unmarshalListServersTypesResponse);
|
|
50
55
|
};
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
})();
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* List volume types. List all volume types and their technical details.
|
|
60
|
+
*
|
|
61
|
+
* @param request - The request {@link ListVolumesTypesRequest}
|
|
62
|
+
* @returns A Promise of ListVolumesTypesResponse
|
|
63
|
+
*/
|
|
64
|
+
listVolumesTypes = (() => {
|
|
65
|
+
var _this3 = this;
|
|
66
|
+
return function (request) {
|
|
58
67
|
if (request === void 0) {
|
|
59
68
|
request = {};
|
|
60
69
|
}
|
|
61
|
-
return
|
|
70
|
+
return _this3.client.fetch({
|
|
62
71
|
method: 'GET',
|
|
63
|
-
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ??
|
|
64
|
-
urlParams: urlParams(['page', request.page], ['per_page', request.perPage ??
|
|
72
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this3.client.settings.defaultZone)}/products/volumes`,
|
|
73
|
+
urlParams: urlParams(['page', request.page], ['per_page', request.perPage ?? _this3.client.settings.defaultPageSize])
|
|
65
74
|
}, unmarshalListVolumesTypesResponse);
|
|
66
75
|
};
|
|
67
|
-
|
|
76
|
+
})();
|
|
77
|
+
pageOfListServers = (() => {
|
|
78
|
+
var _this4 = this;
|
|
79
|
+
return function (request) {
|
|
68
80
|
if (request === void 0) {
|
|
69
81
|
request = {};
|
|
70
82
|
}
|
|
71
|
-
return
|
|
83
|
+
return _this4.client.fetch({
|
|
72
84
|
method: 'GET',
|
|
73
|
-
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ??
|
|
74
|
-
urlParams: urlParams(['commercial_type', request.commercialType], ['name', request.name], ['order', request.order], ['organization', request.organization], ['page', request.page], ['per_page', request.perPage ??
|
|
85
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this4.client.settings.defaultZone)}/servers`,
|
|
86
|
+
urlParams: urlParams(['commercial_type', request.commercialType], ['name', request.name], ['order', request.order], ['organization', request.organization], ['page', request.page], ['per_page', request.perPage ?? _this4.client.settings.defaultPageSize], ['private_ip', request.privateIp], ['private_network', request.privateNetwork], ['project', request.project], ['state', request.state], ['tags', request.tags && request.tags.length > 0 ? request.tags.join(',') : undefined], ['without_ip', request.withoutIp])
|
|
75
87
|
}, unmarshalListServersResponse);
|
|
76
88
|
};
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
89
|
+
})();
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* List all Instances. List all Instances in a specified Availability Zone,
|
|
93
|
+
* e.g. `fr-par-1`.
|
|
94
|
+
*
|
|
95
|
+
* @param request - The request {@link ListServersRequest}
|
|
96
|
+
* @returns A Promise of ListServersResponse
|
|
97
|
+
*/
|
|
98
|
+
listServers = (() => {
|
|
99
|
+
var _this5 = this;
|
|
100
|
+
return function (request) {
|
|
85
101
|
if (request === void 0) {
|
|
86
102
|
request = {};
|
|
87
103
|
}
|
|
88
|
-
return enrichForPagination('servers',
|
|
104
|
+
return enrichForPagination('servers', _this5.pageOfListServers, request);
|
|
89
105
|
};
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
106
|
+
})();
|
|
107
|
+
_createServer = request => this.client.fetch({
|
|
108
|
+
body: JSON.stringify(marshalCreateServerRequest(request, this.client.settings)),
|
|
109
|
+
headers: jsonContentHeaders,
|
|
110
|
+
method: 'POST',
|
|
111
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers`
|
|
112
|
+
}, unmarshalCreateServerResponse);
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Delete an Instance. Delete the Instance with the specified ID.
|
|
116
|
+
*
|
|
117
|
+
* @param request - The request {@link DeleteServerRequest}
|
|
118
|
+
*/
|
|
119
|
+
deleteServer = request => this.client.fetch({
|
|
120
|
+
method: 'DELETE',
|
|
121
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}`
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Get an Instance. Get the details of a specified Instance.
|
|
126
|
+
*
|
|
127
|
+
* @param request - The request {@link GetServerRequest}
|
|
128
|
+
* @returns A Promise of GetServerResponse
|
|
129
|
+
*/
|
|
130
|
+
getServer = request => this.client.fetch({
|
|
131
|
+
method: 'GET',
|
|
132
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}`
|
|
133
|
+
}, unmarshalGetServerResponse);
|
|
134
|
+
_setServer = request => this.client.fetch({
|
|
135
|
+
body: JSON.stringify(marshalSetServerRequest(request, this.client.settings)),
|
|
136
|
+
headers: jsonContentHeaders,
|
|
137
|
+
method: 'PUT',
|
|
138
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('id', request.id)}`
|
|
139
|
+
}, unmarshalSetServerResponse);
|
|
140
|
+
_updateServer = request => this.client.fetch({
|
|
141
|
+
body: JSON.stringify(marshalUpdateServerRequest(request, this.client.settings)),
|
|
142
|
+
headers: jsonContentHeaders,
|
|
143
|
+
method: 'PATCH',
|
|
144
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}`
|
|
145
|
+
}, unmarshalUpdateServerResponse);
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* List Instance actions. List all actions (e.g. power on, power off, reboot)
|
|
149
|
+
* that can currently be performed on an Instance.
|
|
150
|
+
*
|
|
151
|
+
* @param request - The request {@link ListServerActionsRequest}
|
|
152
|
+
* @returns A Promise of ListServerActionsResponse
|
|
153
|
+
*/
|
|
154
|
+
listServerActions = request => this.client.fetch({
|
|
155
|
+
method: 'GET',
|
|
156
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/action`
|
|
157
|
+
}, unmarshalListServerActionsResponse);
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Perform action. Perform an action on an Instance. Available actions are:
|
|
161
|
+
* `poweron`: Start a stopped Instance. `poweroff`: Fully stop the Instance
|
|
162
|
+
* and release the hypervisor slot. `stop_in_place`: Stop the Instance, but
|
|
163
|
+
* keep the slot on the hypervisor. `reboot`: Stop the instance and restart
|
|
164
|
+
* it. `backup`: Create an image with all the volumes of an Instance.
|
|
165
|
+
* `terminate`: Delete the Instance along with all attached volumes.
|
|
166
|
+
* `enable_routed_ip`: Migrate the Instance to the new network stack.
|
|
167
|
+
*
|
|
168
|
+
* Keep in mind that terminating an Instance will result in the deletion of
|
|
169
|
+
* all attached volumes, including local and block storage. If you want to
|
|
170
|
+
* preserve your local volumes, you should use the `archive` action instead of
|
|
171
|
+
* `terminate`. Similarly, if you want to keep your block storage volumes, you
|
|
172
|
+
* must first detach them before issuing the `terminate` command. For more
|
|
173
|
+
* information, read the [Volumes](#path-volumes-list-volumes) documentation.
|
|
174
|
+
*
|
|
175
|
+
* @param request - The request {@link ServerActionRequest}
|
|
176
|
+
* @returns A Promise of ServerActionResponse
|
|
177
|
+
*/
|
|
178
|
+
serverAction = request => this.client.fetch({
|
|
179
|
+
body: JSON.stringify(marshalServerActionRequest(request, this.client.settings)),
|
|
180
|
+
headers: jsonContentHeaders,
|
|
181
|
+
method: 'POST',
|
|
182
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/action`
|
|
183
|
+
}, unmarshalServerActionResponse);
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* List user data. List all user data keys registered on a specified Instance.
|
|
187
|
+
*
|
|
188
|
+
* @param request - The request {@link ListServerUserDataRequest}
|
|
189
|
+
* @returns A Promise of ListServerUserDataResponse
|
|
190
|
+
*/
|
|
191
|
+
listServerUserData = request => this.client.fetch({
|
|
192
|
+
method: 'GET',
|
|
193
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/user_data`
|
|
194
|
+
}, unmarshalListServerUserDataResponse);
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Delete user data. Delete the specified key from an Instance's user data.
|
|
198
|
+
*
|
|
199
|
+
* @param request - The request {@link DeleteServerUserDataRequest}
|
|
200
|
+
*/
|
|
201
|
+
deleteServerUserData = request => this.client.fetch({
|
|
202
|
+
method: 'DELETE',
|
|
203
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/user_data/${validatePathParam('key', request.key)}`
|
|
204
|
+
});
|
|
205
|
+
pageOfListImages = (() => {
|
|
206
|
+
var _this6 = this;
|
|
207
|
+
return function (request) {
|
|
182
208
|
if (request === void 0) {
|
|
183
209
|
request = {};
|
|
184
210
|
}
|
|
185
|
-
return
|
|
211
|
+
return _this6.client.fetch({
|
|
186
212
|
method: 'GET',
|
|
187
|
-
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ??
|
|
188
|
-
urlParams: urlParams(['arch', request.arch], ['name', request.name], ['organization', request.organization], ['page', request.page], ['per_page', request.perPage ??
|
|
213
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this6.client.settings.defaultZone)}/images`,
|
|
214
|
+
urlParams: urlParams(['arch', request.arch], ['name', request.name], ['organization', request.organization], ['page', request.page], ['per_page', request.perPage ?? _this6.client.settings.defaultPageSize], ['project', request.project], ['public', request.public], ['tags', request.tags])
|
|
189
215
|
}, unmarshalListImagesResponse);
|
|
190
216
|
};
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
217
|
+
})();
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* List Instance images. List all existing Instance images.
|
|
221
|
+
*
|
|
222
|
+
* @param request - The request {@link ListImagesRequest}
|
|
223
|
+
* @returns A Promise of ListImagesResponse
|
|
224
|
+
*/
|
|
225
|
+
listImages = (() => {
|
|
226
|
+
var _this7 = this;
|
|
227
|
+
return function (request) {
|
|
198
228
|
if (request === void 0) {
|
|
199
229
|
request = {};
|
|
200
230
|
}
|
|
201
|
-
return enrichForPagination('images',
|
|
231
|
+
return enrichForPagination('images', _this7.pageOfListImages, request);
|
|
202
232
|
};
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
233
|
+
})();
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Get an Instance image. Get details of an image with the specified ID.
|
|
237
|
+
*
|
|
238
|
+
* @param request - The request {@link GetImageRequest}
|
|
239
|
+
* @returns A Promise of GetImageResponse
|
|
240
|
+
*/
|
|
241
|
+
getImage = request => this.client.fetch({
|
|
242
|
+
method: 'GET',
|
|
243
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/images/${validatePathParam('imageId', request.imageId)}`
|
|
244
|
+
}, unmarshalGetImageResponse);
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Create an Instance image. Create an Instance image from the specified
|
|
248
|
+
* snapshot ID.
|
|
249
|
+
*
|
|
250
|
+
* @param request - The request {@link CreateImageRequest}
|
|
251
|
+
* @returns A Promise of CreateImageResponse
|
|
252
|
+
*/
|
|
253
|
+
createImage = request => this.client.fetch({
|
|
254
|
+
body: JSON.stringify(marshalCreateImageRequest(request, this.client.settings)),
|
|
255
|
+
headers: jsonContentHeaders,
|
|
256
|
+
method: 'POST',
|
|
257
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/images`
|
|
258
|
+
}, unmarshalCreateImageResponse);
|
|
259
|
+
_setImage = request => this.client.fetch({
|
|
260
|
+
body: JSON.stringify(marshalSetImageRequest(request, this.client.settings)),
|
|
261
|
+
headers: jsonContentHeaders,
|
|
262
|
+
method: 'PUT',
|
|
263
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/images/${validatePathParam('id', request.id)}`
|
|
264
|
+
}, unmarshalSetImageResponse);
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Delete an Instance image. Delete the image with the specified ID.
|
|
268
|
+
*
|
|
269
|
+
* @param request - The request {@link DeleteImageRequest}
|
|
270
|
+
*/
|
|
271
|
+
deleteImage = request => this.client.fetch({
|
|
272
|
+
method: 'DELETE',
|
|
273
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/images/${validatePathParam('imageId', request.imageId)}`
|
|
274
|
+
});
|
|
275
|
+
pageOfListSnapshots = (() => {
|
|
276
|
+
var _this8 = this;
|
|
277
|
+
return function (request) {
|
|
242
278
|
if (request === void 0) {
|
|
243
279
|
request = {};
|
|
244
280
|
}
|
|
245
|
-
return
|
|
281
|
+
return _this8.client.fetch({
|
|
246
282
|
method: 'GET',
|
|
247
|
-
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ??
|
|
248
|
-
urlParams: urlParams(['name', request.name], ['organization', request.organization], ['page', request.page], ['per_page', request.perPage ??
|
|
283
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this8.client.settings.defaultZone)}/snapshots`,
|
|
284
|
+
urlParams: urlParams(['name', request.name], ['organization', request.organization], ['page', request.page], ['per_page', request.perPage ?? _this8.client.settings.defaultPageSize], ['project', request.project], ['tags', request.tags])
|
|
249
285
|
}, unmarshalListSnapshotsResponse);
|
|
250
286
|
};
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
287
|
+
})();
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* List snapshots. List all snapshots of an Organization in a specified
|
|
291
|
+
* Availability Zone.
|
|
292
|
+
*
|
|
293
|
+
* @param request - The request {@link ListSnapshotsRequest}
|
|
294
|
+
* @returns A Promise of ListSnapshotsResponse
|
|
295
|
+
*/
|
|
296
|
+
listSnapshots = (() => {
|
|
297
|
+
var _this9 = this;
|
|
298
|
+
return function (request) {
|
|
259
299
|
if (request === void 0) {
|
|
260
300
|
request = {};
|
|
261
301
|
}
|
|
262
|
-
return enrichForPagination('snapshots',
|
|
302
|
+
return enrichForPagination('snapshots', _this9.pageOfListSnapshots, request);
|
|
263
303
|
};
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
304
|
+
})();
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Create a snapshot from a specified volume or from a QCOW2 file. Create a
|
|
308
|
+
* snapshot from a specified volume or from a QCOW2 file in a specified
|
|
309
|
+
* Availability Zone.
|
|
310
|
+
*
|
|
311
|
+
* @param request - The request {@link CreateSnapshotRequest}
|
|
312
|
+
* @returns A Promise of CreateSnapshotResponse
|
|
313
|
+
*/
|
|
314
|
+
createSnapshot = (() => {
|
|
315
|
+
var _this10 = this;
|
|
316
|
+
return function (request) {
|
|
273
317
|
if (request === void 0) {
|
|
274
318
|
request = {};
|
|
275
319
|
}
|
|
276
|
-
return
|
|
277
|
-
body: JSON.stringify(marshalCreateSnapshotRequest(request,
|
|
320
|
+
return _this10.client.fetch({
|
|
321
|
+
body: JSON.stringify(marshalCreateSnapshotRequest(request, _this10.client.settings)),
|
|
278
322
|
headers: jsonContentHeaders,
|
|
279
323
|
method: 'POST',
|
|
280
|
-
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ??
|
|
324
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this10.client.settings.defaultZone)}/snapshots`
|
|
281
325
|
}, unmarshalCreateSnapshotResponse);
|
|
282
326
|
};
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
327
|
+
})();
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* Get a snapshot. Get details of a snapshot with the specified ID.
|
|
331
|
+
*
|
|
332
|
+
* @param request - The request {@link GetSnapshotRequest}
|
|
333
|
+
* @returns A Promise of GetSnapshotResponse
|
|
334
|
+
*/
|
|
335
|
+
getSnapshot = request => this.client.fetch({
|
|
336
|
+
method: 'GET',
|
|
337
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/snapshots/${validatePathParam('snapshotId', request.snapshotId)}`
|
|
338
|
+
}, unmarshalGetSnapshotResponse);
|
|
339
|
+
_setSnapshot = request => this.client.fetch({
|
|
340
|
+
body: JSON.stringify(marshalSetSnapshotRequest(request, this.client.settings)),
|
|
341
|
+
headers: jsonContentHeaders,
|
|
342
|
+
method: 'PUT',
|
|
343
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/snapshots/${validatePathParam('snapshotId', request.snapshotId)}`
|
|
344
|
+
}, unmarshalSetSnapshotResponse);
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* Delete a snapshot. Delete the snapshot with the specified ID.
|
|
348
|
+
*
|
|
349
|
+
* @param request - The request {@link DeleteSnapshotRequest}
|
|
350
|
+
*/
|
|
351
|
+
deleteSnapshot = request => this.client.fetch({
|
|
352
|
+
method: 'DELETE',
|
|
353
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/snapshots/${validatePathParam('snapshotId', request.snapshotId)}`
|
|
354
|
+
});
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Export a snapshot. Export a snapshot to a specified S3 bucket in the same
|
|
358
|
+
* region.
|
|
359
|
+
*
|
|
360
|
+
* @param request - The request {@link ExportSnapshotRequest}
|
|
361
|
+
* @returns A Promise of ExportSnapshotResponse
|
|
362
|
+
*/
|
|
363
|
+
exportSnapshot = request => this.client.fetch({
|
|
364
|
+
body: JSON.stringify(marshalExportSnapshotRequest(request, this.client.settings)),
|
|
365
|
+
headers: jsonContentHeaders,
|
|
366
|
+
method: 'POST',
|
|
367
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/snapshots/${validatePathParam('snapshotId', request.snapshotId)}/export`
|
|
368
|
+
}, unmarshalExportSnapshotResponse);
|
|
369
|
+
pageOfListVolumes = (() => {
|
|
370
|
+
var _this11 = this;
|
|
371
|
+
return function (request) {
|
|
322
372
|
if (request === void 0) {
|
|
323
373
|
request = {};
|
|
324
374
|
}
|
|
325
|
-
return
|
|
375
|
+
return _this11.client.fetch({
|
|
326
376
|
method: 'GET',
|
|
327
|
-
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ??
|
|
328
|
-
urlParams: urlParams(['name', request.name], ['organization', request.organization], ['page', request.page], ['per_page', request.perPage ??
|
|
377
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this11.client.settings.defaultZone)}/volumes`,
|
|
378
|
+
urlParams: urlParams(['name', request.name], ['organization', request.organization], ['page', request.page], ['per_page', request.perPage ?? _this11.client.settings.defaultPageSize], ['project', request.project], ['tags', request.tags && request.tags.length > 0 ? request.tags.join(',') : undefined], ['volume_type', request.volumeType])
|
|
329
379
|
}, unmarshalListVolumesResponse);
|
|
330
380
|
};
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
381
|
+
})();
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* List volumes. List volumes in the specified Availability Zone. You can
|
|
385
|
+
* filter the output by volume type.
|
|
386
|
+
*
|
|
387
|
+
* @param request - The request {@link ListVolumesRequest}
|
|
388
|
+
* @returns A Promise of ListVolumesResponse
|
|
389
|
+
*/
|
|
390
|
+
listVolumes = (() => {
|
|
391
|
+
var _this12 = this;
|
|
392
|
+
return function (request) {
|
|
339
393
|
if (request === void 0) {
|
|
340
394
|
request = {};
|
|
341
395
|
}
|
|
342
|
-
return enrichForPagination('volumes',
|
|
396
|
+
return enrichForPagination('volumes', _this12.pageOfListVolumes, request);
|
|
343
397
|
};
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
398
|
+
})();
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* Create a volume. Create a volume of a specified type in an Availability
|
|
402
|
+
* Zone.
|
|
403
|
+
*
|
|
404
|
+
* @param request - The request {@link CreateVolumeRequest}
|
|
405
|
+
* @returns A Promise of CreateVolumeResponse
|
|
406
|
+
*/
|
|
407
|
+
createVolume = (() => {
|
|
408
|
+
var _this13 = this;
|
|
409
|
+
return function (request) {
|
|
352
410
|
if (request === void 0) {
|
|
353
411
|
request = {};
|
|
354
412
|
}
|
|
355
|
-
return
|
|
356
|
-
body: JSON.stringify(marshalCreateVolumeRequest(request,
|
|
413
|
+
return _this13.client.fetch({
|
|
414
|
+
body: JSON.stringify(marshalCreateVolumeRequest(request, _this13.client.settings)),
|
|
357
415
|
headers: jsonContentHeaders,
|
|
358
416
|
method: 'POST',
|
|
359
|
-
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ??
|
|
417
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this13.client.settings.defaultZone)}/volumes`
|
|
360
418
|
}, unmarshalCreateVolumeResponse);
|
|
361
419
|
};
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
420
|
+
})();
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* Get a volume. Get details of a volume with the specified ID.
|
|
424
|
+
*
|
|
425
|
+
* @param request - The request {@link GetVolumeRequest}
|
|
426
|
+
* @returns A Promise of GetVolumeResponse
|
|
427
|
+
*/
|
|
428
|
+
getVolume = request => this.client.fetch({
|
|
429
|
+
method: 'GET',
|
|
430
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/volumes/${validatePathParam('volumeId', request.volumeId)}`
|
|
431
|
+
}, unmarshalGetVolumeResponse);
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* Update a volume. Replace the name and/or size properties of a volume
|
|
435
|
+
* specified by its ID, with the specified value(s). Any volume name can be
|
|
436
|
+
* changed, however only `b_ssd` volumes can currently be increased in size.
|
|
437
|
+
*
|
|
438
|
+
* @param request - The request {@link UpdateVolumeRequest}
|
|
439
|
+
* @returns A Promise of UpdateVolumeResponse
|
|
440
|
+
*/
|
|
441
|
+
updateVolume = request => this.client.fetch({
|
|
442
|
+
body: JSON.stringify(marshalUpdateVolumeRequest(request, this.client.settings)),
|
|
443
|
+
headers: jsonContentHeaders,
|
|
444
|
+
method: 'PATCH',
|
|
445
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/volumes/${validatePathParam('volumeId', request.volumeId)}`
|
|
446
|
+
}, unmarshalUpdateVolumeResponse);
|
|
447
|
+
|
|
448
|
+
/**
|
|
449
|
+
* Delete a volume. Delete the volume with the specified ID.
|
|
450
|
+
*
|
|
451
|
+
* @param request - The request {@link DeleteVolumeRequest}
|
|
452
|
+
*/
|
|
453
|
+
deleteVolume = request => this.client.fetch({
|
|
454
|
+
method: 'DELETE',
|
|
455
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/volumes/${validatePathParam('volumeId', request.volumeId)}`
|
|
456
|
+
});
|
|
457
|
+
pageOfListSecurityGroups = (() => {
|
|
458
|
+
var _this14 = this;
|
|
459
|
+
return function (request) {
|
|
396
460
|
if (request === void 0) {
|
|
397
461
|
request = {};
|
|
398
462
|
}
|
|
399
|
-
return
|
|
463
|
+
return _this14.client.fetch({
|
|
400
464
|
method: 'GET',
|
|
401
|
-
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ??
|
|
402
|
-
urlParams: urlParams(['name', request.name], ['organization', request.organization], ['page', request.page], ['per_page', request.perPage ??
|
|
465
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this14.client.settings.defaultZone)}/security_groups`,
|
|
466
|
+
urlParams: urlParams(['name', request.name], ['organization', request.organization], ['page', request.page], ['per_page', request.perPage ?? _this14.client.settings.defaultPageSize], ['project', request.project], ['project_default', request.projectDefault], ['tags', request.tags && request.tags.length > 0 ? request.tags.join(',') : undefined])
|
|
403
467
|
}, unmarshalListSecurityGroupsResponse);
|
|
404
468
|
};
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
469
|
+
})();
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* List security groups. List all existing security groups.
|
|
473
|
+
*
|
|
474
|
+
* @param request - The request {@link ListSecurityGroupsRequest}
|
|
475
|
+
* @returns A Promise of ListSecurityGroupsResponse
|
|
476
|
+
*/
|
|
477
|
+
listSecurityGroups = (() => {
|
|
478
|
+
var _this15 = this;
|
|
479
|
+
return function (request) {
|
|
412
480
|
if (request === void 0) {
|
|
413
481
|
request = {};
|
|
414
482
|
}
|
|
415
|
-
return enrichForPagination('securityGroups',
|
|
483
|
+
return enrichForPagination('securityGroups', _this15.pageOfListSecurityGroups, request);
|
|
416
484
|
};
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
485
|
+
})();
|
|
486
|
+
|
|
487
|
+
/**
|
|
488
|
+
* Create a security group. Create a security group with a specified name and
|
|
489
|
+
* description.
|
|
490
|
+
*
|
|
491
|
+
* @param request - The request {@link CreateSecurityGroupRequest}
|
|
492
|
+
* @returns A Promise of CreateSecurityGroupResponse
|
|
493
|
+
*/
|
|
494
|
+
createSecurityGroup = request => this.client.fetch({
|
|
495
|
+
body: JSON.stringify(marshalCreateSecurityGroupRequest(request, this.client.settings)),
|
|
496
|
+
headers: jsonContentHeaders,
|
|
497
|
+
method: 'POST',
|
|
498
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups`
|
|
499
|
+
}, unmarshalCreateSecurityGroupResponse);
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* Get a security group. Get the details of a security group with the
|
|
503
|
+
* specified ID.
|
|
504
|
+
*
|
|
505
|
+
* @param request - The request {@link GetSecurityGroupRequest}
|
|
506
|
+
* @returns A Promise of GetSecurityGroupResponse
|
|
507
|
+
*/
|
|
508
|
+
getSecurityGroup = request => this.client.fetch({
|
|
509
|
+
method: 'GET',
|
|
510
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups/${validatePathParam('securityGroupId', request.securityGroupId)}`
|
|
511
|
+
}, unmarshalGetSecurityGroupResponse);
|
|
512
|
+
|
|
513
|
+
/**
|
|
514
|
+
* Delete a security group. Delete a security group with the specified ID.
|
|
515
|
+
*
|
|
516
|
+
* @param request - The request {@link DeleteSecurityGroupRequest}
|
|
517
|
+
*/
|
|
518
|
+
deleteSecurityGroup = request => this.client.fetch({
|
|
519
|
+
method: 'DELETE',
|
|
520
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups/${validatePathParam('securityGroupId', request.securityGroupId)}`
|
|
521
|
+
});
|
|
522
|
+
_setSecurityGroup = request => this.client.fetch({
|
|
523
|
+
body: JSON.stringify(marshalSetSecurityGroupRequest(request, this.client.settings)),
|
|
524
|
+
headers: jsonContentHeaders,
|
|
525
|
+
method: 'PUT',
|
|
526
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups/${validatePathParam('id', request.id)}`
|
|
527
|
+
}, unmarshalSetSecurityGroupResponse);
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* Get default rules. Lists the default rules applied to all the security
|
|
531
|
+
* groups.
|
|
532
|
+
*
|
|
533
|
+
* @param request - The request {@link ListDefaultSecurityGroupRulesRequest}
|
|
534
|
+
* @returns A Promise of ListSecurityGroupRulesResponse
|
|
535
|
+
*/
|
|
536
|
+
listDefaultSecurityGroupRules = (() => {
|
|
537
|
+
var _this16 = this;
|
|
538
|
+
return function (request) {
|
|
464
539
|
if (request === void 0) {
|
|
465
540
|
request = {};
|
|
466
541
|
}
|
|
467
|
-
return
|
|
542
|
+
return _this16.client.fetch({
|
|
468
543
|
method: 'GET',
|
|
469
|
-
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ??
|
|
544
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this16.client.settings.defaultZone)}/security_groups/default/rules`
|
|
470
545
|
}, unmarshalListSecurityGroupRulesResponse);
|
|
471
546
|
};
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
547
|
+
})();
|
|
548
|
+
pageOfListSecurityGroupRules = request => this.client.fetch({
|
|
549
|
+
method: 'GET',
|
|
550
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups/${validatePathParam('securityGroupId', request.securityGroupId)}/rules`,
|
|
551
|
+
urlParams: urlParams(['page', request.page], ['per_page', request.perPage ?? this.client.settings.defaultPageSize])
|
|
552
|
+
}, unmarshalListSecurityGroupRulesResponse);
|
|
553
|
+
|
|
554
|
+
/**
|
|
555
|
+
* List rules. List the rules of the a specified security group ID.
|
|
556
|
+
*
|
|
557
|
+
* @param request - The request {@link ListSecurityGroupRulesRequest}
|
|
558
|
+
* @returns A Promise of ListSecurityGroupRulesResponse
|
|
559
|
+
*/
|
|
560
|
+
listSecurityGroupRules = request => enrichForPagination('rules', this.pageOfListSecurityGroupRules, request);
|
|
561
|
+
|
|
562
|
+
/**
|
|
563
|
+
* Create rule. Create a rule in the specified security group ID.
|
|
564
|
+
*
|
|
565
|
+
* @param request - The request {@link CreateSecurityGroupRuleRequest}
|
|
566
|
+
* @returns A Promise of CreateSecurityGroupRuleResponse
|
|
567
|
+
*/
|
|
568
|
+
createSecurityGroupRule = request => this.client.fetch({
|
|
569
|
+
body: JSON.stringify(marshalCreateSecurityGroupRuleRequest(request, this.client.settings)),
|
|
570
|
+
headers: jsonContentHeaders,
|
|
571
|
+
method: 'POST',
|
|
572
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups/${validatePathParam('securityGroupId', request.securityGroupId)}/rules`
|
|
573
|
+
}, unmarshalCreateSecurityGroupRuleResponse);
|
|
574
|
+
|
|
575
|
+
/**
|
|
576
|
+
* Update all the rules of a security group. Replaces the existing rules of
|
|
577
|
+
* the security group with the rules provided. This endpoint supports the
|
|
578
|
+
* update of existing rules, creation of new rules and deletion of existing
|
|
579
|
+
* rules when they are not passed in the request.
|
|
580
|
+
*
|
|
581
|
+
* @param request - The request {@link SetSecurityGroupRulesRequest}
|
|
582
|
+
* @returns A Promise of SetSecurityGroupRulesResponse
|
|
583
|
+
*/
|
|
584
|
+
setSecurityGroupRules = request => this.client.fetch({
|
|
585
|
+
body: JSON.stringify(marshalSetSecurityGroupRulesRequest(request, this.client.settings)),
|
|
586
|
+
headers: jsonContentHeaders,
|
|
587
|
+
method: 'PUT',
|
|
588
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups/${validatePathParam('securityGroupId', request.securityGroupId)}/rules`
|
|
589
|
+
}, unmarshalSetSecurityGroupRulesResponse);
|
|
590
|
+
|
|
591
|
+
/**
|
|
592
|
+
* Delete rule. Delete a security group rule with the specified ID.
|
|
593
|
+
*
|
|
594
|
+
* @param request - The request {@link DeleteSecurityGroupRuleRequest}
|
|
595
|
+
*/
|
|
596
|
+
deleteSecurityGroupRule = request => this.client.fetch({
|
|
597
|
+
method: 'DELETE',
|
|
598
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups/${validatePathParam('securityGroupId', request.securityGroupId)}/rules/${validatePathParam('securityGroupRuleId', request.securityGroupRuleId)}`
|
|
599
|
+
});
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* Get rule. Get details of a security group rule with the specified ID.
|
|
603
|
+
*
|
|
604
|
+
* @param request - The request {@link GetSecurityGroupRuleRequest}
|
|
605
|
+
* @returns A Promise of GetSecurityGroupRuleResponse
|
|
606
|
+
*/
|
|
607
|
+
getSecurityGroupRule = request => this.client.fetch({
|
|
608
|
+
method: 'GET',
|
|
609
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups/${validatePathParam('securityGroupId', request.securityGroupId)}/rules/${validatePathParam('securityGroupRuleId', request.securityGroupRuleId)}`
|
|
610
|
+
}, unmarshalGetSecurityGroupRuleResponse);
|
|
611
|
+
_setSecurityGroupRule = request => this.client.fetch({
|
|
612
|
+
body: JSON.stringify(marshalSetSecurityGroupRuleRequest(request, this.client.settings)),
|
|
613
|
+
headers: jsonContentHeaders,
|
|
614
|
+
method: 'PUT',
|
|
615
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups/${validatePathParam('securityGroupId', request.securityGroupId)}/rules/${validatePathParam('securityGroupRuleId', request.securityGroupRuleId)}`
|
|
616
|
+
}, unmarshalSetSecurityGroupRuleResponse);
|
|
617
|
+
pageOfListPlacementGroups = (() => {
|
|
618
|
+
var _this17 = this;
|
|
619
|
+
return function (request) {
|
|
537
620
|
if (request === void 0) {
|
|
538
621
|
request = {};
|
|
539
622
|
}
|
|
540
|
-
return
|
|
623
|
+
return _this17.client.fetch({
|
|
541
624
|
method: 'GET',
|
|
542
|
-
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ??
|
|
543
|
-
urlParams: urlParams(['name', request.name], ['organization', request.organization], ['page', request.page], ['per_page', request.perPage ??
|
|
625
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this17.client.settings.defaultZone)}/placement_groups`,
|
|
626
|
+
urlParams: urlParams(['name', request.name], ['organization', request.organization], ['page', request.page], ['per_page', request.perPage ?? _this17.client.settings.defaultPageSize], ['project', request.project], ['tags', request.tags && request.tags.length > 0 ? request.tags.join(',') : undefined])
|
|
544
627
|
}, unmarshalListPlacementGroupsResponse);
|
|
545
628
|
};
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
629
|
+
})();
|
|
630
|
+
|
|
631
|
+
/**
|
|
632
|
+
* List placement groups. List all placement groups in a specified
|
|
633
|
+
* Availability Zone.
|
|
634
|
+
*
|
|
635
|
+
* @param request - The request {@link ListPlacementGroupsRequest}
|
|
636
|
+
* @returns A Promise of ListPlacementGroupsResponse
|
|
637
|
+
*/
|
|
638
|
+
listPlacementGroups = (() => {
|
|
639
|
+
var _this18 = this;
|
|
640
|
+
return function (request) {
|
|
554
641
|
if (request === void 0) {
|
|
555
642
|
request = {};
|
|
556
643
|
}
|
|
557
|
-
return enrichForPagination('placementGroups',
|
|
644
|
+
return enrichForPagination('placementGroups', _this18.pageOfListPlacementGroups, request);
|
|
558
645
|
};
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
646
|
+
})();
|
|
647
|
+
|
|
648
|
+
/**
|
|
649
|
+
* Create a placement group. Create a new placement group in a specified
|
|
650
|
+
* Availability Zone.
|
|
651
|
+
*
|
|
652
|
+
* @param request - The request {@link CreatePlacementGroupRequest}
|
|
653
|
+
* @returns A Promise of CreatePlacementGroupResponse
|
|
654
|
+
*/
|
|
655
|
+
createPlacementGroup = (() => {
|
|
656
|
+
var _this19 = this;
|
|
657
|
+
return function (request) {
|
|
567
658
|
if (request === void 0) {
|
|
568
659
|
request = {};
|
|
569
660
|
}
|
|
570
|
-
return
|
|
571
|
-
body: JSON.stringify(marshalCreatePlacementGroupRequest(request,
|
|
661
|
+
return _this19.client.fetch({
|
|
662
|
+
body: JSON.stringify(marshalCreatePlacementGroupRequest(request, _this19.client.settings)),
|
|
572
663
|
headers: jsonContentHeaders,
|
|
573
664
|
method: 'POST',
|
|
574
|
-
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ??
|
|
665
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this19.client.settings.defaultZone)}/placement_groups`
|
|
575
666
|
}, unmarshalCreatePlacementGroupResponse);
|
|
576
667
|
};
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
668
|
+
})();
|
|
669
|
+
|
|
670
|
+
/**
|
|
671
|
+
* Get a placement group. Get the specified placement group.
|
|
672
|
+
*
|
|
673
|
+
* @param request - The request {@link GetPlacementGroupRequest}
|
|
674
|
+
* @returns A Promise of GetPlacementGroupResponse
|
|
675
|
+
*/
|
|
676
|
+
getPlacementGroup = request => this.client.fetch({
|
|
677
|
+
method: 'GET',
|
|
678
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/placement_groups/${validatePathParam('placementGroupId', request.placementGroupId)}`
|
|
679
|
+
}, unmarshalGetPlacementGroupResponse);
|
|
680
|
+
|
|
681
|
+
/**
|
|
682
|
+
* Set placement group. Set all parameters of the specified placement group.
|
|
683
|
+
*
|
|
684
|
+
* @param request - The request {@link SetPlacementGroupRequest}
|
|
685
|
+
* @returns A Promise of SetPlacementGroupResponse
|
|
686
|
+
*/
|
|
687
|
+
setPlacementGroup = request => this.client.fetch({
|
|
688
|
+
body: JSON.stringify(marshalSetPlacementGroupRequest(request, this.client.settings)),
|
|
689
|
+
headers: jsonContentHeaders,
|
|
690
|
+
method: 'PUT',
|
|
691
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/placement_groups/${validatePathParam('placementGroupId', request.placementGroupId)}`
|
|
692
|
+
}, unmarshalSetPlacementGroupResponse);
|
|
693
|
+
|
|
694
|
+
/**
|
|
695
|
+
* Update a placement group. Update one or more parameter of the specified
|
|
696
|
+
* placement group.
|
|
697
|
+
*
|
|
698
|
+
* @param request - The request {@link UpdatePlacementGroupRequest}
|
|
699
|
+
* @returns A Promise of UpdatePlacementGroupResponse
|
|
700
|
+
*/
|
|
701
|
+
updatePlacementGroup = request => this.client.fetch({
|
|
702
|
+
body: JSON.stringify(marshalUpdatePlacementGroupRequest(request, this.client.settings)),
|
|
703
|
+
headers: jsonContentHeaders,
|
|
704
|
+
method: 'PATCH',
|
|
705
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/placement_groups/${validatePathParam('placementGroupId', request.placementGroupId)}`
|
|
706
|
+
}, unmarshalUpdatePlacementGroupResponse);
|
|
707
|
+
|
|
708
|
+
/**
|
|
709
|
+
* Delete the specified placement group.
|
|
710
|
+
*
|
|
711
|
+
* @param request - The request {@link DeletePlacementGroupRequest}
|
|
712
|
+
*/
|
|
713
|
+
deletePlacementGroup = request => this.client.fetch({
|
|
714
|
+
method: 'DELETE',
|
|
715
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/placement_groups/${validatePathParam('placementGroupId', request.placementGroupId)}`
|
|
716
|
+
});
|
|
717
|
+
|
|
718
|
+
/**
|
|
719
|
+
* Get placement group servers. Get all Instances belonging to the specified
|
|
720
|
+
* placement group.
|
|
721
|
+
*
|
|
722
|
+
* @param request - The request {@link GetPlacementGroupServersRequest}
|
|
723
|
+
* @returns A Promise of GetPlacementGroupServersResponse
|
|
724
|
+
*/
|
|
725
|
+
getPlacementGroupServers = request => this.client.fetch({
|
|
726
|
+
method: 'GET',
|
|
727
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/placement_groups/${validatePathParam('placementGroupId', request.placementGroupId)}/servers`
|
|
728
|
+
}, unmarshalGetPlacementGroupServersResponse);
|
|
729
|
+
|
|
730
|
+
/**
|
|
731
|
+
* Set placement group servers. Set all Instances belonging to the specified
|
|
732
|
+
* placement group.
|
|
733
|
+
*
|
|
734
|
+
* @param request - The request {@link SetPlacementGroupServersRequest}
|
|
735
|
+
* @returns A Promise of SetPlacementGroupServersResponse
|
|
736
|
+
*/
|
|
737
|
+
setPlacementGroupServers = request => this.client.fetch({
|
|
738
|
+
body: JSON.stringify(marshalSetPlacementGroupServersRequest(request, this.client.settings)),
|
|
739
|
+
headers: jsonContentHeaders,
|
|
740
|
+
method: 'PUT',
|
|
741
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/placement_groups/${validatePathParam('placementGroupId', request.placementGroupId)}/servers`
|
|
742
|
+
}, unmarshalSetPlacementGroupServersResponse);
|
|
743
|
+
|
|
744
|
+
/**
|
|
745
|
+
* Update placement group servers. Update all Instances belonging to the
|
|
746
|
+
* specified placement group.
|
|
747
|
+
*
|
|
748
|
+
* @param request - The request {@link UpdatePlacementGroupServersRequest}
|
|
749
|
+
* @returns A Promise of UpdatePlacementGroupServersResponse
|
|
750
|
+
*/
|
|
751
|
+
updatePlacementGroupServers = request => this.client.fetch({
|
|
752
|
+
body: JSON.stringify(marshalUpdatePlacementGroupServersRequest(request, this.client.settings)),
|
|
753
|
+
headers: jsonContentHeaders,
|
|
754
|
+
method: 'PATCH',
|
|
755
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/placement_groups/${validatePathParam('placementGroupId', request.placementGroupId)}/servers`
|
|
756
|
+
}, unmarshalUpdatePlacementGroupServersResponse);
|
|
757
|
+
pageOfListIps = (() => {
|
|
758
|
+
var _this20 = this;
|
|
759
|
+
return function (request) {
|
|
659
760
|
if (request === void 0) {
|
|
660
761
|
request = {};
|
|
661
762
|
}
|
|
662
|
-
return
|
|
763
|
+
return _this20.client.fetch({
|
|
663
764
|
method: 'GET',
|
|
664
|
-
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ??
|
|
665
|
-
urlParams: urlParams(['name', request.name], ['organization', request.organization], ['page', request.page], ['per_page', request.perPage ??
|
|
765
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this20.client.settings.defaultZone)}/ips`,
|
|
766
|
+
urlParams: urlParams(['name', request.name], ['organization', request.organization], ['page', request.page], ['per_page', request.perPage ?? _this20.client.settings.defaultPageSize], ['project', request.project], ['tags', request.tags && request.tags.length > 0 ? request.tags.join(',') : undefined])
|
|
666
767
|
}, unmarshalListIpsResponse);
|
|
667
768
|
};
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
769
|
+
})();
|
|
770
|
+
|
|
771
|
+
/**
|
|
772
|
+
* List all flexible IPs. List all flexible IPs in a specified zone.
|
|
773
|
+
*
|
|
774
|
+
* @param request - The request {@link ListIpsRequest}
|
|
775
|
+
* @returns A Promise of ListIpsResponse
|
|
776
|
+
*/
|
|
777
|
+
listIps = (() => {
|
|
778
|
+
var _this21 = this;
|
|
779
|
+
return function (request) {
|
|
675
780
|
if (request === void 0) {
|
|
676
781
|
request = {};
|
|
677
782
|
}
|
|
678
|
-
return enrichForPagination('ips',
|
|
783
|
+
return enrichForPagination('ips', _this21.pageOfListIps, request);
|
|
679
784
|
};
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
785
|
+
})();
|
|
786
|
+
|
|
787
|
+
/**
|
|
788
|
+
* Reserve a flexible IP. Reserve a flexible IP and attach it to the specified
|
|
789
|
+
* Instance.
|
|
790
|
+
*
|
|
791
|
+
* @param request - The request {@link CreateIpRequest}
|
|
792
|
+
* @returns A Promise of CreateIpResponse
|
|
793
|
+
*/
|
|
794
|
+
createIp = (() => {
|
|
795
|
+
var _this22 = this;
|
|
796
|
+
return function (request) {
|
|
688
797
|
if (request === void 0) {
|
|
689
798
|
request = {};
|
|
690
799
|
}
|
|
691
|
-
return
|
|
692
|
-
body: JSON.stringify(marshalCreateIpRequest(request,
|
|
800
|
+
return _this22.client.fetch({
|
|
801
|
+
body: JSON.stringify(marshalCreateIpRequest(request, _this22.client.settings)),
|
|
693
802
|
headers: jsonContentHeaders,
|
|
694
803
|
method: 'POST',
|
|
695
|
-
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ??
|
|
804
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this22.client.settings.defaultZone)}/ips`
|
|
696
805
|
}, unmarshalCreateIpResponse);
|
|
697
806
|
};
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
807
|
+
})();
|
|
808
|
+
|
|
809
|
+
/**
|
|
810
|
+
* Get a flexible IP. Get details of an IP with the specified ID or address.
|
|
811
|
+
*
|
|
812
|
+
* @param request - The request {@link GetIpRequest}
|
|
813
|
+
* @returns A Promise of GetIpResponse
|
|
814
|
+
*/
|
|
815
|
+
getIp = request => this.client.fetch({
|
|
816
|
+
method: 'GET',
|
|
817
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/ips/${validatePathParam('ip', request.ip)}`
|
|
818
|
+
}, unmarshalGetIpResponse);
|
|
819
|
+
|
|
820
|
+
/**
|
|
821
|
+
* Update a flexible IP. Update a flexible IP in the specified zone with the
|
|
822
|
+
* specified ID.
|
|
823
|
+
*
|
|
824
|
+
* @param request - The request {@link UpdateIpRequest}
|
|
825
|
+
* @returns A Promise of UpdateIpResponse
|
|
826
|
+
*/
|
|
827
|
+
updateIp = request => this.client.fetch({
|
|
828
|
+
body: JSON.stringify(marshalUpdateIpRequest(request, this.client.settings)),
|
|
829
|
+
headers: jsonContentHeaders,
|
|
830
|
+
method: 'PATCH',
|
|
831
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/ips/${validatePathParam('ip', request.ip)}`
|
|
832
|
+
}, unmarshalUpdateIpResponse);
|
|
833
|
+
|
|
834
|
+
/**
|
|
835
|
+
* Delete a flexible IP. Delete the IP with the specified ID.
|
|
836
|
+
*
|
|
837
|
+
* @param request - The request {@link DeleteIpRequest}
|
|
838
|
+
*/
|
|
839
|
+
deleteIp = request => this.client.fetch({
|
|
840
|
+
method: 'DELETE',
|
|
841
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/ips/${validatePathParam('ip', request.ip)}`
|
|
842
|
+
});
|
|
843
|
+
pageOfListPrivateNICs = request => this.client.fetch({
|
|
844
|
+
method: 'GET',
|
|
845
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/private_nics`,
|
|
846
|
+
urlParams: urlParams(['page', request.page], ['per_page', request.perPage ?? this.client.settings.defaultPageSize], ['tags', request.tags && request.tags.length > 0 ? request.tags.join(',') : undefined])
|
|
847
|
+
}, unmarshalListPrivateNICsResponse);
|
|
848
|
+
|
|
849
|
+
/**
|
|
850
|
+
* List all private NICs. List all private NICs of a specified Instance.
|
|
851
|
+
*
|
|
852
|
+
* @param request - The request {@link ListPrivateNICsRequest}
|
|
853
|
+
* @returns A Promise of ListPrivateNICsResponse
|
|
854
|
+
*/
|
|
855
|
+
listPrivateNICs = request => enrichForPagination('privateNics', this.pageOfListPrivateNICs, request);
|
|
856
|
+
|
|
857
|
+
/**
|
|
858
|
+
* Create a private NIC connecting an Instance to a Private Network.
|
|
859
|
+
*
|
|
860
|
+
* @param request - The request {@link CreatePrivateNICRequest}
|
|
861
|
+
* @returns A Promise of CreatePrivateNICResponse
|
|
862
|
+
*/
|
|
863
|
+
createPrivateNIC = request => this.client.fetch({
|
|
864
|
+
body: JSON.stringify(marshalCreatePrivateNICRequest(request, this.client.settings)),
|
|
865
|
+
headers: jsonContentHeaders,
|
|
866
|
+
method: 'POST',
|
|
867
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/private_nics`
|
|
868
|
+
}, unmarshalCreatePrivateNICResponse);
|
|
869
|
+
|
|
870
|
+
/**
|
|
871
|
+
* Get a private NIC. Get private NIC properties.
|
|
872
|
+
*
|
|
873
|
+
* @param request - The request {@link GetPrivateNICRequest}
|
|
874
|
+
* @returns A Promise of GetPrivateNICResponse
|
|
875
|
+
*/
|
|
876
|
+
getPrivateNIC = request => this.client.fetch({
|
|
877
|
+
method: 'GET',
|
|
878
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/private_nics/${validatePathParam('privateNicId', request.privateNicId)}`
|
|
879
|
+
}, unmarshalGetPrivateNICResponse);
|
|
880
|
+
|
|
881
|
+
/**
|
|
882
|
+
* Update a private NIC. Update one or more parameter(s) of a specified
|
|
883
|
+
* private NIC.
|
|
884
|
+
*
|
|
885
|
+
* @param request - The request {@link UpdatePrivateNICRequest}
|
|
886
|
+
* @returns A Promise of PrivateNIC
|
|
887
|
+
*/
|
|
888
|
+
updatePrivateNIC = request => this.client.fetch({
|
|
889
|
+
body: JSON.stringify(marshalUpdatePrivateNICRequest(request, this.client.settings)),
|
|
890
|
+
headers: jsonContentHeaders,
|
|
891
|
+
method: 'PATCH',
|
|
892
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/private_nics/${validatePathParam('privateNicId', request.privateNicId)}`
|
|
893
|
+
}, unmarshalPrivateNIC);
|
|
894
|
+
|
|
895
|
+
/**
|
|
896
|
+
* Delete a private NIC.
|
|
897
|
+
*
|
|
898
|
+
* @param request - The request {@link DeletePrivateNICRequest}
|
|
899
|
+
*/
|
|
900
|
+
deletePrivateNIC = request => this.client.fetch({
|
|
901
|
+
method: 'DELETE',
|
|
902
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/private_nics/${validatePathParam('privateNicId', request.privateNicId)}`
|
|
903
|
+
});
|
|
904
|
+
pageOfListBootscripts = (() => {
|
|
905
|
+
var _this23 = this;
|
|
906
|
+
return function (request) {
|
|
787
907
|
if (request === void 0) {
|
|
788
908
|
request = {};
|
|
789
909
|
}
|
|
790
|
-
return
|
|
910
|
+
return _this23.client.fetch({
|
|
791
911
|
method: 'GET',
|
|
792
|
-
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ??
|
|
793
|
-
urlParams: urlParams(['arch', request.arch], ['default', request.default], ['page', request.page], ['per_page', request.perPage ??
|
|
912
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this23.client.settings.defaultZone)}/bootscripts`,
|
|
913
|
+
urlParams: urlParams(['arch', request.arch], ['default', request.default], ['page', request.page], ['per_page', request.perPage ?? _this23.client.settings.defaultPageSize], ['public', request.public], ['title', request.title])
|
|
794
914
|
}, unmarshalListBootscriptsResponse);
|
|
795
915
|
};
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
916
|
+
})();
|
|
917
|
+
|
|
918
|
+
/**
|
|
919
|
+
* List bootscripts.
|
|
920
|
+
*
|
|
921
|
+
* @deprecated
|
|
922
|
+
* @param request - The request {@link ListBootscriptsRequest}
|
|
923
|
+
* @returns A Promise of ListBootscriptsResponse
|
|
924
|
+
*/
|
|
925
|
+
listBootscripts = (() => {
|
|
926
|
+
var _this24 = this;
|
|
927
|
+
return function (request) {
|
|
804
928
|
if (request === void 0) {
|
|
805
929
|
request = {};
|
|
806
930
|
}
|
|
807
|
-
return enrichForPagination('bootscripts',
|
|
931
|
+
return enrichForPagination('bootscripts', _this24.pageOfListBootscripts, request);
|
|
808
932
|
};
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
933
|
+
})();
|
|
934
|
+
|
|
935
|
+
/**
|
|
936
|
+
* Get bootscripts. Get details of a bootscript with the specified ID.
|
|
937
|
+
*
|
|
938
|
+
* @deprecated
|
|
939
|
+
* @param request - The request {@link GetBootscriptRequest}
|
|
940
|
+
* @returns A Promise of GetBootscriptResponse
|
|
941
|
+
*/
|
|
942
|
+
getBootscript = request => this.client.fetch({
|
|
943
|
+
method: 'GET',
|
|
944
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/bootscripts/${validatePathParam('bootscriptId', request.bootscriptId)}`
|
|
945
|
+
}, unmarshalGetBootscriptResponse);
|
|
946
|
+
getDashboard = (() => {
|
|
947
|
+
var _this25 = this;
|
|
948
|
+
return function (request) {
|
|
821
949
|
if (request === void 0) {
|
|
822
950
|
request = {};
|
|
823
951
|
}
|
|
824
|
-
return
|
|
952
|
+
return _this25.client.fetch({
|
|
825
953
|
method: 'GET',
|
|
826
|
-
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ??
|
|
954
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this25.client.settings.defaultZone)}/dashboard`,
|
|
827
955
|
urlParams: urlParams(['organization', request.organization], ['project', request.project])
|
|
828
956
|
}, unmarshalGetDashboardResponse);
|
|
829
957
|
};
|
|
830
|
-
}
|
|
958
|
+
})();
|
|
831
959
|
}
|
|
832
|
-
/** Lists the available zones of the API. */
|
|
833
|
-
API.LOCALITIES = ['fr-par-1', 'fr-par-2', 'fr-par-3', 'nl-ams-1', 'nl-ams-2', 'pl-waw-1', 'pl-waw-2'];
|
|
834
960
|
|
|
835
961
|
export { API };
|