@scaleway/sdk 2.52.1 → 2.54.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/applesilicon/v1alpha1/api.gen.cjs +21 -0
- package/dist/api/applesilicon/v1alpha1/api.gen.d.ts +3 -1
- package/dist/api/applesilicon/v1alpha1/api.gen.js +22 -1
- package/dist/api/applesilicon/v1alpha1/index.gen.d.ts +1 -1
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.cjs +47 -0
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.d.ts +4 -1
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +48 -1
- package/dist/api/applesilicon/v1alpha1/types.gen.d.ts +33 -0
- package/dist/api/block/v1alpha1/api.gen.cjs +2 -1
- package/dist/api/block/v1alpha1/api.gen.js +2 -1
- package/dist/api/block/v1alpha1/types.gen.d.ts +5 -0
- package/dist/api/cockpit/v1/api.gen.cjs +21 -2
- package/dist/api/cockpit/v1/api.gen.d.ts +16 -3
- package/dist/api/cockpit/v1/api.gen.js +22 -3
- package/dist/api/cockpit/v1/index.gen.d.ts +1 -1
- package/dist/api/cockpit/v1/marshalling.gen.cjs +29 -1
- package/dist/api/cockpit/v1/marshalling.gen.d.ts +2 -1
- package/dist/api/cockpit/v1/marshalling.gen.js +29 -1
- package/dist/api/cockpit/v1/types.gen.d.ts +29 -1
- package/dist/api/cockpit/v1/validation-rules.gen.cjs +11 -0
- package/dist/api/cockpit/v1/validation-rules.gen.d.ts +11 -0
- package/dist/api/cockpit/v1/validation-rules.gen.js +11 -0
- package/dist/api/container/v1beta1/index.gen.d.ts +1 -1
- package/dist/api/container/v1beta1/marshalling.gen.cjs +70 -6
- package/dist/api/container/v1beta1/marshalling.gen.js +71 -7
- package/dist/api/container/v1beta1/types.gen.d.ts +74 -2
- package/dist/api/container/v1beta1/validation-rules.gen.cjs +14 -0
- package/dist/api/container/v1beta1/validation-rules.gen.d.ts +12 -0
- package/dist/api/container/v1beta1/validation-rules.gen.js +14 -0
- package/dist/api/edge_services/v1alpha1/types.gen.d.ts +4 -4
- package/dist/api/function/v1beta1/marshalling.gen.cjs +12 -4
- package/dist/api/function/v1beta1/marshalling.gen.js +13 -5
- package/dist/api/function/v1beta1/types.gen.d.ts +16 -0
- package/dist/api/iam/v1alpha1/api.gen.cjs +37 -0
- package/dist/api/iam/v1alpha1/api.gen.d.ts +22 -1
- package/dist/api/iam/v1alpha1/api.gen.js +37 -0
- package/dist/api/iam/v1alpha1/index.gen.d.ts +1 -1
- package/dist/api/iam/v1alpha1/types.gen.d.ts +12 -0
- package/dist/api/inference/v1beta1/types.gen.d.ts +3 -3
- package/dist/api/instance/v1/api.gen.cjs +2 -2
- package/dist/api/instance/v1/api.gen.d.ts +2 -2
- package/dist/api/instance/v1/api.gen.js +2 -2
- package/dist/api/instance/v1/types.gen.d.ts +2 -2
- package/dist/api/iot/v1/api.gen.cjs +4 -3
- package/dist/api/iot/v1/api.gen.d.ts +4 -3
- package/dist/api/iot/v1/api.gen.js +4 -3
- package/dist/api/iot/v1/types.gen.d.ts +6 -6
- package/dist/api/ipam/v1/types.gen.d.ts +1 -1
- package/dist/api/jobs/v1alpha1/api.gen.cjs +29 -0
- package/dist/api/jobs/v1alpha1/api.gen.d.ts +29 -0
- package/dist/api/jobs/v1alpha1/api.gen.js +29 -0
- package/dist/api/jobs/v1alpha1/types.gen.d.ts +38 -6
- package/dist/api/k8s/v1/api.gen.cjs +65 -1
- package/dist/api/k8s/v1/api.gen.d.ts +32 -1
- package/dist/api/k8s/v1/api.gen.js +66 -2
- package/dist/api/k8s/v1/index.gen.d.ts +1 -1
- package/dist/api/k8s/v1/marshalling.gen.cjs +62 -0
- package/dist/api/k8s/v1/marshalling.gen.d.ts +6 -1
- package/dist/api/k8s/v1/marshalling.gen.js +62 -0
- package/dist/api/k8s/v1/types.gen.d.ts +93 -1
- package/dist/api/k8s/v1/validation-rules.gen.cjs +6 -0
- package/dist/api/k8s/v1/validation-rules.gen.d.ts +5 -0
- package/dist/api/k8s/v1/validation-rules.gen.js +6 -0
- package/dist/api/lb/v1/types.gen.d.ts +15 -10
- package/dist/api/mongodb/v1alpha1/api.gen.cjs +23 -16
- package/dist/api/mongodb/v1alpha1/api.gen.d.ts +10 -1
- package/dist/api/mongodb/v1alpha1/api.gen.js +24 -17
- package/dist/api/mongodb/v1alpha1/index.gen.d.ts +1 -1
- package/dist/api/mongodb/v1alpha1/marshalling.gen.cjs +5 -0
- package/dist/api/mongodb/v1alpha1/marshalling.gen.d.ts +2 -1
- package/dist/api/mongodb/v1alpha1/marshalling.gen.js +5 -0
- package/dist/api/mongodb/v1alpha1/types.gen.d.ts +13 -0
- package/dist/api/mongodb/v1alpha1/validation-rules.gen.cjs +12 -0
- package/dist/api/mongodb/v1alpha1/validation-rules.gen.d.ts +11 -0
- package/dist/api/mongodb/v1alpha1/validation-rules.gen.js +12 -0
- package/dist/api/rdb/v1/marshalling.gen.cjs +2 -1
- package/dist/api/rdb/v1/marshalling.gen.js +2 -1
- package/dist/api/rdb/v1/types.gen.d.ts +22 -13
- package/dist/api/webhosting/v1/api.gen.cjs +2 -8
- package/dist/api/webhosting/v1/api.gen.js +2 -8
- package/dist/scw/constants.cjs +1 -1
- package/dist/scw/constants.d.ts +2 -2
- package/dist/scw/constants.js +1 -1
- package/package.json +2 -2
|
@@ -35,6 +35,7 @@ const unmarshalDataSource = (data) => {
|
|
|
35
35
|
origin: data.origin,
|
|
36
36
|
projectId: data.project_id,
|
|
37
37
|
region: data.region,
|
|
38
|
+
retentionDays: data.retention_days,
|
|
38
39
|
synchronizedWithGrafana: data.synchronized_with_grafana,
|
|
39
40
|
type: data.type,
|
|
40
41
|
updatedAt: unmarshalDate(data.updated_at),
|
|
@@ -115,6 +116,30 @@ const unmarshalAlertManager = (data) => {
|
|
|
115
116
|
region: data.region
|
|
116
117
|
};
|
|
117
118
|
};
|
|
119
|
+
const unmarshalGetConfigResponseRetention = (data) => {
|
|
120
|
+
if (!isJSONObject(data)) {
|
|
121
|
+
throw new TypeError(
|
|
122
|
+
`Unmarshalling the type 'GetConfigResponseRetention' failed as data isn't a dictionary.`
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
return {
|
|
126
|
+
defaultDays: data.default_days,
|
|
127
|
+
maxDays: data.max_days,
|
|
128
|
+
minDays: data.min_days
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
const unmarshalGetConfigResponse = (data) => {
|
|
132
|
+
if (!isJSONObject(data)) {
|
|
133
|
+
throw new TypeError(
|
|
134
|
+
`Unmarshalling the type 'GetConfigResponse' failed as data isn't a dictionary.`
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
return {
|
|
138
|
+
logsRetention: data.logs_retention ? unmarshalGetConfigResponseRetention(data.logs_retention) : void 0,
|
|
139
|
+
metricsRetention: data.metrics_retention ? unmarshalGetConfigResponseRetention(data.metrics_retention) : void 0,
|
|
140
|
+
tracesRetention: data.traces_retention ? unmarshalGetConfigResponseRetention(data.traces_retention) : void 0
|
|
141
|
+
};
|
|
142
|
+
};
|
|
118
143
|
const unmarshalGrafana = (data) => {
|
|
119
144
|
if (!isJSONObject(data)) {
|
|
120
145
|
throw new TypeError(
|
|
@@ -288,6 +313,7 @@ const marshalRegionalApiCreateContactPointRequest = (request, defaults) => ({
|
|
|
288
313
|
const marshalRegionalApiCreateDataSourceRequest = (request, defaults) => ({
|
|
289
314
|
name: request.name,
|
|
290
315
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
316
|
+
retention_days: request.retentionDays,
|
|
291
317
|
type: request.type
|
|
292
318
|
});
|
|
293
319
|
const marshalRegionalApiCreateTokenRequest = (request, defaults) => ({
|
|
@@ -320,7 +346,8 @@ const marshalRegionalApiTriggerTestAlertRequest = (request, defaults) => ({
|
|
|
320
346
|
project_id: request.projectId ?? defaults.defaultProjectId
|
|
321
347
|
});
|
|
322
348
|
const marshalRegionalApiUpdateDataSourceRequest = (request, defaults) => ({
|
|
323
|
-
name: request.name
|
|
349
|
+
name: request.name,
|
|
350
|
+
retention_days: request.retentionDays
|
|
324
351
|
});
|
|
325
352
|
export {
|
|
326
353
|
marshalGlobalApiCreateGrafanaUserRequest,
|
|
@@ -340,6 +367,7 @@ export {
|
|
|
340
367
|
unmarshalAlertManager,
|
|
341
368
|
unmarshalContactPoint,
|
|
342
369
|
unmarshalDataSource,
|
|
370
|
+
unmarshalGetConfigResponse,
|
|
343
371
|
unmarshalGrafana,
|
|
344
372
|
unmarshalGrafanaProductDashboard,
|
|
345
373
|
unmarshalGrafanaUser,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Region } from '../../../bridge';
|
|
2
2
|
export type DataSourceOrigin = 'unknown_origin' | 'scaleway' | 'external';
|
|
3
|
-
export type DataSourceType = 'unknown_type' | 'metrics' | 'logs' | 'traces'
|
|
3
|
+
export type DataSourceType = 'unknown_type' | 'metrics' | 'logs' | 'traces';
|
|
4
4
|
export type GrafanaUserRole = 'unknown_role' | 'editor' | 'viewer';
|
|
5
5
|
export type ListDataSourcesRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc' | 'type_asc' | 'type_desc';
|
|
6
6
|
export type ListGrafanaUsersRequestOrderBy = 'login_asc' | 'login_desc';
|
|
@@ -13,6 +13,11 @@ export type UsageUnit = 'unknown_unit' | 'bytes' | 'samples';
|
|
|
13
13
|
export interface ContactPointEmail {
|
|
14
14
|
to: string;
|
|
15
15
|
}
|
|
16
|
+
export interface GetConfigResponseRetention {
|
|
17
|
+
minDays: number;
|
|
18
|
+
maxDays: number;
|
|
19
|
+
defaultDays: number;
|
|
20
|
+
}
|
|
16
21
|
/** Contact point. */
|
|
17
22
|
export interface ContactPoint {
|
|
18
23
|
/**
|
|
@@ -47,6 +52,8 @@ export interface DataSource {
|
|
|
47
52
|
updatedAt?: Date;
|
|
48
53
|
/** Indicates whether the data source is synchronized with Grafana. */
|
|
49
54
|
synchronizedWithGrafana: boolean;
|
|
55
|
+
/** BETA - Duration for which the data will be retained in the data source. */
|
|
56
|
+
retentionDays: number;
|
|
50
57
|
/** Region of the data source. */
|
|
51
58
|
region: Region;
|
|
52
59
|
}
|
|
@@ -149,6 +156,15 @@ export interface AlertManager {
|
|
|
149
156
|
/** Regions where the Alert manager is enabled. */
|
|
150
157
|
region: Region;
|
|
151
158
|
}
|
|
159
|
+
/** Cockpit configuration. */
|
|
160
|
+
export interface GetConfigResponse {
|
|
161
|
+
/** Metrics retention configuration. */
|
|
162
|
+
metricsRetention?: GetConfigResponseRetention;
|
|
163
|
+
/** Logs retention configuration. */
|
|
164
|
+
logsRetention?: GetConfigResponseRetention;
|
|
165
|
+
/** Traces retention configuration. */
|
|
166
|
+
tracesRetention?: GetConfigResponseRetention;
|
|
167
|
+
}
|
|
152
168
|
/** Create a Grafana user. */
|
|
153
169
|
export type GlobalApiCreateGrafanaUserRequest = {
|
|
154
170
|
/** ID of the Project in which to create the Grafana user. */
|
|
@@ -330,6 +346,8 @@ export type RegionalApiCreateDataSourceRequest = {
|
|
|
330
346
|
name: string;
|
|
331
347
|
/** Data source type. */
|
|
332
348
|
type?: DataSourceType;
|
|
349
|
+
/** Default values are 30 days for metrics, 7 days for logs and traces. */
|
|
350
|
+
retentionDays?: number;
|
|
333
351
|
};
|
|
334
352
|
/** Create a token. */
|
|
335
353
|
export type RegionalApiCreateTokenRequest = {
|
|
@@ -431,6 +449,14 @@ export type RegionalApiGetAlertManagerRequest = {
|
|
|
431
449
|
/** Project ID of the requested Alert manager. */
|
|
432
450
|
projectId?: string;
|
|
433
451
|
};
|
|
452
|
+
/** Get Cockpit configuration. */
|
|
453
|
+
export type RegionalApiGetConfigRequest = {
|
|
454
|
+
/**
|
|
455
|
+
* Region to target. If none is passed will use default region from the
|
|
456
|
+
* config.
|
|
457
|
+
*/
|
|
458
|
+
region?: Region;
|
|
459
|
+
};
|
|
434
460
|
/** Retrieve a data source. */
|
|
435
461
|
export type RegionalApiGetDataSourceRequest = {
|
|
436
462
|
/**
|
|
@@ -561,6 +587,8 @@ export type RegionalApiUpdateDataSourceRequest = {
|
|
|
561
587
|
dataSourceId: string;
|
|
562
588
|
/** Updated name of the data source. */
|
|
563
589
|
name?: string;
|
|
590
|
+
/** BETA - Duration for which the data will be retained in the data source. */
|
|
591
|
+
retentionDays?: number;
|
|
564
592
|
};
|
|
565
593
|
export interface UsageOverview {
|
|
566
594
|
scalewayMetricsUsage?: Usage;
|
|
@@ -5,6 +5,11 @@ const RegionalApiCreateDataSourceRequest = {
|
|
|
5
5
|
maxLength: 50,
|
|
6
6
|
minLength: 3,
|
|
7
7
|
pattern: /^[A-Za-z0-9-_. ]+$/
|
|
8
|
+
},
|
|
9
|
+
retentionDays: {
|
|
10
|
+
greaterThanOrEqual: 1,
|
|
11
|
+
ignoreEmpty: true,
|
|
12
|
+
lessThanOrEqual: 365
|
|
8
13
|
}
|
|
9
14
|
};
|
|
10
15
|
const RegionalApiCreateTokenRequest = {
|
|
@@ -52,9 +57,15 @@ const RegionalApiListTokensRequest = {
|
|
|
52
57
|
};
|
|
53
58
|
const RegionalApiUpdateDataSourceRequest = {
|
|
54
59
|
name: {
|
|
60
|
+
ignoreEmpty: true,
|
|
55
61
|
maxLength: 50,
|
|
56
62
|
minLength: 3,
|
|
57
63
|
pattern: /^[A-Za-z0-9-_. ]+$/
|
|
64
|
+
},
|
|
65
|
+
retentionDays: {
|
|
66
|
+
greaterThanOrEqual: 1,
|
|
67
|
+
ignoreEmpty: true,
|
|
68
|
+
lessThanOrEqual: 365
|
|
58
69
|
}
|
|
59
70
|
};
|
|
60
71
|
exports.RegionalApiCreateDataSourceRequest = RegionalApiCreateDataSourceRequest;
|
|
@@ -4,6 +4,11 @@ export declare const RegionalApiCreateDataSourceRequest: {
|
|
|
4
4
|
minLength: number;
|
|
5
5
|
pattern: RegExp;
|
|
6
6
|
};
|
|
7
|
+
retentionDays: {
|
|
8
|
+
greaterThanOrEqual: number;
|
|
9
|
+
ignoreEmpty: boolean;
|
|
10
|
+
lessThanOrEqual: number;
|
|
11
|
+
};
|
|
7
12
|
};
|
|
8
13
|
export declare const RegionalApiCreateTokenRequest: {
|
|
9
14
|
name: {
|
|
@@ -50,8 +55,14 @@ export declare const RegionalApiListTokensRequest: {
|
|
|
50
55
|
};
|
|
51
56
|
export declare const RegionalApiUpdateDataSourceRequest: {
|
|
52
57
|
name: {
|
|
58
|
+
ignoreEmpty: boolean;
|
|
53
59
|
maxLength: number;
|
|
54
60
|
minLength: number;
|
|
55
61
|
pattern: RegExp;
|
|
56
62
|
};
|
|
63
|
+
retentionDays: {
|
|
64
|
+
greaterThanOrEqual: number;
|
|
65
|
+
ignoreEmpty: boolean;
|
|
66
|
+
lessThanOrEqual: number;
|
|
67
|
+
};
|
|
57
68
|
};
|
|
@@ -3,6 +3,11 @@ const RegionalApiCreateDataSourceRequest = {
|
|
|
3
3
|
maxLength: 50,
|
|
4
4
|
minLength: 3,
|
|
5
5
|
pattern: /^[A-Za-z0-9-_. ]+$/
|
|
6
|
+
},
|
|
7
|
+
retentionDays: {
|
|
8
|
+
greaterThanOrEqual: 1,
|
|
9
|
+
ignoreEmpty: true,
|
|
10
|
+
lessThanOrEqual: 365
|
|
6
11
|
}
|
|
7
12
|
};
|
|
8
13
|
const RegionalApiCreateTokenRequest = {
|
|
@@ -50,9 +55,15 @@ const RegionalApiListTokensRequest = {
|
|
|
50
55
|
};
|
|
51
56
|
const RegionalApiUpdateDataSourceRequest = {
|
|
52
57
|
name: {
|
|
58
|
+
ignoreEmpty: true,
|
|
53
59
|
maxLength: 50,
|
|
54
60
|
minLength: 3,
|
|
55
61
|
pattern: /^[A-Za-z0-9-_. ]+$/
|
|
62
|
+
},
|
|
63
|
+
retentionDays: {
|
|
64
|
+
greaterThanOrEqual: 1,
|
|
65
|
+
ignoreEmpty: true,
|
|
66
|
+
lessThanOrEqual: 365
|
|
56
67
|
}
|
|
57
68
|
};
|
|
58
69
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { API } from './api.gen';
|
|
2
2
|
export * from './content.gen';
|
|
3
|
-
export type { Container, ContainerHttpOption, ContainerPrivacy, ContainerProtocol, ContainerSandbox, ContainerScalingOption, ContainerStatus, CreateContainerRequest, CreateCronRequest, CreateDomainRequest, CreateNamespaceRequest, CreateTokenRequest, CreateTriggerRequest, CreateTriggerRequestMnqNatsClientConfig, CreateTriggerRequestMnqSqsClientConfig, CreateTriggerRequestSqsClientConfig, Cron, CronStatus, DeleteContainerRequest, DeleteCronRequest, DeleteDomainRequest, DeleteNamespaceRequest, DeleteTokenRequest, DeleteTriggerRequest, DeployContainerRequest, Domain, DomainStatus, GetContainerRequest, GetCronRequest, GetDomainRequest, GetNamespaceRequest, GetTokenRequest, GetTriggerRequest, ListContainersRequest, ListContainersRequestOrderBy, ListContainersResponse, ListCronsRequest, ListCronsRequestOrderBy, ListCronsResponse, ListDomainsRequest, ListDomainsRequestOrderBy, ListDomainsResponse, ListNamespacesRequest, ListNamespacesRequestOrderBy, ListNamespacesResponse, ListTokensRequest, ListTokensRequestOrderBy, ListTokensResponse, ListTriggersRequest, ListTriggersRequestOrderBy, ListTriggersResponse, Namespace, NamespaceStatus, Secret, SecretHashedValue, Token, TokenStatus, Trigger, TriggerInputType, TriggerMnqNatsClientConfig, TriggerMnqSqsClientConfig, TriggerSqsClientConfig, TriggerStatus, UpdateContainerRequest, UpdateCronRequest, UpdateNamespaceRequest, UpdateTriggerRequest, UpdateTriggerRequestSqsClientConfig, } from './types.gen';
|
|
3
|
+
export type { Container, ContainerHealthCheckSpec, ContainerHealthCheckSpecHTTPProbe, ContainerHealthCheckSpecTCPProbe, ContainerHttpOption, ContainerPrivacy, ContainerProtocol, ContainerSandbox, ContainerScalingOption, ContainerStatus, CreateContainerRequest, CreateCronRequest, CreateDomainRequest, CreateNamespaceRequest, CreateTokenRequest, CreateTriggerRequest, CreateTriggerRequestMnqNatsClientConfig, CreateTriggerRequestMnqSqsClientConfig, CreateTriggerRequestSqsClientConfig, Cron, CronStatus, DeleteContainerRequest, DeleteCronRequest, DeleteDomainRequest, DeleteNamespaceRequest, DeleteTokenRequest, DeleteTriggerRequest, DeployContainerRequest, Domain, DomainStatus, GetContainerRequest, GetCronRequest, GetDomainRequest, GetNamespaceRequest, GetTokenRequest, GetTriggerRequest, ListContainersRequest, ListContainersRequestOrderBy, ListContainersResponse, ListCronsRequest, ListCronsRequestOrderBy, ListCronsResponse, ListDomainsRequest, ListDomainsRequestOrderBy, ListDomainsResponse, ListNamespacesRequest, ListNamespacesRequestOrderBy, ListNamespacesResponse, ListTokensRequest, ListTokensRequestOrderBy, ListTokensResponse, ListTriggersRequest, ListTriggersRequestOrderBy, ListTriggersResponse, Namespace, NamespaceStatus, Secret, SecretHashedValue, Token, TokenStatus, Trigger, TriggerInputType, TriggerMnqNatsClientConfig, TriggerMnqSqsClientConfig, TriggerSqsClientConfig, TriggerStatus, UpdateContainerRequest, UpdateCronRequest, UpdateNamespaceRequest, UpdateTriggerRequest, UpdateTriggerRequestSqsClientConfig, } from './types.gen';
|
|
4
4
|
export * as ValidationRules from './validation-rules.gen';
|
|
@@ -4,6 +4,37 @@ const randomName = require("@scaleway/random-name");
|
|
|
4
4
|
const json = require("../../../helpers/json.cjs");
|
|
5
5
|
const marshalling = require("../../../helpers/marshalling.cjs");
|
|
6
6
|
require("../../../vendor/base64/index.cjs");
|
|
7
|
+
const unmarshalContainerHealthCheckSpecHTTPProbe = (data) => {
|
|
8
|
+
if (!json.isJSONObject(data)) {
|
|
9
|
+
throw new TypeError(
|
|
10
|
+
`Unmarshalling the type 'ContainerHealthCheckSpecHTTPProbe' failed as data isn't a dictionary.`
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
return {
|
|
14
|
+
path: data.path
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
const unmarshalContainerHealthCheckSpecTCPProbe = (data) => {
|
|
18
|
+
if (!json.isJSONObject(data)) {
|
|
19
|
+
throw new TypeError(
|
|
20
|
+
`Unmarshalling the type 'ContainerHealthCheckSpecTCPProbe' failed as data isn't a dictionary.`
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
return {};
|
|
24
|
+
};
|
|
25
|
+
const unmarshalContainerHealthCheckSpec = (data) => {
|
|
26
|
+
if (!json.isJSONObject(data)) {
|
|
27
|
+
throw new TypeError(
|
|
28
|
+
`Unmarshalling the type 'ContainerHealthCheckSpec' failed as data isn't a dictionary.`
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
failureThreshold: data.failure_threshold,
|
|
33
|
+
http: data.http ? unmarshalContainerHealthCheckSpecHTTPProbe(data.http) : void 0,
|
|
34
|
+
interval: data.interval,
|
|
35
|
+
tcp: data.tcp ? unmarshalContainerHealthCheckSpecTCPProbe(data.tcp) : void 0
|
|
36
|
+
};
|
|
37
|
+
};
|
|
7
38
|
const unmarshalContainerScalingOption = (data) => {
|
|
8
39
|
if (!json.isJSONObject(data)) {
|
|
9
40
|
throw new TypeError(
|
|
@@ -11,7 +42,9 @@ const unmarshalContainerScalingOption = (data) => {
|
|
|
11
42
|
);
|
|
12
43
|
}
|
|
13
44
|
return {
|
|
14
|
-
concurrentRequestsThreshold: data.concurrent_requests_threshold
|
|
45
|
+
concurrentRequestsThreshold: data.concurrent_requests_threshold,
|
|
46
|
+
cpuUsageThreshold: data.cpu_usage_threshold,
|
|
47
|
+
memoryUsageThreshold: data.memory_usage_threshold
|
|
15
48
|
};
|
|
16
49
|
};
|
|
17
50
|
const unmarshalSecretHashedValue = (data) => {
|
|
@@ -33,10 +66,12 @@ const unmarshalContainer = (data) => {
|
|
|
33
66
|
}
|
|
34
67
|
return {
|
|
35
68
|
cpuLimit: data.cpu_limit,
|
|
69
|
+
createdAt: marshalling.unmarshalDate(data.created_at),
|
|
36
70
|
description: data.description,
|
|
37
71
|
domainName: data.domain_name,
|
|
38
72
|
environmentVariables: data.environment_variables,
|
|
39
73
|
errorMessage: data.error_message,
|
|
74
|
+
healthCheck: data.health_check ? unmarshalContainerHealthCheckSpec(data.health_check) : void 0,
|
|
40
75
|
httpOption: data.http_option,
|
|
41
76
|
id: data.id,
|
|
42
77
|
localStorageLimit: data.local_storage_limit,
|
|
@@ -49,6 +84,7 @@ const unmarshalContainer = (data) => {
|
|
|
49
84
|
port: data.port,
|
|
50
85
|
privacy: data.privacy,
|
|
51
86
|
protocol: data.protocol,
|
|
87
|
+
readyAt: marshalling.unmarshalDate(data.ready_at),
|
|
52
88
|
region: data.region,
|
|
53
89
|
registryImage: data.registry_image,
|
|
54
90
|
sandbox: data.sandbox,
|
|
@@ -58,7 +94,8 @@ const unmarshalContainer = (data) => {
|
|
|
58
94
|
unmarshalSecretHashedValue
|
|
59
95
|
),
|
|
60
96
|
status: data.status,
|
|
61
|
-
timeout: data.timeout
|
|
97
|
+
timeout: data.timeout,
|
|
98
|
+
updatedAt: marshalling.unmarshalDate(data.updated_at)
|
|
62
99
|
};
|
|
63
100
|
};
|
|
64
101
|
const unmarshalCron = (data) => {
|
|
@@ -98,6 +135,7 @@ const unmarshalNamespace = (data) => {
|
|
|
98
135
|
);
|
|
99
136
|
}
|
|
100
137
|
return {
|
|
138
|
+
createdAt: marshalling.unmarshalDate(data.created_at),
|
|
101
139
|
description: data.description,
|
|
102
140
|
environmentVariables: data.environment_variables,
|
|
103
141
|
errorMessage: data.error_message,
|
|
@@ -112,7 +150,9 @@ const unmarshalNamespace = (data) => {
|
|
|
112
150
|
data.secret_environment_variables,
|
|
113
151
|
unmarshalSecretHashedValue
|
|
114
152
|
),
|
|
115
|
-
status: data.status
|
|
153
|
+
status: data.status,
|
|
154
|
+
tags: data.tags,
|
|
155
|
+
updatedAt: marshalling.unmarshalDate(data.updated_at)
|
|
116
156
|
};
|
|
117
157
|
};
|
|
118
158
|
const unmarshalToken = (data) => {
|
|
@@ -257,12 +297,32 @@ const unmarshalListTriggersResponse = (data) => {
|
|
|
257
297
|
triggers: marshalling.unmarshalArrayOfObject(data.triggers, unmarshalTrigger)
|
|
258
298
|
};
|
|
259
299
|
};
|
|
300
|
+
const marshalContainerHealthCheckSpecHTTPProbe = (request, defaults) => ({
|
|
301
|
+
path: request.path
|
|
302
|
+
});
|
|
303
|
+
const marshalContainerHealthCheckSpecTCPProbe = (request, defaults) => ({});
|
|
304
|
+
const marshalContainerHealthCheckSpec = (request, defaults) => ({
|
|
305
|
+
failure_threshold: request.failureThreshold,
|
|
306
|
+
interval: request.interval,
|
|
307
|
+
...marshalling.resolveOneOf([
|
|
308
|
+
{
|
|
309
|
+
param: "http",
|
|
310
|
+
value: request.http !== void 0 ? marshalContainerHealthCheckSpecHTTPProbe(request.http) : void 0
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
param: "tcp",
|
|
314
|
+
value: request.tcp !== void 0 ? marshalContainerHealthCheckSpecTCPProbe(request.tcp) : void 0
|
|
315
|
+
}
|
|
316
|
+
])
|
|
317
|
+
});
|
|
260
318
|
const marshalContainerScalingOption = (request, defaults) => ({
|
|
261
319
|
...marshalling.resolveOneOf([
|
|
262
320
|
{
|
|
263
321
|
param: "concurrent_requests_threshold",
|
|
264
322
|
value: request.concurrentRequestsThreshold
|
|
265
|
-
}
|
|
323
|
+
},
|
|
324
|
+
{ param: "cpu_usage_threshold", value: request.cpuUsageThreshold },
|
|
325
|
+
{ param: "memory_usage_threshold", value: request.memoryUsageThreshold }
|
|
266
326
|
])
|
|
267
327
|
});
|
|
268
328
|
const marshalSecret = (request, defaults) => ({
|
|
@@ -273,6 +333,7 @@ const marshalCreateContainerRequest = (request, defaults) => ({
|
|
|
273
333
|
cpu_limit: request.cpuLimit,
|
|
274
334
|
description: request.description,
|
|
275
335
|
environment_variables: request.environmentVariables,
|
|
336
|
+
health_check: request.healthCheck !== void 0 ? marshalContainerHealthCheckSpec(request.healthCheck) : void 0,
|
|
276
337
|
http_option: request.httpOption,
|
|
277
338
|
local_storage_limit: request.localStorageLimit,
|
|
278
339
|
max_concurrency: request.maxConcurrency,
|
|
@@ -309,7 +370,8 @@ const marshalCreateNamespaceRequest = (request, defaults) => ({
|
|
|
309
370
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
310
371
|
secret_environment_variables: request.secretEnvironmentVariables !== void 0 ? request.secretEnvironmentVariables.map(
|
|
311
372
|
(elt) => marshalSecret(elt)
|
|
312
|
-
) : void 0
|
|
373
|
+
) : void 0,
|
|
374
|
+
tags: request.tags
|
|
313
375
|
});
|
|
314
376
|
const marshalCreateTokenRequest = (request, defaults) => ({
|
|
315
377
|
description: request.description,
|
|
@@ -365,6 +427,7 @@ const marshalUpdateContainerRequest = (request, defaults) => ({
|
|
|
365
427
|
cpu_limit: request.cpuLimit,
|
|
366
428
|
description: request.description,
|
|
367
429
|
environment_variables: request.environmentVariables,
|
|
430
|
+
health_check: request.healthCheck !== void 0 ? marshalContainerHealthCheckSpec(request.healthCheck) : void 0,
|
|
368
431
|
http_option: request.httpOption,
|
|
369
432
|
local_storage_limit: request.localStorageLimit,
|
|
370
433
|
max_concurrency: request.maxConcurrency,
|
|
@@ -394,7 +457,8 @@ const marshalUpdateNamespaceRequest = (request, defaults) => ({
|
|
|
394
457
|
environment_variables: request.environmentVariables,
|
|
395
458
|
secret_environment_variables: request.secretEnvironmentVariables !== void 0 ? request.secretEnvironmentVariables.map(
|
|
396
459
|
(elt) => marshalSecret(elt)
|
|
397
|
-
) : void 0
|
|
460
|
+
) : void 0,
|
|
461
|
+
tags: request.tags
|
|
398
462
|
});
|
|
399
463
|
const marshalUpdateTriggerRequestSqsClientConfig = (request, defaults) => ({
|
|
400
464
|
access_key: request.accessKey,
|
|
@@ -1,7 +1,38 @@
|
|
|
1
1
|
import randomName from "@scaleway/random-name";
|
|
2
2
|
import { isJSONObject } from "../../../helpers/json.js";
|
|
3
|
-
import {
|
|
3
|
+
import { unmarshalDate, unmarshalArrayOfObject, resolveOneOf } from "../../../helpers/marshalling.js";
|
|
4
4
|
import "../../../vendor/base64/index.js";
|
|
5
|
+
const unmarshalContainerHealthCheckSpecHTTPProbe = (data) => {
|
|
6
|
+
if (!isJSONObject(data)) {
|
|
7
|
+
throw new TypeError(
|
|
8
|
+
`Unmarshalling the type 'ContainerHealthCheckSpecHTTPProbe' failed as data isn't a dictionary.`
|
|
9
|
+
);
|
|
10
|
+
}
|
|
11
|
+
return {
|
|
12
|
+
path: data.path
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
const unmarshalContainerHealthCheckSpecTCPProbe = (data) => {
|
|
16
|
+
if (!isJSONObject(data)) {
|
|
17
|
+
throw new TypeError(
|
|
18
|
+
`Unmarshalling the type 'ContainerHealthCheckSpecTCPProbe' failed as data isn't a dictionary.`
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
return {};
|
|
22
|
+
};
|
|
23
|
+
const unmarshalContainerHealthCheckSpec = (data) => {
|
|
24
|
+
if (!isJSONObject(data)) {
|
|
25
|
+
throw new TypeError(
|
|
26
|
+
`Unmarshalling the type 'ContainerHealthCheckSpec' failed as data isn't a dictionary.`
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
failureThreshold: data.failure_threshold,
|
|
31
|
+
http: data.http ? unmarshalContainerHealthCheckSpecHTTPProbe(data.http) : void 0,
|
|
32
|
+
interval: data.interval,
|
|
33
|
+
tcp: data.tcp ? unmarshalContainerHealthCheckSpecTCPProbe(data.tcp) : void 0
|
|
34
|
+
};
|
|
35
|
+
};
|
|
5
36
|
const unmarshalContainerScalingOption = (data) => {
|
|
6
37
|
if (!isJSONObject(data)) {
|
|
7
38
|
throw new TypeError(
|
|
@@ -9,7 +40,9 @@ const unmarshalContainerScalingOption = (data) => {
|
|
|
9
40
|
);
|
|
10
41
|
}
|
|
11
42
|
return {
|
|
12
|
-
concurrentRequestsThreshold: data.concurrent_requests_threshold
|
|
43
|
+
concurrentRequestsThreshold: data.concurrent_requests_threshold,
|
|
44
|
+
cpuUsageThreshold: data.cpu_usage_threshold,
|
|
45
|
+
memoryUsageThreshold: data.memory_usage_threshold
|
|
13
46
|
};
|
|
14
47
|
};
|
|
15
48
|
const unmarshalSecretHashedValue = (data) => {
|
|
@@ -31,10 +64,12 @@ const unmarshalContainer = (data) => {
|
|
|
31
64
|
}
|
|
32
65
|
return {
|
|
33
66
|
cpuLimit: data.cpu_limit,
|
|
67
|
+
createdAt: unmarshalDate(data.created_at),
|
|
34
68
|
description: data.description,
|
|
35
69
|
domainName: data.domain_name,
|
|
36
70
|
environmentVariables: data.environment_variables,
|
|
37
71
|
errorMessage: data.error_message,
|
|
72
|
+
healthCheck: data.health_check ? unmarshalContainerHealthCheckSpec(data.health_check) : void 0,
|
|
38
73
|
httpOption: data.http_option,
|
|
39
74
|
id: data.id,
|
|
40
75
|
localStorageLimit: data.local_storage_limit,
|
|
@@ -47,6 +82,7 @@ const unmarshalContainer = (data) => {
|
|
|
47
82
|
port: data.port,
|
|
48
83
|
privacy: data.privacy,
|
|
49
84
|
protocol: data.protocol,
|
|
85
|
+
readyAt: unmarshalDate(data.ready_at),
|
|
50
86
|
region: data.region,
|
|
51
87
|
registryImage: data.registry_image,
|
|
52
88
|
sandbox: data.sandbox,
|
|
@@ -56,7 +92,8 @@ const unmarshalContainer = (data) => {
|
|
|
56
92
|
unmarshalSecretHashedValue
|
|
57
93
|
),
|
|
58
94
|
status: data.status,
|
|
59
|
-
timeout: data.timeout
|
|
95
|
+
timeout: data.timeout,
|
|
96
|
+
updatedAt: unmarshalDate(data.updated_at)
|
|
60
97
|
};
|
|
61
98
|
};
|
|
62
99
|
const unmarshalCron = (data) => {
|
|
@@ -96,6 +133,7 @@ const unmarshalNamespace = (data) => {
|
|
|
96
133
|
);
|
|
97
134
|
}
|
|
98
135
|
return {
|
|
136
|
+
createdAt: unmarshalDate(data.created_at),
|
|
99
137
|
description: data.description,
|
|
100
138
|
environmentVariables: data.environment_variables,
|
|
101
139
|
errorMessage: data.error_message,
|
|
@@ -110,7 +148,9 @@ const unmarshalNamespace = (data) => {
|
|
|
110
148
|
data.secret_environment_variables,
|
|
111
149
|
unmarshalSecretHashedValue
|
|
112
150
|
),
|
|
113
|
-
status: data.status
|
|
151
|
+
status: data.status,
|
|
152
|
+
tags: data.tags,
|
|
153
|
+
updatedAt: unmarshalDate(data.updated_at)
|
|
114
154
|
};
|
|
115
155
|
};
|
|
116
156
|
const unmarshalToken = (data) => {
|
|
@@ -255,12 +295,32 @@ const unmarshalListTriggersResponse = (data) => {
|
|
|
255
295
|
triggers: unmarshalArrayOfObject(data.triggers, unmarshalTrigger)
|
|
256
296
|
};
|
|
257
297
|
};
|
|
298
|
+
const marshalContainerHealthCheckSpecHTTPProbe = (request, defaults) => ({
|
|
299
|
+
path: request.path
|
|
300
|
+
});
|
|
301
|
+
const marshalContainerHealthCheckSpecTCPProbe = (request, defaults) => ({});
|
|
302
|
+
const marshalContainerHealthCheckSpec = (request, defaults) => ({
|
|
303
|
+
failure_threshold: request.failureThreshold,
|
|
304
|
+
interval: request.interval,
|
|
305
|
+
...resolveOneOf([
|
|
306
|
+
{
|
|
307
|
+
param: "http",
|
|
308
|
+
value: request.http !== void 0 ? marshalContainerHealthCheckSpecHTTPProbe(request.http) : void 0
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
param: "tcp",
|
|
312
|
+
value: request.tcp !== void 0 ? marshalContainerHealthCheckSpecTCPProbe(request.tcp) : void 0
|
|
313
|
+
}
|
|
314
|
+
])
|
|
315
|
+
});
|
|
258
316
|
const marshalContainerScalingOption = (request, defaults) => ({
|
|
259
317
|
...resolveOneOf([
|
|
260
318
|
{
|
|
261
319
|
param: "concurrent_requests_threshold",
|
|
262
320
|
value: request.concurrentRequestsThreshold
|
|
263
|
-
}
|
|
321
|
+
},
|
|
322
|
+
{ param: "cpu_usage_threshold", value: request.cpuUsageThreshold },
|
|
323
|
+
{ param: "memory_usage_threshold", value: request.memoryUsageThreshold }
|
|
264
324
|
])
|
|
265
325
|
});
|
|
266
326
|
const marshalSecret = (request, defaults) => ({
|
|
@@ -271,6 +331,7 @@ const marshalCreateContainerRequest = (request, defaults) => ({
|
|
|
271
331
|
cpu_limit: request.cpuLimit,
|
|
272
332
|
description: request.description,
|
|
273
333
|
environment_variables: request.environmentVariables,
|
|
334
|
+
health_check: request.healthCheck !== void 0 ? marshalContainerHealthCheckSpec(request.healthCheck) : void 0,
|
|
274
335
|
http_option: request.httpOption,
|
|
275
336
|
local_storage_limit: request.localStorageLimit,
|
|
276
337
|
max_concurrency: request.maxConcurrency,
|
|
@@ -307,7 +368,8 @@ const marshalCreateNamespaceRequest = (request, defaults) => ({
|
|
|
307
368
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
308
369
|
secret_environment_variables: request.secretEnvironmentVariables !== void 0 ? request.secretEnvironmentVariables.map(
|
|
309
370
|
(elt) => marshalSecret(elt)
|
|
310
|
-
) : void 0
|
|
371
|
+
) : void 0,
|
|
372
|
+
tags: request.tags
|
|
311
373
|
});
|
|
312
374
|
const marshalCreateTokenRequest = (request, defaults) => ({
|
|
313
375
|
description: request.description,
|
|
@@ -363,6 +425,7 @@ const marshalUpdateContainerRequest = (request, defaults) => ({
|
|
|
363
425
|
cpu_limit: request.cpuLimit,
|
|
364
426
|
description: request.description,
|
|
365
427
|
environment_variables: request.environmentVariables,
|
|
428
|
+
health_check: request.healthCheck !== void 0 ? marshalContainerHealthCheckSpec(request.healthCheck) : void 0,
|
|
366
429
|
http_option: request.httpOption,
|
|
367
430
|
local_storage_limit: request.localStorageLimit,
|
|
368
431
|
max_concurrency: request.maxConcurrency,
|
|
@@ -392,7 +455,8 @@ const marshalUpdateNamespaceRequest = (request, defaults) => ({
|
|
|
392
455
|
environment_variables: request.environmentVariables,
|
|
393
456
|
secret_environment_variables: request.secretEnvironmentVariables !== void 0 ? request.secretEnvironmentVariables.map(
|
|
394
457
|
(elt) => marshalSecret(elt)
|
|
395
|
-
) : void 0
|
|
458
|
+
) : void 0,
|
|
459
|
+
tags: request.tags
|
|
396
460
|
});
|
|
397
461
|
const marshalUpdateTriggerRequestSqsClientConfig = (request, defaults) => ({
|
|
398
462
|
access_key: request.accessKey,
|