@scaleway/sdk-container 1.5.0 → 1.6.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/v1beta1/api.gen.cjs +16 -12
- package/dist/v1beta1/api.gen.d.ts +10 -4
- package/dist/v1beta1/api.gen.js +17 -13
- package/dist/v1beta1/marshalling.gen.js +1 -1
- package/dist/v1beta1/types.gen.d.ts +34 -2
- package/dist/v1beta1/validation-rules.gen.cjs +12 -0
- package/dist/v1beta1/validation-rules.gen.d.ts +10 -0
- package/dist/v1beta1/validation-rules.gen.js +12 -0
- package/package.json +6 -6
package/dist/v1beta1/api.gen.cjs
CHANGED
|
@@ -7,12 +7,13 @@ const jsonContentHeaders = {
|
|
|
7
7
|
"Content-Type": "application/json; charset=utf-8"
|
|
8
8
|
};
|
|
9
9
|
class API extends sdkClient.API {
|
|
10
|
-
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Locality of this API.
|
|
12
|
+
* type ∈ {'zone','region','global','unspecified'}
|
|
13
|
+
*/
|
|
14
|
+
static LOCALITY = sdkClient.toApiLocality({
|
|
15
|
+
regions: ["fr-par", "nl-ams", "pl-waw"]
|
|
16
|
+
});
|
|
16
17
|
pageOfListNamespaces = (request = {}) => this.client.fetch(
|
|
17
18
|
{
|
|
18
19
|
method: "GET",
|
|
@@ -72,7 +73,7 @@ class API extends sdkClient.API {
|
|
|
72
73
|
* @param request - The request {@link CreateNamespaceRequest}
|
|
73
74
|
* @returns A Promise of Namespace
|
|
74
75
|
*/
|
|
75
|
-
createNamespace = (request) => this.client.fetch(
|
|
76
|
+
createNamespace = (request = {}) => this.client.fetch(
|
|
76
77
|
{
|
|
77
78
|
body: JSON.stringify(
|
|
78
79
|
marshalling_gen.marshalCreateNamespaceRequest(request, this.client.settings)
|
|
@@ -185,11 +186,14 @@ class API extends sdkClient.API {
|
|
|
185
186
|
marshalling_gen.unmarshalContainer
|
|
186
187
|
);
|
|
187
188
|
/**
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
189
|
+
* Update an existing container. Update the container associated with the specified ID.
|
|
190
|
+
|
|
191
|
+
When updating a container, the container is automatically redeployed to apply the changes.
|
|
192
|
+
This behavior can be changed by setting the `redeploy` field to `false` in the request.
|
|
193
|
+
*
|
|
194
|
+
* @param request - The request {@link UpdateContainerRequest}
|
|
195
|
+
* @returns A Promise of Container
|
|
196
|
+
*/
|
|
193
197
|
updateContainer = (request) => this.client.fetch(
|
|
194
198
|
{
|
|
195
199
|
body: JSON.stringify(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { ApiLocality, WaitForOptions } from '@scaleway/sdk-client';
|
|
1
2
|
import { API as ParentAPI } from '@scaleway/sdk-client';
|
|
2
|
-
import type { Region as ScwRegion, WaitForOptions } from '@scaleway/sdk-client';
|
|
3
3
|
import type { Container, CreateContainerRequest, CreateCronRequest, CreateDomainRequest, CreateNamespaceRequest, CreateTokenRequest, CreateTriggerRequest, Cron, DeleteContainerRequest, DeleteCronRequest, DeleteDomainRequest, DeleteNamespaceRequest, DeleteTokenRequest, DeleteTriggerRequest, DeployContainerRequest, Domain, GetContainerRequest, GetCronRequest, GetDomainRequest, GetNamespaceRequest, GetTokenRequest, GetTriggerRequest, ListContainersRequest, ListContainersResponse, ListCronsRequest, ListCronsResponse, ListDomainsRequest, ListDomainsResponse, ListNamespacesRequest, ListNamespacesResponse, ListTokensRequest, ListTokensResponse, ListTriggersRequest, ListTriggersResponse, Namespace, Token, Trigger, UpdateContainerRequest, UpdateCronRequest, UpdateNamespaceRequest, UpdateTriggerRequest } from './types.gen';
|
|
4
4
|
/**
|
|
5
5
|
* Serverless Containers API.
|
|
@@ -7,8 +7,11 @@ import type { Container, CreateContainerRequest, CreateCronRequest, CreateDomain
|
|
|
7
7
|
This API allows you to manage your Serverless Containers.
|
|
8
8
|
*/
|
|
9
9
|
export declare class API extends ParentAPI {
|
|
10
|
-
/**
|
|
11
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Locality of this API.
|
|
12
|
+
* type ∈ {'zone','region','global','unspecified'}
|
|
13
|
+
*/
|
|
14
|
+
static readonly LOCALITY: ApiLocality;
|
|
12
15
|
protected pageOfListNamespaces: (request?: Readonly<ListNamespacesRequest>) => Promise<ListNamespacesResponse>;
|
|
13
16
|
/**
|
|
14
17
|
* List all your namespaces. List all namespaces in a specified region.
|
|
@@ -41,7 +44,7 @@ export declare class API extends ParentAPI {
|
|
|
41
44
|
* @param request - The request {@link CreateNamespaceRequest}
|
|
42
45
|
* @returns A Promise of Namespace
|
|
43
46
|
*/
|
|
44
|
-
createNamespace: (request
|
|
47
|
+
createNamespace: (request?: Readonly<CreateNamespaceRequest>) => Promise<Namespace>;
|
|
45
48
|
/**
|
|
46
49
|
* Update an existing namespace. Update the space associated with the specified ID.
|
|
47
50
|
*
|
|
@@ -91,6 +94,9 @@ export declare class API extends ParentAPI {
|
|
|
91
94
|
createContainer: (request: Readonly<CreateContainerRequest>) => Promise<Container>;
|
|
92
95
|
/**
|
|
93
96
|
* Update an existing container. Update the container associated with the specified ID.
|
|
97
|
+
|
|
98
|
+
When updating a container, the container is automatically redeployed to apply the changes.
|
|
99
|
+
This behavior can be changed by setting the `redeploy` field to `false` in the request.
|
|
94
100
|
*
|
|
95
101
|
* @param request - The request {@link UpdateContainerRequest}
|
|
96
102
|
* @returns A Promise of Container
|
package/dist/v1beta1/api.gen.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { API as API$1, urlParams, validatePathParam, enrichForPagination, waitForResource, resolveOneOf } from "@scaleway/sdk-client";
|
|
1
|
+
import { API as API$1, toApiLocality, urlParams, validatePathParam, enrichForPagination, waitForResource, resolveOneOf } from "@scaleway/sdk-client";
|
|
2
2
|
import { NAMESPACE_TRANSIENT_STATUSES, CONTAINER_TRANSIENT_STATUSES, CRON_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, TOKEN_TRANSIENT_STATUSES, TRIGGER_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
3
3
|
import { unmarshalListNamespacesResponse, unmarshalNamespace, marshalCreateNamespaceRequest, marshalUpdateNamespaceRequest, unmarshalListContainersResponse, unmarshalContainer, marshalCreateContainerRequest, marshalUpdateContainerRequest, unmarshalListCronsResponse, unmarshalCron, marshalCreateCronRequest, marshalUpdateCronRequest, unmarshalListDomainsResponse, unmarshalDomain, marshalCreateDomainRequest, marshalCreateTokenRequest, unmarshalToken, unmarshalListTokensResponse, marshalCreateTriggerRequest, unmarshalTrigger, unmarshalListTriggersResponse, marshalUpdateTriggerRequest } from "./marshalling.gen.js";
|
|
4
4
|
const jsonContentHeaders = {
|
|
5
5
|
"Content-Type": "application/json; charset=utf-8"
|
|
6
6
|
};
|
|
7
7
|
class API extends API$1 {
|
|
8
|
-
/**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Locality of this API.
|
|
10
|
+
* type ∈ {'zone','region','global','unspecified'}
|
|
11
|
+
*/
|
|
12
|
+
static LOCALITY = toApiLocality({
|
|
13
|
+
regions: ["fr-par", "nl-ams", "pl-waw"]
|
|
14
|
+
});
|
|
14
15
|
pageOfListNamespaces = (request = {}) => this.client.fetch(
|
|
15
16
|
{
|
|
16
17
|
method: "GET",
|
|
@@ -70,7 +71,7 @@ class API extends API$1 {
|
|
|
70
71
|
* @param request - The request {@link CreateNamespaceRequest}
|
|
71
72
|
* @returns A Promise of Namespace
|
|
72
73
|
*/
|
|
73
|
-
createNamespace = (request) => this.client.fetch(
|
|
74
|
+
createNamespace = (request = {}) => this.client.fetch(
|
|
74
75
|
{
|
|
75
76
|
body: JSON.stringify(
|
|
76
77
|
marshalCreateNamespaceRequest(request, this.client.settings)
|
|
@@ -183,11 +184,14 @@ class API extends API$1 {
|
|
|
183
184
|
unmarshalContainer
|
|
184
185
|
);
|
|
185
186
|
/**
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
187
|
+
* Update an existing container. Update the container associated with the specified ID.
|
|
188
|
+
|
|
189
|
+
When updating a container, the container is automatically redeployed to apply the changes.
|
|
190
|
+
This behavior can be changed by setting the `redeploy` field to `false` in the request.
|
|
191
|
+
*
|
|
192
|
+
* @param request - The request {@link UpdateContainerRequest}
|
|
193
|
+
* @returns A Promise of Container
|
|
194
|
+
*/
|
|
191
195
|
updateContainer = (request) => this.client.fetch(
|
|
192
196
|
{
|
|
193
197
|
body: JSON.stringify(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import randomName from "@scaleway/random-name";
|
|
2
|
-
import { resolveOneOf, isJSONObject,
|
|
2
|
+
import { resolveOneOf, isJSONObject, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
|
|
3
3
|
const unmarshalContainerHealthCheckSpecHTTPProbe = (data) => {
|
|
4
4
|
if (!isJSONObject(data)) {
|
|
5
5
|
throw new TypeError(
|
|
@@ -278,6 +278,9 @@ export interface Container {
|
|
|
278
278
|
* List of tags applied to the Serverless Container.
|
|
279
279
|
*/
|
|
280
280
|
tags: string[];
|
|
281
|
+
/**
|
|
282
|
+
* When connected to a Private Network, the container can access other Scaleway resources in this Private Network.
|
|
283
|
+
*/
|
|
281
284
|
privateNetworkId?: string;
|
|
282
285
|
/**
|
|
283
286
|
* Command executed when the container starts. This overrides the default command defined in the container image. This is usually the main executable, or entry point script to run.
|
|
@@ -402,7 +405,7 @@ export interface Namespace {
|
|
|
402
405
|
*/
|
|
403
406
|
updatedAt?: Date;
|
|
404
407
|
/**
|
|
405
|
-
* @deprecated
|
|
408
|
+
* @deprecated The value of this field doesn't matter anymore, and will be removed in a near future.
|
|
406
409
|
*/
|
|
407
410
|
vpcIntegrationActivated?: boolean;
|
|
408
411
|
}
|
|
@@ -590,6 +593,9 @@ export type CreateContainerRequest = {
|
|
|
590
593
|
* Tags of the Serverless Container.
|
|
591
594
|
*/
|
|
592
595
|
tags?: string[];
|
|
596
|
+
/**
|
|
597
|
+
* When connected to a Private Network, the container can access other Scaleway resources in this Private Network.
|
|
598
|
+
*/
|
|
593
599
|
privateNetworkId?: string;
|
|
594
600
|
/**
|
|
595
601
|
* Command executed when the container starts. This overrides the default command defined in the container image. This is usually the main executable, or entry point script to run.
|
|
@@ -665,7 +671,10 @@ export type CreateNamespaceRequest = {
|
|
|
665
671
|
* Tags of the Serverless Container Namespace.
|
|
666
672
|
*/
|
|
667
673
|
tags?: string[];
|
|
668
|
-
|
|
674
|
+
/**
|
|
675
|
+
* @deprecated Setting this field to true doesn't matter anymore. It will be removed in a near future.
|
|
676
|
+
*/
|
|
677
|
+
activateVpcIntegration?: boolean;
|
|
669
678
|
};
|
|
670
679
|
export type CreateTokenRequest = {
|
|
671
680
|
/**
|
|
@@ -1136,8 +1145,28 @@ export type UpdateContainerRequest = {
|
|
|
1136
1145
|
* @deprecated Number of maximum concurrent executions of the container.
|
|
1137
1146
|
*/
|
|
1138
1147
|
maxConcurrency?: number;
|
|
1148
|
+
/**
|
|
1149
|
+
* Protocol the container uses.
|
|
1150
|
+
*/
|
|
1139
1151
|
protocol?: ContainerProtocol;
|
|
1152
|
+
/**
|
|
1153
|
+
* Port the container listens on.
|
|
1154
|
+
*/
|
|
1140
1155
|
port?: number;
|
|
1156
|
+
/**
|
|
1157
|
+
* During an update, secret environment variables that are not specified in this field will be kept unchanged.
|
|
1158
|
+
|
|
1159
|
+
In order to delete a specific secret environment variable, you must reference its key, but not provide any value for it.
|
|
1160
|
+
For example, the following payload will delete the `TO_DELETE` secret environment variable:
|
|
1161
|
+
|
|
1162
|
+
```json
|
|
1163
|
+
{
|
|
1164
|
+
"secret_environment_variables":[
|
|
1165
|
+
{"key":"TO_DELETE"}
|
|
1166
|
+
]
|
|
1167
|
+
}
|
|
1168
|
+
```.
|
|
1169
|
+
*/
|
|
1141
1170
|
secretEnvironmentVariables?: Secret[];
|
|
1142
1171
|
/**
|
|
1143
1172
|
* Possible values:
|
|
@@ -1168,6 +1197,9 @@ export type UpdateContainerRequest = {
|
|
|
1168
1197
|
* Tags of the Serverless Container.
|
|
1169
1198
|
*/
|
|
1170
1199
|
tags?: string[];
|
|
1200
|
+
/**
|
|
1201
|
+
* When connected to a Private Network, the container can access other Scaleway resources in this Private Network.
|
|
1202
|
+
*/
|
|
1171
1203
|
privateNetworkId?: string;
|
|
1172
1204
|
/**
|
|
1173
1205
|
* Command executed when the container starts. This overrides the default command defined in the container image. This is usually the main executable, or entry point script to run.
|
|
@@ -13,6 +13,11 @@ const ContainerHealthCheckSpecHTTPProbe = {
|
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
const ContainerScalingOption = {};
|
|
16
|
+
const CreateContainerRequest = {
|
|
17
|
+
privateNetworkId: {
|
|
18
|
+
ignoreEmpty: true
|
|
19
|
+
}
|
|
20
|
+
};
|
|
16
21
|
const CreateTriggerRequest = {
|
|
17
22
|
description: {
|
|
18
23
|
maxLength: 255
|
|
@@ -43,6 +48,11 @@ const CreateTriggerRequestMnqSqsClientConfig = {
|
|
|
43
48
|
minLength: 1
|
|
44
49
|
}
|
|
45
50
|
};
|
|
51
|
+
const UpdateContainerRequest = {
|
|
52
|
+
privateNetworkId: {
|
|
53
|
+
ignoreEmpty: true
|
|
54
|
+
}
|
|
55
|
+
};
|
|
46
56
|
const UpdateTriggerRequest = {
|
|
47
57
|
description: {
|
|
48
58
|
maxLength: 255
|
|
@@ -55,7 +65,9 @@ const UpdateTriggerRequest = {
|
|
|
55
65
|
exports.ContainerHealthCheckSpec = ContainerHealthCheckSpec;
|
|
56
66
|
exports.ContainerHealthCheckSpecHTTPProbe = ContainerHealthCheckSpecHTTPProbe;
|
|
57
67
|
exports.ContainerScalingOption = ContainerScalingOption;
|
|
68
|
+
exports.CreateContainerRequest = CreateContainerRequest;
|
|
58
69
|
exports.CreateTriggerRequest = CreateTriggerRequest;
|
|
59
70
|
exports.CreateTriggerRequestMnqNatsClientConfig = CreateTriggerRequestMnqNatsClientConfig;
|
|
60
71
|
exports.CreateTriggerRequestMnqSqsClientConfig = CreateTriggerRequestMnqSqsClientConfig;
|
|
72
|
+
exports.UpdateContainerRequest = UpdateContainerRequest;
|
|
61
73
|
exports.UpdateTriggerRequest = UpdateTriggerRequest;
|
|
@@ -11,6 +11,11 @@ export declare const ContainerHealthCheckSpecHTTPProbe: {
|
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
13
|
export declare const ContainerScalingOption: {};
|
|
14
|
+
export declare const CreateContainerRequest: {
|
|
15
|
+
privateNetworkId: {
|
|
16
|
+
ignoreEmpty: boolean;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
14
19
|
export declare const CreateTriggerRequest: {
|
|
15
20
|
description: {
|
|
16
21
|
maxLength: number;
|
|
@@ -41,6 +46,11 @@ export declare const CreateTriggerRequestMnqSqsClientConfig: {
|
|
|
41
46
|
minLength: number;
|
|
42
47
|
};
|
|
43
48
|
};
|
|
49
|
+
export declare const UpdateContainerRequest: {
|
|
50
|
+
privateNetworkId: {
|
|
51
|
+
ignoreEmpty: boolean;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
44
54
|
export declare const UpdateTriggerRequest: {
|
|
45
55
|
description: {
|
|
46
56
|
maxLength: number;
|
|
@@ -11,6 +11,11 @@ const ContainerHealthCheckSpecHTTPProbe = {
|
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
13
|
const ContainerScalingOption = {};
|
|
14
|
+
const CreateContainerRequest = {
|
|
15
|
+
privateNetworkId: {
|
|
16
|
+
ignoreEmpty: true
|
|
17
|
+
}
|
|
18
|
+
};
|
|
14
19
|
const CreateTriggerRequest = {
|
|
15
20
|
description: {
|
|
16
21
|
maxLength: 255
|
|
@@ -41,6 +46,11 @@ const CreateTriggerRequestMnqSqsClientConfig = {
|
|
|
41
46
|
minLength: 1
|
|
42
47
|
}
|
|
43
48
|
};
|
|
49
|
+
const UpdateContainerRequest = {
|
|
50
|
+
privateNetworkId: {
|
|
51
|
+
ignoreEmpty: true
|
|
52
|
+
}
|
|
53
|
+
};
|
|
44
54
|
const UpdateTriggerRequest = {
|
|
45
55
|
description: {
|
|
46
56
|
maxLength: 255
|
|
@@ -54,8 +64,10 @@ export {
|
|
|
54
64
|
ContainerHealthCheckSpec,
|
|
55
65
|
ContainerHealthCheckSpecHTTPProbe,
|
|
56
66
|
ContainerScalingOption,
|
|
67
|
+
CreateContainerRequest,
|
|
57
68
|
CreateTriggerRequest,
|
|
58
69
|
CreateTriggerRequestMnqNatsClientConfig,
|
|
59
70
|
CreateTriggerRequestMnqSqsClientConfig,
|
|
71
|
+
UpdateContainerRequest,
|
|
60
72
|
UpdateTriggerRequest
|
|
61
73
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk-container",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "Scaleway SDK container",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"files": [
|
|
@@ -26,17 +26,17 @@
|
|
|
26
26
|
"directory": "packages_generated/container"
|
|
27
27
|
},
|
|
28
28
|
"engines": {
|
|
29
|
-
"node": ">=20.19.
|
|
29
|
+
"node": ">=20.19.4"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@scaleway/random-name": "5.1.
|
|
33
|
-
"@scaleway/sdk-std": "1.0.
|
|
32
|
+
"@scaleway/random-name": "5.1.2",
|
|
33
|
+
"@scaleway/sdk-std": "1.0.6"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@scaleway/sdk-client": "^1.
|
|
36
|
+
"@scaleway/sdk-client": "^1.3.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@scaleway/sdk-client": "^1.
|
|
39
|
+
"@scaleway/sdk-client": "^1.3.1"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"package:check": "pnpm publint",
|