Skip to content

Commit 8e9702a

Browse files
feat(container/function): add support for tags (scaleway#2539)
Co-authored-by: Rémy Léone <[email protected]>
1 parent a6947a6 commit 8e9702a

File tree

2 files changed

+24
-6
lines changed

2 files changed

+24
-6
lines changed

api/container/v1beta1/container_sdk.go

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -992,6 +992,9 @@ type Container struct {
992992

993993
// Region: region in which the container will be deployed.
994994
Region scw.Region `json:"region"`
995+
996+
// Tags: list of tags applied to the Serverless Container.
997+
Tags []string `json:"tags"`
995998
}
996999

9971000
// Cron: cron.
@@ -1077,7 +1080,7 @@ type Namespace struct {
10771080
// Region: region in which the namespace will be created.
10781081
Region scw.Region `json:"region"`
10791082

1080-
// Tags: [ALPHA] List of tags applied to the Serverless Container Namespace.
1083+
// Tags: list of tags applied to the Serverless Container Namespace.
10811084
Tags []string `json:"tags"`
10821085

10831086
// CreatedAt: creation date of the namespace.
@@ -1235,6 +1238,9 @@ type CreateContainerRequest struct {
12351238

12361239
// HealthCheck: health check configuration of the container.
12371240
HealthCheck *ContainerHealthCheckSpec `json:"health_check,omitempty"`
1241+
1242+
// Tags: tags of the Serverless Container.
1243+
Tags []string `json:"tags"`
12381244
}
12391245

12401246
// CreateCronRequest: create cron request.
@@ -1287,7 +1293,7 @@ type CreateNamespaceRequest struct {
12871293
// SecretEnvironmentVariables: secret environment variables of the namespace to create.
12881294
SecretEnvironmentVariables []*Secret `json:"secret_environment_variables"`
12891295

1290-
// Tags: [ALPHA] Tags of the Serverless Container Namespace.
1296+
// Tags: tags of the Serverless Container Namespace.
12911297
Tags []string `json:"tags"`
12921298
}
12931299

@@ -1832,6 +1838,9 @@ type UpdateContainerRequest struct {
18321838

18331839
// HealthCheck: health check configuration of the container.
18341840
HealthCheck *ContainerHealthCheckSpec `json:"health_check,omitempty"`
1841+
1842+
// Tags: tags of the Serverless Container.
1843+
Tags *[]string `json:"tags,omitempty"`
18351844
}
18361845

18371846
// UpdateCronRequest: update cron request.
@@ -1872,7 +1881,7 @@ type UpdateNamespaceRequest struct {
18721881
// SecretEnvironmentVariables: secret environment variables of the namespace to update.
18731882
SecretEnvironmentVariables []*Secret `json:"secret_environment_variables"`
18741883

1875-
// Tags: [ALPHA] Tags of the Serverless Container Namespace.
1884+
// Tags: tags of the Serverless Container Namespace.
18761885
Tags *[]string `json:"tags,omitempty"`
18771886
}
18781887

api/function/v1beta1/function_sdk.go

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,6 +1117,9 @@ type Function struct {
11171117

11181118
// ReadyAt: last date when the function was successfully deployed and set to ready.
11191119
ReadyAt *time.Time `json:"ready_at"`
1120+
1121+
// Tags: list of tags applied to the Serverless Function.
1122+
Tags []string `json:"tags"`
11201123
}
11211124

11221125
// Namespace: namespace.
@@ -1158,7 +1161,7 @@ type Namespace struct {
11581161
// Region: region in which the namespace is located.
11591162
Region scw.Region `json:"region"`
11601163

1161-
// Tags: [ALPHA] List of tags applied to the Serverless Function Namespace.
1164+
// Tags: list of tags applied to the Serverless Function Namespace.
11621165
Tags []string `json:"tags"`
11631166

11641167
// CreatedAt: creation date of the namespace.
@@ -1324,6 +1327,9 @@ type CreateFunctionRequest struct {
13241327
// Sandbox: execution environment of the function.
13251328
// Default value: unknown_sandbox
13261329
Sandbox FunctionSandbox `json:"sandbox"`
1330+
1331+
// Tags: tags of the Serverless Function.
1332+
Tags []string `json:"tags"`
13271333
}
13281334

13291335
// CreateNamespaceRequest: create namespace request.
@@ -1345,7 +1351,7 @@ type CreateNamespaceRequest struct {
13451351
// SecretEnvironmentVariables: secret environment variables of the namespace.
13461352
SecretEnvironmentVariables []*Secret `json:"secret_environment_variables"`
13471353

1348-
// Tags: [ALPHA] Tags of the Serverless Function Namespace.
1354+
// Tags: tags of the Serverless Function Namespace.
13491355
Tags []string `json:"tags"`
13501356
}
13511357

@@ -1954,6 +1960,9 @@ type UpdateFunctionRequest struct {
19541960
// Sandbox: execution environment of the function.
19551961
// Default value: unknown_sandbox
19561962
Sandbox FunctionSandbox `json:"sandbox"`
1963+
1964+
// Tags: tags of the Serverless Function.
1965+
Tags *[]string `json:"tags,omitempty"`
19571966
}
19581967

19591968
// UpdateNamespaceRequest: update namespace request.
@@ -1973,7 +1982,7 @@ type UpdateNamespaceRequest struct {
19731982
// SecretEnvironmentVariables: secret environment variables of the namespace.
19741983
SecretEnvironmentVariables []*Secret `json:"secret_environment_variables"`
19751984

1976-
// Tags: [ALPHA] Tags of the Serverless Function Namespace.
1985+
// Tags: tags of the Serverless Function Namespace.
19771986
Tags *[]string `json:"tags,omitempty"`
19781987
}
19791988

0 commit comments

Comments
 (0)