Skip to content

Commit f4293c4

Browse files
docs(serverless): clarify UpdateContainer and UpdateFunction behavior and clarify delete secrets behavior (#1197)
Co-authored-by: Laure-di <[email protected]>
1 parent 971a207 commit f4293c4

File tree

8 files changed

+96
-8
lines changed

8 files changed

+96
-8
lines changed

scaleway-async/scaleway_async/container/v1beta1/api.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,18 @@ async def update_container(
746746
:param max_concurrency: Number of maximum concurrent executions of the container.
747747
:param protocol: Protocol the container uses.
748748
:param port: Port the container listens on.
749-
:param secret_environment_variables: Secret environment variables of the container.
749+
:param secret_environment_variables: During an update, secret environment variables that are not specified in this field will be kept unchanged.
750+
751+
In order to delete a specific secret environment variable, you must reference its key, but not provide any value for it.
752+
For example, the following payload will delete the `TO_DELETE` secret environment variable:
753+
754+
```json
755+
{
756+
"secret_environment_variables":[
757+
{"key":"TO_DELETE"}
758+
]
759+
}
760+
```.
750761
:param http_option: Possible values:
751762
- redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.
752763
- enabled: Serve both HTTP and HTTPS traffic.

scaleway-async/scaleway_async/container/v1beta1/types.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1556,7 +1556,18 @@ class UpdateContainerRequest:
15561556

15571557
secret_environment_variables: Optional[List[Secret]] = field(default_factory=list)
15581558
"""
1559-
Secret environment variables of the container.
1559+
During an update, secret environment variables that are not specified in this field will be kept unchanged.
1560+
1561+
In order to delete a specific secret environment variable, you must reference its key, but not provide any value for it.
1562+
For example, the following payload will delete the `TO_DELETE` secret environment variable:
1563+
1564+
```json
1565+
{
1566+
"secret_environment_variables":[
1567+
{"key":"TO_DELETE"}
1568+
]
1569+
}
1570+
```.
15601571
"""
15611572

15621573
http_option: Optional[ContainerHttpOption] = ContainerHttpOption.UNKNOWN_HTTP_OPTION

scaleway-async/scaleway_async/function/v1beta1/api.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,18 @@ async def update_function(
709709
:param handler: Handler to use with the function.
710710
:param privacy: Privacy setting of the function.
711711
:param description: Description of the function.
712-
:param secret_environment_variables: Secret environment variables of the function.
712+
:param secret_environment_variables: During an update, secret environment variables that are not specified in this field will be kept unchanged.
713+
714+
In order to delete a specific secret environment variable, you must reference its key, but not provide any value for it.
715+
For example, the following payload will delete the `TO_DELETE` secret environment variable:
716+
717+
```json
718+
{
719+
"secret_environment_variables":[
720+
{"key":"TO_DELETE"}
721+
]
722+
}
723+
```.
713724
:param http_option: Possible values:
714725
- redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.
715726
- enabled: Serve both HTTP and HTTPS traffic.

scaleway-async/scaleway_async/function/v1beta1/types.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1563,7 +1563,18 @@ class UpdateFunctionRequest:
15631563

15641564
secret_environment_variables: Optional[List[Secret]] = field(default_factory=list)
15651565
"""
1566-
Secret environment variables of the function.
1566+
During an update, secret environment variables that are not specified in this field will be kept unchanged.
1567+
1568+
In order to delete a specific secret environment variable, you must reference its key, but not provide any value for it.
1569+
For example, the following payload will delete the `TO_DELETE` secret environment variable:
1570+
1571+
```json
1572+
{
1573+
"secret_environment_variables":[
1574+
{"key":"TO_DELETE"}
1575+
]
1576+
}
1577+
```.
15671578
"""
15681579

15691580
http_option: Optional[FunctionHttpOption] = FunctionHttpOption.UNKNOWN_HTTP_OPTION

scaleway/scaleway/container/v1beta1/api.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,18 @@ def update_container(
742742
:param max_concurrency: Number of maximum concurrent executions of the container.
743743
:param protocol: Protocol the container uses.
744744
:param port: Port the container listens on.
745-
:param secret_environment_variables: Secret environment variables of the container.
745+
:param secret_environment_variables: During an update, secret environment variables that are not specified in this field will be kept unchanged.
746+
747+
In order to delete a specific secret environment variable, you must reference its key, but not provide any value for it.
748+
For example, the following payload will delete the `TO_DELETE` secret environment variable:
749+
750+
```json
751+
{
752+
"secret_environment_variables":[
753+
{"key":"TO_DELETE"}
754+
]
755+
}
756+
```.
746757
:param http_option: Possible values:
747758
- redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.
748759
- enabled: Serve both HTTP and HTTPS traffic.

scaleway/scaleway/container/v1beta1/types.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1556,7 +1556,18 @@ class UpdateContainerRequest:
15561556

15571557
secret_environment_variables: Optional[List[Secret]] = field(default_factory=list)
15581558
"""
1559-
Secret environment variables of the container.
1559+
During an update, secret environment variables that are not specified in this field will be kept unchanged.
1560+
1561+
In order to delete a specific secret environment variable, you must reference its key, but not provide any value for it.
1562+
For example, the following payload will delete the `TO_DELETE` secret environment variable:
1563+
1564+
```json
1565+
{
1566+
"secret_environment_variables":[
1567+
{"key":"TO_DELETE"}
1568+
]
1569+
}
1570+
```.
15601571
"""
15611572

15621573
http_option: Optional[ContainerHttpOption] = ContainerHttpOption.UNKNOWN_HTTP_OPTION

scaleway/scaleway/function/v1beta1/api.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,18 @@ def update_function(
705705
:param handler: Handler to use with the function.
706706
:param privacy: Privacy setting of the function.
707707
:param description: Description of the function.
708-
:param secret_environment_variables: Secret environment variables of the function.
708+
:param secret_environment_variables: During an update, secret environment variables that are not specified in this field will be kept unchanged.
709+
710+
In order to delete a specific secret environment variable, you must reference its key, but not provide any value for it.
711+
For example, the following payload will delete the `TO_DELETE` secret environment variable:
712+
713+
```json
714+
{
715+
"secret_environment_variables":[
716+
{"key":"TO_DELETE"}
717+
]
718+
}
719+
```.
709720
:param http_option: Possible values:
710721
- redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.
711722
- enabled: Serve both HTTP and HTTPS traffic.

scaleway/scaleway/function/v1beta1/types.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1563,7 +1563,18 @@ class UpdateFunctionRequest:
15631563

15641564
secret_environment_variables: Optional[List[Secret]] = field(default_factory=list)
15651565
"""
1566-
Secret environment variables of the function.
1566+
During an update, secret environment variables that are not specified in this field will be kept unchanged.
1567+
1568+
In order to delete a specific secret environment variable, you must reference its key, but not provide any value for it.
1569+
For example, the following payload will delete the `TO_DELETE` secret environment variable:
1570+
1571+
```json
1572+
{
1573+
"secret_environment_variables":[
1574+
{"key":"TO_DELETE"}
1575+
]
1576+
}
1577+
```.
15671578
"""
15681579

15691580
http_option: Optional[FunctionHttpOption] = FunctionHttpOption.UNKNOWN_HTTP_OPTION

0 commit comments

Comments
 (0)