File tree Expand file tree Collapse file tree 10 files changed +44
-14
lines changed
scaleway-async/scaleway_async Expand file tree Collapse file tree 10 files changed +44
-14
lines changed Original file line number Diff line number Diff line change @@ -630,6 +630,7 @@ async def create_container(
630630 :param local_storage_limit: Local storage limit of the container (in MB).
631631 :param scaling_option: Possible values:
632632 - 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.
633634 :return: :class:`Container <Container>`
634635
635636 Usage:
@@ -728,6 +729,7 @@ async def update_container(
728729 :param local_storage_limit: Local storage limit of the container (in MB).
729730 :param scaling_option: Possible values:
730731 - 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.
731733 :return: :class:`Container <Container>`
732734
733735 Usage:
Original file line number Diff line number Diff line change @@ -59,6 +59,12 @@ def unmarshal_ContainerScalingOption(data: Any) -> ContainerScalingOption:
5959 else :
6060 args ["concurrent_requests_threshold" ] = None
6161
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+
6268 return ContainerScalingOption (** args )
6369
6470
@@ -702,6 +708,7 @@ def marshal_ContainerScalingOption(
702708 "concurrent_requests_threshold" ,
703709 request .concurrent_requests_threshold ,
704710 ),
711+ OneOfPossibility ("cpu_usage_threshold" , request .cpu_usage_threshold ),
705712 ]
706713 ),
707714 )
Original file line number Diff line number Diff line change @@ -195,6 +195,8 @@ def __str__(self) -> str:
195195class ContainerScalingOption :
196196 concurrent_requests_threshold : Optional [int ]
197197
198+ cpu_usage_threshold : Optional [int ]
199+
198200
199201@dataclass
200202class SecretHashedValue :
@@ -447,6 +449,7 @@ class Container:
447449 """
448450 Possible values:
449451- 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.
450453 """
451454
452455 created_at : Optional [datetime ]
@@ -790,6 +793,7 @@ class CreateContainerRequest:
790793 """
791794 Possible values:
792795- 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.
793797 """
794798
795799
@@ -1462,6 +1466,7 @@ class UpdateContainerRequest:
14621466 """
14631467 Possible values:
14641468- 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.
14651470 """
14661471
14671472
Original file line number Diff line number Diff line change @@ -1077,16 +1077,16 @@ async def create_user(
10771077 * ,
10781078 instance_id : str ,
10791079 name : str ,
1080+ password : str ,
10801081 region : Optional [Region ] = None ,
1081- password : Optional [str ] = None ,
10821082 ) -> User :
10831083 """
10841084 Create an user on a Database Instance.
10851085 Create an user on a Database Instance. You must define the `name`, `password` of the user and `instance_id` parameters in the request.
10861086 :param instance_id: UUID of the Database Instance the user belongs to.
10871087 :param name: Name of the database user.
1088- :param region: Region to target. If none is passed will use default region from the config.
10891088 :param password: Password of the database user.
1089+ :param region: Region to target. If none is passed will use default region from the config.
10901090 :return: :class:`User <User>`
10911091
10921092 Usage:
@@ -1095,6 +1095,7 @@ async def create_user(
10951095 result = await api.create_user(
10961096 instance_id="example",
10971097 name="example",
1098+ password="example",
10981099 )
10991100 """
11001101
@@ -1111,8 +1112,8 @@ async def create_user(
11111112 CreateUserRequest (
11121113 instance_id = instance_id ,
11131114 name = name ,
1114- region = region ,
11151115 password = password ,
1116+ region = region ,
11161117 ),
11171118 self .client ,
11181119 ),
Original file line number Diff line number Diff line change @@ -604,14 +604,14 @@ class CreateUserRequest:
604604 Name of the database user.
605605 """
606606
607- region : Optional [ Region ]
607+ password : str
608608 """
609- Region to target. If none is passed will use default region from the config .
609+ Password of the database user .
610610 """
611611
612- password : Optional [str ]
612+ region : Optional [Region ]
613613 """
614- Password of the database user .
614+ Region to target. If none is passed will use default region from the config .
615615 """
616616
617617
Original file line number Diff line number Diff line change @@ -626,6 +626,7 @@ def create_container(
626626 :param local_storage_limit: Local storage limit of the container (in MB).
627627 :param scaling_option: Possible values:
628628 - 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.
629630 :return: :class:`Container <Container>`
630631
631632 Usage:
@@ -724,6 +725,7 @@ def update_container(
724725 :param local_storage_limit: Local storage limit of the container (in MB).
725726 :param scaling_option: Possible values:
726727 - 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.
727729 :return: :class:`Container <Container>`
728730
729731 Usage:
Original file line number Diff line number Diff line change @@ -59,6 +59,12 @@ def unmarshal_ContainerScalingOption(data: Any) -> ContainerScalingOption:
5959 else :
6060 args ["concurrent_requests_threshold" ] = None
6161
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+
6268 return ContainerScalingOption (** args )
6369
6470
@@ -702,6 +708,7 @@ def marshal_ContainerScalingOption(
702708 "concurrent_requests_threshold" ,
703709 request .concurrent_requests_threshold ,
704710 ),
711+ OneOfPossibility ("cpu_usage_threshold" , request .cpu_usage_threshold ),
705712 ]
706713 ),
707714 )
Original file line number Diff line number Diff line change @@ -195,6 +195,8 @@ def __str__(self) -> str:
195195class ContainerScalingOption :
196196 concurrent_requests_threshold : Optional [int ]
197197
198+ cpu_usage_threshold : Optional [int ]
199+
198200
199201@dataclass
200202class SecretHashedValue :
@@ -447,6 +449,7 @@ class Container:
447449 """
448450 Possible values:
449451- 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.
450453 """
451454
452455 created_at : Optional [datetime ]
@@ -790,6 +793,7 @@ class CreateContainerRequest:
790793 """
791794 Possible values:
792795- 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.
793797 """
794798
795799
@@ -1462,6 +1466,7 @@ class UpdateContainerRequest:
14621466 """
14631467 Possible values:
14641468- 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.
14651470 """
14661471
14671472
Original file line number Diff line number Diff line change @@ -1073,16 +1073,16 @@ def create_user(
10731073 * ,
10741074 instance_id : str ,
10751075 name : str ,
1076+ password : str ,
10761077 region : Optional [Region ] = None ,
1077- password : Optional [str ] = None ,
10781078 ) -> User :
10791079 """
10801080 Create an user on a Database Instance.
10811081 Create an user on a Database Instance. You must define the `name`, `password` of the user and `instance_id` parameters in the request.
10821082 :param instance_id: UUID of the Database Instance the user belongs to.
10831083 :param name: Name of the database user.
1084- :param region: Region to target. If none is passed will use default region from the config.
10851084 :param password: Password of the database user.
1085+ :param region: Region to target. If none is passed will use default region from the config.
10861086 :return: :class:`User <User>`
10871087
10881088 Usage:
@@ -1091,6 +1091,7 @@ def create_user(
10911091 result = api.create_user(
10921092 instance_id="example",
10931093 name="example",
1094+ password="example",
10941095 )
10951096 """
10961097
@@ -1107,8 +1108,8 @@ def create_user(
11071108 CreateUserRequest (
11081109 instance_id = instance_id ,
11091110 name = name ,
1110- region = region ,
11111111 password = password ,
1112+ region = region ,
11121113 ),
11131114 self .client ,
11141115 ),
Original file line number Diff line number Diff line change @@ -604,14 +604,14 @@ class CreateUserRequest:
604604 Name of the database user.
605605 """
606606
607- region : Optional [ Region ]
607+ password : str
608608 """
609- Region to target. If none is passed will use default region from the config .
609+ Password of the database user .
610610 """
611611
612- password : Optional [str ]
612+ region : Optional [Region ]
613613 """
614- Password of the database user .
614+ Region to target. If none is passed will use default region from the config .
615615 """
616616
617617
You can’t perform that action at this time.
0 commit comments