Skip to content

Commit 8398b4f

Browse files
authored
Merge branch 'main' into v1.6201.0
2 parents a9b3181 + cfd074e commit 8398b4f

File tree

16 files changed

+32
-208
lines changed

16 files changed

+32
-208
lines changed

scaleway-async/scaleway_async/billing/v2beta1/api.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,10 @@ async def list_discounts(
438438
) -> ListDiscountsResponse:
439439
"""
440440
List discounts.
441-
List all discounts for your organization and usable categories, products, offers, references, regions and zones where the discount can be applied.
441+
List all discounts for your Organization and usable categories, products, offers, references, regions and zones where the discount can be applied. As a reseller:
442+
- If you do not specify an `organization_id` you will list the discounts applied to your own Organization and your customers
443+
- If you indicate your `organization_id` you will list only the discounts applied to your Organization
444+
- If you indicate `the organization_id` of one of your customers, you will list the discounts applied to their Organization.
442445
:param order_by: Order discounts in the response by their description.
443446
:param page: Positive integer to choose the page to return.
444447
:param page_size: Positive integer lower or equal to 100 to select the number of items to return.
@@ -476,7 +479,10 @@ async def list_discounts_all(
476479
) -> List[Discount]:
477480
"""
478481
List discounts.
479-
List all discounts for your organization and usable categories, products, offers, references, regions and zones where the discount can be applied.
482+
List all discounts for your Organization and usable categories, products, offers, references, regions and zones where the discount can be applied. As a reseller:
483+
- If you do not specify an `organization_id` you will list the discounts applied to your own Organization and your customers
484+
- If you indicate your `organization_id` you will list only the discounts applied to your Organization
485+
- If you indicate `the organization_id` of one of your customers, you will list the discounts applied to their Organization.
480486
:param order_by: Order discounts in the response by their description.
481487
:param page: Positive integer to choose the page to return.
482488
:param page_size: Positive integer lower or equal to 100 to select the number of items to return.

scaleway-async/scaleway_async/billing/v2beta1/types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ class Discount:
211211

212212
organization_id: str
213213
"""
214-
The organization ID of the discount.
214+
The Organization ID of the discount.
215215
"""
216216

217217
description: str

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ class UserRoleRole(str, Enum, metaclass=StrEnumMeta):
100100
READ = "read"
101101
READ_WRITE = "read_write"
102102
DB_ADMIN = "db_admin"
103+
SYNC = "sync"
103104

104105
def __str__(self) -> str:
105106
return str(self.value)

scaleway-async/scaleway_async/secret/v1beta1/__init__.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@
3939
from .types import ListTagsRequest
4040
from .types import ListTagsResponse
4141
from .types import ProtectSecretRequest
42-
from .types import RestoreSecretRequest
43-
from .types import RestoreSecretVersionRequest
4442
from .types import SSHKey
4543
from .types import UnprotectSecretRequest
4644
from .types import UpdateSecretRequest
@@ -87,8 +85,6 @@
8785
"ListTagsRequest",
8886
"ListTagsResponse",
8987
"ProtectSecretRequest",
90-
"RestoreSecretRequest",
91-
"RestoreSecretVersionRequest",
9288
"SSHKey",
9389
"UnprotectSecretRequest",
9490
"UpdateSecretRequest",

scaleway-async/scaleway_async/secret/v1beta1/api.py

Lines changed: 0 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,77 +1130,3 @@ async def list_secret_types_all(
11301130
"page_size": page_size,
11311131
},
11321132
)
1133-
1134-
async def restore_secret_version(
1135-
self,
1136-
*,
1137-
secret_id: str,
1138-
revision: str,
1139-
region: Optional[ScwRegion] = None,
1140-
) -> SecretVersion:
1141-
"""
1142-
Restore a version.
1143-
Restore a secret's version specified by the `region`, `secret_id` and `revision` parameters.
1144-
:param secret_id:
1145-
:param revision:
1146-
:param region: Region to target. If none is passed will use default region from the config.
1147-
:return: :class:`SecretVersion <SecretVersion>`
1148-
1149-
Usage:
1150-
::
1151-
1152-
result = await api.restore_secret_version(
1153-
secret_id="example",
1154-
revision="example",
1155-
)
1156-
"""
1157-
1158-
param_region = validate_path_param(
1159-
"region", region or self.client.default_region
1160-
)
1161-
param_secret_id = validate_path_param("secret_id", secret_id)
1162-
param_revision = validate_path_param("revision", revision)
1163-
1164-
res = self._request(
1165-
"POST",
1166-
f"/secret-manager/v1beta1/regions/{param_region}/secrets/{param_secret_id}/versions/{param_revision}/restore",
1167-
body={},
1168-
)
1169-
1170-
self._throw_on_error(res)
1171-
return unmarshal_SecretVersion(res.json())
1172-
1173-
async def restore_secret(
1174-
self,
1175-
*,
1176-
secret_id: str,
1177-
region: Optional[ScwRegion] = None,
1178-
) -> Secret:
1179-
"""
1180-
Restore a secret.
1181-
Restore a secret and all its versions scheduled for deletion specified by the `region` and `secret_id` parameters.
1182-
:param secret_id:
1183-
:param region: Region to target. If none is passed will use default region from the config.
1184-
:return: :class:`Secret <Secret>`
1185-
1186-
Usage:
1187-
::
1188-
1189-
result = await api.restore_secret(
1190-
secret_id="example",
1191-
)
1192-
"""
1193-
1194-
param_region = validate_path_param(
1195-
"region", region or self.client.default_region
1196-
)
1197-
param_secret_id = validate_path_param("secret_id", secret_id)
1198-
1199-
res = self._request(
1200-
"POST",
1201-
f"/secret-manager/v1beta1/regions/{param_region}/secrets/{param_secret_id}/restore",
1202-
body={},
1203-
)
1204-
1205-
self._throw_on_error(res)
1206-
return unmarshal_Secret(res.json())

