Skip to content

Commit 37f2345

Browse files
authored
feat(edge_services): add serverless container backend (scaleway#2622)
1 parent 6e49ce6 commit 37f2345

File tree

2 files changed

+30
-4
lines changed

2 files changed

+30
-4
lines changed

packages_generated/edge_services/src/v1beta1/marshalling.gen.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -804,6 +804,14 @@ const marshalScalewayS3BackendConfig = (
804804
is_website: request.isWebsite,
805805
})
806806

807+
const marshalScalewayServerlessContainerBackendConfig = (
808+
request: ScalewayServerlessContainerBackendConfig,
809+
defaults: DefaultValues,
810+
): Record<string, unknown> => ({
811+
container_id: request.containerId,
812+
region: request.region,
813+
})
814+
807815
export const marshalCreateBackendStageRequest = (
808816
request: CreateBackendStageRequest,
809817
defaults: DefaultValues,
@@ -817,6 +825,10 @@ export const marshalCreateBackendStageRequest = (
817825
value: (request.scalewayLb !== undefined) ? marshalScalewayLbBackendConfig(request.scalewayLb, defaults)
818826
: undefined,
819827
},
828+
{param: 'scaleway_serverless_container',
829+
value: (request.scalewayServerlessContainer !== undefined) ? marshalScalewayServerlessContainerBackendConfig(request.scalewayServerlessContainer, defaults)
830+
: undefined,
831+
},
820832
]),
821833
})
822834

@@ -1006,6 +1018,10 @@ export const marshalUpdateBackendStageRequest = (
10061018
value: (request.scalewayLb !== undefined) ? marshalScalewayLbBackendConfig(request.scalewayLb, defaults)
10071019
: undefined,
10081020
},
1021+
{param: 'scaleway_serverless_container',
1022+
value: (request.scalewayServerlessContainer !== undefined) ? marshalScalewayServerlessContainerBackendConfig(request.scalewayServerlessContainer, defaults)
1023+
: undefined,
1024+
},
10091025
]),
10101026
})
10111027

packages_generated/edge_services/src/v1beta1/types.gen.ts

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -794,15 +794,20 @@ export type CreateBackendStageRequest = {
794794
/**
795795
* Scaleway Object Storage origin bucket (S3) linked to the backend stage.
796796
*
797-
* One-of ('backendConfig'): at most one of 'scalewayS3', 'scalewayLb' could be set.
797+
* One-of ('backendConfig'): at most one of 'scalewayS3', 'scalewayLb', 'scalewayServerlessContainer' could be set.
798798
*/
799799
scalewayS3?: ScalewayS3BackendConfig
800800
/**
801801
* Scaleway Load Balancer origin linked to the backend stage.
802802
*
803-
* One-of ('backendConfig'): at most one of 'scalewayS3', 'scalewayLb' could be set.
803+
* One-of ('backendConfig'): at most one of 'scalewayS3', 'scalewayLb', 'scalewayServerlessContainer' could be set.
804804
*/
805805
scalewayLb?: ScalewayLbBackendConfig
806+
/**
807+
*
808+
* One-of ('backendConfig'): at most one of 'scalewayS3', 'scalewayLb', 'scalewayServerlessContainer' could be set.
809+
*/
810+
scalewayServerlessContainer?: ScalewayServerlessContainerBackendConfig
806811
}
807812

808813

@@ -1640,19 +1645,24 @@ export type UpdateBackendStageRequest = {
16401645
/**
16411646
* Scaleway Object Storage origin bucket (S3) linked to the backend stage.
16421647
*
1643-
* One-of ('backendConfig'): at most one of 'scalewayS3', 'scalewayLb' could be set.
1648+
* One-of ('backendConfig'): at most one of 'scalewayS3', 'scalewayLb', 'scalewayServerlessContainer' could be set.
16441649
*/
16451650
scalewayS3?: ScalewayS3BackendConfig
16461651
/**
16471652
* Scaleway Load Balancer origin linked to the backend stage.
16481653
*
1649-
* One-of ('backendConfig'): at most one of 'scalewayS3', 'scalewayLb' could be set.
1654+
* One-of ('backendConfig'): at most one of 'scalewayS3', 'scalewayLb', 'scalewayServerlessContainer' could be set.
16501655
*/
16511656
scalewayLb?: ScalewayLbBackendConfig
16521657
/**
16531658
* Pipeline ID the Backend stage belongs to.
16541659
*/
16551660
pipelineId: string
1661+
/**
1662+
*
1663+
* One-of ('backendConfig'): at most one of 'scalewayS3', 'scalewayLb', 'scalewayServerlessContainer' could be set.
1664+
*/
1665+
scalewayServerlessContainer?: ScalewayServerlessContainerBackendConfig
16561666
}
16571667

16581668

0 commit comments

Comments
 (0)