File tree 6 files changed +28
-0
lines changed
scaleway/scaleway/container/v1beta1
scaleway-async/scaleway_async/container/v1beta1 6 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -630,6 +630,7 @@ async def create_container(
630
630
:param local_storage_limit: Local storage limit of the container (in MB).
631
631
:param scaling_option: Possible values:
632
632
- concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance.
633
+ - cpu_usage_threshold: Scale depending on the CPU usage of a container instance.
633
634
:return: :class:`Container <Container>`
634
635
635
636
Usage:
@@ -728,6 +729,7 @@ async def update_container(
728
729
:param local_storage_limit: Local storage limit of the container (in MB).
729
730
:param scaling_option: Possible values:
730
731
- concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance.
732
+ - cpu_usage_threshold: Scale depending on the CPU usage of a container instance.
731
733
:return: :class:`Container <Container>`
732
734
733
735
Usage:
Original file line number Diff line number Diff line change @@ -59,6 +59,12 @@ def unmarshal_ContainerScalingOption(data: Any) -> ContainerScalingOption:
59
59
else :
60
60
args ["concurrent_requests_threshold" ] = None
61
61
62
+ field = data .get ("cpu_usage_threshold" , None )
63
+ if field is not None :
64
+ args ["cpu_usage_threshold" ] = field
65
+ else :
66
+ args ["cpu_usage_threshold" ] = None
67
+
62
68
return ContainerScalingOption (** args )
63
69
64
70
@@ -702,6 +708,7 @@ def marshal_ContainerScalingOption(
702
708
"concurrent_requests_threshold" ,
703
709
request .concurrent_requests_threshold ,
704
710
),
711
+ OneOfPossibility ("cpu_usage_threshold" , request .cpu_usage_threshold ),
705
712
]
706
713
),
707
714
)
Original file line number Diff line number Diff line change @@ -195,6 +195,8 @@ def __str__(self) -> str:
195
195
class ContainerScalingOption :
196
196
concurrent_requests_threshold : Optional [int ]
197
197
198
+ cpu_usage_threshold : Optional [int ]
199
+
198
200
199
201
@dataclass
200
202
class SecretHashedValue :
@@ -447,6 +449,7 @@ class Container:
447
449
"""
448
450
Possible values:
449
451
- concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance.
452
+ - cpu_usage_threshold: Scale depending on the CPU usage of a container instance.
450
453
"""
451
454
452
455
created_at : Optional [datetime ]
@@ -790,6 +793,7 @@ class CreateContainerRequest:
790
793
"""
791
794
Possible values:
792
795
- concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance.
796
+ - cpu_usage_threshold: Scale depending on the CPU usage of a container instance.
793
797
"""
794
798
795
799
@@ -1462,6 +1466,7 @@ class UpdateContainerRequest:
1462
1466
"""
1463
1467
Possible values:
1464
1468
- concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance.
1469
+ - cpu_usage_threshold: Scale depending on the CPU usage of a container instance.
1465
1470
"""
1466
1471
1467
1472
Original file line number Diff line number Diff line change @@ -626,6 +626,7 @@ def create_container(
626
626
:param local_storage_limit: Local storage limit of the container (in MB).
627
627
:param scaling_option: Possible values:
628
628
- concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance.
629
+ - cpu_usage_threshold: Scale depending on the CPU usage of a container instance.
629
630
:return: :class:`Container <Container>`
630
631
631
632
Usage:
@@ -724,6 +725,7 @@ def update_container(
724
725
:param local_storage_limit: Local storage limit of the container (in MB).
725
726
:param scaling_option: Possible values:
726
727
- concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance.
728
+ - cpu_usage_threshold: Scale depending on the CPU usage of a container instance.
727
729
:return: :class:`Container <Container>`
728
730
729
731
Usage:
Original file line number Diff line number Diff line change @@ -59,6 +59,12 @@ def unmarshal_ContainerScalingOption(data: Any) -> ContainerScalingOption:
59
59
else :
60
60
args ["concurrent_requests_threshold" ] = None
61
61
62
+ field = data .get ("cpu_usage_threshold" , None )
63
+ if field is not None :
64
+ args ["cpu_usage_threshold" ] = field
65
+ else :
66
+ args ["cpu_usage_threshold" ] = None
67
+
62
68
return ContainerScalingOption (** args )
63
69
64
70
@@ -702,6 +708,7 @@ def marshal_ContainerScalingOption(
702
708
"concurrent_requests_threshold" ,
703
709
request .concurrent_requests_threshold ,
704
710
),
711
+ OneOfPossibility ("cpu_usage_threshold" , request .cpu_usage_threshold ),
705
712
]
706
713
),
707
714
)
Original file line number Diff line number Diff line change @@ -195,6 +195,8 @@ def __str__(self) -> str:
195
195
class ContainerScalingOption :
196
196
concurrent_requests_threshold : Optional [int ]
197
197
198
+ cpu_usage_threshold : Optional [int ]
199
+
198
200
199
201
@dataclass
200
202
class SecretHashedValue :
@@ -447,6 +449,7 @@ class Container:
447
449
"""
448
450
Possible values:
449
451
- concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance.
452
+ - cpu_usage_threshold: Scale depending on the CPU usage of a container instance.
450
453
"""
451
454
452
455
created_at : Optional [datetime ]
@@ -790,6 +793,7 @@ class CreateContainerRequest:
790
793
"""
791
794
Possible values:
792
795
- concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance.
796
+ - cpu_usage_threshold: Scale depending on the CPU usage of a container instance.
793
797
"""
794
798
795
799
@@ -1462,6 +1466,7 @@ class UpdateContainerRequest:
1462
1466
"""
1463
1467
Possible values:
1464
1468
- concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance.
1469
+ - cpu_usage_threshold: Scale depending on the CPU usage of a container instance.
1465
1470
"""
1466
1471
1467
1472
You can’t perform that action at this time.
0 commit comments