Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions scaleway-async/scaleway_async/container/v1beta1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ async def create_namespace(
:param project_id: UUID of the Project in which the namespace will be created.
:param description: Description of the namespace to create.
:param secret_environment_variables: Secret environment variables of the namespace to create.
:param tags: [ALPHA] Tags of the Serverless Container Namespace.
:param tags: Tags of the Serverless Container Namespace.
:return: :class:`Namespace <Namespace>`

Usage:
Expand Down Expand Up @@ -335,7 +335,7 @@ async def update_namespace(
:param environment_variables: Environment variables of the namespace to update.
:param description: Description of the namespace to update.
:param secret_environment_variables: Secret environment variables of the namespace to update.
:param tags: [ALPHA] Tags of the Serverless Container Namespace.
:param tags: Tags of the Serverless Container Namespace.
:return: :class:`Namespace <Namespace>`

Usage:
Expand Down Expand Up @@ -605,6 +605,7 @@ async def create_container(
local_storage_limit: Optional[int] = None,
scaling_option: Optional[ContainerScalingOption] = None,
health_check: Optional[ContainerHealthCheckSpec] = None,
tags: Optional[List[str]] = None,
) -> Container:
"""
Create a new container.
Expand Down Expand Up @@ -635,6 +636,7 @@ async def create_container(
- cpu_usage_threshold: Scale depending on the CPU usage of a container instance.
- memory_usage_threshold: Scale depending on the memory usage of a container instance.
:param health_check: Health check configuration of the container.
:param tags: Tags of the Serverless Container.
:return: :class:`Container <Container>`

Usage:
Expand Down Expand Up @@ -676,6 +678,7 @@ async def create_container(
local_storage_limit=local_storage_limit,
scaling_option=scaling_option,
health_check=health_check,
tags=tags,
),
self.client,
),
Expand Down Expand Up @@ -708,6 +711,7 @@ async def update_container(
local_storage_limit: Optional[int] = None,
scaling_option: Optional[ContainerScalingOption] = None,
health_check: Optional[ContainerHealthCheckSpec] = None,
tags: Optional[List[str]] = None,
) -> Container:
"""
Update an existing container.
Expand Down Expand Up @@ -738,6 +742,7 @@ async def update_container(
- cpu_usage_threshold: Scale depending on the CPU usage of a container instance.
- memory_usage_threshold: Scale depending on the memory usage of a container instance.
:param health_check: Health check configuration of the container.
:param tags: Tags of the Serverless Container.
:return: :class:`Container <Container>`

Usage:
Expand Down Expand Up @@ -779,6 +784,7 @@ async def update_container(
local_storage_limit=local_storage_limit,
scaling_option=scaling_option,
health_check=health_check,
tags=tags,
),
self.client,
),
Expand Down
10 changes: 10 additions & 0 deletions scaleway-async/scaleway_async/container/v1beta1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,10 @@ def unmarshal_Container(data: Any) -> Container:
if field is not None:
args["region"] = field

field = data.get("tags", None)
if field is not None:
args["tags"] = field

field = data.get("scaling_option", None)
if field is not None:
args["scaling_option"] = unmarshal_ContainerScalingOption(field)
Expand Down Expand Up @@ -941,6 +945,9 @@ def marshal_CreateContainerRequest(
request.health_check, defaults
)

if request.tags is not None:
output["tags"] = request.tags

return output


Expand Down Expand Up @@ -1190,6 +1197,9 @@ def marshal_UpdateContainerRequest(
request.health_check, defaults
)

if request.tags is not None:
output["tags"] = request.tags

return output


Expand Down
21 changes: 18 additions & 3 deletions scaleway-async/scaleway_async/container/v1beta1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,11 @@ class Container:
Region in which the container will be deployed.
"""

tags: List[str]
"""
List of tags applied to the Serverless Container.
"""

scaling_option: Optional[ContainerScalingOption]
"""
Possible values:
Expand Down Expand Up @@ -627,7 +632,7 @@ class Namespace:

tags: List[str]
"""
[ALPHA] List of tags applied to the Serverless Container Namespace.
List of tags applied to the Serverless Container Namespace.
"""

error_message: Optional[str]
Expand Down Expand Up @@ -851,6 +856,11 @@ class CreateContainerRequest:
Health check configuration of the container.
"""

tags: Optional[List[str]]
"""
Tags of the Serverless Container.
"""


@dataclass
class CreateCronRequest:
Expand Down Expand Up @@ -932,7 +942,7 @@ class CreateNamespaceRequest:

tags: Optional[List[str]]
"""
[ALPHA] Tags of the Serverless Container Namespace.
Tags of the Serverless Container Namespace.
"""


Expand Down Expand Up @@ -1530,6 +1540,11 @@ class UpdateContainerRequest:
Health check configuration of the container.
"""

tags: Optional[List[str]]
"""
Tags of the Serverless Container.
"""


@dataclass
class UpdateCronRequest:
Expand Down Expand Up @@ -1593,7 +1608,7 @@ class UpdateNamespaceRequest:

tags: Optional[List[str]]
"""
[ALPHA] Tags of the Serverless Container Namespace.
Tags of the Serverless Container Namespace.
"""


Expand Down
10 changes: 8 additions & 2 deletions scaleway-async/scaleway_async/function/v1beta1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ async def create_namespace(
:param project_id: UUID of the project in which the namespace will be created.
:param description: Description of the namespace.
:param secret_environment_variables: Secret environment variables of the namespace.
:param tags: [ALPHA] Tags of the Serverless Function Namespace.
:param tags: Tags of the Serverless Function Namespace.
:return: :class:`Namespace <Namespace>`

Usage:
Expand Down Expand Up @@ -339,7 +339,7 @@ async def update_namespace(
:param environment_variables: Environment variables of the namespace.
:param description: Description of the namespace.
:param secret_environment_variables: Secret environment variables of the namespace.
:param tags: [ALPHA] Tags of the Serverless Function Namespace.
:param tags: Tags of the Serverless Function Namespace.
:return: :class:`Namespace <Namespace>`

Usage:
Expand Down Expand Up @@ -601,6 +601,7 @@ async def create_function(
secret_environment_variables: Optional[List[Secret]] = None,
http_option: Optional[FunctionHttpOption] = None,
sandbox: Optional[FunctionSandbox] = None,
tags: Optional[List[str]] = None,
) -> Function:
"""
Create a new function.
Expand All @@ -622,6 +623,7 @@ async def create_function(
- redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.
- enabled: Serve both HTTP and HTTPS traffic.
:param sandbox: Execution environment of the function.
:param tags: Tags of the Serverless Function.
:return: :class:`Function <Function>`

Usage:
Expand Down Expand Up @@ -656,6 +658,7 @@ async def create_function(
secret_environment_variables=secret_environment_variables,
http_option=http_option,
sandbox=sandbox,
tags=tags,
),
self.client,
),
Expand All @@ -682,6 +685,7 @@ async def update_function(
secret_environment_variables: Optional[List[Secret]] = None,
http_option: Optional[FunctionHttpOption] = None,
sandbox: Optional[FunctionSandbox] = None,
tags: Optional[List[str]] = None,
) -> Function:
"""
Update an existing function.
Expand All @@ -703,6 +707,7 @@ async def update_function(
- redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.
- enabled: Serve both HTTP and HTTPS traffic.
:param sandbox: Execution environment of the function.
:param tags: Tags of the Serverless Function.
:return: :class:`Function <Function>`

Usage:
Expand Down Expand Up @@ -738,6 +743,7 @@ async def update_function(
secret_environment_variables=secret_environment_variables,
http_option=http_option,
sandbox=sandbox,
tags=tags,
),
self.client,
),
Expand Down
10 changes: 10 additions & 0 deletions scaleway-async/scaleway_async/function/v1beta1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,10 @@ def unmarshal_Function(data: Any) -> Function:
if field is not None:
args["sandbox"] = field

field = data.get("tags", None)
if field is not None:
args["tags"] = field

field = data.get("created_at", None)
if field is not None:
args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field
Expand Down Expand Up @@ -892,6 +896,9 @@ def marshal_CreateFunctionRequest(
if request.sandbox is not None:
output["sandbox"] = str(request.sandbox)

if request.tags is not None:
output["tags"] = request.tags

return output


Expand Down Expand Up @@ -1104,6 +1111,9 @@ def marshal_UpdateFunctionRequest(
if request.sandbox is not None:
output["sandbox"] = str(request.sandbox)

if request.tags is not None:
output["tags"] = request.tags

return output


Expand Down
21 changes: 18 additions & 3 deletions scaleway-async/scaleway_async/function/v1beta1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,11 @@ class Function:
Execution environment of the function.
"""

tags: List[str]
"""
List of tags applied to the Serverless Function.
"""

created_at: Optional[datetime]
"""
Creation date of the function.
Expand Down Expand Up @@ -633,7 +638,7 @@ class Namespace:

tags: List[str]
"""
[ALPHA] List of tags applied to the Serverless Function Namespace.
List of tags applied to the Serverless Function Namespace.
"""

error_message: Optional[str]
Expand Down Expand Up @@ -867,6 +872,11 @@ class CreateFunctionRequest:
Execution environment of the function.
"""

tags: Optional[List[str]]
"""
Tags of the Serverless Function.
"""


@dataclass
class CreateNamespaceRequest:
Expand Down Expand Up @@ -899,7 +909,7 @@ class CreateNamespaceRequest:

tags: Optional[List[str]]
"""
[ALPHA] Tags of the Serverless Function Namespace.
Tags of the Serverless Function Namespace.
"""


Expand Down Expand Up @@ -1562,6 +1572,11 @@ class UpdateFunctionRequest:
Execution environment of the function.
"""

tags: Optional[List[str]]
"""
Tags of the Serverless Function.
"""


@dataclass
class UpdateNamespaceRequest:
Expand Down Expand Up @@ -1592,7 +1607,7 @@ class UpdateNamespaceRequest:

tags: Optional[List[str]]
"""
[ALPHA] Tags of the Serverless Function Namespace.
Tags of the Serverless Function Namespace.
"""


Expand Down
10 changes: 8 additions & 2 deletions scaleway/scaleway/container/v1beta1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def create_namespace(
:param project_id: UUID of the Project in which the namespace will be created.
:param description: Description of the namespace to create.
:param secret_environment_variables: Secret environment variables of the namespace to create.
:param tags: [ALPHA] Tags of the Serverless Container Namespace.
:param tags: Tags of the Serverless Container Namespace.
:return: :class:`Namespace <Namespace>`

Usage:
Expand Down Expand Up @@ -333,7 +333,7 @@ def update_namespace(
:param environment_variables: Environment variables of the namespace to update.
:param description: Description of the namespace to update.
:param secret_environment_variables: Secret environment variables of the namespace to update.
:param tags: [ALPHA] Tags of the Serverless Container Namespace.
:param tags: Tags of the Serverless Container Namespace.
:return: :class:`Namespace <Namespace>`

Usage:
Expand Down Expand Up @@ -601,6 +601,7 @@ def create_container(
local_storage_limit: Optional[int] = None,
scaling_option: Optional[ContainerScalingOption] = None,
health_check: Optional[ContainerHealthCheckSpec] = None,
tags: Optional[List[str]] = None,
) -> Container:
"""
Create a new container.
Expand Down Expand Up @@ -631,6 +632,7 @@ def create_container(
- cpu_usage_threshold: Scale depending on the CPU usage of a container instance.
- memory_usage_threshold: Scale depending on the memory usage of a container instance.
:param health_check: Health check configuration of the container.
:param tags: Tags of the Serverless Container.
:return: :class:`Container <Container>`

Usage:
Expand Down Expand Up @@ -672,6 +674,7 @@ def create_container(
local_storage_limit=local_storage_limit,
scaling_option=scaling_option,
health_check=health_check,
tags=tags,
),
self.client,
),
Expand Down Expand Up @@ -704,6 +707,7 @@ def update_container(
local_storage_limit: Optional[int] = None,
scaling_option: Optional[ContainerScalingOption] = None,
health_check: Optional[ContainerHealthCheckSpec] = None,
tags: Optional[List[str]] = None,
) -> Container:
"""
Update an existing container.
Expand Down Expand Up @@ -734,6 +738,7 @@ def update_container(
- cpu_usage_threshold: Scale depending on the CPU usage of a container instance.
- memory_usage_threshold: Scale depending on the memory usage of a container instance.
:param health_check: Health check configuration of the container.
:param tags: Tags of the Serverless Container.
:return: :class:`Container <Container>`

Usage:
Expand Down Expand Up @@ -775,6 +780,7 @@ def update_container(
local_storage_limit=local_storage_limit,
scaling_option=scaling_option,
health_check=health_check,
tags=tags,
),
self.client,
),
Expand Down
Loading