Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ async def list_public_catalog_products(
zone: Optional[ScwZone] = None,
datacenter: Optional[str] = None,
status: Optional[list[ListPublicCatalogProductsRequestStatus]] = None,
api_ids: Optional[list[str]] = None,
) -> ListPublicCatalogProductsResponse:
"""
List all available products.
Expand All @@ -56,6 +57,7 @@ async def list_public_catalog_products(
:param datacenter: Filter products by datacenter.
One-Of ('locality'): at most one of 'global_', 'region', 'zone', 'datacenter' could be set.
:param status: The lists of filtered product status, if empty only products with status public_beta, general_availability, preview, end_of_new_features, end_of_growth, end_of_deployment, end_of_support, end_of_sale, end_of_life or retired will be returned.
:param api_ids: Filter products by API IDs. Each ID is matched against product-specific identifiers: `dedibox.offer_id` (converted to string), `elastic_metal.offer_id`, `apple_silicon.server_type`, `instance.offer_id`, and `load_balancer.node.offer_id`. Products that do not support API ID filtering are excluded from the results. If empty, no filtering is applied.
:return: :class:`ListPublicCatalogProductsResponse <ListPublicCatalogProductsResponse>`

Usage:
Expand All @@ -68,6 +70,7 @@ async def list_public_catalog_products(
"GET",
"/product-catalog/v2alpha1/public-catalog/products",
params={
"api_ids": api_ids,
"page": page,
"page_size": page_size or self.client.default_page_size,
"product_types": product_types,
Expand Down Expand Up @@ -99,6 +102,7 @@ async def list_public_catalog_products_all(
zone: Optional[ScwZone] = None,
datacenter: Optional[str] = None,
status: Optional[list[ListPublicCatalogProductsRequestStatus]] = None,
api_ids: Optional[list[str]] = None,
) -> list[PublicCatalogProduct]:
"""
List all available products.
Expand All @@ -115,6 +119,7 @@ async def list_public_catalog_products_all(
:param datacenter: Filter products by datacenter.
One-Of ('locality'): at most one of 'global_', 'region', 'zone', 'datacenter' could be set.
:param status: The lists of filtered product status, if empty only products with status public_beta, general_availability, preview, end_of_new_features, end_of_growth, end_of_deployment, end_of_support, end_of_sale, end_of_life or retired will be returned.
:param api_ids: Filter products by API IDs. Each ID is matched against product-specific identifiers: `dedibox.offer_id` (converted to string), `elastic_metal.offer_id`, `apple_silicon.server_type`, `instance.offer_id`, and `load_balancer.node.offer_id`. Products that do not support API ID filtering are excluded from the results. If empty, no filtering is applied.
:return: :class:`list[PublicCatalogProduct] <list[PublicCatalogProduct]>`

Usage:
Expand All @@ -132,6 +137,7 @@ async def list_public_catalog_products_all(
"page_size": page_size,
"product_types": product_types,
"status": status,
"api_ids": api_ids,
"global_": global_,
"region": region,
"zone": zone,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,11 @@ class PublicCatalogApiListPublicCatalogProductsRequest:
The lists of filtered product status, if empty only products with status public_beta, general_availability, preview, end_of_new_features, end_of_growth, end_of_deployment, end_of_support, end_of_sale, end_of_life or retired will be returned.
"""

api_ids: Optional[list[str]] = field(default_factory=list)
"""
Filter products by API IDs. Each ID is matched against product-specific identifiers: `dedibox.offer_id` (converted to string), `elastic_metal.offer_id`, `apple_silicon.server_type`, `instance.offer_id`, and `load_balancer.node.offer_id`. Products that do not support API ID filtering are excluded from the results. If empty, no filtering is applied.
"""

global_: Optional[bool] = False

region: Optional[ScwRegion] = None
Expand Down
6 changes: 6 additions & 0 deletions scaleway/scaleway/product_catalog/v2alpha1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def list_public_catalog_products(
zone: Optional[ScwZone] = None,
datacenter: Optional[str] = None,
status: Optional[list[ListPublicCatalogProductsRequestStatus]] = None,
api_ids: Optional[list[str]] = None,
) -> ListPublicCatalogProductsResponse:
"""
List all available products.
Expand All @@ -56,6 +57,7 @@ def list_public_catalog_products(
:param datacenter: Filter products by datacenter.
One-Of ('locality'): at most one of 'global_', 'region', 'zone', 'datacenter' could be set.
:param status: The lists of filtered product status, if empty only products with status public_beta, general_availability, preview, end_of_new_features, end_of_growth, end_of_deployment, end_of_support, end_of_sale, end_of_life or retired will be returned.
:param api_ids: Filter products by API IDs. Each ID is matched against product-specific identifiers: `dedibox.offer_id` (converted to string), `elastic_metal.offer_id`, `apple_silicon.server_type`, `instance.offer_id`, and `load_balancer.node.offer_id`. Products that do not support API ID filtering are excluded from the results. If empty, no filtering is applied.
:return: :class:`ListPublicCatalogProductsResponse <ListPublicCatalogProductsResponse>`

Usage:
Expand All @@ -68,6 +70,7 @@ def list_public_catalog_products(
"GET",
"/product-catalog/v2alpha1/public-catalog/products",
params={
"api_ids": api_ids,
"page": page,
"page_size": page_size or self.client.default_page_size,
"product_types": product_types,
Expand Down Expand Up @@ -99,6 +102,7 @@ def list_public_catalog_products_all(
zone: Optional[ScwZone] = None,
datacenter: Optional[str] = None,
status: Optional[list[ListPublicCatalogProductsRequestStatus]] = None,
api_ids: Optional[list[str]] = None,
) -> list[PublicCatalogProduct]:
"""
List all available products.
Expand All @@ -115,6 +119,7 @@ def list_public_catalog_products_all(
:param datacenter: Filter products by datacenter.
One-Of ('locality'): at most one of 'global_', 'region', 'zone', 'datacenter' could be set.
:param status: The lists of filtered product status, if empty only products with status public_beta, general_availability, preview, end_of_new_features, end_of_growth, end_of_deployment, end_of_support, end_of_sale, end_of_life or retired will be returned.
:param api_ids: Filter products by API IDs. Each ID is matched against product-specific identifiers: `dedibox.offer_id` (converted to string), `elastic_metal.offer_id`, `apple_silicon.server_type`, `instance.offer_id`, and `load_balancer.node.offer_id`. Products that do not support API ID filtering are excluded from the results. If empty, no filtering is applied.
:return: :class:`list[PublicCatalogProduct] <list[PublicCatalogProduct]>`

Usage:
Expand All @@ -132,6 +137,7 @@ def list_public_catalog_products_all(
"page_size": page_size,
"product_types": product_types,
"status": status,
"api_ids": api_ids,
"global_": global_,
"region": region,
"zone": zone,
Expand Down
5 changes: 5 additions & 0 deletions scaleway/scaleway/product_catalog/v2alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,11 @@ class PublicCatalogApiListPublicCatalogProductsRequest:
The lists of filtered product status, if empty only products with status public_beta, general_availability, preview, end_of_new_features, end_of_growth, end_of_deployment, end_of_support, end_of_sale, end_of_life or retired will be returned.
"""

api_ids: Optional[list[str]] = field(default_factory=list)
"""
Filter products by API IDs. Each ID is matched against product-specific identifiers: `dedibox.offer_id` (converted to string), `elastic_metal.offer_id`, `apple_silicon.server_type`, `instance.offer_id`, and `load_balancer.node.offer_id`. Products that do not support API ID filtering are excluded from the results. If empty, no filtering is applied.
"""

global_: Optional[bool] = False

region: Optional[ScwRegion] = None
Expand Down
Loading