@scaleway/sdk 3.0.0-alpha.0 → 3.1.1
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/index.gen.d.ts +362 -0
- package/dist/index.gen.js +323 -0
- package/package.json +71 -25
- package/README.md +0 -46
- package/dist/api/account/index.js +0 -4
- package/dist/api/account/v2/api.gen.js +0 -147
- package/dist/api/account/v2/index.gen.js +0 -4
- package/dist/api/account/v2/marshalling.gen.js +0 -39
- package/dist/api/account/v3/api.gen.js +0 -129
- package/dist/api/account/v3/index.gen.js +0 -6
- package/dist/api/account/v3/marshalling.gen.js +0 -39
- package/dist/api/account/v3/validation-rules.gen.js +0 -39
- package/dist/api/applesilicon/index.js +0 -2
- package/dist/api/applesilicon/v1alpha1/api.gen.js +0 -220
- package/dist/api/applesilicon/v1alpha1/content.gen.js +0 -7
- package/dist/api/applesilicon/v1alpha1/index.gen.js +0 -5
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +0 -113
- package/dist/api/baremetal/index.js +0 -2
- package/dist/api/baremetal/v1/api.gen.js +0 -523
- package/dist/api/baremetal/v1/api.utils.js +0 -27
- package/dist/api/baremetal/v1/content.gen.js +0 -13
- package/dist/api/baremetal/v1/index.js +0 -5
- package/dist/api/baremetal/v1/marshalling.gen.js +0 -395
- package/dist/api/baremetal/v1/validation-rules.gen.js +0 -109
- package/dist/api/billing/index.js +0 -2
- package/dist/api/billing/v2alpha1/api.gen.js +0 -80
- package/dist/api/billing/v2alpha1/index.gen.js +0 -4
- package/dist/api/billing/v2alpha1/marshalling.gen.js +0 -53
- package/dist/api/block/index.js +0 -2
- package/dist/api/block/v1alpha1/api.gen.js +0 -245
- package/dist/api/block/v1alpha1/content.gen.js +0 -13
- package/dist/api/block/v1alpha1/index.gen.js +0 -7
- package/dist/api/block/v1alpha1/marshalling.gen.js +0 -175
- package/dist/api/block/v1alpha1/validation-rules.gen.js +0 -42
- package/dist/api/cockpit/index.js +0 -2
- package/dist/api/cockpit/v1beta1/api.gen.js +0 -448
- package/dist/api/cockpit/v1beta1/content.gen.js +0 -7
- package/dist/api/cockpit/v1beta1/index.gen.js +0 -5
- package/dist/api/cockpit/v1beta1/marshalling.gen.js +0 -220
- package/dist/api/container/index.js +0 -2
- package/dist/api/container/v1beta1/api.gen.js +0 -549
- package/dist/api/container/v1beta1/content.gen.js +0 -22
- package/dist/api/container/v1beta1/index.gen.js +0 -5
- package/dist/api/container/v1beta1/marshalling.gen.js +0 -330
- package/dist/api/document_db/index.js +0 -2
- package/dist/api/document_db/v1beta1/api.gen.js +0 -830
- package/dist/api/document_db/v1beta1/content.gen.js +0 -19
- package/dist/api/document_db/v1beta1/index.gen.js +0 -7
- package/dist/api/document_db/v1beta1/marshalling.gen.js +0 -580
- package/dist/api/document_db/v1beta1/validation-rules.gen.js +0 -10
- package/dist/api/domain/index.js +0 -2
- package/dist/api/domain/v2beta1/api.gen.js +0 -875
- package/dist/api/domain/v2beta1/content.gen.js +0 -28
- package/dist/api/domain/v2beta1/index.gen.js +0 -7
- package/dist/api/domain/v2beta1/marshalling.gen.js +0 -958
- package/dist/api/flexibleip/index.js +0 -2
- package/dist/api/flexibleip/v1alpha1/api.gen.js +0 -203
- package/dist/api/flexibleip/v1alpha1/content.gen.js +0 -10
- package/dist/api/flexibleip/v1alpha1/index.gen.js +0 -7
- package/dist/api/flexibleip/v1alpha1/marshalling.gen.js +0 -97
- package/dist/api/flexibleip/v1alpha1/validation-rules.gen.js +0 -14
- package/dist/api/function/index.js +0 -2
- package/dist/api/function/v1beta1/api.gen.js +0 -560
- package/dist/api/function/v1beta1/content.gen.js +0 -22
- package/dist/api/function/v1beta1/index.gen.js +0 -5
- package/dist/api/function/v1beta1/marshalling.gen.js +0 -368
- package/dist/api/iam/index.js +0 -2
- package/dist/api/iam/v1alpha1/api.gen.js +0 -799
- package/dist/api/iam/v1alpha1/index.gen.js +0 -6
- package/dist/api/iam/v1alpha1/marshalling.gen.js +0 -373
- package/dist/api/iam/v1alpha1/validation-rules.gen.js +0 -207
- package/dist/api/instance/index.js +0 -2
- package/dist/api/instance/v1/api.gen.js +0 -1003
- package/dist/api/instance/v1/api.utils.js +0 -369
- package/dist/api/instance/v1/content.gen.js +0 -31
- package/dist/api/instance/v1/index.js +0 -2
- package/dist/api/instance/v1/marshalling.gen.js +0 -1206
- package/dist/api/instance/v1/marshalling.utils.js +0 -63
- package/dist/api/iot/index.js +0 -2
- package/dist/api/iot/v1/api.gen.js +0 -581
- package/dist/api/iot/v1/content.gen.js +0 -7
- package/dist/api/iot/v1/index.gen.js +0 -5
- package/dist/api/iot/v1/marshalling.gen.js +0 -388
- package/dist/api/ipfs/index.js +0 -2
- package/dist/api/ipfs/v1alpha1/api.gen.js +0 -197
- package/dist/api/ipfs/v1alpha1/content.gen.js +0 -7
- package/dist/api/ipfs/v1alpha1/index.gen.js +0 -5
- package/dist/api/ipfs/v1alpha1/marshalling.gen.js +0 -121
- package/dist/api/k8s/index.js +0 -2
- package/dist/api/k8s/v1/api.gen.js +0 -454
- package/dist/api/k8s/v1/api.utils.js +0 -13
- package/dist/api/k8s/v1/content.gen.js +0 -13
- package/dist/api/k8s/v1/index.js +0 -4
- package/dist/api/k8s/v1/marshalling.gen.js +0 -333
- package/dist/api/k8s/v1/validation-rules.gen.js +0 -101
- package/dist/api/lb/index.js +0 -2
- package/dist/api/lb/v1/api.gen.js +0 -1669
- package/dist/api/lb/v1/api.utils.js +0 -81
- package/dist/api/lb/v1/content.gen.js +0 -16
- package/dist/api/lb/v1/index.js +0 -2
- package/dist/api/lb/v1/marshalling.gen.js +0 -923
- package/dist/api/marketplace/index.js +0 -4
- package/dist/api/marketplace/v1/api.gen.js +0 -60
- package/dist/api/marketplace/v1/index.gen.js +0 -4
- package/dist/api/marketplace/v1/marshalling.gen.js +0 -92
- package/dist/api/marketplace/v2/api.gen.js +0 -162
- package/dist/api/marketplace/v2/index.gen.js +0 -4
- package/dist/api/marketplace/v2/marshalling.gen.js +0 -94
- package/dist/api/mnq/index.js +0 -2
- package/dist/api/mnq/v1alpha1/api.gen.js +0 -205
- package/dist/api/mnq/v1alpha1/index.gen.js +0 -4
- package/dist/api/mnq/v1alpha1/marshalling.gen.js +0 -121
- package/dist/api/rdb/index.js +0 -2
- package/dist/api/rdb/v1/api.gen.js +0 -972
- package/dist/api/rdb/v1/content.gen.js +0 -22
- package/dist/api/rdb/v1/index.gen.js +0 -7
- package/dist/api/rdb/v1/marshalling.gen.js +0 -636
- package/dist/api/rdb/v1/validation-rules.gen.js +0 -10
- package/dist/api/redis/index.js +0 -2
- package/dist/api/redis/v1/api.gen.js +0 -389
- package/dist/api/redis/v1/content.gen.js +0 -7
- package/dist/api/redis/v1/index.gen.js +0 -5
- package/dist/api/redis/v1/marshalling.gen.js +0 -259
- package/dist/api/registry/index.js +0 -2
- package/dist/api/registry/v1/api.gen.js +0 -252
- package/dist/api/registry/v1/content.gen.js +0 -13
- package/dist/api/registry/v1/index.gen.js +0 -5
- package/dist/api/registry/v1/marshalling.gen.js +0 -106
- package/dist/api/secret/index.js +0 -2
- package/dist/api/secret/v1alpha1/api.gen.js +0 -415
- package/dist/api/secret/v1alpha1/index.gen.js +0 -4
- package/dist/api/secret/v1alpha1/marshalling.gen.js +0 -143
- package/dist/api/tem/index.js +0 -2
- package/dist/api/tem/v1alpha1/api.gen.js +0 -229
- package/dist/api/tem/v1alpha1/content.gen.js +0 -10
- package/dist/api/tem/v1alpha1/index.gen.js +0 -5
- package/dist/api/tem/v1alpha1/marshalling.gen.js +0 -159
- package/dist/api/test/index.js +0 -2
- package/dist/api/test/v1/api.gen.js +0 -152
- package/dist/api/test/v1/content.gen.js +0 -7
- package/dist/api/test/v1/index.gen.js +0 -5
- package/dist/api/test/v1/marshalling.gen.js +0 -79
- package/dist/api/vpc/index.js +0 -4
- package/dist/api/vpc/v1/api.gen.js +0 -110
- package/dist/api/vpc/v1/index.gen.js +0 -4
- package/dist/api/vpc/v1/marshalling.gen.js +0 -44
- package/dist/api/vpc/v2/api.gen.js +0 -276
- package/dist/api/vpc/v2/index.gen.js +0 -4
- package/dist/api/vpc/v2/marshalling.gen.js +0 -135
- package/dist/api/vpcgw/index.js +0 -2
- package/dist/api/vpcgw/v1/api.gen.js +0 -669
- package/dist/api/vpcgw/v1/content.gen.js +0 -10
- package/dist/api/vpcgw/v1/index.gen.js +0 -5
- package/dist/api/vpcgw/v1/marshalling.gen.js +0 -336
- package/dist/api/webhosting/index.js +0 -2
- package/dist/api/webhosting/v1alpha1/api.gen.js +0 -210
- package/dist/api/webhosting/v1alpha1/content.gen.js +0 -7
- package/dist/api/webhosting/v1alpha1/index.gen.js +0 -7
- package/dist/api/webhosting/v1alpha1/marshalling.gen.js +0 -173
- package/dist/api/webhosting/v1alpha1/validation-rules.gen.js +0 -23
- package/dist/helpers/is-browser.js +0 -5
- package/dist/helpers/is-response.js +0 -10
- package/dist/helpers/json.js +0 -11
- package/dist/helpers/marshalling.js +0 -130
- package/dist/index.cjs +0 -24364
- package/dist/index.d.ts +0 -27584
- package/dist/index.js +0 -69
- package/dist/internal/async/interval-retrier.js +0 -105
- package/dist/internal/async/sleep.js +0 -13
- package/dist/internal/interceptors/composer.js +0 -46
- package/dist/internal/interceptors/helpers.js +0 -32
- package/dist/internal/logger/console-logger.js +0 -38
- package/dist/internal/logger/index.js +0 -41
- package/dist/internal/logger/level-resolver.js +0 -13
- package/dist/internal/validations/string-validation.js +0 -38
- package/dist/node_modules/.pnpm/@scaleway_random-name@4.0.2/node_modules/@scaleway/random-name/dist/index.js +0 -13
- package/dist/scw/api.js +0 -12
- package/dist/scw/auth.js +0 -68
- package/dist/scw/client-ini-factory.js +0 -174
- package/dist/scw/client-ini-profile.js +0 -54
- package/dist/scw/client-settings.js +0 -78
- package/dist/scw/client.js +0 -98
- package/dist/scw/constants.js +0 -4
- package/dist/scw/custom-marshalling.js +0 -131
- package/dist/scw/errors/error-parser.js +0 -107
- package/dist/scw/errors/non-standard/invalid-request-mapper.js +0 -36
- package/dist/scw/errors/non-standard/unknown-resource-mapper.js +0 -27
- package/dist/scw/errors/scw-error.js +0 -66
- package/dist/scw/errors/standard/already-exists-error.js +0 -26
- package/dist/scw/errors/standard/denied-authentication-error.js +0 -52
- package/dist/scw/errors/standard/index.js +0 -13
- package/dist/scw/errors/standard/invalid-arguments-error.js +0 -67
- package/dist/scw/errors/standard/out-of-stock-error.js +0 -22
- package/dist/scw/errors/standard/permissions-denied-error.js +0 -48
- package/dist/scw/errors/standard/precondition-failed-error.js +0 -42
- package/dist/scw/errors/standard/quotas-exceeded-error.js +0 -68
- package/dist/scw/errors/standard/resource-expired-error.js +0 -26
- package/dist/scw/errors/standard/resource-locked-error.js +0 -25
- package/dist/scw/errors/standard/resource-not-found-error.js +0 -25
- package/dist/scw/errors/standard/too-many-requests-error.js +0 -70
- package/dist/scw/errors/standard/transient-state-error.js +0 -26
- package/dist/scw/errors/types.js +0 -23
- package/dist/scw/fetch/build-fetcher.js +0 -72
- package/dist/scw/fetch/http-dumper.js +0 -54
- package/dist/scw/fetch/http-interceptors.js +0 -99
- package/dist/scw/fetch/resource-paginator.js +0 -84
- package/dist/scw/fetch/response-parser.js +0 -72
- package/node_modules/@scaleway/random-name/.npmignore +0 -4
- package/node_modules/@scaleway/random-name/CHANGELOG.md +0 -129
- package/node_modules/@scaleway/random-name/LICENSE.md +0 -21
- package/node_modules/@scaleway/random-name/README.md +0 -26
- package/node_modules/@scaleway/random-name/dist/index.d.ts +0 -3
- package/node_modules/@scaleway/random-name/dist/index.js +0 -13
- package/node_modules/@scaleway/random-name/package.json +0 -23
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { API as API$1 } from '../../../scw/api.js';
|
|
2
|
-
import { validatePathParam, urlParams } from '../../../helpers/marshalling.js';
|
|
3
|
-
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
4
|
-
import { unmarshalListPrivateNetworksResponse, marshalCreatePrivateNetworkRequest, unmarshalPrivateNetwork, marshalUpdatePrivateNetworkRequest } from './marshalling.gen.js';
|
|
5
|
-
|
|
6
|
-
// This file was automatically generated. DO NOT EDIT.
|
|
7
|
-
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
8
|
-
const jsonContentHeaders = {
|
|
9
|
-
'Content-Type': 'application/json; charset=utf-8'
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
/** VPC API. */
|
|
13
|
-
class API extends API$1 {
|
|
14
|
-
/** Lists the available zones of the API. */
|
|
15
|
-
static LOCALITIES = ['fr-par-1', 'fr-par-2', 'fr-par-3', 'nl-ams-1', 'nl-ams-2', 'nl-ams-3', 'pl-waw-1', 'pl-waw-2'];
|
|
16
|
-
pageOfListPrivateNetworks = (() => {
|
|
17
|
-
var _this = this;
|
|
18
|
-
return function (request) {
|
|
19
|
-
if (request === void 0) {
|
|
20
|
-
request = {};
|
|
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
|
-
})();
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* List Private Networks. List existing Private Networks in a specified
|
|
32
|
-
* Availability Zone. By default, the Private Networks returned in the list
|
|
33
|
-
* are ordered by creation date in ascending order, though this can be
|
|
34
|
-
* modified via the order_by field.
|
|
35
|
-
*
|
|
36
|
-
* @param request - The request {@link ListPrivateNetworksRequest}
|
|
37
|
-
* @returns A Promise of ListPrivateNetworksResponse
|
|
38
|
-
*/
|
|
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
|
-
})();
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Create a Private Network. Create a new Private Network. Once created, you
|
|
51
|
-
* can attach Scaleway resources in the same Availability Zone.
|
|
52
|
-
*
|
|
53
|
-
* @param request - The request {@link CreatePrivateNetworkRequest}
|
|
54
|
-
* @returns A Promise of PrivateNetwork
|
|
55
|
-
*/
|
|
56
|
-
createPrivateNetwork = (() => {
|
|
57
|
-
var _this3 = this;
|
|
58
|
-
return function (request) {
|
|
59
|
-
if (request === void 0) {
|
|
60
|
-
request = {};
|
|
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
|
-
})();
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Get a Private Network. Retrieve information about an existing Private
|
|
73
|
-
* Network, specified by its Private Network ID. Its full details are returned
|
|
74
|
-
* in the response object.
|
|
75
|
-
*
|
|
76
|
-
* @param request - The request {@link GetPrivateNetworkRequest}
|
|
77
|
-
* @returns A Promise of PrivateNetwork
|
|
78
|
-
*/
|
|
79
|
-
getPrivateNetwork = request => this.client.fetch({
|
|
80
|
-
method: 'GET',
|
|
81
|
-
path: `/vpc/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/private-networks/${validatePathParam('privateNetworkId', request.privateNetworkId)}`
|
|
82
|
-
}, unmarshalPrivateNetwork);
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Update Private Network. Update parameters (such as name or tags) of an
|
|
86
|
-
* existing Private Network, specified by its Private Network ID.
|
|
87
|
-
*
|
|
88
|
-
* @param request - The request {@link UpdatePrivateNetworkRequest}
|
|
89
|
-
* @returns A Promise of PrivateNetwork
|
|
90
|
-
*/
|
|
91
|
-
updatePrivateNetwork = request => this.client.fetch({
|
|
92
|
-
body: JSON.stringify(marshalUpdatePrivateNetworkRequest(request, this.client.settings)),
|
|
93
|
-
headers: jsonContentHeaders,
|
|
94
|
-
method: 'PATCH',
|
|
95
|
-
path: `/vpc/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/private-networks/${validatePathParam('privateNetworkId', request.privateNetworkId)}`
|
|
96
|
-
}, unmarshalPrivateNetwork);
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Delete a Private Network. Delete an existing Private Network. Note that you
|
|
100
|
-
* must first detach all resources from the network, in order to delete it.
|
|
101
|
-
*
|
|
102
|
-
* @param request - The request {@link DeletePrivateNetworkRequest}
|
|
103
|
-
*/
|
|
104
|
-
deletePrivateNetwork = request => this.client.fetch({
|
|
105
|
-
method: 'DELETE',
|
|
106
|
-
path: `/vpc/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/private-networks/${validatePathParam('privateNetworkId', request.privateNetworkId)}`
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
export { API };
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import randomName from '../../../node_modules/.pnpm/@scaleway_random-name@4.0.2/node_modules/@scaleway/random-name/dist/index.js';
|
|
2
|
-
import { isJSONObject } from '../../../helpers/json.js';
|
|
3
|
-
import { unmarshalDate, unmarshalArrayOfObject } from '../../../helpers/marshalling.js';
|
|
4
|
-
|
|
5
|
-
// This file was automatically generated. DO NOT EDIT.
|
|
6
|
-
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
7
|
-
const unmarshalPrivateNetwork = data => {
|
|
8
|
-
if (!isJSONObject(data)) {
|
|
9
|
-
throw new TypeError(`Unmarshalling the type 'PrivateNetwork' failed as data isn't a dictionary.`);
|
|
10
|
-
}
|
|
11
|
-
return {
|
|
12
|
-
createdAt: unmarshalDate(data.created_at),
|
|
13
|
-
id: data.id,
|
|
14
|
-
name: data.name,
|
|
15
|
-
organizationId: data.organization_id,
|
|
16
|
-
projectId: data.project_id,
|
|
17
|
-
subnets: data.subnets,
|
|
18
|
-
tags: data.tags,
|
|
19
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
20
|
-
zone: data.zone
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
const unmarshalListPrivateNetworksResponse = data => {
|
|
24
|
-
if (!isJSONObject(data)) {
|
|
25
|
-
throw new TypeError(`Unmarshalling the type 'ListPrivateNetworksResponse' failed as data isn't a dictionary.`);
|
|
26
|
-
}
|
|
27
|
-
return {
|
|
28
|
-
privateNetworks: unmarshalArrayOfObject(data.private_networks, unmarshalPrivateNetwork),
|
|
29
|
-
totalCount: data.total_count
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
const marshalCreatePrivateNetworkRequest = (request, defaults) => ({
|
|
33
|
-
name: request.name || randomName('pn'),
|
|
34
|
-
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
35
|
-
subnets: request.subnets,
|
|
36
|
-
tags: request.tags
|
|
37
|
-
});
|
|
38
|
-
const marshalUpdatePrivateNetworkRequest = (request, defaults) => ({
|
|
39
|
-
name: request.name,
|
|
40
|
-
subnets: request.subnets,
|
|
41
|
-
tags: request.tags
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
export { marshalCreatePrivateNetworkRequest, marshalUpdatePrivateNetworkRequest, unmarshalListPrivateNetworksResponse, unmarshalPrivateNetwork };
|
|
@@ -1,276 +0,0 @@
|
|
|
1
|
-
import { API as API$1 } from '../../../scw/api.js';
|
|
2
|
-
import { validatePathParam, urlParams } from '../../../helpers/marshalling.js';
|
|
3
|
-
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
4
|
-
import { unmarshalListVPCsResponse, marshalCreateVPCRequest, unmarshalVPC, marshalUpdateVPCRequest, unmarshalListPrivateNetworksResponse, marshalCreatePrivateNetworkRequest, unmarshalPrivateNetwork, marshalUpdatePrivateNetworkRequest, marshalMigrateZonalPrivateNetworksRequest, marshalSetSubnetsRequest, unmarshalSetSubnetsResponse, marshalAddSubnetsRequest, unmarshalAddSubnetsResponse, marshalDeleteSubnetsRequest, unmarshalDeleteSubnetsResponse } from './marshalling.gen.js';
|
|
5
|
-
|
|
6
|
-
// This file was automatically generated. DO NOT EDIT.
|
|
7
|
-
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
8
|
-
const jsonContentHeaders = {
|
|
9
|
-
'Content-Type': 'application/json; charset=utf-8'
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
/** VPC API. */
|
|
13
|
-
class API extends API$1 {
|
|
14
|
-
/** Lists the available regions of the API. */
|
|
15
|
-
static LOCALITIES = ['fr-par', 'nl-ams', 'pl-waw'];
|
|
16
|
-
pageOfListVPCs = (() => {
|
|
17
|
-
var _this = this;
|
|
18
|
-
return function (request) {
|
|
19
|
-
if (request === void 0) {
|
|
20
|
-
request = {};
|
|
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
|
-
})();
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* List VPCs. List existing VPCs in the specified region.
|
|
32
|
-
*
|
|
33
|
-
* @param request - The request {@link ListVPCsRequest}
|
|
34
|
-
* @returns A Promise of ListVPCsResponse
|
|
35
|
-
*/
|
|
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
|
-
})();
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Create a VPC. Create a new VPC in the specified region.
|
|
48
|
-
*
|
|
49
|
-
* @param request - The request {@link CreateVPCRequest}
|
|
50
|
-
* @returns A Promise of VPC
|
|
51
|
-
*/
|
|
52
|
-
createVPC = (() => {
|
|
53
|
-
var _this3 = this;
|
|
54
|
-
return function (request) {
|
|
55
|
-
if (request === void 0) {
|
|
56
|
-
request = {};
|
|
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
|
-
})();
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Get a VPC. Retrieve details of an existing VPC, specified by its VPC ID.
|
|
69
|
-
*
|
|
70
|
-
* @param request - The request {@link GetVPCRequest}
|
|
71
|
-
* @returns A Promise of VPC
|
|
72
|
-
*/
|
|
73
|
-
getVPC = request => this.client.fetch({
|
|
74
|
-
method: 'GET',
|
|
75
|
-
path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/vpcs/${validatePathParam('vpcId', request.vpcId)}`
|
|
76
|
-
}, unmarshalVPC);
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Update VPC. Update parameters including name and tags of the specified VPC.
|
|
80
|
-
*
|
|
81
|
-
* @param request - The request {@link UpdateVPCRequest}
|
|
82
|
-
* @returns A Promise of VPC
|
|
83
|
-
*/
|
|
84
|
-
updateVPC = request => this.client.fetch({
|
|
85
|
-
body: JSON.stringify(marshalUpdateVPCRequest(request, this.client.settings)),
|
|
86
|
-
headers: jsonContentHeaders,
|
|
87
|
-
method: 'PATCH',
|
|
88
|
-
path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/vpcs/${validatePathParam('vpcId', request.vpcId)}`
|
|
89
|
-
}, unmarshalVPC);
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Delete a VPC. Delete a VPC specified by its VPC ID.
|
|
93
|
-
*
|
|
94
|
-
* @param request - The request {@link DeleteVPCRequest}
|
|
95
|
-
*/
|
|
96
|
-
deleteVPC = request => this.client.fetch({
|
|
97
|
-
method: 'DELETE',
|
|
98
|
-
path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/vpcs/${validatePathParam('vpcId', request.vpcId)}`
|
|
99
|
-
});
|
|
100
|
-
pageOfListPrivateNetworks = (() => {
|
|
101
|
-
var _this4 = this;
|
|
102
|
-
return function (request) {
|
|
103
|
-
if (request === void 0) {
|
|
104
|
-
request = {};
|
|
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
|
-
})();
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* List Private Networks. List existing Private Networks in the specified
|
|
116
|
-
* region. By default, the Private Networks returned in the list are ordered
|
|
117
|
-
* by creation date in ascending order, though this can be modified via the
|
|
118
|
-
* order_by field.
|
|
119
|
-
*
|
|
120
|
-
* @param request - The request {@link ListPrivateNetworksRequest}
|
|
121
|
-
* @returns A Promise of ListPrivateNetworksResponse
|
|
122
|
-
*/
|
|
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
|
-
})();
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* Create a Private Network. Create a new Private Network. Once created, you
|
|
135
|
-
* can attach Scaleway resources which are in the same region.
|
|
136
|
-
*
|
|
137
|
-
* @param request - The request {@link CreatePrivateNetworkRequest}
|
|
138
|
-
* @returns A Promise of PrivateNetwork
|
|
139
|
-
*/
|
|
140
|
-
createPrivateNetwork = (() => {
|
|
141
|
-
var _this6 = this;
|
|
142
|
-
return function (request) {
|
|
143
|
-
if (request === void 0) {
|
|
144
|
-
request = {};
|
|
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
|
-
})();
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* Get a Private Network. Retrieve information about an existing Private
|
|
157
|
-
* Network, specified by its Private Network ID. Its full details are returned
|
|
158
|
-
* in the response object.
|
|
159
|
-
*
|
|
160
|
-
* @param request - The request {@link GetPrivateNetworkRequest}
|
|
161
|
-
* @returns A Promise of PrivateNetwork
|
|
162
|
-
*/
|
|
163
|
-
getPrivateNetwork = request => this.client.fetch({
|
|
164
|
-
method: 'GET',
|
|
165
|
-
path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/private-networks/${validatePathParam('privateNetworkId', request.privateNetworkId)}`
|
|
166
|
-
}, unmarshalPrivateNetwork);
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* Update Private Network. Update parameters (such as name or tags) of an
|
|
170
|
-
* existing Private Network, specified by its Private Network ID.
|
|
171
|
-
*
|
|
172
|
-
* @param request - The request {@link UpdatePrivateNetworkRequest}
|
|
173
|
-
* @returns A Promise of PrivateNetwork
|
|
174
|
-
*/
|
|
175
|
-
updatePrivateNetwork = request => this.client.fetch({
|
|
176
|
-
body: JSON.stringify(marshalUpdatePrivateNetworkRequest(request, this.client.settings)),
|
|
177
|
-
headers: jsonContentHeaders,
|
|
178
|
-
method: 'PATCH',
|
|
179
|
-
path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/private-networks/${validatePathParam('privateNetworkId', request.privateNetworkId)}`
|
|
180
|
-
}, unmarshalPrivateNetwork);
|
|
181
|
-
|
|
182
|
-
/**
|
|
183
|
-
* Delete a Private Network. Delete an existing Private Network. Note that you
|
|
184
|
-
* must first detach all resources from the network, in order to delete it.
|
|
185
|
-
*
|
|
186
|
-
* @param request - The request {@link DeletePrivateNetworkRequest}
|
|
187
|
-
*/
|
|
188
|
-
deletePrivateNetwork = request => this.client.fetch({
|
|
189
|
-
method: 'DELETE',
|
|
190
|
-
path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/private-networks/${validatePathParam('privateNetworkId', request.privateNetworkId)}`
|
|
191
|
-
});
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* Migrate Private Networks from zoned to regional. Transform multiple
|
|
195
|
-
* existing zoned Private Networks (scoped to a single Availability Zone) into
|
|
196
|
-
* regional Private Networks, scoped to an entire region. You can transform
|
|
197
|
-
* one or many Private Networks (specified by their Private Network IDs)
|
|
198
|
-
* within a single Scaleway Organization or Project, with the same call.
|
|
199
|
-
*
|
|
200
|
-
* @param request - The request {@link MigrateZonalPrivateNetworksRequest}
|
|
201
|
-
*/
|
|
202
|
-
migrateZonalPrivateNetworks = (() => {
|
|
203
|
-
var _this7 = this;
|
|
204
|
-
return function (request) {
|
|
205
|
-
if (request === void 0) {
|
|
206
|
-
request = {};
|
|
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
|
-
})();
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* Enable DHCP on a Private Network. Enable DHCP managed on an existing
|
|
219
|
-
* Private Network. Note that you will not be able to deactivate it
|
|
220
|
-
* afterwards.
|
|
221
|
-
*
|
|
222
|
-
* @param request - The request {@link EnableDHCPRequest}
|
|
223
|
-
* @returns A Promise of PrivateNetwork
|
|
224
|
-
*/
|
|
225
|
-
enableDHCP = request => this.client.fetch({
|
|
226
|
-
body: '{}',
|
|
227
|
-
headers: jsonContentHeaders,
|
|
228
|
-
method: 'POST',
|
|
229
|
-
path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/private-networks/${validatePathParam('privateNetworkId', request.privateNetworkId)}/enable-dhcp`
|
|
230
|
-
}, unmarshalPrivateNetwork);
|
|
231
|
-
|
|
232
|
-
/**
|
|
233
|
-
* Set the subnets of a Private Network. Set subnets for an existing Private
|
|
234
|
-
* Network. Note that the method is PUT and not PATCH. Any existing subnets
|
|
235
|
-
* will be removed in favor of the new specified set of subnets.
|
|
236
|
-
*
|
|
237
|
-
* @param request - The request {@link SetSubnetsRequest}
|
|
238
|
-
* @returns A Promise of SetSubnetsResponse
|
|
239
|
-
*/
|
|
240
|
-
setSubnets = request => this.client.fetch({
|
|
241
|
-
body: JSON.stringify(marshalSetSubnetsRequest(request, this.client.settings)),
|
|
242
|
-
headers: jsonContentHeaders,
|
|
243
|
-
method: 'PUT',
|
|
244
|
-
path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/private-networks/${validatePathParam('privateNetworkId', request.privateNetworkId)}/subnets`
|
|
245
|
-
}, unmarshalSetSubnetsResponse);
|
|
246
|
-
|
|
247
|
-
/**
|
|
248
|
-
* Add subnets to a Private Network. Add new subnets to an existing Private
|
|
249
|
-
* Network.
|
|
250
|
-
*
|
|
251
|
-
* @param request - The request {@link AddSubnetsRequest}
|
|
252
|
-
* @returns A Promise of AddSubnetsResponse
|
|
253
|
-
*/
|
|
254
|
-
addSubnets = request => this.client.fetch({
|
|
255
|
-
body: JSON.stringify(marshalAddSubnetsRequest(request, this.client.settings)),
|
|
256
|
-
headers: jsonContentHeaders,
|
|
257
|
-
method: 'POST',
|
|
258
|
-
path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/private-networks/${validatePathParam('privateNetworkId', request.privateNetworkId)}/subnets`
|
|
259
|
-
}, unmarshalAddSubnetsResponse);
|
|
260
|
-
|
|
261
|
-
/**
|
|
262
|
-
* Delete subnets from a Private Network. Delete the specified subnets from a
|
|
263
|
-
* Private Network.
|
|
264
|
-
*
|
|
265
|
-
* @param request - The request {@link DeleteSubnetsRequest}
|
|
266
|
-
* @returns A Promise of DeleteSubnetsResponse
|
|
267
|
-
*/
|
|
268
|
-
deleteSubnets = request => this.client.fetch({
|
|
269
|
-
body: JSON.stringify(marshalDeleteSubnetsRequest(request, this.client.settings)),
|
|
270
|
-
headers: jsonContentHeaders,
|
|
271
|
-
method: 'DELETE',
|
|
272
|
-
path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/private-networks/${validatePathParam('privateNetworkId', request.privateNetworkId)}/subnets`
|
|
273
|
-
}, unmarshalDeleteSubnetsResponse);
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
export { API };
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import randomName from '../../../node_modules/.pnpm/@scaleway_random-name@4.0.2/node_modules/@scaleway/random-name/dist/index.js';
|
|
2
|
-
import { isJSONObject } from '../../../helpers/json.js';
|
|
3
|
-
import { unmarshalDate, unmarshalArrayOfObject, resolveOneOf } from '../../../helpers/marshalling.js';
|
|
4
|
-
|
|
5
|
-
// This file was automatically generated. DO NOT EDIT.
|
|
6
|
-
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
7
|
-
const unmarshalSubnet = data => {
|
|
8
|
-
if (!isJSONObject(data)) {
|
|
9
|
-
throw new TypeError(`Unmarshalling the type 'Subnet' failed as data isn't a dictionary.`);
|
|
10
|
-
}
|
|
11
|
-
return {
|
|
12
|
-
createdAt: unmarshalDate(data.created_at),
|
|
13
|
-
id: data.id,
|
|
14
|
-
subnet: data.subnet,
|
|
15
|
-
updatedAt: unmarshalDate(data.updated_at)
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
const unmarshalPrivateNetwork = data => {
|
|
19
|
-
if (!isJSONObject(data)) {
|
|
20
|
-
throw new TypeError(`Unmarshalling the type 'PrivateNetwork' failed as data isn't a dictionary.`);
|
|
21
|
-
}
|
|
22
|
-
return {
|
|
23
|
-
createdAt: unmarshalDate(data.created_at),
|
|
24
|
-
dhcpEnabled: data.dhcp_enabled,
|
|
25
|
-
id: data.id,
|
|
26
|
-
name: data.name,
|
|
27
|
-
organizationId: data.organization_id,
|
|
28
|
-
projectId: data.project_id,
|
|
29
|
-
region: data.region,
|
|
30
|
-
subnets: unmarshalArrayOfObject(data.subnets, unmarshalSubnet),
|
|
31
|
-
tags: data.tags,
|
|
32
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
33
|
-
vpcId: data.vpc_id
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
const unmarshalVPC = data => {
|
|
37
|
-
if (!isJSONObject(data)) {
|
|
38
|
-
throw new TypeError(`Unmarshalling the type 'VPC' failed as data isn't a dictionary.`);
|
|
39
|
-
}
|
|
40
|
-
return {
|
|
41
|
-
createdAt: unmarshalDate(data.created_at),
|
|
42
|
-
id: data.id,
|
|
43
|
-
isDefault: data.is_default,
|
|
44
|
-
name: data.name,
|
|
45
|
-
organizationId: data.organization_id,
|
|
46
|
-
privateNetworkCount: data.private_network_count,
|
|
47
|
-
projectId: data.project_id,
|
|
48
|
-
region: data.region,
|
|
49
|
-
tags: data.tags,
|
|
50
|
-
updatedAt: unmarshalDate(data.updated_at)
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
const unmarshalAddSubnetsResponse = data => {
|
|
54
|
-
if (!isJSONObject(data)) {
|
|
55
|
-
throw new TypeError(`Unmarshalling the type 'AddSubnetsResponse' failed as data isn't a dictionary.`);
|
|
56
|
-
}
|
|
57
|
-
return {
|
|
58
|
-
subnets: data.subnets
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
const unmarshalDeleteSubnetsResponse = data => {
|
|
62
|
-
if (!isJSONObject(data)) {
|
|
63
|
-
throw new TypeError(`Unmarshalling the type 'DeleteSubnetsResponse' failed as data isn't a dictionary.`);
|
|
64
|
-
}
|
|
65
|
-
return {
|
|
66
|
-
subnets: data.subnets
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
const unmarshalListPrivateNetworksResponse = data => {
|
|
70
|
-
if (!isJSONObject(data)) {
|
|
71
|
-
throw new TypeError(`Unmarshalling the type 'ListPrivateNetworksResponse' failed as data isn't a dictionary.`);
|
|
72
|
-
}
|
|
73
|
-
return {
|
|
74
|
-
privateNetworks: unmarshalArrayOfObject(data.private_networks, unmarshalPrivateNetwork),
|
|
75
|
-
totalCount: data.total_count
|
|
76
|
-
};
|
|
77
|
-
};
|
|
78
|
-
const unmarshalListVPCsResponse = data => {
|
|
79
|
-
if (!isJSONObject(data)) {
|
|
80
|
-
throw new TypeError(`Unmarshalling the type 'ListVPCsResponse' failed as data isn't a dictionary.`);
|
|
81
|
-
}
|
|
82
|
-
return {
|
|
83
|
-
totalCount: data.total_count,
|
|
84
|
-
vpcs: unmarshalArrayOfObject(data.vpcs, unmarshalVPC)
|
|
85
|
-
};
|
|
86
|
-
};
|
|
87
|
-
const unmarshalSetSubnetsResponse = data => {
|
|
88
|
-
if (!isJSONObject(data)) {
|
|
89
|
-
throw new TypeError(`Unmarshalling the type 'SetSubnetsResponse' failed as data isn't a dictionary.`);
|
|
90
|
-
}
|
|
91
|
-
return {
|
|
92
|
-
subnets: data.subnets
|
|
93
|
-
};
|
|
94
|
-
};
|
|
95
|
-
const marshalAddSubnetsRequest = (request, defaults) => ({
|
|
96
|
-
subnets: request.subnets
|
|
97
|
-
});
|
|
98
|
-
const marshalCreatePrivateNetworkRequest = (request, defaults) => ({
|
|
99
|
-
name: request.name || randomName('pn'),
|
|
100
|
-
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
101
|
-
subnets: request.subnets,
|
|
102
|
-
tags: request.tags,
|
|
103
|
-
vpc_id: request.vpcId
|
|
104
|
-
});
|
|
105
|
-
const marshalCreateVPCRequest = (request, defaults) => ({
|
|
106
|
-
name: request.name || randomName('vpc'),
|
|
107
|
-
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
108
|
-
tags: request.tags
|
|
109
|
-
});
|
|
110
|
-
const marshalDeleteSubnetsRequest = (request, defaults) => ({
|
|
111
|
-
subnets: request.subnets
|
|
112
|
-
});
|
|
113
|
-
const marshalMigrateZonalPrivateNetworksRequest = (request, defaults) => ({
|
|
114
|
-
private_network_ids: request.privateNetworkIds,
|
|
115
|
-
...resolveOneOf([{
|
|
116
|
-
param: 'organization_id',
|
|
117
|
-
value: request.organizationId
|
|
118
|
-
}, {
|
|
119
|
-
param: 'project_id',
|
|
120
|
-
value: request.projectId
|
|
121
|
-
}])
|
|
122
|
-
});
|
|
123
|
-
const marshalSetSubnetsRequest = (request, defaults) => ({
|
|
124
|
-
subnets: request.subnets
|
|
125
|
-
});
|
|
126
|
-
const marshalUpdatePrivateNetworkRequest = (request, defaults) => ({
|
|
127
|
-
name: request.name,
|
|
128
|
-
tags: request.tags
|
|
129
|
-
});
|
|
130
|
-
const marshalUpdateVPCRequest = (request, defaults) => ({
|
|
131
|
-
name: request.name,
|
|
132
|
-
tags: request.tags
|
|
133
|
-
});
|
|
134
|
-
|
|
135
|
-
export { marshalAddSubnetsRequest, marshalCreatePrivateNetworkRequest, marshalCreateVPCRequest, marshalDeleteSubnetsRequest, marshalMigrateZonalPrivateNetworksRequest, marshalSetSubnetsRequest, marshalUpdatePrivateNetworkRequest, marshalUpdateVPCRequest, unmarshalAddSubnetsResponse, unmarshalDeleteSubnetsResponse, unmarshalListPrivateNetworksResponse, unmarshalListVPCsResponse, unmarshalPrivateNetwork, unmarshalSetSubnetsResponse, unmarshalVPC };
|
package/dist/api/vpcgw/index.js
DELETED