@scaleway/sdk-container 2.3.1 → 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 -606
- package/dist/v1beta1/content.gen.js +33 -34
- package/dist/v1beta1/index.gen.d.ts +1 -1
- package/dist/v1beta1/index.gen.js +36 -34
- package/dist/v1beta1/marshalling.gen.js +326 -453
- package/dist/v1beta1/types.gen.d.ts +3 -3
- package/dist/v1beta1/validation-rules.gen.js +51 -65
- package/package.json +4 -4
|
@@ -1,512 +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
|
-
unmarshalSecretHashedValue
|
|
94
|
-
),
|
|
95
|
-
status: data.status,
|
|
96
|
-
tags: data.tags,
|
|
97
|
-
timeout: data.timeout,
|
|
98
|
-
updatedAt: unmarshalDate(data.updated_at)
|
|
99
|
-
};
|
|
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
|
+
};
|
|
100
71
|
};
|
|
101
72
|
const unmarshalCron = (data) => {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
name: data.name,
|
|
112
|
-
schedule: data.schedule,
|
|
113
|
-
status: data.status
|
|
114
|
-
};
|
|
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
|
+
};
|
|
115
82
|
};
|
|
116
83
|
const unmarshalDomain = (data) => {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
id: data.id,
|
|
127
|
-
status: data.status,
|
|
128
|
-
url: data.url
|
|
129
|
-
};
|
|
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
|
+
};
|
|
130
93
|
};
|
|
131
94
|
const unmarshalNamespace = (data) => {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
unmarshalSecretHashedValue
|
|
152
|
-
),
|
|
153
|
-
status: data.status,
|
|
154
|
-
tags: data.tags,
|
|
155
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
156
|
-
vpcIntegrationActivated: data.vpc_integration_activated
|
|
157
|
-
};
|
|
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
|
+
};
|
|
158
114
|
};
|
|
159
115
|
const unmarshalToken = (data) => {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
publicKey: data.public_key,
|
|
172
|
-
status: data.status,
|
|
173
|
-
token: data.token
|
|
174
|
-
};
|
|
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
|
+
};
|
|
175
127
|
};
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
mnqProjectId: data.mnq_project_id,
|
|
186
|
-
mnqRegion: data.mnq_region,
|
|
187
|
-
subject: data.subject
|
|
188
|
-
};
|
|
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
|
+
};
|
|
189
137
|
};
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
mnqProjectId: data.mnq_project_id,
|
|
199
|
-
mnqRegion: data.mnq_region,
|
|
200
|
-
queue: data.queue
|
|
201
|
-
};
|
|
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
|
+
};
|
|
202
146
|
};
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
endpoint: data.endpoint,
|
|
212
|
-
queueUrl: data.queue_url,
|
|
213
|
-
secretKey: data.secret_key
|
|
214
|
-
};
|
|
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
|
+
};
|
|
215
155
|
};
|
|
216
156
|
const unmarshalTrigger = (data) => {
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
scwSqsConfig: data.scw_sqs_config ? unmarshalTriggerMnqSqsClientConfig(data.scw_sqs_config) : void 0,
|
|
231
|
-
sqsConfig: data.sqs_config ? unmarshalTriggerSqsClientConfig(data.sqs_config) : void 0,
|
|
232
|
-
status: data.status
|
|
233
|
-
};
|
|
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
|
+
};
|
|
234
170
|
};
|
|
235
171
|
const unmarshalListContainersResponse = (data) => {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
return {
|
|
242
|
-
containers: unmarshalArrayOfObject(data.containers, unmarshalContainer),
|
|
243
|
-
totalCount: data.total_count
|
|
244
|
-
};
|
|
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
|
+
};
|
|
245
177
|
};
|
|
246
178
|
const unmarshalListCronsResponse = (data) => {
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
return {
|
|
253
|
-
crons: unmarshalArrayOfObject(data.crons, unmarshalCron),
|
|
254
|
-
totalCount: data.total_count
|
|
255
|
-
};
|
|
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
|
+
};
|
|
256
184
|
};
|
|
257
185
|
const unmarshalListDomainsResponse = (data) => {
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
return {
|
|
264
|
-
domains: unmarshalArrayOfObject(data.domains, unmarshalDomain),
|
|
265
|
-
totalCount: data.total_count
|
|
266
|
-
};
|
|
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
|
+
};
|
|
267
191
|
};
|
|
268
192
|
const unmarshalListNamespacesResponse = (data) => {
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
return {
|
|
275
|
-
namespaces: unmarshalArrayOfObject(data.namespaces, unmarshalNamespace),
|
|
276
|
-
totalCount: data.total_count
|
|
277
|
-
};
|
|
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
|
+
};
|
|
278
198
|
};
|
|
279
199
|
const unmarshalListTokensResponse = (data) => {
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
return {
|
|
286
|
-
tokens: unmarshalArrayOfObject(data.tokens, unmarshalToken),
|
|
287
|
-
totalCount: data.total_count
|
|
288
|
-
};
|
|
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
|
+
};
|
|
289
205
|
};
|
|
290
206
|
const unmarshalListTriggersResponse = (data) => {
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
return {
|
|
297
|
-
totalCount: data.total_count,
|
|
298
|
-
triggers: unmarshalArrayOfObject(data.triggers, unmarshalTrigger)
|
|
299
|
-
};
|
|
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
|
+
};
|
|
300
212
|
};
|
|
301
|
-
|
|
302
|
-
|
|
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
|
+
}])
|
|
303
225
|
});
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
{
|
|
322
|
-
param: "concurrent_requests_threshold",
|
|
323
|
-
value: request.concurrentRequestsThreshold
|
|
324
|
-
},
|
|
325
|
-
{ param: "cpu_usage_threshold", value: request.cpuUsageThreshold },
|
|
326
|
-
{ param: "memory_usage_threshold", value: request.memoryUsageThreshold }
|
|
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
|
-
|
|
358
|
-
tags: request.tags,
|
|
359
|
-
timeout: request.timeout
|
|
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
|
|
360
269
|
});
|
|
361
270
|
const marshalCreateCronRequest = (request, defaults) => ({
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
271
|
+
args: request.args,
|
|
272
|
+
container_id: request.containerId,
|
|
273
|
+
name: request.name,
|
|
274
|
+
schedule: request.schedule
|
|
366
275
|
});
|
|
367
276
|
const marshalCreateDomainRequest = (request, defaults) => ({
|
|
368
|
-
|
|
369
|
-
|
|
277
|
+
container_id: request.containerId,
|
|
278
|
+
hostname: request.hostname
|
|
370
279
|
});
|
|
371
280
|
const marshalCreateNamespaceRequest = (request, defaults) => ({
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
) : void 0,
|
|
380
|
-
tags: request.tags
|
|
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
|
|
381
288
|
});
|
|
382
289
|
const marshalCreateTokenRequest = (request, defaults) => ({
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
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
|
+
}])
|
|
389
299
|
});
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
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
|
|
395
305
|
});
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
306
|
+
var marshalCreateTriggerRequestMnqSqsClientConfig = (request, defaults) => ({
|
|
307
|
+
mnq_project_id: request.mnqProjectId,
|
|
308
|
+
mnq_region: request.mnqRegion,
|
|
309
|
+
queue: request.queue
|
|
400
310
|
});
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
311
|
+
var marshalCreateTriggerRequestSqsClientConfig = (request, defaults) => ({
|
|
312
|
+
access_key: request.accessKey,
|
|
313
|
+
endpoint: request.endpoint,
|
|
314
|
+
queue_url: request.queueUrl,
|
|
315
|
+
secret_key: request.secretKey
|
|
406
316
|
});
|
|
407
317
|
const marshalCreateTriggerRequest = (request, defaults) => ({
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
param: "sqs_config",
|
|
426
|
-
value: request.sqsConfig !== void 0 ? marshalCreateTriggerRequestSqsClientConfig(
|
|
427
|
-
request.sqsConfig
|
|
428
|
-
) : void 0
|
|
429
|
-
}
|
|
430
|
-
])
|
|
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
|
+
])
|
|
431
335
|
});
|
|
432
336
|
const marshalUpdateContainerRequest = (request, defaults) => ({
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
tags: request.tags,
|
|
457
|
-
timeout: request.timeout
|
|
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
|
|
458
360
|
});
|
|
459
361
|
const marshalUpdateCronRequest = (request, defaults) => ({
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
362
|
+
args: request.args,
|
|
363
|
+
container_id: request.containerId,
|
|
364
|
+
name: request.name,
|
|
365
|
+
schedule: request.schedule
|
|
464
366
|
});
|
|
465
367
|
const marshalUpdateNamespaceRequest = (request, defaults) => ({
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
) : void 0,
|
|
471
|
-
tags: request.tags
|
|
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
|
|
472
372
|
});
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
373
|
+
var marshalUpdateTriggerRequestSqsClientConfig = (request, defaults) => ({
|
|
374
|
+
access_key: request.accessKey,
|
|
375
|
+
secret_key: request.secretKey
|
|
476
376
|
});
|
|
477
377
|
const marshalUpdateTriggerRequest = (request, defaults) => ({
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
request.sqsConfig
|
|
485
|
-
) : void 0
|
|
486
|
-
}
|
|
487
|
-
])
|
|
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
|
+
}])
|
|
488
384
|
});
|
|
489
|
-
export {
|
|
490
|
-
marshalCreateContainerRequest,
|
|
491
|
-
marshalCreateCronRequest,
|
|
492
|
-
marshalCreateDomainRequest,
|
|
493
|
-
marshalCreateNamespaceRequest,
|
|
494
|
-
marshalCreateTokenRequest,
|
|
495
|
-
marshalCreateTriggerRequest,
|
|
496
|
-
marshalUpdateContainerRequest,
|
|
497
|
-
marshalUpdateCronRequest,
|
|
498
|
-
marshalUpdateNamespaceRequest,
|
|
499
|
-
marshalUpdateTriggerRequest,
|
|
500
|
-
unmarshalContainer,
|
|
501
|
-
unmarshalCron,
|
|
502
|
-
unmarshalDomain,
|
|
503
|
-
unmarshalListContainersResponse,
|
|
504
|
-
unmarshalListCronsResponse,
|
|
505
|
-
unmarshalListDomainsResponse,
|
|
506
|
-
unmarshalListNamespacesResponse,
|
|
507
|
-
unmarshalListTokensResponse,
|
|
508
|
-
unmarshalListTriggersResponse,
|
|
509
|
-
unmarshalNamespace,
|
|
510
|
-
unmarshalToken,
|
|
511
|
-
unmarshalTrigger
|
|
512
|
-
};
|
|
385
|
+
export { marshalCreateContainerRequest, marshalCreateCronRequest, marshalCreateDomainRequest, marshalCreateNamespaceRequest, marshalCreateTokenRequest, marshalCreateTriggerRequest, marshalUpdateContainerRequest, marshalUpdateCronRequest, marshalUpdateNamespaceRequest, marshalUpdateTriggerRequest, unmarshalContainer, unmarshalCron, unmarshalDomain, unmarshalListContainersResponse, unmarshalListCronsResponse, unmarshalListDomainsResponse, unmarshalListNamespacesResponse, unmarshalListTokensResponse, unmarshalListTriggersResponse, unmarshalNamespace, unmarshalToken, unmarshalTrigger };
|