@scaleway/sdk 1.14.0 → 1.15.0

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