From a20fcfa0fd38eda3cf3f5113e3631c4cabb1cf3b Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Mon, 20 Jul 2026 15:31:43 +0000 Subject: [PATCH] feat(ipam): add support for cli generation for attach, detach and move --- .../datawarehouse/v1beta1/marshalling.py | 30 +++++++++++++ .../datawarehouse/v1beta1/types.py | 25 +++++++++++ scaleway-async/scaleway_async/lb/v1/api.py | 12 +++++ scaleway-async/scaleway_async/lb/v1/types.py | 10 +++++ .../product_catalog/v2alpha1/__init__.py | 4 ++ .../product_catalog/v2alpha1/marshalling.py | 44 +++++++++++++++++++ .../product_catalog/v2alpha1/types.py | 20 +++++++++ .../search/v1alpha1/__init__.py | 2 + .../scaleway_async/search/v1alpha1/api.py | 10 +++++ .../search/v1alpha1/marshalling.py | 6 +++ .../scaleway_async/search/v1alpha1/types.py | 36 +++++++++++++++ .../scaleway_async/webhosting/v1/api.py | 3 ++ .../webhosting/v1/marshalling.py | 5 +++ .../scaleway_async/webhosting/v1/types.py | 5 +++ .../datawarehouse/v1beta1/marshalling.py | 30 +++++++++++++ .../scaleway/datawarehouse/v1beta1/types.py | 25 +++++++++++ scaleway/scaleway/lb/v1/api.py | 12 +++++ scaleway/scaleway/lb/v1/types.py | 10 +++++ .../product_catalog/v2alpha1/__init__.py | 4 ++ .../product_catalog/v2alpha1/marshalling.py | 44 +++++++++++++++++++ .../product_catalog/v2alpha1/types.py | 20 +++++++++ scaleway/scaleway/search/v1alpha1/__init__.py | 2 + scaleway/scaleway/search/v1alpha1/api.py | 10 +++++ .../scaleway/search/v1alpha1/marshalling.py | 6 +++ scaleway/scaleway/search/v1alpha1/types.py | 36 +++++++++++++++ scaleway/scaleway/webhosting/v1/api.py | 3 ++ .../scaleway/webhosting/v1/marshalling.py | 5 +++ scaleway/scaleway/webhosting/v1/types.py | 5 +++ 28 files changed, 424 insertions(+) diff --git a/scaleway-async/scaleway_async/datawarehouse/v1beta1/marshalling.py b/scaleway-async/scaleway_async/datawarehouse/v1beta1/marshalling.py index ef704f715..ac1f970dc 100644 --- a/scaleway-async/scaleway_async/datawarehouse/v1beta1/marshalling.py +++ b/scaleway-async/scaleway_async/datawarehouse/v1beta1/marshalling.py @@ -161,6 +161,12 @@ def unmarshal_Endpoint(data: Any) -> Endpoint: else: args["services"] = [] + field = data.get("region", None) + if field is not None: + args["region"] = field + else: + args["region"] = None + field = data.get("private_network", None) if field is not None: args["private_network"] = unmarshal_PrivateNetworkDetails(field) @@ -196,6 +202,18 @@ def unmarshal_Database(data: Any) -> Database: else: args["size"] = 0 + field = data.get("deployment_id", None) + if field is not None: + args["deployment_id"] = field + else: + args["deployment_id"] = None + + field = data.get("region", None) + if field is not None: + args["region"] = field + else: + args["region"] = None + return Database(**args) @@ -334,6 +352,18 @@ def unmarshal_User(data: Any) -> User: else: args["is_admin"] = False + field = data.get("deployment_id", None) + if field is not None: + args["deployment_id"] = field + else: + args["deployment_id"] = None + + field = data.get("region", None) + if field is not None: + args["region"] = field + else: + args["region"] = None + return User(**args) diff --git a/scaleway-async/scaleway_async/datawarehouse/v1beta1/types.py b/scaleway-async/scaleway_async/datawarehouse/v1beta1/types.py index 20cb571ef..c7115e293 100644 --- a/scaleway-async/scaleway_async/datawarehouse/v1beta1/types.py +++ b/scaleway-async/scaleway_async/datawarehouse/v1beta1/types.py @@ -141,6 +141,11 @@ class Endpoint: List of services associated with the endpoint. """ + region: ScwRegion + """ + Region of the deployment. + """ + private_network: Optional[PrivateNetworkDetails] = None public: Optional[EndpointPublicDetails] = None @@ -165,6 +170,16 @@ class Database: Size of the database. """ + deployment_id: str + """ + Identifier of the deployment. + """ + + region: ScwRegion + """ + Region of the deployment. + """ + @dataclass class Deployment: @@ -304,6 +319,16 @@ class User: Indicates if the user is an administrator. """ + deployment_id: str + """ + Identifier of the deployment. + """ + + region: ScwRegion + """ + Region of the deployment. + """ + @dataclass class Version: diff --git a/scaleway-async/scaleway_async/lb/v1/api.py b/scaleway-async/scaleway_async/lb/v1/api.py index 0d75e2d48..2e625ca7b 100644 --- a/scaleway-async/scaleway_async/lb/v1/api.py +++ b/scaleway-async/scaleway_async/lb/v1/api.py @@ -218,6 +218,7 @@ async def list_lbs( organization_id: Optional[str] = None, project_id: Optional[str] = None, tags: Optional[list[str]] = None, + lb_ids: Optional[list[str]] = None, ) -> ListLbsResponse: """ List Load Balancers. @@ -230,6 +231,7 @@ async def list_lbs( :param organization_id: Organization ID to filter for, only Load Balancers from this Organization will be returned. :param project_id: Project ID to filter for, only Load Balancers from this Project will be returned. :param tags: Filter by tag, only Load Balancers with one or more matching tags will be returned. + :param lb_ids: Filter by lb_ids, only Load Balancers with these IDs will be returned. :return: :class:`ListLbsResponse ` Usage: @@ -244,6 +246,7 @@ async def list_lbs( "GET", f"/lb/v1/zones/{param_zone}/lbs", params={ + "lb_ids": lb_ids, "name": name, "order_by": order_by, "organization_id": organization_id @@ -269,6 +272,7 @@ async def list_lbs_all( organization_id: Optional[str] = None, project_id: Optional[str] = None, tags: Optional[list[str]] = None, + lb_ids: Optional[list[str]] = None, ) -> list[Lb]: """ List Load Balancers. @@ -281,6 +285,7 @@ async def list_lbs_all( :param organization_id: Organization ID to filter for, only Load Balancers from this Organization will be returned. :param project_id: Project ID to filter for, only Load Balancers from this Project will be returned. :param tags: Filter by tag, only Load Balancers with one or more matching tags will be returned. + :param lb_ids: Filter by lb_ids, only Load Balancers with these IDs will be returned. :return: :class:`list[Lb] ` Usage: @@ -302,6 +307,7 @@ async def list_lbs_all( "organization_id": organization_id, "project_id": project_id, "tags": tags, + "lb_ids": lb_ids, }, ) @@ -3256,6 +3262,7 @@ async def list_lbs( organization_id: Optional[str] = None, project_id: Optional[str] = None, tags: Optional[list[str]] = None, + lb_ids: Optional[list[str]] = None, ) -> ListLbsResponse: """ List load balancers. @@ -3267,6 +3274,7 @@ async def list_lbs( :param organization_id: Organization ID to filter for, only Load Balancers from this Organization will be returned. :param project_id: Project ID to filter for, only Load Balancers from this Project will be returned. :param tags: Filter by tag, only Load Balancers with one or more matching tags will be returned. + :param lb_ids: Filter by lb_ids, only Load Balancers with these IDs will be returned. :return: :class:`ListLbsResponse ` Usage: @@ -3283,6 +3291,7 @@ async def list_lbs( "GET", f"/lb/v1/regions/{param_region}/lbs", params={ + "lb_ids": lb_ids, "name": name, "order_by": order_by, "organization_id": organization_id @@ -3308,6 +3317,7 @@ async def list_lbs_all( organization_id: Optional[str] = None, project_id: Optional[str] = None, tags: Optional[list[str]] = None, + lb_ids: Optional[list[str]] = None, ) -> list[Lb]: """ List load balancers. @@ -3319,6 +3329,7 @@ async def list_lbs_all( :param organization_id: Organization ID to filter for, only Load Balancers from this Organization will be returned. :param project_id: Project ID to filter for, only Load Balancers from this Project will be returned. :param tags: Filter by tag, only Load Balancers with one or more matching tags will be returned. + :param lb_ids: Filter by lb_ids, only Load Balancers with these IDs will be returned. :return: :class:`list[Lb] ` Usage: @@ -3340,6 +3351,7 @@ async def list_lbs_all( "organization_id": organization_id, "project_id": project_id, "tags": tags, + "lb_ids": lb_ids, }, ) diff --git a/scaleway-async/scaleway_async/lb/v1/types.py b/scaleway-async/scaleway_async/lb/v1/types.py index f99f3741a..1857c9ed1 100644 --- a/scaleway-async/scaleway_async/lb/v1/types.py +++ b/scaleway-async/scaleway_async/lb/v1/types.py @@ -2317,6 +2317,11 @@ class ListLbsRequest: Filter by tag, only Load Balancers with one or more matching tags will be returned. """ + lb_ids: Optional[list[str]] = field(default_factory=list) + """ + Filter by lb_ids, only Load Balancers with these IDs will be returned. + """ + @dataclass class ListLbsResponse: @@ -3899,6 +3904,11 @@ class ZonedApiListLbsRequest: Filter by tag, only Load Balancers with one or more matching tags will be returned. """ + lb_ids: Optional[list[str]] = field(default_factory=list) + """ + Filter by lb_ids, only Load Balancers with these IDs will be returned. + """ + @dataclass class ZonedApiListRoutesRequest: diff --git a/scaleway-async/scaleway_async/product_catalog/v2alpha1/__init__.py b/scaleway-async/scaleway_async/product_catalog/v2alpha1/__init__.py index d15e54f76..6ba420bb2 100644 --- a/scaleway-async/scaleway_async/product_catalog/v2alpha1/__init__.py +++ b/scaleway-async/scaleway_async/product_catalog/v2alpha1/__init__.py @@ -65,6 +65,8 @@ from .types import PublicCatalogProductPropertiesGenerativeApis from .types import PublicCatalogProductPropertiesHardware from .types import PublicCatalogProductPropertiesInstance +from .types import PublicCatalogProductPropertiesInstanceLocalSSDSnapshot +from .types import PublicCatalogProductPropertiesInstanceLocalSSDStorage from .types import PublicCatalogProductPropertiesKeyManager from .types import PublicCatalogProductPropertiesKubernetes from .types import PublicCatalogProductPropertiesLoadBalancer @@ -146,6 +148,8 @@ "PublicCatalogProductPropertiesGenerativeApis", "PublicCatalogProductPropertiesHardware", "PublicCatalogProductPropertiesInstance", + "PublicCatalogProductPropertiesInstanceLocalSSDSnapshot", + "PublicCatalogProductPropertiesInstanceLocalSSDStorage", "PublicCatalogProductPropertiesKeyManager", "PublicCatalogProductPropertiesKubernetes", "PublicCatalogProductPropertiesLoadBalancer", diff --git a/scaleway-async/scaleway_async/product_catalog/v2alpha1/marshalling.py b/scaleway-async/scaleway_async/product_catalog/v2alpha1/marshalling.py index af13b1c50..90d93efc9 100644 --- a/scaleway-async/scaleway_async/product_catalog/v2alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/product_catalog/v2alpha1/marshalling.py @@ -60,6 +60,8 @@ PublicCatalogProductPropertiesGenerativeApis, PublicCatalogProductPropertiesHardware, PublicCatalogProductPropertiesInstance, + PublicCatalogProductPropertiesInstanceLocalSSDSnapshot, + PublicCatalogProductPropertiesInstanceLocalSSDStorage, PublicCatalogProductPropertiesKeyManager, PublicCatalogProductPropertiesKubernetes, PublicCatalogProductPropertiesLoadBalancer, @@ -1049,6 +1051,32 @@ def unmarshal_PublicCatalogProductPropertiesInstance( return PublicCatalogProductPropertiesInstance(**args) +def unmarshal_PublicCatalogProductPropertiesInstanceLocalSSDSnapshot( + data: Any, +) -> PublicCatalogProductPropertiesInstanceLocalSSDSnapshot: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'PublicCatalogProductPropertiesInstanceLocalSSDSnapshot' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + return PublicCatalogProductPropertiesInstanceLocalSSDSnapshot(**args) + + +def unmarshal_PublicCatalogProductPropertiesInstanceLocalSSDStorage( + data: Any, +) -> PublicCatalogProductPropertiesInstanceLocalSSDStorage: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'PublicCatalogProductPropertiesInstanceLocalSSDStorage' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + return PublicCatalogProductPropertiesInstanceLocalSSDStorage(**args) + + def unmarshal_PublicCatalogProductPropertiesKeyManager( data: Any, ) -> PublicCatalogProductPropertiesKeyManager: @@ -1720,6 +1748,22 @@ def unmarshal_PublicCatalogProductProperties( else: args["open_search"] = None + field = data.get("instance_local_ssd_snapshot", None) + if field is not None: + args["instance_local_ssd_snapshot"] = ( + unmarshal_PublicCatalogProductPropertiesInstanceLocalSSDSnapshot(field) + ) + else: + args["instance_local_ssd_snapshot"] = None + + field = data.get("instance_local_ssd_storage", None) + if field is not None: + args["instance_local_ssd_storage"] = ( + unmarshal_PublicCatalogProductPropertiesInstanceLocalSSDStorage(field) + ) + else: + args["instance_local_ssd_storage"] = None + return PublicCatalogProductProperties(**args) diff --git a/scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py b/scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py index 981e6c602..ec837f58c 100644 --- a/scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py +++ b/scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py @@ -39,6 +39,8 @@ class ListPublicCatalogProductsRequestProductType(str, Enum, metaclass=StrEnumMe SERVERLESS_JOBS = "serverless_jobs" APACHE_KAFKA = "apache_kafka" OPEN_SEARCH = "open_search" + INSTANCE_LOCAL_SSD_SNAPSHOT = "instance_local_ssd_snapshot" + INSTANCE_LOCAL_SSD_STORAGE = "instance_local_ssd_storage" def __str__(self) -> str: return str(self.value) @@ -704,6 +706,16 @@ class PublicCatalogProductPropertiesInstance: """ +@dataclass +class PublicCatalogProductPropertiesInstanceLocalSSDSnapshot: + pass + + +@dataclass +class PublicCatalogProductPropertiesInstanceLocalSSDStorage: + pass + + @dataclass class PublicCatalogProductPropertiesKeyManager: pass @@ -925,6 +937,14 @@ class PublicCatalogProductProperties: open_search: Optional[PublicCatalogProductPropertiesOpenSearch] = None + instance_local_ssd_snapshot: Optional[ + PublicCatalogProductPropertiesInstanceLocalSSDSnapshot + ] = None + + instance_local_ssd_storage: Optional[ + PublicCatalogProductPropertiesInstanceLocalSSDStorage + ] = None + @dataclass class PublicCatalogProductUnitOfMeasure: diff --git a/scaleway-async/scaleway_async/search/v1alpha1/__init__.py b/scaleway-async/scaleway_async/search/v1alpha1/__init__.py index 8f075978d..9c5f058f8 100644 --- a/scaleway-async/scaleway_async/search/v1alpha1/__init__.py +++ b/scaleway-async/scaleway_async/search/v1alpha1/__init__.py @@ -4,6 +4,7 @@ from .types import ObsDatasourceInfoDataType from .types import ObsExporterInfoDestinationType from .types import ResourceType +from .types import SearchResourcesRequestOrderBy from .types import BrmServerInfo from .types import ObsDatasourceInfo from .types import ObsExporterInfo @@ -21,6 +22,7 @@ "ObsDatasourceInfoDataType", "ObsExporterInfoDestinationType", "ResourceType", + "SearchResourcesRequestOrderBy", "BrmServerInfo", "ObsDatasourceInfo", "ObsExporterInfo", diff --git a/scaleway-async/scaleway_async/search/v1alpha1/api.py b/scaleway-async/scaleway_async/search/v1alpha1/api.py index 4a8d6d4e1..d4eab0f65 100644 --- a/scaleway-async/scaleway_async/search/v1alpha1/api.py +++ b/scaleway-async/scaleway_async/search/v1alpha1/api.py @@ -8,6 +8,7 @@ from .types import ( Locality, ResourceType, + SearchResourcesRequestOrderBy, SearchResourcesResponse, ) from .marshalling import ( @@ -30,6 +31,9 @@ async def search_resources( created_before: Optional[datetime] = None, modified_after: Optional[datetime] = None, modified_before: Optional[datetime] = None, + page_token: Optional[str] = None, + page_size: Optional[int] = None, + order_by: Optional[SearchResourcesRequestOrderBy] = None, ) -> SearchResourcesResponse: """ Search API. @@ -42,6 +46,9 @@ async def search_resources( :param created_before: Filter resources created before this timestamp. :param modified_after: Filter resources modified after this timestamp. :param modified_before: Filter resources modified before this timestamp. + :param page_token: Leave empty or omit to fetch the first page. + :param page_size: Number of resources to retrieve per page. + :param order_by: Sort order in the response. :return: :class:`SearchResourcesResponse ` Usage: @@ -61,8 +68,11 @@ async def search_resources( "localities": localities, "modified_after": modified_after, "modified_before": modified_before, + "order_by": order_by, "organization_id": organization_id or self.client.default_organization_id, + "page_size": page_size or self.client.default_page_size, + "page_token": page_token, "project_ids": project_ids, "query": query, "types": types, diff --git a/scaleway-async/scaleway_async/search/v1alpha1/marshalling.py b/scaleway-async/scaleway_async/search/v1alpha1/marshalling.py index 1c65ea2fb..7ed08f3ac 100644 --- a/scaleway-async/scaleway_async/search/v1alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/search/v1alpha1/marshalling.py @@ -263,4 +263,10 @@ def unmarshal_SearchResourcesResponse(data: Any) -> SearchResourcesResponse: else: args["resources"] = [] + field = data.get("next_page_token", None) + if field is not None: + args["next_page_token"] = field + else: + args["next_page_token"] = None + return SearchResourcesResponse(**args) diff --git a/scaleway-async/scaleway_async/search/v1alpha1/types.py b/scaleway-async/scaleway_async/search/v1alpha1/types.py index c0eb0155e..e5454771e 100644 --- a/scaleway-async/scaleway_async/search/v1alpha1/types.py +++ b/scaleway-async/scaleway_async/search/v1alpha1/types.py @@ -128,6 +128,20 @@ def __str__(self) -> str: return str(self.value) +class SearchResourcesRequestOrderBy(str, Enum, metaclass=StrEnumMeta): + CREATED_AT_ASC = "created_at_asc" + CREATED_AT_DESC = "created_at_desc" + MODIFIED_AT_ASC = "modified_at_asc" + MODIFIED_AT_DESC = "modified_at_desc" + NAME_ASC = "name_asc" + NAME_DESC = "name_desc" + TYPE_ASC = "type_asc" + TYPE_DESC = "type_desc" + + def __str__(self) -> str: + return str(self.value) + + @dataclass class BrmServerInfo: ip: str @@ -269,6 +283,23 @@ class SearchResourcesRequest: Filter resources modified before this timestamp. """ + page_token: Optional[str] = None + """ + Leave empty or omit to fetch the first page. + """ + + page_size: Optional[int] = 0 + """ + Number of resources to retrieve per page. + """ + + order_by: Optional[SearchResourcesRequestOrderBy] = ( + SearchResourcesRequestOrderBy.CREATED_AT_ASC + ) + """ + Sort order in the response. + """ + @dataclass class SearchResourcesResponse: @@ -276,3 +307,8 @@ class SearchResourcesResponse: """ Top resources found. """ + + next_page_token: str + """ + If this string is empty, it means there are no more pages available. + """ diff --git a/scaleway-async/scaleway_async/webhosting/v1/api.py b/scaleway-async/scaleway_async/webhosting/v1/api.py index dd0f1f70a..13b642570 100644 --- a/scaleway-async/scaleway_async/webhosting/v1/api.py +++ b/scaleway-async/scaleway_async/webhosting/v1/api.py @@ -1772,6 +1772,7 @@ async def update_hosting( offer_options: Optional[list[OfferOptionRequest]] = None, offer_id: Optional[str] = None, protected: Optional[bool] = None, + delete_hosting_after_commitment: Optional[bool] = None, ) -> Hosting: """ Update a Web Hosting plan. @@ -1783,6 +1784,7 @@ async def update_hosting( :param offer_options: List of the Web Hosting plan options IDs with their quantities. :param offer_id: ID of the new offer for the Web Hosting plan. :param protected: Whether the hosting is protected or not. + :param delete_hosting_after_commitment: Whether the hosting is deleted at the end of the commitment period. :return: :class:`Hosting ` Usage: @@ -1810,6 +1812,7 @@ async def update_hosting( offer_options=offer_options, offer_id=offer_id, protected=protected, + delete_hosting_after_commitment=delete_hosting_after_commitment, ), self.client, ), diff --git a/scaleway-async/scaleway_async/webhosting/v1/marshalling.py b/scaleway-async/scaleway_async/webhosting/v1/marshalling.py index 11716a02c..dfda75907 100644 --- a/scaleway-async/scaleway_async/webhosting/v1/marshalling.py +++ b/scaleway-async/scaleway_async/webhosting/v1/marshalling.py @@ -2273,6 +2273,11 @@ def marshal_HostingApiUpdateHostingRequest( if request.protected is not None: output["protected"] = request.protected + if request.delete_hosting_after_commitment is not None: + output["delete_hosting_after_commitment"] = ( + request.delete_hosting_after_commitment + ) + return output diff --git a/scaleway-async/scaleway_async/webhosting/v1/types.py b/scaleway-async/scaleway_async/webhosting/v1/types.py index 49f5901cb..7afb73c3e 100644 --- a/scaleway-async/scaleway_async/webhosting/v1/types.py +++ b/scaleway-async/scaleway_async/webhosting/v1/types.py @@ -2214,6 +2214,11 @@ class HostingApiUpdateHostingRequest: Whether the hosting is protected or not. """ + delete_hosting_after_commitment: Optional[bool] = False + """ + Whether the hosting is deleted at the end of the commitment period. + """ + @dataclass class ListBackupItemsResponse: diff --git a/scaleway/scaleway/datawarehouse/v1beta1/marshalling.py b/scaleway/scaleway/datawarehouse/v1beta1/marshalling.py index ef704f715..ac1f970dc 100644 --- a/scaleway/scaleway/datawarehouse/v1beta1/marshalling.py +++ b/scaleway/scaleway/datawarehouse/v1beta1/marshalling.py @@ -161,6 +161,12 @@ def unmarshal_Endpoint(data: Any) -> Endpoint: else: args["services"] = [] + field = data.get("region", None) + if field is not None: + args["region"] = field + else: + args["region"] = None + field = data.get("private_network", None) if field is not None: args["private_network"] = unmarshal_PrivateNetworkDetails(field) @@ -196,6 +202,18 @@ def unmarshal_Database(data: Any) -> Database: else: args["size"] = 0 + field = data.get("deployment_id", None) + if field is not None: + args["deployment_id"] = field + else: + args["deployment_id"] = None + + field = data.get("region", None) + if field is not None: + args["region"] = field + else: + args["region"] = None + return Database(**args) @@ -334,6 +352,18 @@ def unmarshal_User(data: Any) -> User: else: args["is_admin"] = False + field = data.get("deployment_id", None) + if field is not None: + args["deployment_id"] = field + else: + args["deployment_id"] = None + + field = data.get("region", None) + if field is not None: + args["region"] = field + else: + args["region"] = None + return User(**args) diff --git a/scaleway/scaleway/datawarehouse/v1beta1/types.py b/scaleway/scaleway/datawarehouse/v1beta1/types.py index 20cb571ef..c7115e293 100644 --- a/scaleway/scaleway/datawarehouse/v1beta1/types.py +++ b/scaleway/scaleway/datawarehouse/v1beta1/types.py @@ -141,6 +141,11 @@ class Endpoint: List of services associated with the endpoint. """ + region: ScwRegion + """ + Region of the deployment. + """ + private_network: Optional[PrivateNetworkDetails] = None public: Optional[EndpointPublicDetails] = None @@ -165,6 +170,16 @@ class Database: Size of the database. """ + deployment_id: str + """ + Identifier of the deployment. + """ + + region: ScwRegion + """ + Region of the deployment. + """ + @dataclass class Deployment: @@ -304,6 +319,16 @@ class User: Indicates if the user is an administrator. """ + deployment_id: str + """ + Identifier of the deployment. + """ + + region: ScwRegion + """ + Region of the deployment. + """ + @dataclass class Version: diff --git a/scaleway/scaleway/lb/v1/api.py b/scaleway/scaleway/lb/v1/api.py index acc4b25b8..276901659 100644 --- a/scaleway/scaleway/lb/v1/api.py +++ b/scaleway/scaleway/lb/v1/api.py @@ -218,6 +218,7 @@ def list_lbs( organization_id: Optional[str] = None, project_id: Optional[str] = None, tags: Optional[list[str]] = None, + lb_ids: Optional[list[str]] = None, ) -> ListLbsResponse: """ List Load Balancers. @@ -230,6 +231,7 @@ def list_lbs( :param organization_id: Organization ID to filter for, only Load Balancers from this Organization will be returned. :param project_id: Project ID to filter for, only Load Balancers from this Project will be returned. :param tags: Filter by tag, only Load Balancers with one or more matching tags will be returned. + :param lb_ids: Filter by lb_ids, only Load Balancers with these IDs will be returned. :return: :class:`ListLbsResponse ` Usage: @@ -244,6 +246,7 @@ def list_lbs( "GET", f"/lb/v1/zones/{param_zone}/lbs", params={ + "lb_ids": lb_ids, "name": name, "order_by": order_by, "organization_id": organization_id @@ -269,6 +272,7 @@ def list_lbs_all( organization_id: Optional[str] = None, project_id: Optional[str] = None, tags: Optional[list[str]] = None, + lb_ids: Optional[list[str]] = None, ) -> list[Lb]: """ List Load Balancers. @@ -281,6 +285,7 @@ def list_lbs_all( :param organization_id: Organization ID to filter for, only Load Balancers from this Organization will be returned. :param project_id: Project ID to filter for, only Load Balancers from this Project will be returned. :param tags: Filter by tag, only Load Balancers with one or more matching tags will be returned. + :param lb_ids: Filter by lb_ids, only Load Balancers with these IDs will be returned. :return: :class:`list[Lb] ` Usage: @@ -302,6 +307,7 @@ def list_lbs_all( "organization_id": organization_id, "project_id": project_id, "tags": tags, + "lb_ids": lb_ids, }, ) @@ -3254,6 +3260,7 @@ def list_lbs( organization_id: Optional[str] = None, project_id: Optional[str] = None, tags: Optional[list[str]] = None, + lb_ids: Optional[list[str]] = None, ) -> ListLbsResponse: """ List load balancers. @@ -3265,6 +3272,7 @@ def list_lbs( :param organization_id: Organization ID to filter for, only Load Balancers from this Organization will be returned. :param project_id: Project ID to filter for, only Load Balancers from this Project will be returned. :param tags: Filter by tag, only Load Balancers with one or more matching tags will be returned. + :param lb_ids: Filter by lb_ids, only Load Balancers with these IDs will be returned. :return: :class:`ListLbsResponse ` Usage: @@ -3281,6 +3289,7 @@ def list_lbs( "GET", f"/lb/v1/regions/{param_region}/lbs", params={ + "lb_ids": lb_ids, "name": name, "order_by": order_by, "organization_id": organization_id @@ -3306,6 +3315,7 @@ def list_lbs_all( organization_id: Optional[str] = None, project_id: Optional[str] = None, tags: Optional[list[str]] = None, + lb_ids: Optional[list[str]] = None, ) -> list[Lb]: """ List load balancers. @@ -3317,6 +3327,7 @@ def list_lbs_all( :param organization_id: Organization ID to filter for, only Load Balancers from this Organization will be returned. :param project_id: Project ID to filter for, only Load Balancers from this Project will be returned. :param tags: Filter by tag, only Load Balancers with one or more matching tags will be returned. + :param lb_ids: Filter by lb_ids, only Load Balancers with these IDs will be returned. :return: :class:`list[Lb] ` Usage: @@ -3338,6 +3349,7 @@ def list_lbs_all( "organization_id": organization_id, "project_id": project_id, "tags": tags, + "lb_ids": lb_ids, }, ) diff --git a/scaleway/scaleway/lb/v1/types.py b/scaleway/scaleway/lb/v1/types.py index f99f3741a..1857c9ed1 100644 --- a/scaleway/scaleway/lb/v1/types.py +++ b/scaleway/scaleway/lb/v1/types.py @@ -2317,6 +2317,11 @@ class ListLbsRequest: Filter by tag, only Load Balancers with one or more matching tags will be returned. """ + lb_ids: Optional[list[str]] = field(default_factory=list) + """ + Filter by lb_ids, only Load Balancers with these IDs will be returned. + """ + @dataclass class ListLbsResponse: @@ -3899,6 +3904,11 @@ class ZonedApiListLbsRequest: Filter by tag, only Load Balancers with one or more matching tags will be returned. """ + lb_ids: Optional[list[str]] = field(default_factory=list) + """ + Filter by lb_ids, only Load Balancers with these IDs will be returned. + """ + @dataclass class ZonedApiListRoutesRequest: diff --git a/scaleway/scaleway/product_catalog/v2alpha1/__init__.py b/scaleway/scaleway/product_catalog/v2alpha1/__init__.py index d15e54f76..6ba420bb2 100644 --- a/scaleway/scaleway/product_catalog/v2alpha1/__init__.py +++ b/scaleway/scaleway/product_catalog/v2alpha1/__init__.py @@ -65,6 +65,8 @@ from .types import PublicCatalogProductPropertiesGenerativeApis from .types import PublicCatalogProductPropertiesHardware from .types import PublicCatalogProductPropertiesInstance +from .types import PublicCatalogProductPropertiesInstanceLocalSSDSnapshot +from .types import PublicCatalogProductPropertiesInstanceLocalSSDStorage from .types import PublicCatalogProductPropertiesKeyManager from .types import PublicCatalogProductPropertiesKubernetes from .types import PublicCatalogProductPropertiesLoadBalancer @@ -146,6 +148,8 @@ "PublicCatalogProductPropertiesGenerativeApis", "PublicCatalogProductPropertiesHardware", "PublicCatalogProductPropertiesInstance", + "PublicCatalogProductPropertiesInstanceLocalSSDSnapshot", + "PublicCatalogProductPropertiesInstanceLocalSSDStorage", "PublicCatalogProductPropertiesKeyManager", "PublicCatalogProductPropertiesKubernetes", "PublicCatalogProductPropertiesLoadBalancer", diff --git a/scaleway/scaleway/product_catalog/v2alpha1/marshalling.py b/scaleway/scaleway/product_catalog/v2alpha1/marshalling.py index af13b1c50..90d93efc9 100644 --- a/scaleway/scaleway/product_catalog/v2alpha1/marshalling.py +++ b/scaleway/scaleway/product_catalog/v2alpha1/marshalling.py @@ -60,6 +60,8 @@ PublicCatalogProductPropertiesGenerativeApis, PublicCatalogProductPropertiesHardware, PublicCatalogProductPropertiesInstance, + PublicCatalogProductPropertiesInstanceLocalSSDSnapshot, + PublicCatalogProductPropertiesInstanceLocalSSDStorage, PublicCatalogProductPropertiesKeyManager, PublicCatalogProductPropertiesKubernetes, PublicCatalogProductPropertiesLoadBalancer, @@ -1049,6 +1051,32 @@ def unmarshal_PublicCatalogProductPropertiesInstance( return PublicCatalogProductPropertiesInstance(**args) +def unmarshal_PublicCatalogProductPropertiesInstanceLocalSSDSnapshot( + data: Any, +) -> PublicCatalogProductPropertiesInstanceLocalSSDSnapshot: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'PublicCatalogProductPropertiesInstanceLocalSSDSnapshot' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + return PublicCatalogProductPropertiesInstanceLocalSSDSnapshot(**args) + + +def unmarshal_PublicCatalogProductPropertiesInstanceLocalSSDStorage( + data: Any, +) -> PublicCatalogProductPropertiesInstanceLocalSSDStorage: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'PublicCatalogProductPropertiesInstanceLocalSSDStorage' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + return PublicCatalogProductPropertiesInstanceLocalSSDStorage(**args) + + def unmarshal_PublicCatalogProductPropertiesKeyManager( data: Any, ) -> PublicCatalogProductPropertiesKeyManager: @@ -1720,6 +1748,22 @@ def unmarshal_PublicCatalogProductProperties( else: args["open_search"] = None + field = data.get("instance_local_ssd_snapshot", None) + if field is not None: + args["instance_local_ssd_snapshot"] = ( + unmarshal_PublicCatalogProductPropertiesInstanceLocalSSDSnapshot(field) + ) + else: + args["instance_local_ssd_snapshot"] = None + + field = data.get("instance_local_ssd_storage", None) + if field is not None: + args["instance_local_ssd_storage"] = ( + unmarshal_PublicCatalogProductPropertiesInstanceLocalSSDStorage(field) + ) + else: + args["instance_local_ssd_storage"] = None + return PublicCatalogProductProperties(**args) diff --git a/scaleway/scaleway/product_catalog/v2alpha1/types.py b/scaleway/scaleway/product_catalog/v2alpha1/types.py index 981e6c602..ec837f58c 100644 --- a/scaleway/scaleway/product_catalog/v2alpha1/types.py +++ b/scaleway/scaleway/product_catalog/v2alpha1/types.py @@ -39,6 +39,8 @@ class ListPublicCatalogProductsRequestProductType(str, Enum, metaclass=StrEnumMe SERVERLESS_JOBS = "serverless_jobs" APACHE_KAFKA = "apache_kafka" OPEN_SEARCH = "open_search" + INSTANCE_LOCAL_SSD_SNAPSHOT = "instance_local_ssd_snapshot" + INSTANCE_LOCAL_SSD_STORAGE = "instance_local_ssd_storage" def __str__(self) -> str: return str(self.value) @@ -704,6 +706,16 @@ class PublicCatalogProductPropertiesInstance: """ +@dataclass +class PublicCatalogProductPropertiesInstanceLocalSSDSnapshot: + pass + + +@dataclass +class PublicCatalogProductPropertiesInstanceLocalSSDStorage: + pass + + @dataclass class PublicCatalogProductPropertiesKeyManager: pass @@ -925,6 +937,14 @@ class PublicCatalogProductProperties: open_search: Optional[PublicCatalogProductPropertiesOpenSearch] = None + instance_local_ssd_snapshot: Optional[ + PublicCatalogProductPropertiesInstanceLocalSSDSnapshot + ] = None + + instance_local_ssd_storage: Optional[ + PublicCatalogProductPropertiesInstanceLocalSSDStorage + ] = None + @dataclass class PublicCatalogProductUnitOfMeasure: diff --git a/scaleway/scaleway/search/v1alpha1/__init__.py b/scaleway/scaleway/search/v1alpha1/__init__.py index 8f075978d..9c5f058f8 100644 --- a/scaleway/scaleway/search/v1alpha1/__init__.py +++ b/scaleway/scaleway/search/v1alpha1/__init__.py @@ -4,6 +4,7 @@ from .types import ObsDatasourceInfoDataType from .types import ObsExporterInfoDestinationType from .types import ResourceType +from .types import SearchResourcesRequestOrderBy from .types import BrmServerInfo from .types import ObsDatasourceInfo from .types import ObsExporterInfo @@ -21,6 +22,7 @@ "ObsDatasourceInfoDataType", "ObsExporterInfoDestinationType", "ResourceType", + "SearchResourcesRequestOrderBy", "BrmServerInfo", "ObsDatasourceInfo", "ObsExporterInfo", diff --git a/scaleway/scaleway/search/v1alpha1/api.py b/scaleway/scaleway/search/v1alpha1/api.py index 24c9cdb7b..c4cdd14c7 100644 --- a/scaleway/scaleway/search/v1alpha1/api.py +++ b/scaleway/scaleway/search/v1alpha1/api.py @@ -8,6 +8,7 @@ from .types import ( Locality, ResourceType, + SearchResourcesRequestOrderBy, SearchResourcesResponse, ) from .marshalling import ( @@ -30,6 +31,9 @@ def search_resources( created_before: Optional[datetime] = None, modified_after: Optional[datetime] = None, modified_before: Optional[datetime] = None, + page_token: Optional[str] = None, + page_size: Optional[int] = None, + order_by: Optional[SearchResourcesRequestOrderBy] = None, ) -> SearchResourcesResponse: """ Search API. @@ -42,6 +46,9 @@ def search_resources( :param created_before: Filter resources created before this timestamp. :param modified_after: Filter resources modified after this timestamp. :param modified_before: Filter resources modified before this timestamp. + :param page_token: Leave empty or omit to fetch the first page. + :param page_size: Number of resources to retrieve per page. + :param order_by: Sort order in the response. :return: :class:`SearchResourcesResponse ` Usage: @@ -61,8 +68,11 @@ def search_resources( "localities": localities, "modified_after": modified_after, "modified_before": modified_before, + "order_by": order_by, "organization_id": organization_id or self.client.default_organization_id, + "page_size": page_size or self.client.default_page_size, + "page_token": page_token, "project_ids": project_ids, "query": query, "types": types, diff --git a/scaleway/scaleway/search/v1alpha1/marshalling.py b/scaleway/scaleway/search/v1alpha1/marshalling.py index 1c65ea2fb..7ed08f3ac 100644 --- a/scaleway/scaleway/search/v1alpha1/marshalling.py +++ b/scaleway/scaleway/search/v1alpha1/marshalling.py @@ -263,4 +263,10 @@ def unmarshal_SearchResourcesResponse(data: Any) -> SearchResourcesResponse: else: args["resources"] = [] + field = data.get("next_page_token", None) + if field is not None: + args["next_page_token"] = field + else: + args["next_page_token"] = None + return SearchResourcesResponse(**args) diff --git a/scaleway/scaleway/search/v1alpha1/types.py b/scaleway/scaleway/search/v1alpha1/types.py index c0eb0155e..e5454771e 100644 --- a/scaleway/scaleway/search/v1alpha1/types.py +++ b/scaleway/scaleway/search/v1alpha1/types.py @@ -128,6 +128,20 @@ def __str__(self) -> str: return str(self.value) +class SearchResourcesRequestOrderBy(str, Enum, metaclass=StrEnumMeta): + CREATED_AT_ASC = "created_at_asc" + CREATED_AT_DESC = "created_at_desc" + MODIFIED_AT_ASC = "modified_at_asc" + MODIFIED_AT_DESC = "modified_at_desc" + NAME_ASC = "name_asc" + NAME_DESC = "name_desc" + TYPE_ASC = "type_asc" + TYPE_DESC = "type_desc" + + def __str__(self) -> str: + return str(self.value) + + @dataclass class BrmServerInfo: ip: str @@ -269,6 +283,23 @@ class SearchResourcesRequest: Filter resources modified before this timestamp. """ + page_token: Optional[str] = None + """ + Leave empty or omit to fetch the first page. + """ + + page_size: Optional[int] = 0 + """ + Number of resources to retrieve per page. + """ + + order_by: Optional[SearchResourcesRequestOrderBy] = ( + SearchResourcesRequestOrderBy.CREATED_AT_ASC + ) + """ + Sort order in the response. + """ + @dataclass class SearchResourcesResponse: @@ -276,3 +307,8 @@ class SearchResourcesResponse: """ Top resources found. """ + + next_page_token: str + """ + If this string is empty, it means there are no more pages available. + """ diff --git a/scaleway/scaleway/webhosting/v1/api.py b/scaleway/scaleway/webhosting/v1/api.py index dd9cece7b..2e5b94391 100644 --- a/scaleway/scaleway/webhosting/v1/api.py +++ b/scaleway/scaleway/webhosting/v1/api.py @@ -1772,6 +1772,7 @@ def update_hosting( offer_options: Optional[list[OfferOptionRequest]] = None, offer_id: Optional[str] = None, protected: Optional[bool] = None, + delete_hosting_after_commitment: Optional[bool] = None, ) -> Hosting: """ Update a Web Hosting plan. @@ -1783,6 +1784,7 @@ def update_hosting( :param offer_options: List of the Web Hosting plan options IDs with their quantities. :param offer_id: ID of the new offer for the Web Hosting plan. :param protected: Whether the hosting is protected or not. + :param delete_hosting_after_commitment: Whether the hosting is deleted at the end of the commitment period. :return: :class:`Hosting ` Usage: @@ -1810,6 +1812,7 @@ def update_hosting( offer_options=offer_options, offer_id=offer_id, protected=protected, + delete_hosting_after_commitment=delete_hosting_after_commitment, ), self.client, ), diff --git a/scaleway/scaleway/webhosting/v1/marshalling.py b/scaleway/scaleway/webhosting/v1/marshalling.py index 11716a02c..dfda75907 100644 --- a/scaleway/scaleway/webhosting/v1/marshalling.py +++ b/scaleway/scaleway/webhosting/v1/marshalling.py @@ -2273,6 +2273,11 @@ def marshal_HostingApiUpdateHostingRequest( if request.protected is not None: output["protected"] = request.protected + if request.delete_hosting_after_commitment is not None: + output["delete_hosting_after_commitment"] = ( + request.delete_hosting_after_commitment + ) + return output diff --git a/scaleway/scaleway/webhosting/v1/types.py b/scaleway/scaleway/webhosting/v1/types.py index 49f5901cb..7afb73c3e 100644 --- a/scaleway/scaleway/webhosting/v1/types.py +++ b/scaleway/scaleway/webhosting/v1/types.py @@ -2214,6 +2214,11 @@ class HostingApiUpdateHostingRequest: Whether the hosting is protected or not. """ + delete_hosting_after_commitment: Optional[bool] = False + """ + Whether the hosting is deleted at the end of the commitment period. + """ + @dataclass class ListBackupItemsResponse: