@scaleway/sdk-container 2.3.2 → 2.4.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/_virtual/_rolldown/runtime.js +11 -0
- package/dist/index.gen.js +2 -4
- package/dist/v1beta1/api.gen.d.ts +1 -1
- package/dist/v1beta1/api.gen.js +410 -584
- package/dist/v1beta1/content.gen.js +34 -38
- package/dist/v1beta1/index.gen.js +36 -34
- package/dist/v1beta1/marshalling.gen.js +326 -443
- package/dist/v1beta1/types.gen.d.ts +3 -3
- package/dist/v1beta1/validation-rules.gen.js +51 -65
- package/package.json +4 -4
|
@@ -1,502 +1,385 @@
|
|
|
1
|
+
import { isJSONObject, resolveOneOf, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
|
|
1
2
|
import randomName from "@scaleway/random-name";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
throw new TypeError(
|
|
6
|
-
`Unmarshalling the type 'ContainerHealthCheckSpecHTTPProbe' failed as data isn't a dictionary.`
|
|
7
|
-
);
|
|
8
|
-
}
|
|
9
|
-
return {
|
|
10
|
-
path: data.path
|
|
11
|
-
};
|
|
3
|
+
var unmarshalContainerHealthCheckSpecHTTPProbe = (data) => {
|
|
4
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ContainerHealthCheckSpecHTTPProbe' failed as data isn't a dictionary.`);
|
|
5
|
+
return { path: data.path };
|
|
12
6
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
`Unmarshalling the type 'ContainerHealthCheckSpecTCPProbe' failed as data isn't a dictionary.`
|
|
17
|
-
);
|
|
18
|
-
}
|
|
19
|
-
return {};
|
|
7
|
+
var unmarshalContainerHealthCheckSpecTCPProbe = (data) => {
|
|
8
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ContainerHealthCheckSpecTCPProbe' failed as data isn't a dictionary.`);
|
|
9
|
+
return {};
|
|
20
10
|
};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
http: data.http ? unmarshalContainerHealthCheckSpecHTTPProbe(data.http) : void 0,
|
|
30
|
-
interval: data.interval,
|
|
31
|
-
tcp: data.tcp ? unmarshalContainerHealthCheckSpecTCPProbe(data.tcp) : void 0
|
|
32
|
-
};
|
|
11
|
+
var unmarshalContainerHealthCheckSpec = (data) => {
|
|
12
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ContainerHealthCheckSpec' failed as data isn't a dictionary.`);
|
|
13
|
+
return {
|
|
14
|
+
failureThreshold: data.failure_threshold,
|
|
15
|
+
http: data.http ? unmarshalContainerHealthCheckSpecHTTPProbe(data.http) : void 0,
|
|
16
|
+
interval: data.interval,
|
|
17
|
+
tcp: data.tcp ? unmarshalContainerHealthCheckSpecTCPProbe(data.tcp) : void 0
|
|
18
|
+
};
|
|
33
19
|
};
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
concurrentRequestsThreshold: data.concurrent_requests_threshold,
|
|
42
|
-
cpuUsageThreshold: data.cpu_usage_threshold,
|
|
43
|
-
memoryUsageThreshold: data.memory_usage_threshold
|
|
44
|
-
};
|
|
20
|
+
var unmarshalContainerScalingOption = (data) => {
|
|
21
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ContainerScalingOption' failed as data isn't a dictionary.`);
|
|
22
|
+
return {
|
|
23
|
+
concurrentRequestsThreshold: data.concurrent_requests_threshold,
|
|
24
|
+
cpuUsageThreshold: data.cpu_usage_threshold,
|
|
25
|
+
memoryUsageThreshold: data.memory_usage_threshold
|
|
26
|
+
};
|
|
45
27
|
};
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
return {
|
|
53
|
-
hashedValue: data.hashed_value,
|
|
54
|
-
key: data.key
|
|
55
|
-
};
|
|
28
|
+
var unmarshalSecretHashedValue = (data) => {
|
|
29
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SecretHashedValue' failed as data isn't a dictionary.`);
|
|
30
|
+
return {
|
|
31
|
+
hashedValue: data.hashed_value,
|
|
32
|
+
key: data.key
|
|
33
|
+
};
|
|
56
34
|
};
|
|
57
35
|
const unmarshalContainer = (data) => {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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
|
-
tags: data.tags,
|
|
94
|
-
timeout: data.timeout,
|
|
95
|
-
updatedAt: unmarshalDate(data.updated_at)
|
|
96
|
-
};
|
|
36
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Container' failed as data isn't a dictionary.`);
|
|
37
|
+
return {
|
|
38
|
+
args: data.args,
|
|
39
|
+
command: data.command,
|
|
40
|
+
cpuLimit: data.cpu_limit,
|
|
41
|
+
createdAt: unmarshalDate(data.created_at),
|
|
42
|
+
description: data.description,
|
|
43
|
+
domainName: data.domain_name,
|
|
44
|
+
environmentVariables: data.environment_variables,
|
|
45
|
+
errorMessage: data.error_message,
|
|
46
|
+
healthCheck: data.health_check ? unmarshalContainerHealthCheckSpec(data.health_check) : void 0,
|
|
47
|
+
httpOption: data.http_option,
|
|
48
|
+
id: data.id,
|
|
49
|
+
localStorageLimit: data.local_storage_limit,
|
|
50
|
+
maxConcurrency: data.max_concurrency,
|
|
51
|
+
maxScale: data.max_scale,
|
|
52
|
+
memoryLimit: data.memory_limit,
|
|
53
|
+
minScale: data.min_scale,
|
|
54
|
+
name: data.name,
|
|
55
|
+
namespaceId: data.namespace_id,
|
|
56
|
+
port: data.port,
|
|
57
|
+
privacy: data.privacy,
|
|
58
|
+
privateNetworkId: data.private_network_id,
|
|
59
|
+
protocol: data.protocol,
|
|
60
|
+
readyAt: unmarshalDate(data.ready_at),
|
|
61
|
+
region: data.region,
|
|
62
|
+
registryImage: data.registry_image,
|
|
63
|
+
sandbox: data.sandbox,
|
|
64
|
+
scalingOption: data.scaling_option ? unmarshalContainerScalingOption(data.scaling_option) : void 0,
|
|
65
|
+
secretEnvironmentVariables: unmarshalArrayOfObject(data.secret_environment_variables, unmarshalSecretHashedValue),
|
|
66
|
+
status: data.status,
|
|
67
|
+
tags: data.tags,
|
|
68
|
+
timeout: data.timeout,
|
|
69
|
+
updatedAt: unmarshalDate(data.updated_at)
|
|
70
|
+
};
|
|
97
71
|
};
|
|
98
72
|
const unmarshalCron = (data) => {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
name: data.name,
|
|
109
|
-
schedule: data.schedule,
|
|
110
|
-
status: data.status
|
|
111
|
-
};
|
|
73
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Cron' failed as data isn't a dictionary.`);
|
|
74
|
+
return {
|
|
75
|
+
args: data.args,
|
|
76
|
+
containerId: data.container_id,
|
|
77
|
+
id: data.id,
|
|
78
|
+
name: data.name,
|
|
79
|
+
schedule: data.schedule,
|
|
80
|
+
status: data.status
|
|
81
|
+
};
|
|
112
82
|
};
|
|
113
83
|
const unmarshalDomain = (data) => {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
id: data.id,
|
|
124
|
-
status: data.status,
|
|
125
|
-
url: data.url
|
|
126
|
-
};
|
|
84
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Domain' failed as data isn't a dictionary.`);
|
|
85
|
+
return {
|
|
86
|
+
containerId: data.container_id,
|
|
87
|
+
errorMessage: data.error_message,
|
|
88
|
+
hostname: data.hostname,
|
|
89
|
+
id: data.id,
|
|
90
|
+
status: data.status,
|
|
91
|
+
url: data.url
|
|
92
|
+
};
|
|
127
93
|
};
|
|
128
94
|
const unmarshalNamespace = (data) => {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
tags: data.tags,
|
|
149
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
150
|
-
vpcIntegrationActivated: data.vpc_integration_activated
|
|
151
|
-
};
|
|
95
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Namespace' failed as data isn't a dictionary.`);
|
|
96
|
+
return {
|
|
97
|
+
createdAt: unmarshalDate(data.created_at),
|
|
98
|
+
description: data.description,
|
|
99
|
+
environmentVariables: data.environment_variables,
|
|
100
|
+
errorMessage: data.error_message,
|
|
101
|
+
id: data.id,
|
|
102
|
+
name: data.name,
|
|
103
|
+
organizationId: data.organization_id,
|
|
104
|
+
projectId: data.project_id,
|
|
105
|
+
region: data.region,
|
|
106
|
+
registryEndpoint: data.registry_endpoint,
|
|
107
|
+
registryNamespaceId: data.registry_namespace_id,
|
|
108
|
+
secretEnvironmentVariables: unmarshalArrayOfObject(data.secret_environment_variables, unmarshalSecretHashedValue),
|
|
109
|
+
status: data.status,
|
|
110
|
+
tags: data.tags,
|
|
111
|
+
updatedAt: unmarshalDate(data.updated_at),
|
|
112
|
+
vpcIntegrationActivated: data.vpc_integration_activated
|
|
113
|
+
};
|
|
152
114
|
};
|
|
153
115
|
const unmarshalToken = (data) => {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
publicKey: data.public_key,
|
|
166
|
-
status: data.status,
|
|
167
|
-
token: data.token
|
|
168
|
-
};
|
|
116
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Token' failed as data isn't a dictionary.`);
|
|
117
|
+
return {
|
|
118
|
+
containerId: data.container_id,
|
|
119
|
+
description: data.description,
|
|
120
|
+
expiresAt: unmarshalDate(data.expires_at),
|
|
121
|
+
id: data.id,
|
|
122
|
+
namespaceId: data.namespace_id,
|
|
123
|
+
publicKey: data.public_key,
|
|
124
|
+
status: data.status,
|
|
125
|
+
token: data.token
|
|
126
|
+
};
|
|
169
127
|
};
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
mnqProjectId: data.mnq_project_id,
|
|
180
|
-
mnqRegion: data.mnq_region,
|
|
181
|
-
subject: data.subject
|
|
182
|
-
};
|
|
128
|
+
var unmarshalTriggerMnqNatsClientConfig = (data) => {
|
|
129
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'TriggerMnqNatsClientConfig' failed as data isn't a dictionary.`);
|
|
130
|
+
return {
|
|
131
|
+
mnqCredentialId: data.mnq_credential_id,
|
|
132
|
+
mnqNatsAccountId: data.mnq_nats_account_id,
|
|
133
|
+
mnqProjectId: data.mnq_project_id,
|
|
134
|
+
mnqRegion: data.mnq_region,
|
|
135
|
+
subject: data.subject
|
|
136
|
+
};
|
|
183
137
|
};
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
mnqProjectId: data.mnq_project_id,
|
|
193
|
-
mnqRegion: data.mnq_region,
|
|
194
|
-
queue: data.queue
|
|
195
|
-
};
|
|
138
|
+
var unmarshalTriggerMnqSqsClientConfig = (data) => {
|
|
139
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'TriggerMnqSqsClientConfig' failed as data isn't a dictionary.`);
|
|
140
|
+
return {
|
|
141
|
+
mnqCredentialId: data.mnq_credential_id,
|
|
142
|
+
mnqProjectId: data.mnq_project_id,
|
|
143
|
+
mnqRegion: data.mnq_region,
|
|
144
|
+
queue: data.queue
|
|
145
|
+
};
|
|
196
146
|
};
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
endpoint: data.endpoint,
|
|
206
|
-
queueUrl: data.queue_url,
|
|
207
|
-
secretKey: data.secret_key
|
|
208
|
-
};
|
|
147
|
+
var unmarshalTriggerSqsClientConfig = (data) => {
|
|
148
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'TriggerSqsClientConfig' failed as data isn't a dictionary.`);
|
|
149
|
+
return {
|
|
150
|
+
accessKey: data.access_key,
|
|
151
|
+
endpoint: data.endpoint,
|
|
152
|
+
queueUrl: data.queue_url,
|
|
153
|
+
secretKey: data.secret_key
|
|
154
|
+
};
|
|
209
155
|
};
|
|
210
156
|
const unmarshalTrigger = (data) => {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
scwSqsConfig: data.scw_sqs_config ? unmarshalTriggerMnqSqsClientConfig(data.scw_sqs_config) : void 0,
|
|
225
|
-
sqsConfig: data.sqs_config ? unmarshalTriggerSqsClientConfig(data.sqs_config) : void 0,
|
|
226
|
-
status: data.status
|
|
227
|
-
};
|
|
157
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Trigger' failed as data isn't a dictionary.`);
|
|
158
|
+
return {
|
|
159
|
+
containerId: data.container_id,
|
|
160
|
+
description: data.description,
|
|
161
|
+
errorMessage: data.error_message,
|
|
162
|
+
id: data.id,
|
|
163
|
+
inputType: data.input_type,
|
|
164
|
+
name: data.name,
|
|
165
|
+
scwNatsConfig: data.scw_nats_config ? unmarshalTriggerMnqNatsClientConfig(data.scw_nats_config) : void 0,
|
|
166
|
+
scwSqsConfig: data.scw_sqs_config ? unmarshalTriggerMnqSqsClientConfig(data.scw_sqs_config) : void 0,
|
|
167
|
+
sqsConfig: data.sqs_config ? unmarshalTriggerSqsClientConfig(data.sqs_config) : void 0,
|
|
168
|
+
status: data.status
|
|
169
|
+
};
|
|
228
170
|
};
|
|
229
171
|
const unmarshalListContainersResponse = (data) => {
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
return {
|
|
236
|
-
containers: unmarshalArrayOfObject(data.containers, unmarshalContainer),
|
|
237
|
-
totalCount: data.total_count
|
|
238
|
-
};
|
|
172
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListContainersResponse' failed as data isn't a dictionary.`);
|
|
173
|
+
return {
|
|
174
|
+
containers: unmarshalArrayOfObject(data.containers, unmarshalContainer),
|
|
175
|
+
totalCount: data.total_count
|
|
176
|
+
};
|
|
239
177
|
};
|
|
240
178
|
const unmarshalListCronsResponse = (data) => {
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
return {
|
|
247
|
-
crons: unmarshalArrayOfObject(data.crons, unmarshalCron),
|
|
248
|
-
totalCount: data.total_count
|
|
249
|
-
};
|
|
179
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListCronsResponse' failed as data isn't a dictionary.`);
|
|
180
|
+
return {
|
|
181
|
+
crons: unmarshalArrayOfObject(data.crons, unmarshalCron),
|
|
182
|
+
totalCount: data.total_count
|
|
183
|
+
};
|
|
250
184
|
};
|
|
251
185
|
const unmarshalListDomainsResponse = (data) => {
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
return {
|
|
258
|
-
domains: unmarshalArrayOfObject(data.domains, unmarshalDomain),
|
|
259
|
-
totalCount: data.total_count
|
|
260
|
-
};
|
|
186
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListDomainsResponse' failed as data isn't a dictionary.`);
|
|
187
|
+
return {
|
|
188
|
+
domains: unmarshalArrayOfObject(data.domains, unmarshalDomain),
|
|
189
|
+
totalCount: data.total_count
|
|
190
|
+
};
|
|
261
191
|
};
|
|
262
192
|
const unmarshalListNamespacesResponse = (data) => {
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
return {
|
|
269
|
-
namespaces: unmarshalArrayOfObject(data.namespaces, unmarshalNamespace),
|
|
270
|
-
totalCount: data.total_count
|
|
271
|
-
};
|
|
193
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListNamespacesResponse' failed as data isn't a dictionary.`);
|
|
194
|
+
return {
|
|
195
|
+
namespaces: unmarshalArrayOfObject(data.namespaces, unmarshalNamespace),
|
|
196
|
+
totalCount: data.total_count
|
|
197
|
+
};
|
|
272
198
|
};
|
|
273
199
|
const unmarshalListTokensResponse = (data) => {
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
return {
|
|
280
|
-
tokens: unmarshalArrayOfObject(data.tokens, unmarshalToken),
|
|
281
|
-
totalCount: data.total_count
|
|
282
|
-
};
|
|
200
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListTokensResponse' failed as data isn't a dictionary.`);
|
|
201
|
+
return {
|
|
202
|
+
tokens: unmarshalArrayOfObject(data.tokens, unmarshalToken),
|
|
203
|
+
totalCount: data.total_count
|
|
204
|
+
};
|
|
283
205
|
};
|
|
284
206
|
const unmarshalListTriggersResponse = (data) => {
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
return {
|
|
291
|
-
totalCount: data.total_count,
|
|
292
|
-
triggers: unmarshalArrayOfObject(data.triggers, unmarshalTrigger)
|
|
293
|
-
};
|
|
207
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListTriggersResponse' failed as data isn't a dictionary.`);
|
|
208
|
+
return {
|
|
209
|
+
totalCount: data.total_count,
|
|
210
|
+
triggers: unmarshalArrayOfObject(data.triggers, unmarshalTrigger)
|
|
211
|
+
};
|
|
294
212
|
};
|
|
295
|
-
|
|
296
|
-
|
|
213
|
+
var marshalContainerHealthCheckSpecHTTPProbe = (request, defaults) => ({ path: request.path });
|
|
214
|
+
var marshalContainerHealthCheckSpecTCPProbe = (request, defaults) => ({});
|
|
215
|
+
var marshalContainerHealthCheckSpec = (request, defaults) => ({
|
|
216
|
+
failure_threshold: request.failureThreshold,
|
|
217
|
+
interval: request.interval,
|
|
218
|
+
...resolveOneOf([{
|
|
219
|
+
param: "http",
|
|
220
|
+
value: request.http !== void 0 ? marshalContainerHealthCheckSpecHTTPProbe(request.http, defaults) : void 0
|
|
221
|
+
}, {
|
|
222
|
+
param: "tcp",
|
|
223
|
+
value: request.tcp !== void 0 ? marshalContainerHealthCheckSpecTCPProbe(request.tcp, defaults) : void 0
|
|
224
|
+
}])
|
|
297
225
|
});
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
{
|
|
316
|
-
param: "concurrent_requests_threshold",
|
|
317
|
-
value: request.concurrentRequestsThreshold
|
|
318
|
-
},
|
|
319
|
-
{
|
|
320
|
-
param: "cpu_usage_threshold",
|
|
321
|
-
value: request.cpuUsageThreshold
|
|
322
|
-
},
|
|
323
|
-
{
|
|
324
|
-
param: "memory_usage_threshold",
|
|
325
|
-
value: request.memoryUsageThreshold
|
|
326
|
-
}
|
|
327
|
-
])
|
|
328
|
-
});
|
|
329
|
-
const marshalSecret = (request, defaults) => ({
|
|
330
|
-
key: request.key,
|
|
331
|
-
value: request.value
|
|
226
|
+
var marshalContainerScalingOption = (request, defaults) => ({ ...resolveOneOf([
|
|
227
|
+
{
|
|
228
|
+
param: "concurrent_requests_threshold",
|
|
229
|
+
value: request.concurrentRequestsThreshold
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
param: "cpu_usage_threshold",
|
|
233
|
+
value: request.cpuUsageThreshold
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
param: "memory_usage_threshold",
|
|
237
|
+
value: request.memoryUsageThreshold
|
|
238
|
+
}
|
|
239
|
+
]) });
|
|
240
|
+
var marshalSecret = (request, defaults) => ({
|
|
241
|
+
key: request.key,
|
|
242
|
+
value: request.value
|
|
332
243
|
});
|
|
333
244
|
const marshalCreateContainerRequest = (request, defaults) => ({
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
245
|
+
args: request.args,
|
|
246
|
+
command: request.command,
|
|
247
|
+
cpu_limit: request.cpuLimit,
|
|
248
|
+
description: request.description,
|
|
249
|
+
environment_variables: request.environmentVariables,
|
|
250
|
+
health_check: request.healthCheck !== void 0 ? marshalContainerHealthCheckSpec(request.healthCheck, defaults) : void 0,
|
|
251
|
+
http_option: request.httpOption,
|
|
252
|
+
local_storage_limit: request.localStorageLimit,
|
|
253
|
+
max_concurrency: request.maxConcurrency,
|
|
254
|
+
max_scale: request.maxScale,
|
|
255
|
+
memory_limit: request.memoryLimit,
|
|
256
|
+
min_scale: request.minScale,
|
|
257
|
+
name: request.name,
|
|
258
|
+
namespace_id: request.namespaceId,
|
|
259
|
+
port: request.port,
|
|
260
|
+
privacy: request.privacy,
|
|
261
|
+
private_network_id: request.privateNetworkId,
|
|
262
|
+
protocol: request.protocol,
|
|
263
|
+
registry_image: request.registryImage,
|
|
264
|
+
sandbox: request.sandbox,
|
|
265
|
+
scaling_option: request.scalingOption !== void 0 ? marshalContainerScalingOption(request.scalingOption, defaults) : void 0,
|
|
266
|
+
secret_environment_variables: request.secretEnvironmentVariables !== void 0 ? request.secretEnvironmentVariables.map((elt) => marshalSecret(elt, defaults)) : void 0,
|
|
267
|
+
tags: request.tags,
|
|
268
|
+
timeout: request.timeout
|
|
358
269
|
});
|
|
359
270
|
const marshalCreateCronRequest = (request, defaults) => ({
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
271
|
+
args: request.args,
|
|
272
|
+
container_id: request.containerId,
|
|
273
|
+
name: request.name,
|
|
274
|
+
schedule: request.schedule
|
|
364
275
|
});
|
|
365
276
|
const marshalCreateDomainRequest = (request, defaults) => ({
|
|
366
|
-
|
|
367
|
-
|
|
277
|
+
container_id: request.containerId,
|
|
278
|
+
hostname: request.hostname
|
|
368
279
|
});
|
|
369
280
|
const marshalCreateNamespaceRequest = (request, defaults) => ({
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
281
|
+
activate_vpc_integration: request.activateVpcIntegration,
|
|
282
|
+
description: request.description,
|
|
283
|
+
environment_variables: request.environmentVariables,
|
|
284
|
+
name: request.name || randomName("cns"),
|
|
285
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
286
|
+
secret_environment_variables: request.secretEnvironmentVariables !== void 0 ? request.secretEnvironmentVariables.map((elt) => marshalSecret(elt, defaults)) : void 0,
|
|
287
|
+
tags: request.tags
|
|
377
288
|
});
|
|
378
289
|
const marshalCreateTokenRequest = (request, defaults) => ({
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
value: request.namespaceId
|
|
389
|
-
}
|
|
390
|
-
])
|
|
290
|
+
description: request.description,
|
|
291
|
+
expires_at: request.expiresAt,
|
|
292
|
+
...resolveOneOf([{
|
|
293
|
+
param: "container_id",
|
|
294
|
+
value: request.containerId
|
|
295
|
+
}, {
|
|
296
|
+
param: "namespace_id",
|
|
297
|
+
value: request.namespaceId
|
|
298
|
+
}])
|
|
391
299
|
});
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
300
|
+
var marshalCreateTriggerRequestMnqNatsClientConfig = (request, defaults) => ({
|
|
301
|
+
mnq_nats_account_id: request.mnqNatsAccountId,
|
|
302
|
+
mnq_project_id: request.mnqProjectId,
|
|
303
|
+
mnq_region: request.mnqRegion,
|
|
304
|
+
subject: request.subject
|
|
397
305
|
});
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
306
|
+
var marshalCreateTriggerRequestMnqSqsClientConfig = (request, defaults) => ({
|
|
307
|
+
mnq_project_id: request.mnqProjectId,
|
|
308
|
+
mnq_region: request.mnqRegion,
|
|
309
|
+
queue: request.queue
|
|
402
310
|
});
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
311
|
+
var marshalCreateTriggerRequestSqsClientConfig = (request, defaults) => ({
|
|
312
|
+
access_key: request.accessKey,
|
|
313
|
+
endpoint: request.endpoint,
|
|
314
|
+
queue_url: request.queueUrl,
|
|
315
|
+
secret_key: request.secretKey
|
|
408
316
|
});
|
|
409
317
|
const marshalCreateTriggerRequest = (request, defaults) => ({
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
318
|
+
container_id: request.containerId,
|
|
319
|
+
description: request.description,
|
|
320
|
+
name: request.name,
|
|
321
|
+
...resolveOneOf([
|
|
322
|
+
{
|
|
323
|
+
param: "scw_sqs_config",
|
|
324
|
+
value: request.scwSqsConfig !== void 0 ? marshalCreateTriggerRequestMnqSqsClientConfig(request.scwSqsConfig, defaults) : void 0
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
param: "scw_nats_config",
|
|
328
|
+
value: request.scwNatsConfig !== void 0 ? marshalCreateTriggerRequestMnqNatsClientConfig(request.scwNatsConfig, defaults) : void 0
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
param: "sqs_config",
|
|
332
|
+
value: request.sqsConfig !== void 0 ? marshalCreateTriggerRequestSqsClientConfig(request.sqsConfig, defaults) : void 0
|
|
333
|
+
}
|
|
334
|
+
])
|
|
427
335
|
});
|
|
428
336
|
const marshalUpdateContainerRequest = (request, defaults) => ({
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
337
|
+
args: request.args,
|
|
338
|
+
command: request.command,
|
|
339
|
+
cpu_limit: request.cpuLimit,
|
|
340
|
+
description: request.description,
|
|
341
|
+
environment_variables: request.environmentVariables,
|
|
342
|
+
health_check: request.healthCheck !== void 0 ? marshalContainerHealthCheckSpec(request.healthCheck, defaults) : void 0,
|
|
343
|
+
http_option: request.httpOption,
|
|
344
|
+
local_storage_limit: request.localStorageLimit,
|
|
345
|
+
max_concurrency: request.maxConcurrency,
|
|
346
|
+
max_scale: request.maxScale,
|
|
347
|
+
memory_limit: request.memoryLimit,
|
|
348
|
+
min_scale: request.minScale,
|
|
349
|
+
port: request.port,
|
|
350
|
+
privacy: request.privacy,
|
|
351
|
+
private_network_id: request.privateNetworkId,
|
|
352
|
+
protocol: request.protocol,
|
|
353
|
+
redeploy: request.redeploy,
|
|
354
|
+
registry_image: request.registryImage,
|
|
355
|
+
sandbox: request.sandbox,
|
|
356
|
+
scaling_option: request.scalingOption !== void 0 ? marshalContainerScalingOption(request.scalingOption, defaults) : void 0,
|
|
357
|
+
secret_environment_variables: request.secretEnvironmentVariables !== void 0 ? request.secretEnvironmentVariables.map((elt) => marshalSecret(elt, defaults)) : void 0,
|
|
358
|
+
tags: request.tags,
|
|
359
|
+
timeout: request.timeout
|
|
452
360
|
});
|
|
453
361
|
const marshalUpdateCronRequest = (request, defaults) => ({
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
362
|
+
args: request.args,
|
|
363
|
+
container_id: request.containerId,
|
|
364
|
+
name: request.name,
|
|
365
|
+
schedule: request.schedule
|
|
458
366
|
});
|
|
459
367
|
const marshalUpdateNamespaceRequest = (request, defaults) => ({
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
368
|
+
description: request.description,
|
|
369
|
+
environment_variables: request.environmentVariables,
|
|
370
|
+
secret_environment_variables: request.secretEnvironmentVariables !== void 0 ? request.secretEnvironmentVariables.map((elt) => marshalSecret(elt, defaults)) : void 0,
|
|
371
|
+
tags: request.tags
|
|
464
372
|
});
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
373
|
+
var marshalUpdateTriggerRequestSqsClientConfig = (request, defaults) => ({
|
|
374
|
+
access_key: request.accessKey,
|
|
375
|
+
secret_key: request.secretKey
|
|
468
376
|
});
|
|
469
377
|
const marshalUpdateTriggerRequest = (request, defaults) => ({
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
}
|
|
477
|
-
])
|
|
378
|
+
description: request.description,
|
|
379
|
+
name: request.name,
|
|
380
|
+
...resolveOneOf([{
|
|
381
|
+
param: "sqs_config",
|
|
382
|
+
value: request.sqsConfig !== void 0 ? marshalUpdateTriggerRequestSqsClientConfig(request.sqsConfig, defaults) : void 0
|
|
383
|
+
}])
|
|
478
384
|
});
|
|
479
|
-
export {
|
|
480
|
-
marshalCreateContainerRequest,
|
|
481
|
-
marshalCreateCronRequest,
|
|
482
|
-
marshalCreateDomainRequest,
|
|
483
|
-
marshalCreateNamespaceRequest,
|
|
484
|
-
marshalCreateTokenRequest,
|
|
485
|
-
marshalCreateTriggerRequest,
|
|
486
|
-
marshalUpdateContainerRequest,
|
|
487
|
-
marshalUpdateCronRequest,
|
|
488
|
-
marshalUpdateNamespaceRequest,
|
|
489
|
-
marshalUpdateTriggerRequest,
|
|
490
|
-
unmarshalContainer,
|
|
491
|
-
unmarshalCron,
|
|
492
|
-
unmarshalDomain,
|
|
493
|
-
unmarshalListContainersResponse,
|
|
494
|
-
unmarshalListCronsResponse,
|
|
495
|
-
unmarshalListDomainsResponse,
|
|
496
|
-
unmarshalListNamespacesResponse,
|
|
497
|
-
unmarshalListTokensResponse,
|
|
498
|
-
unmarshalListTriggersResponse,
|
|
499
|
-
unmarshalNamespace,
|
|
500
|
-
unmarshalToken,
|
|
501
|
-
unmarshalTrigger
|
|
502
|
-
};
|
|
385
|
+
export { marshalCreateContainerRequest, marshalCreateCronRequest, marshalCreateDomainRequest, marshalCreateNamespaceRequest, marshalCreateTokenRequest, marshalCreateTriggerRequest, marshalUpdateContainerRequest, marshalUpdateCronRequest, marshalUpdateNamespaceRequest, marshalUpdateTriggerRequest, unmarshalContainer, unmarshalCron, unmarshalDomain, unmarshalListContainersResponse, unmarshalListCronsResponse, unmarshalListDomainsResponse, unmarshalListNamespacesResponse, unmarshalListTokensResponse, unmarshalListTriggersResponse, unmarshalNamespace, unmarshalToken, unmarshalTrigger };
|