@scaleway/sdk 2.5.0 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/account/v2/api.gen.js +26 -74
- package/dist/api/account/v3/api.gen.js +20 -60
- package/dist/api/applesilicon/v1alpha1/api.gen.js +16 -56
- package/dist/api/baremetal/v1/api.gen.js +36 -132
- package/dist/api/billing/v2alpha1/api.gen.js +17 -57
- package/dist/api/block/v1alpha1/api.gen.js +19 -67
- package/dist/api/block/v1alpha1/marshalling.gen.js +1 -0
- package/dist/api/cockpit/v1beta1/api.gen.js +95 -279
- package/dist/api/container/v1beta1/api.gen.js +51 -123
- package/dist/api/document_db/v1beta1/api.gen.js +18 -66
- package/dist/api/document_db/v1beta1/marshalling.gen.js +20 -1
- package/dist/api/domain/v2beta1/api.gen.js +36 -124
- package/dist/api/flexibleip/v1alpha1/api.gen.js +6 -22
- package/dist/api/function/v1beta1/api.gen.js +55 -135
- package/dist/api/iam/v1alpha1/api.gen.js +66 -226
- package/dist/api/instance/v1/api.gen.js +156 -325
- package/dist/api/instance/v1/api.utils.js +0 -126
- package/dist/api/instance/v1/marshalling.gen.js +99 -51
- package/dist/api/iot/v1/api.gen.js +24 -88
- package/dist/api/ipam/v1/api.gen.js +12 -28
- package/dist/api/ipfs/v1alpha1/api.gen.js +12 -44
- package/dist/api/jobs/v1alpha1/api.gen.js +13 -58
- package/dist/api/jobs/v1alpha1/marshalling.gen.js +2 -0
- package/dist/api/k8s/v1/api.gen.js +16 -56
- package/dist/api/k8s/v1/marshalling.gen.js +1 -0
- package/dist/api/lb/v1/api.gen.js +72 -248
- package/dist/api/marketplace/v1/api.gen.js +7 -31
- package/dist/api/marketplace/v1/marshalling.gen.js +1 -18
- package/dist/api/marketplace/v2/api.gen.js +21 -53
- package/dist/api/mnq/v1beta1/api.gen.js +76 -212
- package/dist/api/rdb/v1/api.gen.js +24 -88
- package/dist/api/rdb/v1/marshalling.gen.js +11 -1
- package/dist/api/redis/v1/api.gen.js +6 -22
- package/dist/api/registry/v1/api.gen.js +12 -44
- package/dist/api/secret/v1alpha1/api.gen.js +18 -66
- package/dist/api/serverless_sqldb/index.js +2 -0
- package/dist/api/serverless_sqldb/v1alpha1/api.gen.js +162 -0
- package/dist/api/serverless_sqldb/v1alpha1/content.gen.js +7 -0
- package/dist/api/serverless_sqldb/v1alpha1/index.gen.js +7 -0
- package/dist/api/serverless_sqldb/v1alpha1/marshalling.gen.js +77 -0
- package/dist/api/serverless_sqldb/v1alpha1/validation-rules.gen.js +60 -0
- package/dist/api/tem/v1alpha1/api.gen.js +17 -57
- package/dist/api/test/v1/api.gen.js +6 -22
- package/dist/api/vpc/v1/api.gen.js +12 -36
- package/dist/api/vpc/v2/api.gen.js +30 -86
- package/dist/api/vpcgw/v1/api.gen.js +46 -158
- package/dist/api/webhosting/v1alpha1/api.gen.js +12 -44
- package/dist/helpers/marshalling.js +8 -23
- package/dist/index.cjs +1066 -821
- package/dist/index.d.ts +2191 -1780
- package/dist/index.js +12 -10
- package/dist/internal/async/interval-retrier.js +8 -16
- package/dist/internal/interceptors/helpers.js +3 -4
- package/dist/internal/logger/console-logger.js +1 -7
- package/dist/internal/logger/index.js +1 -9
- package/dist/scw/auth.js +1 -2
- package/dist/scw/client.js +2 -10
- package/dist/scw/constants.js +1 -1
- package/dist/scw/errors/non-standard/invalid-request-mapper.js +5 -8
- package/dist/scw/errors/scw-error.js +2 -9
- package/dist/scw/errors/standard/permissions-denied-error.js +4 -7
- package/dist/scw/fetch/build-fetcher.js +1 -4
- package/dist/scw/fetch/http-dumper.js +1 -4
- package/dist/scw/fetch/http-interceptors.js +18 -31
- package/dist/scw/fetch/resource-paginator.js +3 -17
- package/package.json +2 -2
- package/dist/api/instance/v1/marshalling.utils.js +0 -63
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { isJSONObject } from '../../../helpers/json.js';
|
|
2
|
+
import { unmarshalDate, unmarshalArrayOfObject } from '../../../helpers/marshalling.js';
|
|
3
|
+
|
|
4
|
+
// This file was automatically generated. DO NOT EDIT.
|
|
5
|
+
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
6
|
+
const unmarshalDatabaseBackup = data => {
|
|
7
|
+
if (!isJSONObject(data)) {
|
|
8
|
+
throw new TypeError(`Unmarshalling the type 'DatabaseBackup' failed as data isn't a dictionary.`);
|
|
9
|
+
}
|
|
10
|
+
return {
|
|
11
|
+
createdAt: unmarshalDate(data.created_at),
|
|
12
|
+
databaseId: data.database_id,
|
|
13
|
+
downloadUrl: data.download_url,
|
|
14
|
+
downloadUrlExpiresAt: unmarshalDate(data.download_url_expires_at),
|
|
15
|
+
expiresAt: unmarshalDate(data.expires_at),
|
|
16
|
+
id: data.id,
|
|
17
|
+
organizationId: data.organization_id,
|
|
18
|
+
projectId: data.project_id,
|
|
19
|
+
region: data.region,
|
|
20
|
+
size: data.size,
|
|
21
|
+
status: data.status
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
const unmarshalDatabase = data => {
|
|
25
|
+
if (!isJSONObject(data)) {
|
|
26
|
+
throw new TypeError(`Unmarshalling the type 'Database' failed as data isn't a dictionary.`);
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
cpuCurrent: data.cpu_current,
|
|
30
|
+
cpuMax: data.cpu_max,
|
|
31
|
+
cpuMin: data.cpu_min,
|
|
32
|
+
createdAt: unmarshalDate(data.created_at),
|
|
33
|
+
endpoint: data.endpoint,
|
|
34
|
+
engineMajorVersion: data.engine_major_version,
|
|
35
|
+
id: data.id,
|
|
36
|
+
name: data.name,
|
|
37
|
+
organizationId: data.organization_id,
|
|
38
|
+
projectId: data.project_id,
|
|
39
|
+
region: data.region,
|
|
40
|
+
started: data.started,
|
|
41
|
+
status: data.status
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
const unmarshalListDatabaseBackupsResponse = data => {
|
|
45
|
+
if (!isJSONObject(data)) {
|
|
46
|
+
throw new TypeError(`Unmarshalling the type 'ListDatabaseBackupsResponse' failed as data isn't a dictionary.`);
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
backups: unmarshalArrayOfObject(data.backups, unmarshalDatabaseBackup),
|
|
50
|
+
totalCount: data.total_count
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
const unmarshalListDatabasesResponse = data => {
|
|
54
|
+
if (!isJSONObject(data)) {
|
|
55
|
+
throw new TypeError(`Unmarshalling the type 'ListDatabasesResponse' failed as data isn't a dictionary.`);
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
databases: unmarshalArrayOfObject(data.databases, unmarshalDatabase),
|
|
59
|
+
totalCount: data.total_count
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
const marshalCreateDatabaseRequest = (request, defaults) => ({
|
|
63
|
+
cpu_max: request.cpuMax,
|
|
64
|
+
cpu_min: request.cpuMin,
|
|
65
|
+
from_backup_id: request.fromBackupId,
|
|
66
|
+
name: request.name,
|
|
67
|
+
project_id: request.projectId ?? defaults.defaultProjectId
|
|
68
|
+
});
|
|
69
|
+
const marshalRestoreDatabaseFromBackupRequest = (request, defaults) => ({
|
|
70
|
+
backup_id: request.backupId
|
|
71
|
+
});
|
|
72
|
+
const marshalUpdateDatabaseRequest = (request, defaults) => ({
|
|
73
|
+
cpu_max: request.cpuMax,
|
|
74
|
+
cpu_min: request.cpuMin
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
export { marshalCreateDatabaseRequest, marshalRestoreDatabaseFromBackupRequest, marshalUpdateDatabaseRequest, unmarshalDatabase, unmarshalDatabaseBackup, unmarshalListDatabaseBackupsResponse, unmarshalListDatabasesResponse };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// This file was automatically generated. DO NOT EDIT.
|
|
2
|
+
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
3
|
+
|
|
4
|
+
const CreateDatabaseRequest = {
|
|
5
|
+
cpuMax: {
|
|
6
|
+
greaterThanOrEqual: 1,
|
|
7
|
+
lessThanOrEqual: 15
|
|
8
|
+
},
|
|
9
|
+
cpuMin: {
|
|
10
|
+
lessThanOrEqual: 15
|
|
11
|
+
},
|
|
12
|
+
fromBackupId: {
|
|
13
|
+
ignoreEmpty: true
|
|
14
|
+
},
|
|
15
|
+
name: {
|
|
16
|
+
maxLength: 63,
|
|
17
|
+
minLength: 1
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
const Database = {
|
|
21
|
+
cpuCurrent: {
|
|
22
|
+
lessThanOrEqual: 15
|
|
23
|
+
},
|
|
24
|
+
cpuMax: {
|
|
25
|
+
greaterThanOrEqual: 1,
|
|
26
|
+
lessThanOrEqual: 15
|
|
27
|
+
},
|
|
28
|
+
cpuMin: {
|
|
29
|
+
lessThanOrEqual: 15
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
const ListDatabaseBackupsRequest = {
|
|
33
|
+
page: {
|
|
34
|
+
greaterThanOrEqual: 1
|
|
35
|
+
},
|
|
36
|
+
pageSize: {
|
|
37
|
+
greaterThanOrEqual: 1,
|
|
38
|
+
lessThanOrEqual: 1000
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
const ListDatabasesRequest = {
|
|
42
|
+
page: {
|
|
43
|
+
greaterThanOrEqual: 1
|
|
44
|
+
},
|
|
45
|
+
pageSize: {
|
|
46
|
+
greaterThanOrEqual: 1,
|
|
47
|
+
lessThanOrEqual: 1000
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
const UpdateDatabaseRequest = {
|
|
51
|
+
cpuMax: {
|
|
52
|
+
greaterThanOrEqual: 1,
|
|
53
|
+
lessThanOrEqual: 15
|
|
54
|
+
},
|
|
55
|
+
cpuMin: {
|
|
56
|
+
lessThanOrEqual: 15
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export { CreateDatabaseRequest, Database, ListDatabaseBackupsRequest, ListDatabasesRequest, UpdateDatabaseRequest };
|
|
@@ -52,19 +52,11 @@ class API extends API$1 {
|
|
|
52
52
|
* @returns A Promise of Email
|
|
53
53
|
*/
|
|
54
54
|
waitForEmail = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!EMAIL_TRANSIENT_STATUSES.includes(res.status))), this.getEmail, request, options);
|
|
55
|
-
pageOfListEmails = (
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
return _this.client.fetch({
|
|
62
|
-
method: 'GET',
|
|
63
|
-
path: `/transactional-email/v1alpha1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/emails`,
|
|
64
|
-
urlParams: urlParams(['domain_id', request.domainId], ['flags', request.flags], ['mail_from', request.mailFrom], ['mail_rcpt', request.mailRcpt], ['mail_to', request.mailTo], ['message_id', request.messageId], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId], ['search', request.search], ['since', request.since], ['statuses', request.statuses], ['subject', request.subject], ['until', request.until])
|
|
65
|
-
}, unmarshalListEmailsResponse);
|
|
66
|
-
};
|
|
67
|
-
})();
|
|
55
|
+
pageOfListEmails = (request = {}) => this.client.fetch({
|
|
56
|
+
method: 'GET',
|
|
57
|
+
path: `/transactional-email/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/emails`,
|
|
58
|
+
urlParams: urlParams(['domain_id', request.domainId], ['flags', request.flags], ['mail_from', request.mailFrom], ['mail_rcpt', request.mailRcpt], ['mail_to', request.mailTo], ['message_id', request.messageId], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId], ['search', request.search], ['since', request.since], ['statuses', request.statuses], ['subject', request.subject], ['until', request.until])
|
|
59
|
+
}, unmarshalListEmailsResponse);
|
|
68
60
|
|
|
69
61
|
/**
|
|
70
62
|
* List emails. Retrieve the list of emails sent from a specific domain or for
|
|
@@ -73,15 +65,7 @@ class API extends API$1 {
|
|
|
73
65
|
* @param request - The request {@link ListEmailsRequest}
|
|
74
66
|
* @returns A Promise of ListEmailsResponse
|
|
75
67
|
*/
|
|
76
|
-
listEmails = (
|
|
77
|
-
var _this2 = this;
|
|
78
|
-
return function (request) {
|
|
79
|
-
if (request === void 0) {
|
|
80
|
-
request = {};
|
|
81
|
-
}
|
|
82
|
-
return enrichForPagination('emails', _this2.pageOfListEmails, request);
|
|
83
|
-
};
|
|
84
|
-
})();
|
|
68
|
+
listEmails = (request = {}) => enrichForPagination('emails', this.pageOfListEmails, request);
|
|
85
69
|
|
|
86
70
|
/**
|
|
87
71
|
* Email statuses. Get information on your emails' statuses.
|
|
@@ -89,19 +73,11 @@ class API extends API$1 {
|
|
|
89
73
|
* @param request - The request {@link GetStatisticsRequest}
|
|
90
74
|
* @returns A Promise of Statistics
|
|
91
75
|
*/
|
|
92
|
-
getStatistics = (
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}
|
|
98
|
-
return _this3.client.fetch({
|
|
99
|
-
method: 'GET',
|
|
100
|
-
path: `/transactional-email/v1alpha1/regions/${validatePathParam('region', request.region ?? _this3.client.settings.defaultRegion)}/statistics`,
|
|
101
|
-
urlParams: urlParams(['domain_id', request.domainId], ['mail_from', request.mailFrom], ['project_id', request.projectId], ['since', request.since], ['until', request.until])
|
|
102
|
-
}, unmarshalStatistics);
|
|
103
|
-
};
|
|
104
|
-
})();
|
|
76
|
+
getStatistics = (request = {}) => this.client.fetch({
|
|
77
|
+
method: 'GET',
|
|
78
|
+
path: `/transactional-email/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/statistics`,
|
|
79
|
+
urlParams: urlParams(['domain_id', request.domainId], ['mail_from', request.mailFrom], ['project_id', request.projectId], ['since', request.since], ['until', request.until])
|
|
80
|
+
}, unmarshalStatistics);
|
|
105
81
|
|
|
106
82
|
/**
|
|
107
83
|
* Cancel an email. You can cancel the sending of an email if it has not been
|
|
@@ -158,19 +134,11 @@ class API extends API$1 {
|
|
|
158
134
|
* @returns A Promise of Domain
|
|
159
135
|
*/
|
|
160
136
|
waitForDomain = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!DOMAIN_TRANSIENT_STATUSES.includes(res.status))), this.getDomain, request, options);
|
|
161
|
-
pageOfListDomains = (
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
}
|
|
167
|
-
return _this4.client.fetch({
|
|
168
|
-
method: 'GET',
|
|
169
|
-
path: `/transactional-email/v1alpha1/regions/${validatePathParam('region', request.region ?? _this4.client.settings.defaultRegion)}/domains`,
|
|
170
|
-
urlParams: urlParams(['name', request.name], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this4.client.settings.defaultPageSize], ['project_id', request.projectId], ['status', request.status])
|
|
171
|
-
}, unmarshalListDomainsResponse);
|
|
172
|
-
};
|
|
173
|
-
})();
|
|
137
|
+
pageOfListDomains = (request = {}) => this.client.fetch({
|
|
138
|
+
method: 'GET',
|
|
139
|
+
path: `/transactional-email/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains`,
|
|
140
|
+
urlParams: urlParams(['name', request.name], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId], ['status', request.status])
|
|
141
|
+
}, unmarshalListDomainsResponse);
|
|
174
142
|
|
|
175
143
|
/**
|
|
176
144
|
* List domains. Retrieve domains in a specific Project or in a specific
|
|
@@ -179,15 +147,7 @@ class API extends API$1 {
|
|
|
179
147
|
* @param request - The request {@link ListDomainsRequest}
|
|
180
148
|
* @returns A Promise of ListDomainsResponse
|
|
181
149
|
*/
|
|
182
|
-
listDomains = (
|
|
183
|
-
var _this5 = this;
|
|
184
|
-
return function (request) {
|
|
185
|
-
if (request === void 0) {
|
|
186
|
-
request = {};
|
|
187
|
-
}
|
|
188
|
-
return enrichForPagination('domains', _this5.pageOfListDomains, request);
|
|
189
|
-
};
|
|
190
|
-
})();
|
|
150
|
+
listDomains = (request = {}) => enrichForPagination('domains', this.pageOfListDomains, request);
|
|
191
151
|
|
|
192
152
|
/**
|
|
193
153
|
* Delete a domain. You must specify the domain you want to delete by the
|
|
@@ -33,19 +33,11 @@ class API extends API$1 {
|
|
|
33
33
|
method: 'POST',
|
|
34
34
|
path: `/test/v1/register`
|
|
35
35
|
}, unmarshalRegisterResponse);
|
|
36
|
-
pageOfListHumans = (
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
return _this.client.fetch({
|
|
43
|
-
method: 'GET',
|
|
44
|
-
path: `/test/v1/humans`,
|
|
45
|
-
urlParams: urlParams(['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
46
|
-
}, unmarshalListHumansResponse);
|
|
47
|
-
};
|
|
48
|
-
})();
|
|
36
|
+
pageOfListHumans = (request = {}) => this.client.fetch({
|
|
37
|
+
method: 'GET',
|
|
38
|
+
path: `/test/v1/humans`,
|
|
39
|
+
urlParams: urlParams(['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
40
|
+
}, unmarshalListHumansResponse);
|
|
49
41
|
|
|
50
42
|
/**
|
|
51
43
|
* List all your humans.
|
|
@@ -53,15 +45,7 @@ class API extends API$1 {
|
|
|
53
45
|
* @param request - The request {@link ListHumansRequest}
|
|
54
46
|
* @returns A Promise of ListHumansResponse
|
|
55
47
|
*/
|
|
56
|
-
listHumans = (
|
|
57
|
-
var _this2 = this;
|
|
58
|
-
return function (request) {
|
|
59
|
-
if (request === void 0) {
|
|
60
|
-
request = {};
|
|
61
|
-
}
|
|
62
|
-
return enrichForPagination('humans', _this2.pageOfListHumans, request);
|
|
63
|
-
};
|
|
64
|
-
})();
|
|
48
|
+
listHumans = (request = {}) => enrichForPagination('humans', this.pageOfListHumans, request);
|
|
65
49
|
|
|
66
50
|
/**
|
|
67
51
|
* Get human details. Get the human details associated with the given id.
|
|
@@ -13,19 +13,11 @@ const jsonContentHeaders = {
|
|
|
13
13
|
class API extends API$1 {
|
|
14
14
|
/** Lists the available zones of the API. */
|
|
15
15
|
static LOCALITIES = ['fr-par-1', 'fr-par-2', 'fr-par-3', 'nl-ams-1', 'nl-ams-2', 'nl-ams-3', 'pl-waw-1', 'pl-waw-2'];
|
|
16
|
-
pageOfListPrivateNetworks = (
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
return _this.client.fetch({
|
|
23
|
-
method: 'GET',
|
|
24
|
-
path: `/vpc/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/private-networks`,
|
|
25
|
-
urlParams: urlParams(['include_regional', request.includeRegional], ['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['private_network_ids', request.privateNetworkIds], ['project_id', request.projectId], ['tags', request.tags])
|
|
26
|
-
}, unmarshalListPrivateNetworksResponse);
|
|
27
|
-
};
|
|
28
|
-
})();
|
|
16
|
+
pageOfListPrivateNetworks = (request = {}) => this.client.fetch({
|
|
17
|
+
method: 'GET',
|
|
18
|
+
path: `/vpc/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/private-networks`,
|
|
19
|
+
urlParams: urlParams(['include_regional', request.includeRegional], ['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['private_network_ids', request.privateNetworkIds], ['project_id', request.projectId], ['tags', request.tags])
|
|
20
|
+
}, unmarshalListPrivateNetworksResponse);
|
|
29
21
|
|
|
30
22
|
/**
|
|
31
23
|
* List Private Networks. List existing Private Networks in a specified
|
|
@@ -36,15 +28,7 @@ class API extends API$1 {
|
|
|
36
28
|
* @param request - The request {@link ListPrivateNetworksRequest}
|
|
37
29
|
* @returns A Promise of ListPrivateNetworksResponse
|
|
38
30
|
*/
|
|
39
|
-
listPrivateNetworks = (
|
|
40
|
-
var _this2 = this;
|
|
41
|
-
return function (request) {
|
|
42
|
-
if (request === void 0) {
|
|
43
|
-
request = {};
|
|
44
|
-
}
|
|
45
|
-
return enrichForPagination('privateNetworks', _this2.pageOfListPrivateNetworks, request);
|
|
46
|
-
};
|
|
47
|
-
})();
|
|
31
|
+
listPrivateNetworks = (request = {}) => enrichForPagination('privateNetworks', this.pageOfListPrivateNetworks, request);
|
|
48
32
|
|
|
49
33
|
/**
|
|
50
34
|
* Create a Private Network. Create a new Private Network. Once created, you
|
|
@@ -53,20 +37,12 @@ class API extends API$1 {
|
|
|
53
37
|
* @param request - The request {@link CreatePrivateNetworkRequest}
|
|
54
38
|
* @returns A Promise of PrivateNetwork
|
|
55
39
|
*/
|
|
56
|
-
createPrivateNetwork = (
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
return _this3.client.fetch({
|
|
63
|
-
body: JSON.stringify(marshalCreatePrivateNetworkRequest(request, _this3.client.settings)),
|
|
64
|
-
headers: jsonContentHeaders,
|
|
65
|
-
method: 'POST',
|
|
66
|
-
path: `/vpc/v1/zones/${validatePathParam('zone', request.zone ?? _this3.client.settings.defaultZone)}/private-networks`
|
|
67
|
-
}, unmarshalPrivateNetwork);
|
|
68
|
-
};
|
|
69
|
-
})();
|
|
40
|
+
createPrivateNetwork = (request = {}) => this.client.fetch({
|
|
41
|
+
body: JSON.stringify(marshalCreatePrivateNetworkRequest(request, this.client.settings)),
|
|
42
|
+
headers: jsonContentHeaders,
|
|
43
|
+
method: 'POST',
|
|
44
|
+
path: `/vpc/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/private-networks`
|
|
45
|
+
}, unmarshalPrivateNetwork);
|
|
70
46
|
|
|
71
47
|
/**
|
|
72
48
|
* Get a Private Network. Retrieve information about an existing Private
|
|
@@ -13,19 +13,11 @@ const jsonContentHeaders = {
|
|
|
13
13
|
class API extends API$1 {
|
|
14
14
|
/** Lists the available regions of the API. */
|
|
15
15
|
static LOCALITIES = ['fr-par', 'nl-ams', 'pl-waw'];
|
|
16
|
-
pageOfListVPCs = (
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
return _this.client.fetch({
|
|
23
|
-
method: 'GET',
|
|
24
|
-
path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/vpcs`,
|
|
25
|
-
urlParams: urlParams(['is_default', request.isDefault], ['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId], ['tags', request.tags])
|
|
26
|
-
}, unmarshalListVPCsResponse);
|
|
27
|
-
};
|
|
28
|
-
})();
|
|
16
|
+
pageOfListVPCs = (request = {}) => this.client.fetch({
|
|
17
|
+
method: 'GET',
|
|
18
|
+
path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/vpcs`,
|
|
19
|
+
urlParams: urlParams(['is_default', request.isDefault], ['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId], ['tags', request.tags])
|
|
20
|
+
}, unmarshalListVPCsResponse);
|
|
29
21
|
|
|
30
22
|
/**
|
|
31
23
|
* List VPCs. List existing VPCs in the specified region.
|
|
@@ -33,15 +25,7 @@ class API extends API$1 {
|
|
|
33
25
|
* @param request - The request {@link ListVPCsRequest}
|
|
34
26
|
* @returns A Promise of ListVPCsResponse
|
|
35
27
|
*/
|
|
36
|
-
listVPCs = (
|
|
37
|
-
var _this2 = this;
|
|
38
|
-
return function (request) {
|
|
39
|
-
if (request === void 0) {
|
|
40
|
-
request = {};
|
|
41
|
-
}
|
|
42
|
-
return enrichForPagination('vpcs', _this2.pageOfListVPCs, request);
|
|
43
|
-
};
|
|
44
|
-
})();
|
|
28
|
+
listVPCs = (request = {}) => enrichForPagination('vpcs', this.pageOfListVPCs, request);
|
|
45
29
|
|
|
46
30
|
/**
|
|
47
31
|
* Create a VPC. Create a new VPC in the specified region.
|
|
@@ -49,20 +33,12 @@ class API extends API$1 {
|
|
|
49
33
|
* @param request - The request {@link CreateVPCRequest}
|
|
50
34
|
* @returns A Promise of VPC
|
|
51
35
|
*/
|
|
52
|
-
createVPC = (
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
return _this3.client.fetch({
|
|
59
|
-
body: JSON.stringify(marshalCreateVPCRequest(request, _this3.client.settings)),
|
|
60
|
-
headers: jsonContentHeaders,
|
|
61
|
-
method: 'POST',
|
|
62
|
-
path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? _this3.client.settings.defaultRegion)}/vpcs`
|
|
63
|
-
}, unmarshalVPC);
|
|
64
|
-
};
|
|
65
|
-
})();
|
|
36
|
+
createVPC = (request = {}) => this.client.fetch({
|
|
37
|
+
body: JSON.stringify(marshalCreateVPCRequest(request, this.client.settings)),
|
|
38
|
+
headers: jsonContentHeaders,
|
|
39
|
+
method: 'POST',
|
|
40
|
+
path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/vpcs`
|
|
41
|
+
}, unmarshalVPC);
|
|
66
42
|
|
|
67
43
|
/**
|
|
68
44
|
* Get a VPC. Retrieve details of an existing VPC, specified by its VPC ID.
|
|
@@ -97,19 +73,11 @@ class API extends API$1 {
|
|
|
97
73
|
method: 'DELETE',
|
|
98
74
|
path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/vpcs/${validatePathParam('vpcId', request.vpcId)}`
|
|
99
75
|
});
|
|
100
|
-
pageOfListPrivateNetworks = (
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
return _this4.client.fetch({
|
|
107
|
-
method: 'GET',
|
|
108
|
-
path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? _this4.client.settings.defaultRegion)}/private-networks`,
|
|
109
|
-
urlParams: urlParams(['dhcp_enabled', request.dhcpEnabled], ['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this4.client.settings.defaultPageSize], ['private_network_ids', request.privateNetworkIds], ['project_id', request.projectId], ['tags', request.tags], ['vpc_id', request.vpcId])
|
|
110
|
-
}, unmarshalListPrivateNetworksResponse);
|
|
111
|
-
};
|
|
112
|
-
})();
|
|
76
|
+
pageOfListPrivateNetworks = (request = {}) => this.client.fetch({
|
|
77
|
+
method: 'GET',
|
|
78
|
+
path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/private-networks`,
|
|
79
|
+
urlParams: urlParams(['dhcp_enabled', request.dhcpEnabled], ['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['private_network_ids', request.privateNetworkIds], ['project_id', request.projectId], ['tags', request.tags], ['vpc_id', request.vpcId])
|
|
80
|
+
}, unmarshalListPrivateNetworksResponse);
|
|
113
81
|
|
|
114
82
|
/**
|
|
115
83
|
* List Private Networks. List existing Private Networks in the specified
|
|
@@ -120,15 +88,7 @@ class API extends API$1 {
|
|
|
120
88
|
* @param request - The request {@link ListPrivateNetworksRequest}
|
|
121
89
|
* @returns A Promise of ListPrivateNetworksResponse
|
|
122
90
|
*/
|
|
123
|
-
listPrivateNetworks = (
|
|
124
|
-
var _this5 = this;
|
|
125
|
-
return function (request) {
|
|
126
|
-
if (request === void 0) {
|
|
127
|
-
request = {};
|
|
128
|
-
}
|
|
129
|
-
return enrichForPagination('privateNetworks', _this5.pageOfListPrivateNetworks, request);
|
|
130
|
-
};
|
|
131
|
-
})();
|
|
91
|
+
listPrivateNetworks = (request = {}) => enrichForPagination('privateNetworks', this.pageOfListPrivateNetworks, request);
|
|
132
92
|
|
|
133
93
|
/**
|
|
134
94
|
* Create a Private Network. Create a new Private Network. Once created, you
|
|
@@ -137,20 +97,12 @@ class API extends API$1 {
|
|
|
137
97
|
* @param request - The request {@link CreatePrivateNetworkRequest}
|
|
138
98
|
* @returns A Promise of PrivateNetwork
|
|
139
99
|
*/
|
|
140
|
-
createPrivateNetwork = (
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
return _this6.client.fetch({
|
|
147
|
-
body: JSON.stringify(marshalCreatePrivateNetworkRequest(request, _this6.client.settings)),
|
|
148
|
-
headers: jsonContentHeaders,
|
|
149
|
-
method: 'POST',
|
|
150
|
-
path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? _this6.client.settings.defaultRegion)}/private-networks`
|
|
151
|
-
}, unmarshalPrivateNetwork);
|
|
152
|
-
};
|
|
153
|
-
})();
|
|
100
|
+
createPrivateNetwork = (request = {}) => this.client.fetch({
|
|
101
|
+
body: JSON.stringify(marshalCreatePrivateNetworkRequest(request, this.client.settings)),
|
|
102
|
+
headers: jsonContentHeaders,
|
|
103
|
+
method: 'POST',
|
|
104
|
+
path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/private-networks`
|
|
105
|
+
}, unmarshalPrivateNetwork);
|
|
154
106
|
|
|
155
107
|
/**
|
|
156
108
|
* Get a Private Network. Retrieve information about an existing Private
|
|
@@ -199,20 +151,12 @@ class API extends API$1 {
|
|
|
199
151
|
*
|
|
200
152
|
* @param request - The request {@link MigrateZonalPrivateNetworksRequest}
|
|
201
153
|
*/
|
|
202
|
-
migrateZonalPrivateNetworks = (
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
return _this7.client.fetch({
|
|
209
|
-
body: JSON.stringify(marshalMigrateZonalPrivateNetworksRequest(request, _this7.client.settings)),
|
|
210
|
-
headers: jsonContentHeaders,
|
|
211
|
-
method: 'POST',
|
|
212
|
-
path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? _this7.client.settings.defaultRegion)}/private-networks/migrate-zonal`
|
|
213
|
-
});
|
|
214
|
-
};
|
|
215
|
-
})();
|
|
154
|
+
migrateZonalPrivateNetworks = (request = {}) => this.client.fetch({
|
|
155
|
+
body: JSON.stringify(marshalMigrateZonalPrivateNetworksRequest(request, this.client.settings)),
|
|
156
|
+
headers: jsonContentHeaders,
|
|
157
|
+
method: 'POST',
|
|
158
|
+
path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/private-networks/migrate-zonal`
|
|
159
|
+
});
|
|
216
160
|
|
|
217
161
|
/**
|
|
218
162
|
* Enable DHCP on a Private Network. Enable DHCP managed on an existing
|