Skip to content

Commit 7958844

Browse files
committed
feat: update generated APIs
1 parent bf7e3c6 commit 7958844

File tree

32 files changed

+1444
-34
lines changed

32 files changed

+1444
-34
lines changed

scaleway-async/scaleway_async/account/v3/types.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class ContractType(str, Enum, metaclass=StrEnumMeta):
2424
CONTAINER = "container"
2525
BAREMETAL = "baremetal"
2626
NETWORK = "network"
27+
CORE = "core"
2728

2829
def __str__(self) -> str:
2930
return str(self.value)

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
from .types import AccountProjectInfo
1919
from .types import AccountUserInfo
2020
from .types import AppleSiliconServerInfo
21+
from .types import AuditTrailExportJobInfo
2122
from .types import BaremetalServerInfo
2223
from .types import BaremetalSettingInfo
2324
from .types import EdgeServicesBackendStageInfo
@@ -92,6 +93,7 @@
9293
"AccountProjectInfo",
9394
"AccountUserInfo",
9495
"AppleSiliconServerInfo",
96+
"AuditTrailExportJobInfo",
9597
"BaremetalServerInfo",
9698
"BaremetalSettingInfo",
9799
"EdgeServicesBackendStageInfo",

scaleway-async/scaleway_async/audit_trail/v1alpha1/marshalling.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
AccountProjectInfo,
2525
AccountUserInfo,
2626
AppleSiliconServerInfo,
27+
AuditTrailExportJobInfo,
2728
BaremetalServerInfo,
2829
BaremetalSettingInfo,
2930
EdgeServicesBackendStageInfo,
@@ -353,6 +354,17 @@ def unmarshal_AppleSiliconServerInfo(data: Any) -> AppleSiliconServerInfo:
353354
return AppleSiliconServerInfo(**args)
354355

355356

