@scaleway/sdk 1.14.0 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/account/v2/api.gen.js +77 -60
- package/dist/api/applesilicon/v1alpha1/api.gen.js +174 -152
- package/dist/api/baremetal/v1/api.gen.js +434 -378
- package/dist/api/baremetal/v1/api.utils.js +19 -22
- package/dist/api/billing/v2alpha1/api.gen.js +21 -17
- package/dist/api/cockpit/v1beta1/api.gen.js +308 -232
- package/dist/api/container/v1beta1/api.gen.js +384 -337
- package/dist/api/domain/v2beta1/api.gen.js +754 -668
- package/dist/api/flexibleip/v1alpha1/api.gen.js +164 -151
- package/dist/api/function/v1beta1/api.gen.js +467 -407
- package/dist/api/iam/v1alpha1/api.gen.js +641 -557
- package/dist/api/instance/v1/api.gen.js +803 -677
- package/dist/api/instance/v1/api.utils.js +337 -325
- package/dist/api/instance/v1/content.gen.js +4 -1
- package/dist/api/instance/v1/index.js +1 -1
- package/dist/api/instance/v1/marshalling.gen.js +27 -4
- package/dist/api/iot/v1/api.gen.js +508 -452
- package/dist/api/ipfs/index.js +2 -0
- package/dist/api/ipfs/v1alpha1/api.gen.js +197 -0
- package/dist/api/ipfs/v1alpha1/content.gen.js +7 -0
- package/dist/api/ipfs/v1alpha1/index.gen.js +5 -0
- package/dist/api/ipfs/v1alpha1/marshalling.gen.js +125 -0
- package/dist/api/k8s/v1/api.gen.js +403 -342
- package/dist/api/k8s/v1/api.utils.js +7 -10
- package/dist/api/k8s/v1/marshalling.gen.js +19 -1
- package/dist/api/k8s/v1/validation-rules.gen.js +10 -1
- package/dist/api/lb/v1/api.gen.js +1501 -1363
- package/dist/api/lb/v1/api.utils.js +71 -75
- package/dist/api/lb/v1/marshalling.gen.js +6 -0
- package/dist/api/marketplace/v1/api.gen.js +35 -32
- package/dist/api/marketplace/v2/api.gen.js +117 -102
- package/dist/api/mnq/v1alpha1/api.gen.js +154 -137
- package/dist/api/rdb/v1/api.gen.js +897 -819
- package/dist/api/redis/v1/api.gen.js +358 -333
- package/dist/api/redis/v1/marshalling.gen.js +1 -0
- package/dist/api/registry/v1/api.gen.js +211 -189
- package/dist/api/secret/v1alpha1/api.gen.js +295 -246
- package/dist/api/secret/v1alpha1/marshalling.gen.js +10 -1
- package/dist/api/tem/v1alpha1/api.gen.js +182 -147
- package/dist/api/tem/v1alpha1/marshalling.gen.js +32 -1
- package/dist/api/test/v1/api.gen.js +116 -104
- package/dist/api/vpc/v1/api.gen.js +74 -65
- package/dist/api/vpc/v2/api.gen.js +200 -178
- package/dist/api/vpc/v2/marshalling.gen.js +1 -0
- package/dist/api/vpcgw/v1/api.gen.js +575 -501
- package/dist/api/webhosting/v1alpha1/api.gen.js +127 -117
- package/dist/api/webhosting/v1alpha1/content.gen.js +1 -1
- package/dist/index.cjs +924 -453
- package/dist/index.d.ts +2152 -1558
- package/dist/index.js +28 -26
- package/dist/internal/logger/console-logger.js +4 -5
- package/dist/scw/constants.js +1 -1
- package/dist/scw/errors/scw-error.js +2 -2
- package/package.json +2 -2
|
@@ -26,27 +26,25 @@ const jsonContentHeaders = {
|
|
|
26
26
|
* SCW_SECRET_KEY env variable.
|
|
27
27
|
*/
|
|
28
28
|
class API extends API$1 {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}, unmarshalRegisterResponse);
|
|
49
|
-
this.pageOfListHumans = function (request) {
|
|
29
|
+
/**
|
|
30
|
+
* Register a user. Register a human and return a access-key and a secret-key
|
|
31
|
+
* that must be used in all other commands.
|
|
32
|
+
*
|
|
33
|
+
* Hint: you can use other test commands by setting the SCW_SECRET_KEY env
|
|
34
|
+
* variable.
|
|
35
|
+
*
|
|
36
|
+
* @param request - The request {@link RegisterRequest}
|
|
37
|
+
* @returns A Promise of RegisterResponse
|
|
38
|
+
*/
|
|
39
|
+
register = request => this.client.fetch({
|
|
40
|
+
body: JSON.stringify(marshalRegisterRequest(request, this.client.settings)),
|
|
41
|
+
headers: jsonContentHeaders,
|
|
42
|
+
method: 'POST',
|
|
43
|
+
path: `/test/v1/register`
|
|
44
|
+
}, unmarshalRegisterResponse);
|
|
45
|
+
pageOfListHumans = (() => {
|
|
46
|
+
var _this = this;
|
|
47
|
+
return function (request) {
|
|
50
48
|
if (request === void 0) {
|
|
51
49
|
request = {};
|
|
52
50
|
}
|
|
@@ -56,102 +54,116 @@ class API extends API$1 {
|
|
|
56
54
|
urlParams: urlParams(['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
57
55
|
}, unmarshalListHumansResponse);
|
|
58
56
|
};
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
57
|
+
})();
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* List all your humans.
|
|
61
|
+
*
|
|
62
|
+
* @param request - The request {@link ListHumansRequest}
|
|
63
|
+
* @returns A Promise of ListHumansResponse
|
|
64
|
+
*/
|
|
65
|
+
listHumans = (() => {
|
|
66
|
+
var _this2 = this;
|
|
67
|
+
return function (request) {
|
|
66
68
|
if (request === void 0) {
|
|
67
69
|
request = {};
|
|
68
70
|
}
|
|
69
|
-
return enrichForPagination('humans',
|
|
71
|
+
return enrichForPagination('humans', _this2.pageOfListHumans, request);
|
|
70
72
|
};
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
73
|
+
})();
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Get human details. Get the human details associated with the given id.
|
|
77
|
+
*
|
|
78
|
+
* @param request - The request {@link GetHumanRequest}
|
|
79
|
+
* @returns A Promise of Human
|
|
80
|
+
*/
|
|
81
|
+
getHuman = request => this.client.fetch({
|
|
82
|
+
method: 'GET',
|
|
83
|
+
path: `/test/v1/humans/${validatePathParam('humanId', request.humanId)}`
|
|
84
|
+
}, unmarshalHuman);
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Waits for {@link Human} to be in a final state.
|
|
88
|
+
*
|
|
89
|
+
* @param request - The request {@link GetHumanRequest}
|
|
90
|
+
* @param options - The waiting options
|
|
91
|
+
* @returns A Promise of Human
|
|
92
|
+
*/
|
|
93
|
+
waitForHuman = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!HUMAN_TRANSIENT_STATUSES.includes(res.status))), this.getHuman, request, options);
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Create a new human.
|
|
97
|
+
*
|
|
98
|
+
* @param request - The request {@link CreateHumanRequest}
|
|
99
|
+
* @returns A Promise of Human
|
|
100
|
+
*/
|
|
101
|
+
createHuman = request => this.client.fetch({
|
|
102
|
+
body: JSON.stringify(marshalCreateHumanRequest(request, this.client.settings)),
|
|
103
|
+
headers: jsonContentHeaders,
|
|
104
|
+
method: 'POST',
|
|
105
|
+
path: `/test/v1/humans`
|
|
106
|
+
}, unmarshalHuman);
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Update an existing human. Update the human associated with the given id.
|
|
110
|
+
*
|
|
111
|
+
* @param request - The request {@link UpdateHumanRequest}
|
|
112
|
+
* @returns A Promise of Human
|
|
113
|
+
*/
|
|
114
|
+
updateHuman = request => this.client.fetch({
|
|
115
|
+
body: JSON.stringify(marshalUpdateHumanRequest(request, this.client.settings)),
|
|
116
|
+
headers: jsonContentHeaders,
|
|
117
|
+
method: 'PATCH',
|
|
118
|
+
path: `/test/v1/humans/${validatePathParam('humanId', request.humanId)}`
|
|
119
|
+
}, unmarshalHuman);
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Delete an existing human. Delete the human associated with the given id.
|
|
123
|
+
*
|
|
124
|
+
* @param request - The request {@link DeleteHumanRequest}
|
|
125
|
+
* @returns A Promise of Human
|
|
126
|
+
*/
|
|
127
|
+
deleteHuman = request => this.client.fetch({
|
|
128
|
+
method: 'DELETE',
|
|
129
|
+
path: `/test/v1/humans/${validatePathParam('humanId', request.humanId)}`
|
|
130
|
+
}, unmarshalHuman);
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Start a 1h running for the given human. Start a one hour running for the
|
|
134
|
+
* given human.
|
|
135
|
+
*
|
|
136
|
+
* @param request - The request {@link RunHumanRequest}
|
|
137
|
+
* @returns A Promise of Human
|
|
138
|
+
*/
|
|
139
|
+
runHuman = request => this.client.fetch({
|
|
140
|
+
body: '{}',
|
|
141
|
+
headers: jsonContentHeaders,
|
|
142
|
+
method: 'POST',
|
|
143
|
+
path: `/test/v1/humans/${validatePathParam('humanId', request.humanId)}/run`
|
|
144
|
+
}, unmarshalHuman);
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Make a human smoke.
|
|
148
|
+
*
|
|
149
|
+
* @deprecated
|
|
150
|
+
* @param request - The request {@link SmokeHumanRequest}
|
|
151
|
+
* @returns A Promise of Human
|
|
152
|
+
*/
|
|
153
|
+
smokeHuman = (() => {
|
|
154
|
+
var _this3 = this;
|
|
155
|
+
return function (request) {
|
|
144
156
|
if (request === void 0) {
|
|
145
157
|
request = {};
|
|
146
158
|
}
|
|
147
|
-
return
|
|
159
|
+
return _this3.client.fetch({
|
|
148
160
|
body: '{}',
|
|
149
161
|
headers: jsonContentHeaders,
|
|
150
162
|
method: 'POST',
|
|
151
163
|
path: `/test/v1/humans/${validatePathParam('humanId', request.humanId)}/smoke`
|
|
152
164
|
}, unmarshalHuman);
|
|
153
165
|
};
|
|
154
|
-
}
|
|
166
|
+
})();
|
|
155
167
|
}
|
|
156
168
|
|
|
157
169
|
export { API };
|
|
@@ -11,11 +11,11 @@ const jsonContentHeaders = {
|
|
|
11
11
|
|
|
12
12
|
/** VPC API. */
|
|
13
13
|
class API extends API$1 {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
_this = this;
|
|
18
|
-
|
|
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
19
|
if (request === void 0) {
|
|
20
20
|
request = {};
|
|
21
21
|
}
|
|
@@ -25,77 +25,86 @@ class API extends API$1 {
|
|
|
25
25
|
urlParams: urlParams(['include_regional', request.includeRegional], ['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], ['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
26
|
}, unmarshalListPrivateNetworksResponse);
|
|
27
27
|
};
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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) {
|
|
38
42
|
if (request === void 0) {
|
|
39
43
|
request = {};
|
|
40
44
|
}
|
|
41
|
-
return enrichForPagination('privateNetworks',
|
|
45
|
+
return enrichForPagination('privateNetworks', _this2.pageOfListPrivateNetworks, request);
|
|
42
46
|
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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) {
|
|
51
59
|
if (request === void 0) {
|
|
52
60
|
request = {};
|
|
53
61
|
}
|
|
54
|
-
return
|
|
55
|
-
body: JSON.stringify(marshalCreatePrivateNetworkRequest(request,
|
|
62
|
+
return _this3.client.fetch({
|
|
63
|
+
body: JSON.stringify(marshalCreatePrivateNetworkRequest(request, _this3.client.settings)),
|
|
56
64
|
headers: jsonContentHeaders,
|
|
57
65
|
method: 'POST',
|
|
58
|
-
path: `/vpc/v1/zones/${validatePathParam('zone', request.zone ??
|
|
66
|
+
path: `/vpc/v1/zones/${validatePathParam('zone', request.zone ?? _this3.client.settings.defaultZone)}/private-networks`
|
|
59
67
|
}, unmarshalPrivateNetwork);
|
|
60
68
|
};
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
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
|
+
});
|
|
97
108
|
}
|
|
98
|
-
/** Lists the available zones of the API. */
|
|
99
|
-
API.LOCALITIES = ['fr-par-1', 'fr-par-2', 'fr-par-3', 'nl-ams-1', 'nl-ams-2', 'pl-waw-1', 'pl-waw-2'];
|
|
100
109
|
|
|
101
110
|
export { API };
|