Skip to content

Commit 20ef32f

Browse files
authored
Merge branch 'main' into v1.6511.0
2 parents 0a5e8b6 + 1fedb2f commit 20ef32f

File tree

16 files changed

+176
-24
lines changed

16 files changed

+176
-24
lines changed

scaleway-async/scaleway_async/file/v1alpha1/api.py

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,13 @@ async def list_file_systems(
127127
) -> ListFileSystemsResponse:
128128
"""
129129
List all filesystems.
130-
Retrieve all filesystems in the specified region. Results are ordered by creation date in ascending order by default.
131-
Use the order_by parameter to modify the sorting behavior.
130+
Retrieve all filesystems in the specified region. By default, the filesystems listed are ordered by creation date in ascending order. This can be modified using the `order_by` field.
132131
:param region: Region to target. If none is passed will use default region from the config.
133132
:param order_by: Criteria to use when ordering the list.
134133
:param project_id: Filter by project ID.
135134
:param page: Page number (starting at 1).
136135
:param page_size: Number of entries per page (default: 20, max: 100).
137-
:param name: Filter the return filesystems by their names.
136+
:param name: Filter the returned filesystems by their names.
138137
:param tags: Filter by tags. Only filesystems with one or more matching tags will be returned.
139138
:return: :class:`ListFileSystemsResponse <ListFileSystemsResponse>`
140139
@@ -177,14 +176,13 @@ async def list_file_systems_all(
177176
) -> List[FileSystem]:
178177
"""
179178
List all filesystems.
180-
Retrieve all filesystems in the specified region. Results are ordered by creation date in ascending order by default.
181-
Use the order_by parameter to modify the sorting behavior.
179+
Retrieve all filesystems in the specified region. By default, the filesystems listed are ordered by creation date in ascending order. This can be modified using the `order_by` field.
182180
:param region: Region to target. If none is passed will use default region from the config.
183181
:param order_by: Criteria to use when ordering the list.
184182
:param project_id: Filter by project ID.
185183
:param page: Page number (starting at 1).
186184
:param page_size: Number of entries per page (default: 20, max: 100).
187-
:param name: Filter the return filesystems by their names.
185+
:param name: Filter the returned filesystems by their names.
188186
:param tags: Filter by tags. Only filesystems with one or more matching tags will be returned.
189187
:return: :class:`List[FileSystem] <List[FileSystem]>`
190188
@@ -223,8 +221,7 @@ async def list_attachments(
223221
"""
224222
List filesystems attachments.
225223
List all existing attachments in a specified region.
226-
By default, the attachments listed are ordered by creation date in ascending order.
227-
This can be modified using the `order_by` field.
224+
By default, the attachments listed are ordered by creation date in ascending order. This can be modified using the `order_by` field.
228225
:param region: Region to target. If none is passed will use default region from the config.
229226
:param filesystem_id: UUID of the File Storage volume.
230227
:param resource_id: Filter by resource ID.
@@ -274,8 +271,7 @@ async def list_attachments_all(
274271
"""
275272
List filesystems attachments.
276273
List all existing attachments in a specified region.
277-
By default, the attachments listed are ordered by creation date in ascending order.
278-
This can be modified using the `order_by` field.
274+
By default, the attachments listed are ordered by creation date in ascending order. This can be modified using the `order_by` field.
279275
:param region: Region to target. If none is passed will use default region from the config.
280276
:param filesystem_id: UUID of the File Storage volume.
281277
:param resource_id: Filter by resource ID.
@@ -317,7 +313,7 @@ async def create_file_system(
317313
) -> FileSystem:
318314
"""
319315
Create a new filesystem.
320-
To create a new filesystem, you need to provide a name, a size, and a project ID.
316+
To create a new filesystem, you must specify a name, a size, and a project ID.
321317
:param name: Name of the filesystem.
322318
:param size: Must be compliant with the minimum (100 GB) and maximum (10 TB) allowed size.
323319
:param region: Region to target. If none is passed will use default region from the config.

scaleway-async/scaleway_async/file/v1alpha1/types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ class ListFileSystemsRequest:
297297

298298
name: Optional[str]
299299
"""
300-
Filter the return filesystems by their names.
300+
Filter the returned filesystems by their names.
301301
"""
302302

303303
tags: Optional[List[str]]

scaleway-async/scaleway_async/key_manager/v1alpha1/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from .types import KeyOrigin
88
from .types import KeyState
99
from .types import ListKeysRequestOrderBy
10+
from .types import ListKeysRequestUsage
1011
from .types import KeyRotationPolicy
1112
from .types import KeyUsage
1213
from .types import Key
@@ -45,6 +46,7 @@
4546
"KeyOrigin",
4647
"KeyState",
4748
"ListKeysRequestOrderBy",
49+
"ListKeysRequestUsage",
4850
"KeyRotationPolicy",
4951
"KeyUsage",
5052
"Key",

scaleway-async/scaleway_async/key_manager/v1alpha1/api.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
DataKeyAlgorithmSymmetricEncryption,
1616
KeyOrigin,
1717
ListKeysRequestOrderBy,
18+
ListKeysRequestUsage,
1819
CreateKeyRequest,
1920
DataKey,
2021
DecryptRequest,
@@ -459,6 +460,7 @@ async def list_keys(
459460
page_size: Optional[int] = None,
460461
tags: Optional[List[str]] = None,
461462
name: Optional[str] = None,
463+
usage: Optional[ListKeysRequestUsage] = None,
462464
) -> ListKeysResponse:
463465
"""
464466
List keys.
@@ -471,6 +473,7 @@ async def list_keys(
471473
:param page_size:
472474
:param tags: (Optional) List of tags to filter on.
473475
:param name: (Optional) Filter by key name.
476+
:param usage: Select from symmetric encryption, asymmetric encryption, or asymmetric signing.
474477
:return: :class:`ListKeysResponse <ListKeysResponse>`
475478
476479
Usage:
@@ -495,6 +498,7 @@ async def list_keys(
495498
"page_size": page_size or self.client.default_page_size,
496499
"project_id": project_id or self.client.default_project_id,
497500
"tags": tags,
501+
"usage": usage,
498502
},
499503
)
500504

@@ -512,6 +516,7 @@ async def list_keys_all(
512516
page_size: Optional[int] = None,
513517
tags: Optional[List[str]] = None,
514518
name: Optional[str] = None,
519+
usage: Optional[ListKeysRequestUsage] = None,
515520
) -> List[Key]:
516521
"""
517522
List keys.
@@ -524,6 +529,7 @@ async def list_keys_all(
524529
:param page_size:
525530
:param tags: (Optional) List of tags to filter on.
526531
:param name: (Optional) Filter by key name.
532+
:param usage: Select from symmetric encryption, asymmetric encryption, or asymmetric signing.
527533
:return: :class:`List[Key] <List[Key]>`
528534
529535
Usage:
@@ -545,6 +551,7 @@ async def list_keys_all(
545551
"page_size": page_size,
546552
"tags": tags,
547553
"name": name,
554+
"usage": usage,
548555
},
549556
)
550557

scaleway-async/scaleway_async/key_manager/v1alpha1/types.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,16 @@ def __str__(self) -> str:
8787
return str(self.value)
8888

8989

90+
class ListKeysRequestUsage(str, Enum, metaclass=StrEnumMeta):
91+
UNKNOWN_USAGE = "unknown_usage"
92+
SYMMETRIC_ENCRYPTION = "symmetric_encryption"
93+
ASYMMETRIC_ENCRYPTION = "asymmetric_encryption"
94+
ASYMMETRIC_SIGNING = "asymmetric_signing"
95+
96+
def __str__(self) -> str:
97+
return str(self.value)
98+
99+
90100
@dataclass
91101
class KeyRotationPolicy:
92102
rotation_period: Optional[str]
@@ -503,6 +513,11 @@ class ListKeysRequest:
503513
(Optional) Filter by key name.
504514
"""
505515

516+
usage: Optional[ListKeysRequestUsage]
517+
"""
518+
Select from symmetric encryption, asymmetric encryption, or asymmetric signing.
519+
"""
520+
506521

507522
@dataclass
508523
class ListKeysResponse:

scaleway-async/scaleway_async/product_catalog/v2alpha1/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# This file was automatically generated. DO NOT EDIT.
22
# If you have any remark or suggestion do not hesitate to open an issue.
33
from .types import PublicCatalogProductPropertiesHardwareCPUArch
4+
from .types import PublicCatalogProductStatus
45
from .types import PublicCatalogProductUnitOfMeasureCountableUnit
56
from .types import PublicCatalogProductPropertiesHardwareCPUPhysical
67
from .types import PublicCatalogProductPropertiesHardwareCPUVirtual
@@ -26,6 +27,7 @@
2627

2728
__all__ = [
2829
"PublicCatalogProductPropertiesHardwareCPUArch",
30+
"PublicCatalogProductStatus",
2931
"PublicCatalogProductUnitOfMeasureCountableUnit",
3032
"PublicCatalogProductPropertiesHardwareCPUPhysical",
3133
"PublicCatalogProductPropertiesHardwareCPUVirtual",

scaleway-async/scaleway_async/product_catalog/v2alpha1/marshalling.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# If you have any remark or suggestion do not hesitate to open an issue.
33

44
from typing import Any, Dict
5+
from dateutil import parser
56

67
from scaleway_core.bridge import (
78
unmarshal_Money,
@@ -332,6 +333,14 @@ def unmarshal_PublicCatalogProductPropertiesInstance(
332333
if field is not None:
333334
args["range"] = field
334335

336+
field = data.get("offer_id", None)
337+
if field is not None:
338+
args["offer_id"] = field
339+
340+
field = data.get("recommended_replacement_offer_ids", None)
341+
if field is not None:
342+
args["recommended_replacement_offer_ids"] = field
343+
335344
return PublicCatalogProductPropertiesInstance(**args)
336345

337346

@@ -508,6 +517,10 @@ def unmarshal_PublicCatalogProduct(data: Any) -> PublicCatalogProduct:
508517
if field is not None:
509518
args["description"] = field
510519

520+
field = data.get("status", None)
521+
if field is not None:
522+
args["status"] = field
523+
511524
field = data.get("locality", None)
512525
if field is not None:
513526
args["locality"] = unmarshal_PublicCatalogProductLocality(field)
@@ -540,6 +553,14 @@ def unmarshal_PublicCatalogProduct(data: Any) -> PublicCatalogProduct:
540553
else:
541554
args["unit_of_measure"] = None
542555

556+
field = data.get("end_of_life_at", None)
557+
if field is not None:
558+
args["end_of_life_at"] = (
559+
parser.isoparse(field) if isinstance(field, str) else field
560+
)
561+
else:
562+
args["end_of_life_at"] = None
563+
543564
return PublicCatalogProduct(**args)
544565

545566

scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from __future__ import annotations
44

55
from dataclasses import dataclass
6+
from datetime import datetime
67
from enum import Enum
78
from typing import List, Optional
89

@@ -27,6 +28,18 @@ def __str__(self) -> str:
2728
return str(self.value)
2829

2930

31+
class PublicCatalogProductStatus(str, Enum, metaclass=StrEnumMeta):
32+
UNKNOWN_STATUS = "unknown_status"
33+
PUBLIC_BETA = "public_beta"
34+
PREVIEW = "preview"
35+
GENERAL_AVAILABILITY = "general_availability"
36+
END_OF_DEPLOYMENT = "end_of_deployment"
37+
END_OF_SUPPORT = "end_of_support"
38+
39+
def __str__(self) -> str:
40+
return str(self.value)
41+
42+
3043
class PublicCatalogProductUnitOfMeasureCountableUnit(str, Enum, metaclass=StrEnumMeta):
3144
UNKNOWN_COUNTABLE_UNIT = "unknown_countable_unit"
3245
CHUNK = "chunk"
@@ -253,6 +266,16 @@ class PublicCatalogProductPropertiesInstance:
253266
The range of the Instance server.
254267
"""
255268

269+
offer_id: str
270+
"""
271+
The offer ID of the Instance server.
272+
"""
273+
274+
recommended_replacement_offer_ids: List[str]
275+
"""
276+
The recommended replacement offer IDs of the Instance server.
277+
"""
278+
256279

257280
@dataclass
258281
class PublicCatalogProductEnvironmentalImpactEstimation:
@@ -330,6 +353,11 @@ class PublicCatalogProduct:
330353
The product description.
331354
"""
332355

356+
status: PublicCatalogProductStatus
357+
"""
358+
The status of the product.
359+
"""
360+
333361
locality: Optional[PublicCatalogProductLocality]
334362
"""
335363
The locality of the product.
@@ -357,6 +385,11 @@ class PublicCatalogProduct:
357385
The unit of measure of the product.
358386
"""
359387

388+
end_of_life_at: Optional[datetime]
389+
"""
390+
The end of life date of the product.
391+
"""
392+
360393

361394
@dataclass
362395
class ListPublicCatalogProductsResponse:

scaleway/scaleway/file/v1alpha1/api.py

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,13 @@ def list_file_systems(
125125
) -> ListFileSystemsResponse:
126126
"""
127127
List all filesystems.
128-
Retrieve all filesystems in the specified region. Results are ordered by creation date in ascending order by default.
129-
Use the order_by parameter to modify the sorting behavior.
128+
Retrieve all filesystems in the specified region. By default, the filesystems listed are ordered by creation date in ascending order. This can be modified using the `order_by` field.
130129
:param region: Region to target. If none is passed will use default region from the config.
131130
:param order_by: Criteria to use when ordering the list.
132131
:param project_id: Filter by project ID.
133132
:param page: Page number (starting at 1).
134133
:param page_size: Number of entries per page (default: 20, max: 100).
135-
:param name: Filter the return filesystems by their names.
134+
:param name: Filter the returned filesystems by their names.
136135
:param tags: Filter by tags. Only filesystems with one or more matching tags will be returned.
137136
:return: :class:`ListFileSystemsResponse <ListFileSystemsResponse>`
138137
@@ -175,14 +174,13 @@ def list_file_systems_all(
175174
) -> List[FileSystem]:
176175
"""
177176
List all filesystems.
178-
Retrieve all filesystems in the specified region. Results are ordered by creation date in ascending order by default.
179-
Use the order_by parameter to modify the sorting behavior.
177+
Retrieve all filesystems in the specified region. By default, the filesystems listed are ordered by creation date in ascending order. This can be modified using the `order_by` field.
180178
:param region: Region to target. If none is passed will use default region from the config.
181179
:param order_by: Criteria to use when ordering the list.
182180
:param project_id: Filter by project ID.
183181
:param page: Page number (starting at 1).
184182
:param page_size: Number of entries per page (default: 20, max: 100).
185-
:param name: Filter the return filesystems by their names.
183+
:param name: Filter the returned filesystems by their names.
186184
:param tags: Filter by tags. Only filesystems with one or more matching tags will be returned.
187185
:return: :class:`List[FileSystem] <List[FileSystem]>`
188186
@@ -221,8 +219,7 @@ def list_attachments(
221219
"""
222220
List filesystems attachments.
223221
List all existing attachments in a specified region.
224-
By default, the attachments listed are ordered by creation date in ascending order.
225-
This can be modified using the `order_by` field.
222+
By default, the attachments listed are ordered by creation date in ascending order. This can be modified using the `order_by` field.
226223
:param region: Region to target. If none is passed will use default region from the config.
227224
:param filesystem_id: UUID of the File Storage volume.
228225
:param resource_id: Filter by resource ID.
@@ -272,8 +269,7 @@ def list_attachments_all(
272269
"""
273270
List filesystems attachments.
274271
List all existing attachments in a specified region.
275-
By default, the attachments listed are ordered by creation date in ascending order.
276-
This can be modified using the `order_by` field.
272+
By default, the attachments listed are ordered by creation date in ascending order. This can be modified using the `order_by` field.
277273
:param region: Region to target. If none is passed will use default region from the config.
278274
:param filesystem_id: UUID of the File Storage volume.
279275
:param resource_id: Filter by resource ID.
@@ -315,7 +311,7 @@ def create_file_system(
315311
) -> FileSystem:
316312
"""
317313
Create a new filesystem.
318-
To create a new filesystem, you need to provide a name, a size, and a project ID.
314+
To create a new filesystem, you must specify a name, a size, and a project ID.
319315
:param name: Name of the filesystem.
320316
:param size: Must be compliant with the minimum (100 GB) and maximum (10 TB) allowed size.
321317
:param region: Region to target. If none is passed will use default region from the config.

scaleway/scaleway/file/v1alpha1/types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ class ListFileSystemsRequest:
297297

298298
name: Optional[str]
299299
"""
300-
Filter the return filesystems by their names.
300+
Filter the returned filesystems by their names.
301301
"""
302302

303303
tags: Optional[List[str]]

0 commit comments

Comments
 (0)