357+
def unmarshal_AuditTrailExportJobInfo(data: Any) -> AuditTrailExportJobInfo:
358+
if not isinstance(data, dict):
359+
raise TypeError(
360+
"Unmarshalling the type 'AuditTrailExportJobInfo' failed as data isn't a dictionary."
361+
)
362+
363+
args: dict[str, Any] = {}
364+
365+
return AuditTrailExportJobInfo(**args)
366+
367+
356368
def unmarshal_BaremetalServerInfo(data: Any) -> BaremetalServerInfo:
357369
if not isinstance(data, dict):
358370
raise TypeError(
@@ -1213,6 +1225,12 @@ def unmarshal_Resource(data: Any) -> Resource:
12131225
else:
12141226
args["vpc_private_network_info"] = None
12151227

1228+
field = data.get("audit_trail_export_job_info", None)
1229+
if field is not None:
1230+
args["audit_trail_export_job_info"] = unmarshal_AuditTrailExportJobInfo(field)
1231+
else:
1232+
args["audit_trail_export_job_info"] = None
1233+
12161234
return Resource(**args)
12171235

12181236

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ class ResourceType(str, Enum, metaclass=StrEnumMeta):
180180
VPC_GW_DHCP_ENTRY = "vpc_gw_dhcp_entry"
181181
VPC_GW_PAT_RULE = "vpc_gw_pat_rule"
182182
VPC_GW_IP = "vpc_gw_ip"
183+
AUDIT_TRAIL_EXPORT_JOB = "audit_trail_export_job"
183184

184185
def __str__(self) -> str:
185186
return str(self.value)
@@ -234,6 +235,11 @@ class AppleSiliconServerInfo:
234235
name: str
235236

236237

238+
@dataclass
239+
class AuditTrailExportJobInfo:
240+
pass
241+
242+
237243
@dataclass
238244
class BaremetalServerInfo:
239245
description: str
@@ -482,6 +488,8 @@ class Resource:
482488

483489
vpc_private_network_info: Optional[VpcPrivateNetworkInfo] = None
484490

491+
audit_trail_export_job_info: Optional[AuditTrailExportJobInfo] = None
492+
485493

486494
@dataclass
487495
class EventPrincipal:

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,10 @@ async def update_container(
742742
:param memory_limit: Memory limit of the container in MB.
743743
:param cpu_limit: CPU limit of the container in mvCPU.
744744
:param timeout: Processing time limit for the container.
745-
:param redeploy: Defines whether to redeploy failed containers.
745+
:param redeploy: Deprecated: future versions of this API will systematically redeploy containers when needed. As such,
746+
passing `redeploy: false` will be ignored. Relying on this field is discouraged.
747+
748+
To force the redeployment of a container, even if no configuration has changed, use the `DeployContainer` method instead.
746749
:param privacy: Privacy settings of the container.
747750
:param description: Description of the container.
748751
:param registry_image: Name of the registry image (e.g. "rg.fr-par.scw.cloud/something/image:tag").

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1534,7 +1534,10 @@ class UpdateContainerRequest:
15341534

15351535
redeploy: Optional[bool] = False
15361536
"""
1537-
Defines whether to redeploy failed containers.
1537+
Deprecated: future versions of this API will systematically redeploy containers when needed. As such,
1538+
passing `redeploy: false` will be ignored. Relying on this field is discouraged.
1539+
1540+
To force the redeployment of a container, even if no configuration has changed, use the `DeployContainer` method instead.
15381541
"""
15391542

15401543
privacy: Optional[ContainerPrivacy] = ContainerPrivacy.UNKNOWN_PRIVACY

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
from .types import ListUsersResponse
3939
from .types import ListVersionsRequest
4040
from .types import ListVersionsResponse
41+
from .types import StartDeploymentRequest
42+
from .types import StopDeploymentRequest
4143
from .types import UpdateDeploymentRequest
4244
from .types import UpdateUserRequest
4345
from .api import DatawarehouseV1Beta1API
@@ -81,6 +83,8 @@
8183
"ListUsersResponse",
8284
"ListVersionsRequest",
8385
"ListVersionsResponse",
86+
"StartDeploymentRequest",
87+
"StopDeploymentRequest",
8488
"UpdateDeploymentRequest",
8589
"UpdateUserRequest",
8690
"DatawarehouseV1Beta1API",

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

Lines changed: 73 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,9 @@ async def get_deployment_certificate(
548548
region: Optional[ScwRegion] = None,
549549
) -> ScwFile:
550550
"""
551-
:param deployment_id:
551+
Get deployment TLS certificate.
552+
Retrieve the TLS certificate associated with a deployment.
553+
:param deployment_id: UUID of the deployment.
552554
:param region: Region to target. If none is passed will use default region from the config.
553555
:return: :class:`ScwFile <ScwFile>`
554556
@@ -573,6 +575,76 @@ async def get_deployment_certificate(
573575
self._throw_on_error(res)
574576
return unmarshal_ScwFile(res.json())
575577

578+
async def start_deployment(
579+
self,
580+
*,
581+
deployment_id: str,
582+
region: Optional[ScwRegion] = None,
583+
) -> Deployment:
584+
"""
585+
Start a deployment.
586+
Start a stopped deployment.
587+
:param deployment_id: UUID of the deployment.
588+
:param region: Region to target. If none is passed will use default region from the config.
589+
:return: :class:`Deployment <Deployment>`
590+
591+
Usage:
592+
::
593+
594+
result = await api.start_deployment(
595+
deployment_id="example",
596+
)
597+
"""
598+
599+
param_region = validate_path_param(
600+
"region", region or self.client.default_region
601+
)
602+
param_deployment_id = validate_path_param("deployment_id", deployment_id)
603+
604+
res = self._request(
605+
"POST",
606+
f"/datawarehouse/v1beta1/regions/{param_region}/deployments/{param_deployment_id}/start",
607+
body={},
608+
)
609+
610+
self._throw_on_error(res)
611+
return unmarshal_Deployment(res.json())
612+
613+
async def stop_deployment(
614+
self,
615+
*,
616+
deployment_id: str,
617+
region: Optional[ScwRegion] = None,
618+
) -> Deployment:
619+
"""
620+
Stop a deployment.
621+
Stop a running deployment.
622+
:param deployment_id: UUID of the deployment.
623+
:param region: Region to target. If none is passed will use default region from the config.
624+
:return: :class:`Deployment <Deployment>`
625+
626+
Usage:
627+
::
628+
629+
result = await api.stop_deployment(
630+
deployment_id="example",
631+
)
632+
"""
633+
634+
param_region = validate_path_param(
635+
"region", region or self.client.default_region
636+
)
637+
param_deployment_id = validate_path_param("deployment_id", deployment_id)
638+
639+
res = self._request(
640+
"POST",
641+
f"/datawarehouse/v1beta1/regions/{param_region}/deployments/{param_deployment_id}/stop",
642+
body={},
643+
)
644+
645+
self._throw_on_error(res)
646+
return unmarshal_Deployment(res.json())
647+
576648
async def list_users(
577649
self,
578650
*,

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

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,10 @@ class DeleteUserRequest:
464464
@dataclass
465465
class GetDeploymentCertificateRequest:
466466
deployment_id: str
467+
"""
468+
UUID of the deployment.
469+
"""
470+
467471
region: Optional[ScwRegion] = None
468472
"""
469473
Region to target. If none is passed will use default region from the config.
@@ -663,6 +667,32 @@ class ListVersionsResponse:
663667
"""
664668

665669

670+
@dataclass
671+
class StartDeploymentRequest:
672+
deployment_id: str
673+
"""
674+
UUID of the deployment.
675+
"""
676+
677+
region: Optional[ScwRegion] = None
678+
"""
679+
Region to target. If none is passed will use default region from the config.
680+
"""
681+
682+
683+
@dataclass
684+
class StopDeploymentRequest:
685+
deployment_id: str
686+
"""
687+
UUID of the deployment.
688+
"""
689+
690+
region: Optional[ScwRegion] = None
691+
"""
692+
Region to target. If none is passed will use default region from the config.
693+
"""
694+
695+
666696
@dataclass
667697
class UpdateDeploymentRequest:
668698
deployment_id: str

scaleway-async/scaleway_async/mongodb/v1/__init__.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,38 @@
44
from .content import INSTANCE_TRANSIENT_STATUSES
55
from .types import ListDatabasesRequestOrderBy
66
from .types import ListInstancesRequestOrderBy
7+
from .types import ListMaintenancesRequestOrderBy
78
from .types import ListSnapshotsRequestOrderBy
89
from .types import ListUsersRequestOrderBy
10+
from .types import MaintenanceAppliedBy
11+
from .types import MaintenanceStatus
12+
from .content import MAINTENANCE_TRANSIENT_STATUSES
913
from .types import NodeTypeStock
1014
from .types import SnapshotStatus
1115
from .content import SNAPSHOT_TRANSIENT_STATUSES
1216
from .types import UserRoleRole
1317
from .types import VolumeType
1418
from .types import EndpointPrivateNetworkDetails
1519
from .types import EndpointPublicNetworkDetails
20+
from .types import EngineUpgrade
21+
from .types import ServiceUpdate
1622
from .types import EndpointSpecPrivateNetworkDetails
1723
from .types import EndpointSpecPublicNetworkDetails
1824
from .types import Endpoint
1925
from .types import InstanceSnapshotSchedule
2026
from .types import Volume
27+
from .types import Workflow
2128
from .types import NodeTypeVolumeType
2229
from .types import UserRole
2330
from .types import EndpointSpec
2431
from .types import Database
2532
from .types import Instance
33+
from .types import Maintenance
2634
from .types import NodeType
2735
from .types import Snapshot
2836
from .types import User
2937
from .types import Version
38+
from .types import ApplyMaintenanceRequest
3039
from .types import CreateEndpointRequest
3140
from .types import CreateInstanceRequest
3241
from .types import CreateSnapshotRequest
@@ -37,11 +46,14 @@
3746
from .types import DeleteUserRequest
3847
from .types import GetInstanceCertificateRequest
3948
from .types import GetInstanceRequest
49+
from .types import GetMaintenanceRequest
4050
from .types import GetSnapshotRequest
4151
from .types import ListDatabasesRequest
4252
from .types import ListDatabasesResponse
4353
from .types import ListInstancesRequest
4454
from .types import ListInstancesResponse
55+
from .types import ListMaintenancesRequest
56+
from .types import ListMaintenancesResponse
4557
from .types import ListNodeTypesRequest
4658
from .types import ListNodeTypesResponse
4759
from .types import ListSnapshotsRequest
@@ -63,29 +75,38 @@
6375
"INSTANCE_TRANSIENT_STATUSES",
6476
"ListDatabasesRequestOrderBy",
6577
"ListInstancesRequestOrderBy",
78+
"ListMaintenancesRequestOrderBy",
6679
"ListSnapshotsRequestOrderBy",
6780
"ListUsersRequestOrderBy",
81+
"MaintenanceAppliedBy",
82+
"MaintenanceStatus",
83+
"MAINTENANCE_TRANSIENT_STATUSES",
6884
"NodeTypeStock",
6985
"SnapshotStatus",
7086
"SNAPSHOT_TRANSIENT_STATUSES",
7187
"UserRoleRole",
7288
"VolumeType",
7389
"EndpointPrivateNetworkDetails",
7490
"EndpointPublicNetworkDetails",
91+
"EngineUpgrade",
92+
"ServiceUpdate",
7593
"EndpointSpecPrivateNetworkDetails",
7694
"EndpointSpecPublicNetworkDetails",
7795
"Endpoint",
7896
"InstanceSnapshotSchedule",
7997
"Volume",
98+
"Workflow",
8099
"NodeTypeVolumeType",
81100
"UserRole",
82101
"EndpointSpec",
83102
"Database",
84103
"Instance",
104+
"Maintenance",
85105
"NodeType",
86106
"Snapshot",
87107
"User",
88108
"Version",
109+
"ApplyMaintenanceRequest",
89110
"CreateEndpointRequest",
90111
"CreateInstanceRequest",
91112
"CreateSnapshotRequest",
@@ -96,11 +117,14 @@
96117
"DeleteUserRequest",
97118
"GetInstanceCertificateRequest",
98119
"GetInstanceRequest",
120+
"GetMaintenanceRequest",
99121
"GetSnapshotRequest",
100122
"ListDatabasesRequest",
101123
"ListDatabasesResponse",
102124
"ListInstancesRequest",
103125
"ListInstancesResponse",
126+
"ListMaintenancesRequest",
127+
"ListMaintenancesResponse",
104128
"ListNodeTypesRequest",
105129
"ListNodeTypesResponse",
106130
"ListSnapshotsRequest",

0 commit comments

Comments
 (0)