diff --git a/scaleway-async/scaleway_async/k8s/v1/api.py b/scaleway-async/scaleway_async/k8s/v1/api.py index ecce75cd6..1873516f6 100644 --- a/scaleway-async/scaleway_async/k8s/v1/api.py +++ b/scaleway-async/scaleway_async/k8s/v1/api.py @@ -1044,6 +1044,7 @@ async def create_pool( zone: Optional[ScwZone] = None, root_volume_type: Optional[PoolVolumeType] = None, root_volume_size: Optional[int] = None, + security_group_id: Optional[str] = None, ) -> Pool: """ Create a new Pool in a Cluster. @@ -1069,6 +1070,7 @@ async def create_pool( * `sbs-15k` is a faster remote block storage which means your system is stored on a centralized and resilient cluster with 15k IOPS limits * `b_ssd` is the legacy remote block storage which means your system is stored on a centralized and resilient cluster. Consider using `sbs-5k` or `sbs-15k` instead. :param root_volume_size: System volume disk size. + :param security_group_id: Security group ID in which all the nodes of the pool will be created. If unset, the pool will use default Kapsule security group in current zone. :return: :class:`Pool ` Usage: @@ -1112,6 +1114,7 @@ async def create_pool( zone=zone, root_volume_type=root_volume_type, root_volume_size=root_volume_size, + security_group_id=security_group_id, ), self.client, ), diff --git a/scaleway-async/scaleway_async/k8s/v1/marshalling.py b/scaleway-async/scaleway_async/k8s/v1/marshalling.py index 0f7d21497..99b266f87 100644 --- a/scaleway-async/scaleway_async/k8s/v1/marshalling.py +++ b/scaleway-async/scaleway_async/k8s/v1/marshalling.py @@ -169,6 +169,10 @@ def unmarshal_Pool(data: Any) -> Pool: if field is not None: args["public_ip_disabled"] = field + field = data.get("security_group_id", None) + if field is not None: + args["security_group_id"] = field + field = data.get("region", None) if field is not None: args["region"] = field @@ -1282,6 +1286,9 @@ def marshal_CreateClusterRequestPoolConfig( if request.root_volume_size is not None: output["root_volume_size"] = request.root_volume_size + if request.security_group_id is not None: + output["security_group_id"] = request.security_group_id + return output @@ -1434,6 +1441,9 @@ def marshal_CreatePoolRequest( if request.root_volume_size is not None: output["root_volume_size"] = request.root_volume_size + if request.security_group_id is not None: + output["security_group_id"] = request.security_group_id + return output diff --git a/scaleway-async/scaleway_async/k8s/v1/types.py b/scaleway-async/scaleway_async/k8s/v1/types.py index d2333e282..226043722 100644 --- a/scaleway-async/scaleway_async/k8s/v1/types.py +++ b/scaleway-async/scaleway_async/k8s/v1/types.py @@ -433,6 +433,11 @@ class Pool: Defines if the public IP should be removed from Nodes. To use this feature, your Cluster must have an attached Private Network set up with a Public Gateway. """ + security_group_id: str + """ + Security group ID in which all the nodes of the pool will be created. If unset, the pool will use default Kapsule security group in current zone. + """ + region: ScwRegion """ Cluster region of the pool. @@ -677,6 +682,11 @@ class CreateClusterRequestPoolConfig: System volume disk size. """ + security_group_id: Optional[str] + """ + Security group ID in which all the nodes of the pool will be created. If unset, the pool will use default Kapsule security group in current zone. + """ + @dataclass class CreatePoolRequestUpgradePolicy: @@ -1342,6 +1352,11 @@ class CreatePoolRequest: System volume disk size. """ + security_group_id: Optional[str] + """ + Security group ID in which all the nodes of the pool will be created. If unset, the pool will use default Kapsule security group in current zone. + """ + @dataclass class DeleteACLRuleRequest: diff --git a/scaleway/scaleway/k8s/v1/api.py b/scaleway/scaleway/k8s/v1/api.py index 62824fcf8..60ad64f62 100644 --- a/scaleway/scaleway/k8s/v1/api.py +++ b/scaleway/scaleway/k8s/v1/api.py @@ -1044,6 +1044,7 @@ def create_pool( zone: Optional[ScwZone] = None, root_volume_type: Optional[PoolVolumeType] = None, root_volume_size: Optional[int] = None, + security_group_id: Optional[str] = None, ) -> Pool: """ Create a new Pool in a Cluster. @@ -1069,6 +1070,7 @@ def create_pool( * `sbs-15k` is a faster remote block storage which means your system is stored on a centralized and resilient cluster with 15k IOPS limits * `b_ssd` is the legacy remote block storage which means your system is stored on a centralized and resilient cluster. Consider using `sbs-5k` or `sbs-15k` instead. :param root_volume_size: System volume disk size. + :param security_group_id: Security group ID in which all the nodes of the pool will be created. If unset, the pool will use default Kapsule security group in current zone. :return: :class:`Pool ` Usage: @@ -1112,6 +1114,7 @@ def create_pool( zone=zone, root_volume_type=root_volume_type, root_volume_size=root_volume_size, + security_group_id=security_group_id, ), self.client, ), diff --git a/scaleway/scaleway/k8s/v1/marshalling.py b/scaleway/scaleway/k8s/v1/marshalling.py index 0f7d21497..99b266f87 100644 --- a/scaleway/scaleway/k8s/v1/marshalling.py +++ b/scaleway/scaleway/k8s/v1/marshalling.py @@ -169,6 +169,10 @@ def unmarshal_Pool(data: Any) -> Pool: if field is not None: args["public_ip_disabled"] = field + field = data.get("security_group_id", None) + if field is not None: + args["security_group_id"] = field + field = data.get("region", None) if field is not None: args["region"] = field @@ -1282,6 +1286,9 @@ def marshal_CreateClusterRequestPoolConfig( if request.root_volume_size is not None: output["root_volume_size"] = request.root_volume_size + if request.security_group_id is not None: + output["security_group_id"] = request.security_group_id + return output @@ -1434,6 +1441,9 @@ def marshal_CreatePoolRequest( if request.root_volume_size is not None: output["root_volume_size"] = request.root_volume_size + if request.security_group_id is not None: + output["security_group_id"] = request.security_group_id + return output diff --git a/scaleway/scaleway/k8s/v1/types.py b/scaleway/scaleway/k8s/v1/types.py index d2333e282..226043722 100644 --- a/scaleway/scaleway/k8s/v1/types.py +++ b/scaleway/scaleway/k8s/v1/types.py @@ -433,6 +433,11 @@ class Pool: Defines if the public IP should be removed from Nodes. To use this feature, your Cluster must have an attached Private Network set up with a Public Gateway. """ + security_group_id: str + """ + Security group ID in which all the nodes of the pool will be created. If unset, the pool will use default Kapsule security group in current zone. + """ + region: ScwRegion """ Cluster region of the pool. @@ -677,6 +682,11 @@ class CreateClusterRequestPoolConfig: System volume disk size. """ + security_group_id: Optional[str] + """ + Security group ID in which all the nodes of the pool will be created. If unset, the pool will use default Kapsule security group in current zone. + """ + @dataclass class CreatePoolRequestUpgradePolicy: @@ -1342,6 +1352,11 @@ class CreatePoolRequest: System volume disk size. """ + security_group_id: Optional[str] + """ + Security group ID in which all the nodes of the pool will be created. If unset, the pool will use default Kapsule security group in current zone. + """ + @dataclass class DeleteACLRuleRequest: