@scaleway/sdk 0.1.0-beta.9 → 1.0.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/README.md +1 -1
- package/dist/api/account/index.js +2 -2
- package/dist/api/account/v2/api.gen.js +5 -18
- package/dist/api/account/v2/index.gen.js +3 -0
- package/dist/api/account/v2/marshalling.gen.js +0 -2
- package/dist/api/account/v2alpha1/api.gen.js +3 -13
- package/dist/api/account/v2alpha1/marshalling.gen.js +0 -5
- package/dist/api/applesilicon/index.js +2 -2
- package/dist/api/applesilicon/v1alpha1/api.gen.js +7 -27
- package/dist/api/applesilicon/v1alpha1/index.gen.js +4 -0
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +1 -14
- package/dist/api/baremetal/v1/api.gen.js +47 -49
- package/dist/api/baremetal/v1/api.utils.js +2 -10
- package/dist/api/baremetal/v1/content.gen.js +6 -3
- package/dist/api/baremetal/v1/index.js +4 -1
- package/dist/api/baremetal/v1/marshalling.gen.js +44 -45
- package/dist/api/baremetal/v1/validation-rules.gen.js +109 -0
- package/dist/api/container/index.js +2 -2
- package/dist/api/container/v1beta1/api.gen.js +5 -51
- package/dist/api/container/v1beta1/content.gen.js +4 -4
- package/dist/api/container/v1beta1/{index.js → index.gen.js} +3 -1
- package/dist/api/container/v1beta1/marshalling.gen.js +12 -26
- package/dist/api/domain/index.js +2 -2
- package/dist/api/domain/v2beta1/api.gen.js +55 -85
- package/dist/api/domain/v2beta1/content.gen.js +22 -1
- package/dist/api/domain/v2beta1/index.gen.js +4 -0
- package/dist/api/domain/v2beta1/marshalling.gen.js +47 -165
- package/dist/api/flexibleip/index.js +2 -2
- package/dist/api/flexibleip/v1alpha1/api.gen.js +5 -22
- package/dist/api/flexibleip/v1alpha1/content.gen.js +1 -1
- package/dist/api/flexibleip/v1alpha1/index.gen.js +6 -0
- package/dist/api/flexibleip/v1alpha1/marshalling.gen.js +0 -7
- package/dist/api/flexibleip/v1alpha1/validation-rules.gen.js +14 -0
- package/dist/api/function/index.js +2 -2
- package/dist/api/function/v1beta1/api.gen.js +54 -57
- package/dist/api/function/v1beta1/content.gen.js +8 -5
- package/dist/api/function/v1beta1/index.gen.js +4 -0
- package/dist/api/function/v1beta1/marshalling.gen.js +125 -33
- package/dist/api/iam/index.js +2 -2
- package/dist/api/iam/v1alpha1/api.gen.js +15 -62
- package/dist/api/iam/v1alpha1/index.gen.js +5 -0
- package/dist/api/iam/v1alpha1/marshalling.gen.js +7 -29
- package/dist/api/iam/v1alpha1/validation-rules.gen.js +184 -0
- package/dist/api/instance/v1/api.gen.js +38 -118
- package/dist/api/instance/v1/api.utils.js +59 -51
- package/dist/api/instance/v1/content.gen.js +7 -7
- package/dist/api/instance/v1/marshalling.gen.js +46 -168
- package/dist/api/instance/v1/marshalling.utils.js +63 -0
- package/dist/api/iot/index.js +2 -2
- package/dist/api/iot/v1/api.gen.js +5 -56
- package/dist/api/iot/v1/index.gen.js +4 -0
- package/dist/api/iot/v1/marshalling.gen.js +2 -51
- package/dist/api/k8s/index.js +2 -2
- package/dist/api/k8s/v1/api.gen.js +17 -43
- package/dist/api/k8s/v1/content.gen.js +2 -2
- package/dist/api/k8s/v1/index.gen.js +6 -0
- package/dist/api/k8s/v1/marshalling.gen.js +18 -36
- package/dist/api/k8s/v1/validation-rules.gen.js +92 -0
- package/dist/api/lb/v1/api.gen.js +8 -163
- package/dist/api/lb/v1/api.utils.js +3 -9
- package/dist/api/lb/v1/content.gen.js +3 -3
- package/dist/api/lb/v1/marshalling.gen.js +74 -101
- package/dist/api/marketplace/index.js +4 -2
- package/dist/api/marketplace/v1/api.gen.js +3 -13
- package/dist/api/marketplace/v1/index.gen.js +3 -0
- package/dist/api/marketplace/v1/marshalling.gen.js +0 -13
- package/dist/api/marketplace/v2/api.gen.js +85 -0
- package/dist/api/marketplace/v2/index.gen.js +3 -0
- package/dist/api/marketplace/v2/marshalling.gen.js +92 -0
- package/dist/api/mnq/index.js +2 -2
- package/dist/api/mnq/v1alpha1/api.gen.js +7 -25
- package/dist/api/mnq/v1alpha1/index.gen.js +3 -0
- package/dist/api/mnq/v1alpha1/marshalling.gen.js +7 -46
- package/dist/api/rdb/index.js +2 -2
- package/dist/api/rdb/v1/api.gen.js +15 -89
- package/dist/api/rdb/v1/content.gen.js +10 -4
- package/dist/api/rdb/v1/index.gen.js +4 -0
- package/dist/api/rdb/v1/marshalling.gen.js +25 -81
- package/dist/api/redis/index.js +2 -2
- package/dist/api/redis/{v1alpha1 → v1}/api.gen.js +45 -77
- package/dist/api/redis/{v1alpha1 → v1}/content.gen.js +1 -1
- package/dist/api/redis/v1/index.gen.js +4 -0
- package/dist/api/redis/{v1alpha1 → v1}/marshalling.gen.js +42 -59
- package/dist/api/registry/index.js +2 -2
- package/dist/api/registry/v1/api.gen.js +5 -29
- package/dist/api/registry/v1/content.gen.js +2 -2
- package/dist/api/registry/v1/{index.js → index.gen.js} +3 -1
- package/dist/api/registry/v1/marshalling.gen.js +2 -8
- package/dist/api/secret/index.js +2 -0
- package/dist/api/secret/v1alpha1/api.gen.js +135 -0
- package/dist/api/secret/v1alpha1/index.gen.js +3 -0
- package/dist/api/secret/v1alpha1/marshalling.gen.js +82 -0
- package/dist/api/tem/index.js +2 -0
- package/dist/api/tem/v1alpha1/api.gen.js +109 -0
- package/dist/api/tem/v1alpha1/content.gen.js +10 -0
- package/dist/api/tem/v1alpha1/index.gen.js +4 -0
- package/dist/api/tem/v1alpha1/marshalling.gen.js +132 -0
- package/dist/api/test/index.js +2 -2
- package/dist/api/test/v1/api.gen.js +6 -20
- package/dist/api/test/v1/index.gen.js +4 -0
- package/dist/api/test/v1/marshalling.gen.js +2 -5
- package/dist/api/vpc/index.js +2 -2
- package/dist/api/vpc/v1/api.gen.js +6 -17
- package/dist/api/vpc/v1/index.gen.js +3 -0
- package/dist/api/vpc/v1/marshalling.gen.js +1 -3
- package/dist/api/vpcgw/index.js +2 -2
- package/dist/api/vpcgw/v1/api.gen.js +5 -64
- package/dist/api/vpcgw/v1/content.gen.js +2 -2
- package/dist/api/vpcgw/v1/{index.js → index.gen.js} +3 -1
- package/dist/api/vpcgw/v1/marshalling.gen.js +3 -24
- package/dist/helpers/json.js +1 -2
- package/dist/helpers/marshalling.js +7 -20
- package/dist/index.cjs +3864 -2945
- package/dist/index.d.ts +7212 -4332
- package/dist/index.js +10 -6
- package/dist/internal/async/interval-retrier.js +10 -16
- package/dist/internal/interceptors/interceptor.js +3 -1
- package/dist/internal/interceptors/request.js +1 -3
- package/dist/internal/logger/console-logger.js +3 -5
- package/dist/internal/logger/index.js +3 -5
- package/dist/internal/logger/level-resolver.js +0 -3
- package/dist/internal/validations/string-validation.js +8 -10
- package/dist/node_modules/.pnpm/@scaleway_random-name@4.0.1/node_modules/@scaleway/random-name/dist/index.js +13 -0
- package/dist/scw/api.js +3 -4
- package/dist/scw/auth.js +3 -5
- package/dist/scw/client-ini-factory.js +32 -15
- package/dist/scw/client-ini-profile.js +10 -4
- package/dist/scw/client-settings.js +32 -15
- package/dist/scw/client.js +5 -6
- package/dist/scw/constants.js +1 -1
- package/dist/scw/custom-marshalling.js +8 -14
- package/dist/scw/errors/error-parser.js +2 -21
- package/dist/scw/errors/non-standard/invalid-request-mapper.js +17 -15
- package/dist/scw/errors/non-standard/unknown-resource-mapper.js +7 -6
- package/dist/scw/errors/scw-error.js +20 -20
- package/dist/scw/errors/standard/already-exists-error.js +3 -4
- package/dist/scw/errors/standard/denied-authentication-error.js +4 -11
- package/dist/scw/errors/standard/invalid-arguments-error.js +1 -10
- package/dist/scw/errors/standard/out-of-stock-error.js +0 -3
- package/dist/scw/errors/standard/permissions-denied-error.js +1 -4
- package/dist/scw/errors/standard/precondition-failed-error.js +4 -8
- package/dist/scw/errors/standard/quotas-exceeded-error.js +14 -14
- package/dist/scw/errors/standard/resource-expired-error.js +3 -4
- package/dist/scw/errors/standard/resource-locked-error.js +3 -4
- package/dist/scw/errors/standard/resource-not-found-error.js +3 -4
- package/dist/scw/errors/standard/too-many-requests-error.js +3 -16
- package/dist/scw/errors/standard/transient-state-error.js +3 -4
- package/dist/scw/errors/types.js +0 -3
- package/dist/scw/fetch/build-fetcher.js +1 -9
- package/dist/scw/fetch/http-dumper.js +4 -7
- package/dist/scw/fetch/http-interceptors.js +9 -12
- package/dist/scw/fetch/resource-paginator.js +18 -16
- package/dist/scw/fetch/response-parser.js +17 -23
- package/node_modules/@scaleway/random-name/CHANGELOG.md +42 -63
- package/node_modules/@scaleway/random-name/dist/index.js +5 -246
- package/node_modules/@scaleway/random-name/package.json +6 -5
- package/package.json +4 -5
- package/dist/api/account/v2/index.js +0 -1
- package/dist/api/applesilicon/v1alpha1/index.js +0 -2
- package/dist/api/domain/v2beta1/index.js +0 -2
- package/dist/api/flexibleip/v1alpha1/index.js +0 -2
- package/dist/api/function/v1beta1/index.js +0 -2
- package/dist/api/iam/v1alpha1/index.js +0 -1
- package/dist/api/iot/v1/index.js +0 -2
- package/dist/api/k8s/v1/index.js +0 -2
- package/dist/api/marketplace/v1/index.js +0 -1
- package/dist/api/mnq/v1alpha1/index.js +0 -1
- package/dist/api/rdb/v1/index.js +0 -2
- package/dist/api/redis/v1alpha1/index.js +0 -2
- package/dist/api/test/v1/index.js +0 -1
- package/dist/api/vpc/v1/index.js +0 -1
- package/dist/node_modules/.pnpm/@scaleway_random-name@3.0.2/node_modules/@scaleway/random-name/dist/index.js +0 -254
- package/node_modules/@scaleway/random-name/dist/index.browser.js +0 -256
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { API } from '../../../scw/api.js';
|
|
1
|
+
import { API as API$1 } from '../../../scw/api.js';
|
|
2
2
|
import { validatePathParam, urlParams } from '../../../helpers/marshalling.js';
|
|
3
3
|
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
4
4
|
import { unmarshalGetServerTypesAvailabilityResponse, unmarshalListServersTypesResponse, unmarshalListVolumesTypesResponse, unmarshalListServersResponse, marshalCreateServerRequest, unmarshalCreateServerResponse, unmarshalGetServerResponse, marshalSetServerRequest, unmarshalSetServerResponse, marshalUpdateServerRequest, unmarshalUpdateServerResponse, unmarshalListServerActionsResponse, marshalServerActionRequest, unmarshalServerActionResponse, unmarshalListServerUserDataResponse, unmarshalListImagesResponse, unmarshalGetImageResponse, marshalCreateImageRequest, unmarshalCreateImageResponse, marshalSetImageRequest, unmarshalSetImageResponse, unmarshalListSnapshotsResponse, marshalCreateSnapshotRequest, unmarshalCreateSnapshotResponse, unmarshalGetSnapshotResponse, marshalSetSnapshotRequest, unmarshalSetSnapshotResponse, marshalExportSnapshotRequest, unmarshalExportSnapshotResponse, unmarshalListVolumesResponse, marshalCreateVolumeRequest, unmarshalCreateVolumeResponse, unmarshalGetVolumeResponse, marshalUpdateVolumeRequest, unmarshalUpdateVolumeResponse, unmarshalListSecurityGroupsResponse, marshalCreateSecurityGroupRequest, unmarshalCreateSecurityGroupResponse, unmarshalGetSecurityGroupResponse, marshalSetSecurityGroupRequest, unmarshalSetSecurityGroupResponse, unmarshalListSecurityGroupRulesResponse, marshalCreateSecurityGroupRuleRequest, unmarshalCreateSecurityGroupRuleResponse, marshalSetSecurityGroupRulesRequest, unmarshalSetSecurityGroupRulesResponse, unmarshalGetSecurityGroupRuleResponse, marshalSetSecurityGroupRuleRequest, unmarshalSetSecurityGroupRuleResponse, unmarshalListPlacementGroupsResponse, marshalCreatePlacementGroupRequest, unmarshalCreatePlacementGroupResponse, unmarshalGetPlacementGroupResponse, marshalSetPlacementGroupRequest, unmarshalSetPlacementGroupResponse, marshalUpdatePlacementGroupRequest, unmarshalUpdatePlacementGroupResponse, unmarshalGetPlacementGroupServersResponse, marshalSetPlacementGroupServersRequest, unmarshalSetPlacementGroupServersResponse, marshalUpdatePlacementGroupServersRequest, unmarshalUpdatePlacementGroupServersResponse, unmarshalListIpsResponse, marshalCreateIpRequest, unmarshalCreateIpResponse, unmarshalGetIpResponse, marshalUpdateIpRequest, unmarshalUpdateIpResponse, unmarshalListPrivateNICsResponse, marshalCreatePrivateNICRequest, unmarshalCreatePrivateNICResponse, unmarshalGetPrivateNICResponse, unmarshalListBootscriptsResponse, unmarshalGetBootscriptResponse, unmarshalGetDashboardResponse } from './marshalling.gen.js';
|
|
@@ -7,452 +7,387 @@ import { unmarshalGetServerTypesAvailabilityResponse, unmarshalListServersTypesR
|
|
|
7
7
|
const jsonContentHeaders = {
|
|
8
8
|
'Content-Type': 'application/json; charset=utf-8'
|
|
9
9
|
};
|
|
10
|
-
/** Instance API. */
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
/** Instance API. */
|
|
12
|
+
class API extends API$1 {
|
|
13
13
|
constructor() {
|
|
14
14
|
var _this;
|
|
15
|
-
|
|
16
15
|
super(...arguments);
|
|
17
16
|
_this = this;
|
|
18
|
-
|
|
19
17
|
this.getServerTypesAvailability = function (request) {
|
|
20
18
|
if (request === void 0) {
|
|
21
19
|
request = {};
|
|
22
20
|
}
|
|
23
|
-
|
|
24
21
|
return _this.client.fetch({
|
|
25
22
|
method: 'GET',
|
|
26
23
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/products/servers/availability`,
|
|
27
24
|
urlParams: urlParams(['page', request.page], ['per_page', request.perPage ?? _this.client.settings.defaultPageSize])
|
|
28
25
|
}, unmarshalGetServerTypesAvailabilityResponse);
|
|
29
26
|
};
|
|
30
|
-
|
|
31
27
|
this.listServersTypes = function (request) {
|
|
32
28
|
if (request === void 0) {
|
|
33
29
|
request = {};
|
|
34
30
|
}
|
|
35
|
-
|
|
36
31
|
return _this.client.fetch({
|
|
37
32
|
method: 'GET',
|
|
38
33
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/products/servers`,
|
|
39
34
|
urlParams: urlParams(['page', request.page], ['per_page', request.perPage ?? _this.client.settings.defaultPageSize])
|
|
40
35
|
}, unmarshalListServersTypesResponse);
|
|
41
36
|
};
|
|
42
|
-
|
|
43
37
|
this.listVolumesTypes = function (request) {
|
|
44
38
|
if (request === void 0) {
|
|
45
39
|
request = {};
|
|
46
40
|
}
|
|
47
|
-
|
|
48
41
|
return _this.client.fetch({
|
|
49
42
|
method: 'GET',
|
|
50
43
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/products/volumes`,
|
|
51
44
|
urlParams: urlParams(['page', request.page], ['per_page', request.perPage ?? _this.client.settings.defaultPageSize])
|
|
52
45
|
}, unmarshalListVolumesTypesResponse);
|
|
53
46
|
};
|
|
54
|
-
|
|
55
47
|
this.pageOfListServers = function (request) {
|
|
56
48
|
if (request === void 0) {
|
|
57
49
|
request = {};
|
|
58
50
|
}
|
|
59
|
-
|
|
60
51
|
return _this.client.fetch({
|
|
61
52
|
method: 'GET',
|
|
62
53
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/servers`,
|
|
63
54
|
urlParams: urlParams(['commercial_type', request.commercialType], ['name', request.name], ['order', request.order], ['organization', request.organization ?? _this.client.settings.defaultOrganizationId], ['page', request.page], ['per_page', request.perPage ?? _this.client.settings.defaultPageSize], ['private_ip', request.privateIp], ['private_network', request.privateNetwork], ['project', request.project ?? _this.client.settings.defaultProjectId], ['state', request.state], ['tags', request.tags && request.tags.length > 0 ? request.tags.join(',') : undefined], ['without_ip', request.withoutIp])
|
|
64
55
|
}, unmarshalListServersResponse);
|
|
65
56
|
};
|
|
66
|
-
|
|
67
57
|
this.listServers = function (request) {
|
|
68
58
|
if (request === void 0) {
|
|
69
59
|
request = {};
|
|
70
60
|
}
|
|
71
|
-
|
|
72
61
|
return enrichForPagination('servers', _this.pageOfListServers, request);
|
|
73
62
|
};
|
|
74
|
-
|
|
75
63
|
this._createServer = request => this.client.fetch({
|
|
76
64
|
body: JSON.stringify(marshalCreateServerRequest(request, this.client.settings)),
|
|
77
65
|
headers: jsonContentHeaders,
|
|
78
66
|
method: 'POST',
|
|
79
67
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers`
|
|
80
68
|
}, unmarshalCreateServerResponse);
|
|
81
|
-
|
|
82
69
|
this.deleteServer = request => this.client.fetch({
|
|
83
70
|
method: 'DELETE',
|
|
84
71
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}`
|
|
85
72
|
});
|
|
86
|
-
|
|
87
73
|
this.getServer = request => this.client.fetch({
|
|
88
74
|
method: 'GET',
|
|
89
75
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}`
|
|
90
76
|
}, unmarshalGetServerResponse);
|
|
91
|
-
|
|
92
77
|
this._setServer = request => this.client.fetch({
|
|
93
78
|
body: JSON.stringify(marshalSetServerRequest(request, this.client.settings)),
|
|
94
79
|
headers: jsonContentHeaders,
|
|
95
80
|
method: 'PUT',
|
|
96
81
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('id', request.id)}`
|
|
97
82
|
}, unmarshalSetServerResponse);
|
|
98
|
-
|
|
99
83
|
this._updateServer = request => this.client.fetch({
|
|
100
84
|
body: JSON.stringify(marshalUpdateServerRequest(request, this.client.settings)),
|
|
101
85
|
headers: jsonContentHeaders,
|
|
102
86
|
method: 'PATCH',
|
|
103
87
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}`
|
|
104
88
|
}, unmarshalUpdateServerResponse);
|
|
105
|
-
|
|
106
89
|
this.listServerActions = request => this.client.fetch({
|
|
107
90
|
method: 'GET',
|
|
108
91
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/action`
|
|
109
92
|
}, unmarshalListServerActionsResponse);
|
|
110
|
-
|
|
111
93
|
this.serverAction = request => this.client.fetch({
|
|
112
94
|
body: JSON.stringify(marshalServerActionRequest(request, this.client.settings)),
|
|
113
95
|
headers: jsonContentHeaders,
|
|
114
96
|
method: 'POST',
|
|
115
97
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/action`
|
|
116
98
|
}, unmarshalServerActionResponse);
|
|
117
|
-
|
|
118
99
|
this.listServerUserData = request => this.client.fetch({
|
|
119
100
|
method: 'GET',
|
|
120
101
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/user_data`
|
|
121
102
|
}, unmarshalListServerUserDataResponse);
|
|
122
|
-
|
|
123
103
|
this.deleteServerUserData = request => this.client.fetch({
|
|
124
104
|
method: 'DELETE',
|
|
125
105
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/user_data/${validatePathParam('key', request.key)}`
|
|
126
106
|
});
|
|
127
|
-
|
|
128
107
|
this.pageOfListImages = function (request) {
|
|
129
108
|
if (request === void 0) {
|
|
130
109
|
request = {};
|
|
131
110
|
}
|
|
132
|
-
|
|
133
111
|
return _this.client.fetch({
|
|
134
112
|
method: 'GET',
|
|
135
113
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/images`,
|
|
136
114
|
urlParams: urlParams(['arch', request.arch], ['name', request.name], ['organization', request.organization ?? _this.client.settings.defaultOrganizationId], ['page', request.page], ['per_page', request.perPage ?? _this.client.settings.defaultPageSize], ['project', request.project ?? _this.client.settings.defaultProjectId], ['public', request.public], ['tags', request.tags])
|
|
137
115
|
}, unmarshalListImagesResponse);
|
|
138
116
|
};
|
|
139
|
-
|
|
140
117
|
this.listImages = function (request) {
|
|
141
118
|
if (request === void 0) {
|
|
142
119
|
request = {};
|
|
143
120
|
}
|
|
144
|
-
|
|
145
121
|
return enrichForPagination('images', _this.pageOfListImages, request);
|
|
146
122
|
};
|
|
147
|
-
|
|
148
123
|
this.getImage = request => this.client.fetch({
|
|
149
124
|
method: 'GET',
|
|
150
125
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/images/${validatePathParam('imageId', request.imageId)}`
|
|
151
126
|
}, unmarshalGetImageResponse);
|
|
152
|
-
|
|
153
127
|
this.createImage = request => this.client.fetch({
|
|
154
128
|
body: JSON.stringify(marshalCreateImageRequest(request, this.client.settings)),
|
|
155
129
|
headers: jsonContentHeaders,
|
|
156
130
|
method: 'POST',
|
|
157
131
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/images`
|
|
158
132
|
}, unmarshalCreateImageResponse);
|
|
159
|
-
|
|
160
133
|
this._setImage = request => this.client.fetch({
|
|
161
134
|
body: JSON.stringify(marshalSetImageRequest(request, this.client.settings)),
|
|
162
135
|
headers: jsonContentHeaders,
|
|
163
136
|
method: 'PUT',
|
|
164
137
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/images/${validatePathParam('id', request.id)}`
|
|
165
138
|
}, unmarshalSetImageResponse);
|
|
166
|
-
|
|
167
139
|
this.deleteImage = request => this.client.fetch({
|
|
168
140
|
method: 'DELETE',
|
|
169
141
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/images/${validatePathParam('imageId', request.imageId)}`
|
|
170
142
|
});
|
|
171
|
-
|
|
172
143
|
this.pageOfListSnapshots = function (request) {
|
|
173
144
|
if (request === void 0) {
|
|
174
145
|
request = {};
|
|
175
146
|
}
|
|
176
|
-
|
|
177
147
|
return _this.client.fetch({
|
|
178
148
|
method: 'GET',
|
|
179
149
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/snapshots`,
|
|
180
150
|
urlParams: urlParams(['name', request.name], ['organization', request.organization ?? _this.client.settings.defaultOrganizationId], ['page', request.page], ['per_page', request.perPage ?? _this.client.settings.defaultPageSize], ['project', request.project ?? _this.client.settings.defaultProjectId], ['tags', request.tags])
|
|
181
151
|
}, unmarshalListSnapshotsResponse);
|
|
182
152
|
};
|
|
183
|
-
|
|
184
153
|
this.listSnapshots = function (request) {
|
|
185
154
|
if (request === void 0) {
|
|
186
155
|
request = {};
|
|
187
156
|
}
|
|
188
|
-
|
|
189
157
|
return enrichForPagination('snapshots', _this.pageOfListSnapshots, request);
|
|
190
158
|
};
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
159
|
+
this.createSnapshot = function (request) {
|
|
160
|
+
if (request === void 0) {
|
|
161
|
+
request = {};
|
|
162
|
+
}
|
|
163
|
+
return _this.client.fetch({
|
|
164
|
+
body: JSON.stringify(marshalCreateSnapshotRequest(request, _this.client.settings)),
|
|
165
|
+
headers: jsonContentHeaders,
|
|
166
|
+
method: 'POST',
|
|
167
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/snapshots`
|
|
168
|
+
}, unmarshalCreateSnapshotResponse);
|
|
169
|
+
};
|
|
199
170
|
this.getSnapshot = request => this.client.fetch({
|
|
200
171
|
method: 'GET',
|
|
201
172
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/snapshots/${validatePathParam('snapshotId', request.snapshotId)}`
|
|
202
173
|
}, unmarshalGetSnapshotResponse);
|
|
203
|
-
|
|
204
174
|
this._setSnapshot = request => this.client.fetch({
|
|
205
175
|
body: JSON.stringify(marshalSetSnapshotRequest(request, this.client.settings)),
|
|
206
176
|
headers: jsonContentHeaders,
|
|
207
177
|
method: 'PUT',
|
|
208
178
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/snapshots/${validatePathParam('snapshotId', request.snapshotId)}`
|
|
209
179
|
}, unmarshalSetSnapshotResponse);
|
|
210
|
-
|
|
211
180
|
this.deleteSnapshot = request => this.client.fetch({
|
|
212
181
|
method: 'DELETE',
|
|
213
182
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/snapshots/${validatePathParam('snapshotId', request.snapshotId)}`
|
|
214
183
|
});
|
|
215
|
-
|
|
216
184
|
this.exportSnapshot = request => this.client.fetch({
|
|
217
185
|
body: JSON.stringify(marshalExportSnapshotRequest(request, this.client.settings)),
|
|
218
186
|
headers: jsonContentHeaders,
|
|
219
187
|
method: 'POST',
|
|
220
188
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/snapshots/${validatePathParam('snapshotId', request.snapshotId)}/export`
|
|
221
189
|
}, unmarshalExportSnapshotResponse);
|
|
222
|
-
|
|
223
190
|
this.pageOfListVolumes = function (request) {
|
|
224
191
|
if (request === void 0) {
|
|
225
192
|
request = {};
|
|
226
193
|
}
|
|
227
|
-
|
|
228
194
|
return _this.client.fetch({
|
|
229
195
|
method: 'GET',
|
|
230
196
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/volumes`,
|
|
231
197
|
urlParams: urlParams(['name', request.name], ['organization', request.organization ?? _this.client.settings.defaultOrganizationId], ['page', request.page], ['per_page', request.perPage ?? _this.client.settings.defaultPageSize], ['project', request.project ?? _this.client.settings.defaultProjectId], ['tags', request.tags && request.tags.length > 0 ? request.tags.join(',') : undefined], ['volume_type', request.volumeType])
|
|
232
198
|
}, unmarshalListVolumesResponse);
|
|
233
199
|
};
|
|
234
|
-
|
|
235
200
|
this.listVolumes = function (request) {
|
|
236
201
|
if (request === void 0) {
|
|
237
202
|
request = {};
|
|
238
203
|
}
|
|
239
|
-
|
|
240
204
|
return enrichForPagination('volumes', _this.pageOfListVolumes, request);
|
|
241
205
|
};
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
206
|
+
this.createVolume = function (request) {
|
|
207
|
+
if (request === void 0) {
|
|
208
|
+
request = {};
|
|
209
|
+
}
|
|
210
|
+
return _this.client.fetch({
|
|
211
|
+
body: JSON.stringify(marshalCreateVolumeRequest(request, _this.client.settings)),
|
|
212
|
+
headers: jsonContentHeaders,
|
|
213
|
+
method: 'POST',
|
|
214
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/volumes`
|
|
215
|
+
}, unmarshalCreateVolumeResponse);
|
|
216
|
+
};
|
|
250
217
|
this.getVolume = request => this.client.fetch({
|
|
251
218
|
method: 'GET',
|
|
252
219
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/volumes/${validatePathParam('volumeId', request.volumeId)}`
|
|
253
220
|
}, unmarshalGetVolumeResponse);
|
|
254
|
-
|
|
255
221
|
this.updateVolume = request => this.client.fetch({
|
|
256
222
|
body: JSON.stringify(marshalUpdateVolumeRequest(request, this.client.settings)),
|
|
257
223
|
headers: jsonContentHeaders,
|
|
258
224
|
method: 'PATCH',
|
|
259
225
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/volumes/${validatePathParam('volumeId', request.volumeId)}`
|
|
260
226
|
}, unmarshalUpdateVolumeResponse);
|
|
261
|
-
|
|
262
227
|
this.deleteVolume = request => this.client.fetch({
|
|
263
228
|
method: 'DELETE',
|
|
264
229
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/volumes/${validatePathParam('volumeId', request.volumeId)}`
|
|
265
230
|
});
|
|
266
|
-
|
|
267
231
|
this.pageOfListSecurityGroups = function (request) {
|
|
268
232
|
if (request === void 0) {
|
|
269
233
|
request = {};
|
|
270
234
|
}
|
|
271
|
-
|
|
272
235
|
return _this.client.fetch({
|
|
273
236
|
method: 'GET',
|
|
274
237
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/security_groups`,
|
|
275
238
|
urlParams: urlParams(['name', request.name], ['organization', request.organization ?? _this.client.settings.defaultOrganizationId], ['page', request.page], ['per_page', request.perPage ?? _this.client.settings.defaultPageSize], ['project', request.project ?? _this.client.settings.defaultProjectId], ['project_default', request.projectDefault], ['tags', request.tags && request.tags.length > 0 ? request.tags.join(',') : undefined])
|
|
276
239
|
}, unmarshalListSecurityGroupsResponse);
|
|
277
240
|
};
|
|
278
|
-
|
|
279
241
|
this.listSecurityGroups = function (request) {
|
|
280
242
|
if (request === void 0) {
|
|
281
243
|
request = {};
|
|
282
244
|
}
|
|
283
|
-
|
|
284
245
|
return enrichForPagination('securityGroups', _this.pageOfListSecurityGroups, request);
|
|
285
246
|
};
|
|
286
|
-
|
|
287
247
|
this.createSecurityGroup = request => this.client.fetch({
|
|
288
248
|
body: JSON.stringify(marshalCreateSecurityGroupRequest(request, this.client.settings)),
|
|
289
249
|
headers: jsonContentHeaders,
|
|
290
250
|
method: 'POST',
|
|
291
251
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups`
|
|
292
252
|
}, unmarshalCreateSecurityGroupResponse);
|
|
293
|
-
|
|
294
253
|
this.getSecurityGroup = request => this.client.fetch({
|
|
295
254
|
method: 'GET',
|
|
296
255
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups/${validatePathParam('securityGroupId', request.securityGroupId)}`
|
|
297
256
|
}, unmarshalGetSecurityGroupResponse);
|
|
298
|
-
|
|
299
257
|
this.deleteSecurityGroup = request => this.client.fetch({
|
|
300
258
|
method: 'DELETE',
|
|
301
259
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups/${validatePathParam('securityGroupId', request.securityGroupId)}`
|
|
302
260
|
});
|
|
303
|
-
|
|
304
261
|
this._setSecurityGroup = request => this.client.fetch({
|
|
305
262
|
body: JSON.stringify(marshalSetSecurityGroupRequest(request, this.client.settings)),
|
|
306
263
|
headers: jsonContentHeaders,
|
|
307
264
|
method: 'PUT',
|
|
308
265
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups/${validatePathParam('id', request.id)}`
|
|
309
266
|
}, unmarshalSetSecurityGroupResponse);
|
|
310
|
-
|
|
311
267
|
this.listDefaultSecurityGroupRules = function (request) {
|
|
312
268
|
if (request === void 0) {
|
|
313
269
|
request = {};
|
|
314
270
|
}
|
|
315
|
-
|
|
316
271
|
return _this.client.fetch({
|
|
317
272
|
method: 'GET',
|
|
318
273
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/security_groups/default/rules`
|
|
319
274
|
}, unmarshalListSecurityGroupRulesResponse);
|
|
320
275
|
};
|
|
321
|
-
|
|
322
276
|
this.pageOfListSecurityGroupRules = request => this.client.fetch({
|
|
323
277
|
method: 'GET',
|
|
324
278
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups/${validatePathParam('securityGroupId', request.securityGroupId)}/rules`,
|
|
325
279
|
urlParams: urlParams(['page', request.page], ['per_page', request.perPage ?? this.client.settings.defaultPageSize])
|
|
326
280
|
}, unmarshalListSecurityGroupRulesResponse);
|
|
327
|
-
|
|
328
281
|
this.listSecurityGroupRules = request => enrichForPagination('rules', this.pageOfListSecurityGroupRules, request);
|
|
329
|
-
|
|
330
282
|
this.createSecurityGroupRule = request => this.client.fetch({
|
|
331
283
|
body: JSON.stringify(marshalCreateSecurityGroupRuleRequest(request, this.client.settings)),
|
|
332
284
|
headers: jsonContentHeaders,
|
|
333
285
|
method: 'POST',
|
|
334
286
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups/${validatePathParam('securityGroupId', request.securityGroupId)}/rules`
|
|
335
287
|
}, unmarshalCreateSecurityGroupRuleResponse);
|
|
336
|
-
|
|
337
288
|
this.setSecurityGroupRules = request => this.client.fetch({
|
|
338
289
|
body: JSON.stringify(marshalSetSecurityGroupRulesRequest(request, this.client.settings)),
|
|
339
290
|
headers: jsonContentHeaders,
|
|
340
291
|
method: 'PUT',
|
|
341
292
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups/${validatePathParam('securityGroupId', request.securityGroupId)}/rules`
|
|
342
293
|
}, unmarshalSetSecurityGroupRulesResponse);
|
|
343
|
-
|
|
344
294
|
this.deleteSecurityGroupRule = request => this.client.fetch({
|
|
345
295
|
method: 'DELETE',
|
|
346
296
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups/${validatePathParam('securityGroupId', request.securityGroupId)}/rules/${validatePathParam('securityGroupRuleId', request.securityGroupRuleId)}`
|
|
347
297
|
});
|
|
348
|
-
|
|
349
298
|
this.getSecurityGroupRule = request => this.client.fetch({
|
|
350
299
|
method: 'GET',
|
|
351
300
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups/${validatePathParam('securityGroupId', request.securityGroupId)}/rules/${validatePathParam('securityGroupRuleId', request.securityGroupRuleId)}`
|
|
352
301
|
}, unmarshalGetSecurityGroupRuleResponse);
|
|
353
|
-
|
|
354
302
|
this._setSecurityGroupRule = request => this.client.fetch({
|
|
355
303
|
body: JSON.stringify(marshalSetSecurityGroupRuleRequest(request, this.client.settings)),
|
|
356
304
|
headers: jsonContentHeaders,
|
|
357
305
|
method: 'PUT',
|
|
358
306
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups/${validatePathParam('securityGroupId', request.securityGroupId)}/rules/${validatePathParam('securityGroupRuleId', request.securityGroupRuleId)}`
|
|
359
307
|
}, unmarshalSetSecurityGroupRuleResponse);
|
|
360
|
-
|
|
361
308
|
this.pageOfListPlacementGroups = function (request) {
|
|
362
309
|
if (request === void 0) {
|
|
363
310
|
request = {};
|
|
364
311
|
}
|
|
365
|
-
|
|
366
312
|
return _this.client.fetch({
|
|
367
313
|
method: 'GET',
|
|
368
314
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/placement_groups`,
|
|
369
315
|
urlParams: urlParams(['name', request.name], ['organization', request.organization ?? _this.client.settings.defaultOrganizationId], ['page', request.page], ['per_page', request.perPage ?? _this.client.settings.defaultPageSize], ['project', request.project ?? _this.client.settings.defaultProjectId], ['tags', request.tags && request.tags.length > 0 ? request.tags.join(',') : undefined])
|
|
370
316
|
}, unmarshalListPlacementGroupsResponse);
|
|
371
317
|
};
|
|
372
|
-
|
|
373
318
|
this.listPlacementGroups = function (request) {
|
|
374
319
|
if (request === void 0) {
|
|
375
320
|
request = {};
|
|
376
321
|
}
|
|
377
|
-
|
|
378
322
|
return enrichForPagination('placementGroups', _this.pageOfListPlacementGroups, request);
|
|
379
323
|
};
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
324
|
+
this.createPlacementGroup = function (request) {
|
|
325
|
+
if (request === void 0) {
|
|
326
|
+
request = {};
|
|
327
|
+
}
|
|
328
|
+
return _this.client.fetch({
|
|
329
|
+
body: JSON.stringify(marshalCreatePlacementGroupRequest(request, _this.client.settings)),
|
|
330
|
+
headers: jsonContentHeaders,
|
|
331
|
+
method: 'POST',
|
|
332
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/placement_groups`
|
|
333
|
+
}, unmarshalCreatePlacementGroupResponse);
|
|
334
|
+
};
|
|
388
335
|
this.getPlacementGroup = request => this.client.fetch({
|
|
389
336
|
method: 'GET',
|
|
390
337
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/placement_groups/${validatePathParam('placementGroupId', request.placementGroupId)}`
|
|
391
338
|
}, unmarshalGetPlacementGroupResponse);
|
|
392
|
-
|
|
393
339
|
this.setPlacementGroup = request => this.client.fetch({
|
|
394
340
|
body: JSON.stringify(marshalSetPlacementGroupRequest(request, this.client.settings)),
|
|
395
341
|
headers: jsonContentHeaders,
|
|
396
342
|
method: 'PUT',
|
|
397
343
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/placement_groups/${validatePathParam('placementGroupId', request.placementGroupId)}`
|
|
398
344
|
}, unmarshalSetPlacementGroupResponse);
|
|
399
|
-
|
|
400
345
|
this.updatePlacementGroup = request => this.client.fetch({
|
|
401
346
|
body: JSON.stringify(marshalUpdatePlacementGroupRequest(request, this.client.settings)),
|
|
402
347
|
headers: jsonContentHeaders,
|
|
403
348
|
method: 'PATCH',
|
|
404
349
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/placement_groups/${validatePathParam('placementGroupId', request.placementGroupId)}`
|
|
405
350
|
}, unmarshalUpdatePlacementGroupResponse);
|
|
406
|
-
|
|
407
351
|
this.deletePlacementGroup = request => this.client.fetch({
|
|
408
352
|
method: 'DELETE',
|
|
409
353
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/placement_groups/${validatePathParam('placementGroupId', request.placementGroupId)}`
|
|
410
354
|
});
|
|
411
|
-
|
|
412
355
|
this.getPlacementGroupServers = request => this.client.fetch({
|
|
413
356
|
method: 'GET',
|
|
414
357
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/placement_groups/${validatePathParam('placementGroupId', request.placementGroupId)}/servers`
|
|
415
358
|
}, unmarshalGetPlacementGroupServersResponse);
|
|
416
|
-
|
|
417
359
|
this.setPlacementGroupServers = request => this.client.fetch({
|
|
418
360
|
body: JSON.stringify(marshalSetPlacementGroupServersRequest(request, this.client.settings)),
|
|
419
361
|
headers: jsonContentHeaders,
|
|
420
362
|
method: 'PUT',
|
|
421
363
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/placement_groups/${validatePathParam('placementGroupId', request.placementGroupId)}/servers`
|
|
422
364
|
}, unmarshalSetPlacementGroupServersResponse);
|
|
423
|
-
|
|
424
365
|
this.updatePlacementGroupServers = request => this.client.fetch({
|
|
425
366
|
body: JSON.stringify(marshalUpdatePlacementGroupServersRequest(request, this.client.settings)),
|
|
426
367
|
headers: jsonContentHeaders,
|
|
427
368
|
method: 'PATCH',
|
|
428
369
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/placement_groups/${validatePathParam('placementGroupId', request.placementGroupId)}/servers`
|
|
429
370
|
}, unmarshalUpdatePlacementGroupServersResponse);
|
|
430
|
-
|
|
431
371
|
this.pageOfListIps = function (request) {
|
|
432
372
|
if (request === void 0) {
|
|
433
373
|
request = {};
|
|
434
374
|
}
|
|
435
|
-
|
|
436
375
|
return _this.client.fetch({
|
|
437
376
|
method: 'GET',
|
|
438
377
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/ips`,
|
|
439
378
|
urlParams: urlParams(['name', request.name], ['organization', request.organization ?? _this.client.settings.defaultOrganizationId], ['page', request.page], ['per_page', request.perPage ?? _this.client.settings.defaultPageSize], ['project', request.project ?? _this.client.settings.defaultProjectId], ['tags', request.tags && request.tags.length > 0 ? request.tags.join(',') : undefined])
|
|
440
379
|
}, unmarshalListIpsResponse);
|
|
441
380
|
};
|
|
442
|
-
|
|
443
381
|
this.listIps = function (request) {
|
|
444
382
|
if (request === void 0) {
|
|
445
383
|
request = {};
|
|
446
384
|
}
|
|
447
|
-
|
|
448
385
|
return enrichForPagination('ips', _this.pageOfListIps, request);
|
|
449
386
|
};
|
|
450
|
-
|
|
451
387
|
this.createIp = function (request) {
|
|
452
388
|
if (request === void 0) {
|
|
453
389
|
request = {};
|
|
454
390
|
}
|
|
455
|
-
|
|
456
391
|
return _this.client.fetch({
|
|
457
392
|
body: JSON.stringify(marshalCreateIpRequest(request, _this.client.settings)),
|
|
458
393
|
headers: jsonContentHeaders,
|
|
@@ -460,76 +395,62 @@ class InstanceV1GenAPI extends API {
|
|
|
460
395
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/ips`
|
|
461
396
|
}, unmarshalCreateIpResponse);
|
|
462
397
|
};
|
|
463
|
-
|
|
464
398
|
this.getIp = request => this.client.fetch({
|
|
465
399
|
method: 'GET',
|
|
466
400
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/ips/${validatePathParam('ip', request.ip)}`
|
|
467
401
|
}, unmarshalGetIpResponse);
|
|
468
|
-
|
|
469
402
|
this.updateIp = request => this.client.fetch({
|
|
470
403
|
body: JSON.stringify(marshalUpdateIpRequest(request, this.client.settings)),
|
|
471
404
|
headers: jsonContentHeaders,
|
|
472
405
|
method: 'PATCH',
|
|
473
406
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/ips/${validatePathParam('ip', request.ip)}`
|
|
474
407
|
}, unmarshalUpdateIpResponse);
|
|
475
|
-
|
|
476
408
|
this.deleteIp = request => this.client.fetch({
|
|
477
409
|
method: 'DELETE',
|
|
478
410
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/ips/${validatePathParam('ip', request.ip)}`
|
|
479
411
|
});
|
|
480
|
-
|
|
481
412
|
this.listPrivateNICs = request => this.client.fetch({
|
|
482
413
|
method: 'GET',
|
|
483
414
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/private_nics`
|
|
484
415
|
}, unmarshalListPrivateNICsResponse);
|
|
485
|
-
|
|
486
416
|
this.createPrivateNIC = request => this.client.fetch({
|
|
487
417
|
body: JSON.stringify(marshalCreatePrivateNICRequest(request, this.client.settings)),
|
|
488
418
|
headers: jsonContentHeaders,
|
|
489
419
|
method: 'POST',
|
|
490
420
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/private_nics`
|
|
491
421
|
}, unmarshalCreatePrivateNICResponse);
|
|
492
|
-
|
|
493
422
|
this.getPrivateNIC = request => this.client.fetch({
|
|
494
423
|
method: 'GET',
|
|
495
424
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/private_nics/${validatePathParam('privateNicId', request.privateNicId)}`
|
|
496
425
|
}, unmarshalGetPrivateNICResponse);
|
|
497
|
-
|
|
498
426
|
this.deletePrivateNIC = request => this.client.fetch({
|
|
499
427
|
method: 'DELETE',
|
|
500
428
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/private_nics/${validatePathParam('privateNicId', request.privateNicId)}`
|
|
501
429
|
});
|
|
502
|
-
|
|
503
430
|
this.pageOfListBootscripts = function (request) {
|
|
504
431
|
if (request === void 0) {
|
|
505
432
|
request = {};
|
|
506
433
|
}
|
|
507
|
-
|
|
508
434
|
return _this.client.fetch({
|
|
509
435
|
method: 'GET',
|
|
510
436
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/bootscripts`,
|
|
511
437
|
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])
|
|
512
438
|
}, unmarshalListBootscriptsResponse);
|
|
513
439
|
};
|
|
514
|
-
|
|
515
440
|
this.listBootscripts = function (request) {
|
|
516
441
|
if (request === void 0) {
|
|
517
442
|
request = {};
|
|
518
443
|
}
|
|
519
|
-
|
|
520
444
|
return enrichForPagination('bootscripts', _this.pageOfListBootscripts, request);
|
|
521
445
|
};
|
|
522
|
-
|
|
523
446
|
this.getBootscript = request => this.client.fetch({
|
|
524
447
|
method: 'GET',
|
|
525
448
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/bootscripts/${validatePathParam('bootscriptId', request.bootscriptId)}`
|
|
526
449
|
}, unmarshalGetBootscriptResponse);
|
|
527
|
-
|
|
528
450
|
this.getDashboard = function (request) {
|
|
529
451
|
if (request === void 0) {
|
|
530
452
|
request = {};
|
|
531
453
|
}
|
|
532
|
-
|
|
533
454
|
return _this.client.fetch({
|
|
534
455
|
method: 'GET',
|
|
535
456
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/dashboard`,
|
|
@@ -537,8 +458,7 @@ class InstanceV1GenAPI extends API {
|
|
|
537
458
|
}, unmarshalGetDashboardResponse);
|
|
538
459
|
};
|
|
539
460
|
}
|
|
540
|
-
|
|
541
461
|
}
|
|
542
|
-
|
|
462
|
+
API.LOCALITIES = ['fr-par-1', 'fr-par-2', 'fr-par-3', 'nl-ams-1', 'nl-ams-2', 'pl-waw-1', 'pl-waw-2'];
|
|
543
463
|
|
|
544
|
-
export {
|
|
464
|
+
export { API };
|