scaleway-async/scaleway_async/secret/v1beta1/types.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -866,28 +866,6 @@ class ProtectSecretRequest:
866866
"""
867867

868868

869-
@dataclass
870-
class RestoreSecretRequest:
871-
secret_id: str
872-
873-
region: Optional[ScwRegion]
874-
"""
875-
Region to target. If none is passed will use default region from the config.
876-
"""
877-
878-
879-
@dataclass
880-
class RestoreSecretVersionRequest:
881-
secret_id: str
882-
883-
revision: str
884-
885-
region: Optional[ScwRegion]
886-
"""
887-
Region to target. If none is passed will use default region from the config.
888-
"""
889-
890-
891869
@dataclass
892870
class SSHKey:
893871
ssh_private_key: str

scaleway-async/scaleway_async/vpcgw/v1/api.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2088,7 +2088,9 @@ async def migrate_to_v2(
20882088
zone: Optional[ScwZone] = None,
20892089
) -> None:
20902090
"""
2091-
:param gateway_id:
2091+
Put a Public Gateway in IPAM mode.
2092+
Put a Public Gateway in IPAM mode, so that it can be used with the Public Gateways API v2. This call is idempotent.
2093+
:param gateway_id: ID of the gateway to put into IPAM mode.
20922094
:param zone: Zone to target. If none is passed will use default zone from the config.
20932095
20942096
Usage:

scaleway-async/scaleway_async/vpcgw/v1/types.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1443,6 +1443,9 @@ class ListPATRulesResponse:
14431443
@dataclass
14441444
class MigrateToV2Request:
14451445
gateway_id: str
1446+
"""
1447+
ID of the gateway to put into IPAM mode.
1448+
"""
14461449

14471450
zone: Optional[ScwZone]
14481451
"""

scaleway/scaleway/billing/v2beta1/api.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,10 @@ def list_discounts(
438438
) -> ListDiscountsResponse:
439439
"""
440440
List discounts.
441-
List all discounts for your organization and usable categories, products, offers, references, regions and zones where the discount can be applied.
441+
List all discounts for your Organization and usable categories, products, offers, references, regions and zones where the discount can be applied. As a reseller:
442+
- If you do not specify an `organization_id` you will list the discounts applied to your own Organization and your customers
443+
- If you indicate your `organization_id` you will list only the discounts applied to your Organization
444+
- If you indicate `the organization_id` of one of your customers, you will list the discounts applied to their Organization.
442445
:param order_by: Order discounts in the response by their description.
443446
:param page: Positive integer to choose the page to return.
444447
:param page_size: Positive integer lower or equal to 100 to select the number of items to return.
@@ -476,7 +479,10 @@ def list_discounts_all(
476479
) -> List[Discount]:
477480
"""
478481
List discounts.
479-
List all discounts for your organization and usable categories, products, offers, references, regions and zones where the discount can be applied.
482+
List all discounts for your Organization and usable categories, products, offers, references, regions and zones where the discount can be applied. As a reseller:
483+
- If you do not specify an `organization_id` you will list the discounts applied to your own Organization and your customers
484+
- If you indicate your `organization_id` you will list only the discounts applied to your Organization
485+
- If you indicate `the organization_id` of one of your customers, you will list the discounts applied to their Organization.
480486
:param order_by: Order discounts in the response by their description.
481487
:param page: Positive integer to choose the page to return.
482488
:param page_size: Positive integer lower or equal to 100 to select the number of items to return.

scaleway/scaleway/billing/v2beta1/types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ class Discount:
211211

212212
organization_id: str
213213
"""
214-
The organization ID of the discount.
214+
The Organization ID of the discount.
215215
"""
216216

217217
description: str

0 commit comments

Comments
 (0)