From eb2ae535aee13903b3b9ec08a669c43bac68b85a Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Tue, 22 Sep 2026 07:43:41 +0000 Subject: [PATCH] feat(audit_trail): add WOFL workflow version resource type for SAA-462 --- .../applesilicon/v1alpha1/marshalling.py | 39 +++++++++-- .../applesilicon/v1alpha1/types.py | 36 ++++++++++ .../audit_trail/v1alpha1/__init__.py | 2 + .../audit_trail/v1alpha1/marshalling.py | 36 ++++++++++ .../audit_trail/v1alpha1/types.py | 10 +++ .../baremetal/v1/marshalling.py | 6 ++ .../scaleway_async/baremetal/v1/types.py | 5 ++ .../scaleway_async/s2s_vpn/v1alpha1/api.py | 11 +++- .../s2s_vpn/v1alpha1/marshalling.py | 66 ++++++++++++++----- .../scaleway_async/s2s_vpn/v1alpha1/types.py | 35 +++++++++- .../applesilicon/v1alpha1/marshalling.py | 39 +++++++++-- .../scaleway/applesilicon/v1alpha1/types.py | 36 ++++++++++ .../scaleway/audit_trail/v1alpha1/__init__.py | 2 + .../audit_trail/v1alpha1/marshalling.py | 36 ++++++++++ .../scaleway/audit_trail/v1alpha1/types.py | 10 +++ scaleway/scaleway/baremetal/v1/marshalling.py | 6 ++ scaleway/scaleway/baremetal/v1/types.py | 5 ++ scaleway/scaleway/s2s_vpn/v1alpha1/api.py | 11 +++- .../scaleway/s2s_vpn/v1alpha1/marshalling.py | 66 ++++++++++++++----- scaleway/scaleway/s2s_vpn/v1alpha1/types.py | 35 +++++++++- 20 files changed, 440 insertions(+), 52 deletions(-) diff --git a/scaleway-async/scaleway_async/applesilicon/v1alpha1/marshalling.py b/scaleway-async/scaleway_async/applesilicon/v1alpha1/marshalling.py index cb129249e..932eb21d9 100644 --- a/scaleway-async/scaleway_async/applesilicon/v1alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/applesilicon/v1alpha1/marshalling.py @@ -11,6 +11,7 @@ ) from .types import ( ConnectivityDiagnosticActionType, + RunnerStatus, ServerPrivateNetworkServerStatus, ServerPrivateNetworkStatus, ServerStatus, @@ -344,11 +345,11 @@ def unmarshal_Server(data: Any) -> Server: else: args["zone"] = None - field = data.get("delivered", None) + field = data.get("srn", None) if field is not None: - args["delivered"] = field + args["srn"] = field else: - args["delivered"] = False + args["srn"] = None field = data.get("os", None) if field is not None: @@ -376,6 +377,12 @@ def unmarshal_Server(data: Any) -> Server: else: args["deletable_at"] = None + field = data.get("delivered", None) + if field is not None: + args["delivered"] = field + else: + args["delivered"] = False + field = data.get("vpc_status", None) if field is not None: args["vpc_status"] = field @@ -526,7 +533,7 @@ def unmarshal_Runner(data: Any) -> Runner: if field is not None: args["status"] = field else: - args["status"] = None + args["status"] = RunnerStatus.UNKNOWN_STATUS field = data.get("error_message", None) if field is not None: @@ -534,6 +541,18 @@ def unmarshal_Runner(data: Any) -> Runner: else: args["error_message"] = None + field = data.get("zone", None) + if field is not None: + args["zone"] = field + else: + args["zone"] = None + + field = data.get("srn", None) + if field is not None: + args["srn"] = field + else: + args["srn"] = None + field = data.get("configuration", None) if field is not None: args["configuration"] = unmarshal_RunnerConfigurationV2(field) @@ -941,6 +960,18 @@ def unmarshal_ConnectivityDiagnostic(data: Any) -> ConnectivityDiagnostic: else: args["error_message"] = None + field = data.get("zone", None) + if field is not None: + args["zone"] = field + else: + args["zone"] = None + + field = data.get("srn", None) + if field is not None: + args["srn"] = field + else: + args["srn"] = None + field = data.get("health_details", None) if field is not None: args["health_details"] = unmarshal_ConnectivityDiagnosticServerHealth(field) diff --git a/scaleway-async/scaleway_async/applesilicon/v1alpha1/types.py b/scaleway-async/scaleway_async/applesilicon/v1alpha1/types.py index 110bf1a43..c3c9c9db1 100644 --- a/scaleway-async/scaleway_async/applesilicon/v1alpha1/types.py +++ b/scaleway-async/scaleway_async/applesilicon/v1alpha1/types.py @@ -372,6 +372,11 @@ class Server: Zone of the server. """ + srn: str + """ + SRN of the server. + """ + delivered: bool """ Set to true once the server has completed its provisioning steps and is ready to use. Some OS configurations might require a reinstallation of the server before delivery depending on the available stock. A reinstallation after the initial delivery will not change this flag and can be tracked using the server status. @@ -451,9 +456,34 @@ class AppliedRunnerConfigurations: @dataclass class Runner: id: str + """ + UUID of the runner. + """ + status: RunnerStatus + """ + Status of the runner. + """ + error_message: str + """ + Error message of the runner (if any). + """ + + zone: ScwZone + """ + Zone of the runner. + """ + + srn: str + """ + SRN of the runner. + """ + configuration: Optional[RunnerConfigurationV2] = None + """ + Configuration of the runner. + """ @dataclass @@ -627,6 +657,12 @@ class ConnectivityDiagnostic: is_healthy: bool supported_actions: list[ConnectivityDiagnosticActionType] error_message: str + zone: ScwZone + """ + Zone to target. If none is passed will use default zone from the config. + """ + + srn: str health_details: Optional[ConnectivityDiagnosticServerHealth] = None diff --git a/scaleway-async/scaleway_async/audit_trail/v1alpha1/__init__.py b/scaleway-async/scaleway_async/audit_trail/v1alpha1/__init__.py index 7004c2c8b..1efac5159 100644 --- a/scaleway-async/scaleway_async/audit_trail/v1alpha1/__init__.py +++ b/scaleway-async/scaleway_async/audit_trail/v1alpha1/__init__.py @@ -82,6 +82,7 @@ from .types import VpcSubnetInfo from .types import WoflWorkflowDefinitionInfo from .types import WoflWorkflowRunInfo +from .types import WoflWorkflowVersionInfo from .types import Resource from .types import EventPrincipal from .types import AuthenticationEvent @@ -217,6 +218,7 @@ "VpcSubnetInfo", "WoflWorkflowDefinitionInfo", "WoflWorkflowRunInfo", + "WoflWorkflowVersionInfo", "Resource", "EventPrincipal", "AuthenticationEvent", diff --git a/scaleway-async/scaleway_async/audit_trail/v1alpha1/marshalling.py b/scaleway-async/scaleway_async/audit_trail/v1alpha1/marshalling.py index a0f22fb14..4f2fbf9f6 100644 --- a/scaleway-async/scaleway_async/audit_trail/v1alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/audit_trail/v1alpha1/marshalling.py @@ -87,6 +87,7 @@ VpcSubnetInfo, WoflWorkflowDefinitionInfo, WoflWorkflowRunInfo, + WoflWorkflowVersionInfo, EventPrincipal, Resource, Event, @@ -1633,6 +1634,35 @@ def unmarshal_WoflWorkflowRunInfo(data: Any) -> WoflWorkflowRunInfo: return WoflWorkflowRunInfo(**args) +def unmarshal_WoflWorkflowVersionInfo(data: Any) -> WoflWorkflowVersionInfo: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'WoflWorkflowVersionInfo' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + field = data.get("workflow_definition_id", None) + if field is not None: + args["workflow_definition_id"] = field + else: + args["workflow_definition_id"] = None + + field = data.get("name", None) + if field is not None: + args["name"] = field + else: + args["name"] = None + + field = data.get("workflow_definition_name", None) + if field is not None: + args["workflow_definition_name"] = field + else: + args["workflow_definition_name"] = None + + return WoflWorkflowVersionInfo(**args) + + def unmarshal_EventPrincipal(data: Any) -> EventPrincipal: if not isinstance(data, dict): raise TypeError( @@ -2112,6 +2142,12 @@ def unmarshal_Resource(data: Any) -> Resource: else: args["wofl_workflow_run_info"] = None + field = data.get("wofl_workflow_version_info", None) + if field is not None: + args["wofl_workflow_version_info"] = unmarshal_WoflWorkflowVersionInfo(field) + else: + args["wofl_workflow_version_info"] = None + return Resource(**args) diff --git a/scaleway-async/scaleway_async/audit_trail/v1alpha1/types.py b/scaleway-async/scaleway_async/audit_trail/v1alpha1/types.py index 9b73d384f..ef195e7e1 100644 --- a/scaleway-async/scaleway_async/audit_trail/v1alpha1/types.py +++ b/scaleway-async/scaleway_async/audit_trail/v1alpha1/types.py @@ -286,6 +286,7 @@ class ResourceType(str, Enum, metaclass=StrEnumMeta): SERVERLESS_FUNCTIONS_TRIGGER = "serverless_functions_trigger" WOFL_WORKFLOW_DEFINITION = "wofl_workflow_definition" WOFL_WORKFLOW_RUN = "wofl_workflow_run" + WOFL_WORKFLOW_VERSION = "wofl_workflow_version" def __str__(self) -> str: return str(self.value) @@ -671,6 +672,13 @@ class WoflWorkflowRunInfo: workflow_definition_name: Optional[str] = None +@dataclass +class WoflWorkflowVersionInfo: + workflow_definition_id: str + name: str + workflow_definition_name: Optional[str] = None + + @dataclass class Resource: id: str @@ -810,6 +818,8 @@ class Resource: wofl_workflow_run_info: Optional[WoflWorkflowRunInfo] = None + wofl_workflow_version_info: Optional[WoflWorkflowVersionInfo] = None + @dataclass class EventPrincipal: diff --git a/scaleway-async/scaleway_async/baremetal/v1/marshalling.py b/scaleway-async/scaleway_async/baremetal/v1/marshalling.py index a96f97a03..6be05765c 100644 --- a/scaleway-async/scaleway_async/baremetal/v1/marshalling.py +++ b/scaleway-async/scaleway_async/baremetal/v1/marshalling.py @@ -1301,6 +1301,12 @@ def unmarshal_Offer(data: Any) -> Offer: else: args["monthly_offer_id"] = None + field = data.get("dual_attach", None) + if field is not None: + args["dual_attach"] = field + else: + args["dual_attach"] = False + return Offer(**args) diff --git a/scaleway-async/scaleway_async/baremetal/v1/types.py b/scaleway-async/scaleway_async/baremetal/v1/types.py index cd77c890d..b4dad6f45 100644 --- a/scaleway-async/scaleway_async/baremetal/v1/types.py +++ b/scaleway-async/scaleway_async/baremetal/v1/types.py @@ -1017,6 +1017,11 @@ class Offer: Exist only for hourly offers, to migrate to the monthly offer. """ + dual_attach: Optional[bool] = False + """ + Describe the network topology of the offer. + """ + @dataclass class Option: diff --git a/scaleway-async/scaleway_async/s2s_vpn/v1alpha1/api.py b/scaleway-async/scaleway_async/s2s_vpn/v1alpha1/api.py index d00de152b..eb01b4c81 100644 --- a/scaleway-async/scaleway_async/s2s_vpn/v1alpha1/api.py +++ b/scaleway-async/scaleway_async/s2s_vpn/v1alpha1/api.py @@ -704,7 +704,8 @@ async def create_connection( :param enable_route_propagation: Defines whether route propagation is enabled or not. :param vpn_gateway_id: ID of the VPN gateway to attach to the connection. :param customer_gateway_id: ID of the customer gateway to attach to the connection. - :param secret: Specifies the pre-shared key used for the IPsec tunnel. + :param secret: If no secret is given, S2S VPN will create one automatically in Secret Manager, reference its secret_id and version in the connection and use the generated PSK. + Secret version is also optional and maybe used to refer to a previous version. If no version is given, "latest" is used. :param bgp_config_ipv4: BGP config of IPv4 session, including interco private IPv4 subnet (first IP assigned to the VPN Gateway, second IP to the Customer Gateway) and attached routing policy. :param bgp_config_ipv6: BGP config of IPv6 session, including interco private IPv6 subnet (first IP assigned to the VPN Gateway, second IP to the Customer Gateway) and attached routing policy. :return: :class:`CreateConnectionResponse ` @@ -765,6 +766,8 @@ async def update_connection( initiation_policy: Optional[CreateConnectionRequestInitiationPolicy] = None, ikev2_ciphers: Optional[list[ConnectionCipher]] = None, esp_ciphers: Optional[list[ConnectionCipher]] = None, + secret_id: Optional[str] = None, + secret_revision: Optional[int] = None, ) -> Connection: """ Update a connection. @@ -776,6 +779,8 @@ async def update_connection( :param initiation_policy: Who initiates the IPsec tunnel. :param ikev2_ciphers: List of IKE v2 ciphers proposed for the IPsec tunnel. :param esp_ciphers: List of ESP ciphers proposed for the IPsec tunnel. + :param secret_id: Secret ID in the client's project containing the PSK. + :param secret_revision: If not given it will not change. If secret_id is updated, secret_revision should be set accordingly. :return: :class:`Connection ` Usage: @@ -803,6 +808,8 @@ async def update_connection( initiation_policy=initiation_policy, ikev2_ciphers=ikev2_ciphers, esp_ciphers=esp_ciphers, + secret_id=secret_id, + secret_revision=secret_revision, ), self.client, ), @@ -855,7 +862,7 @@ async def renew_connection_psk( Renew pre-shared key for a given connection. :param connection_id: ID of the connection to renew the PSK. :param region: Region to target. If none is passed will use default region from the config. - :param generate_revision: Generate a new revision or update to the latest existing one. + :param generate_revision: Generate a new version or update to the latest existing one. :return: :class:`RenewConnectionPskResponse ` Usage: diff --git a/scaleway-async/scaleway_async/s2s_vpn/v1alpha1/marshalling.py b/scaleway-async/scaleway_async/s2s_vpn/v1alpha1/marshalling.py index 988bd45b9..900274d7b 100644 --- a/scaleway-async/scaleway_async/s2s_vpn/v1alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/s2s_vpn/v1alpha1/marshalling.py @@ -126,6 +126,12 @@ def unmarshal_Connection(data: Any) -> Connection: else: args["id"] = None + field = data.get("srn", None) + if field is not None: + args["srn"] = field + else: + args["srn"] = None + field = data.get("project_id", None) if field is not None: args["project_id"] = field @@ -150,6 +156,18 @@ def unmarshal_Connection(data: Any) -> Connection: else: args["tags"] = [] + field = data.get("created_at", None) + if field is not None: + args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None + + field = data.get("updated_at", None) + if field is not None: + args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None + field = data.get("status", None) if field is not None: args["status"] = field @@ -180,18 +198,6 @@ def unmarshal_Connection(data: Any) -> Connection: else: args["secret_revision"] = 0 - field = data.get("created_at", None) - if field is not None: - args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field - else: - args["created_at"] = None - - field = data.get("updated_at", None) - if field is not None: - args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field - else: - args["updated_at"] = None - field = data.get("ikev2_ciphers", None) if field is not None: args["ikev2_ciphers"] = ( @@ -295,6 +301,12 @@ def unmarshal_CustomerGateway(data: Any) -> CustomerGateway: else: args["id"] = None + field = data.get("srn", None) + if field is not None: + args["srn"] = field + else: + args["srn"] = None + field = data.get("project_id", None) if field is not None: args["project_id"] = field @@ -378,6 +390,12 @@ def unmarshal_RoutingPolicy(data: Any) -> RoutingPolicy: else: args["id"] = None + field = data.get("srn", None) + if field is not None: + args["srn"] = field + else: + args["srn"] = None + field = data.get("project_id", None) if field is not None: args["project_id"] = field @@ -489,6 +507,12 @@ def unmarshal_VpnGateway(data: Any) -> VpnGateway: else: args["id"] = None + field = data.get("srn", None) + if field is not None: + args["srn"] = field + else: + args["srn"] = None + field = data.get("project_id", None) if field is not None: args["project_id"] = field @@ -513,12 +537,6 @@ def unmarshal_VpnGateway(data: Any) -> VpnGateway: else: args["tags"] = [] - field = data.get("status", None) - if field is not None: - args["status"] = field - else: - args["status"] = VpnGatewayStatus.UNKNOWN_STATUS - field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field @@ -531,6 +549,12 @@ def unmarshal_VpnGateway(data: Any) -> VpnGateway: else: args["updated_at"] = None + field = data.get("status", None) + if field is not None: + args["status"] = field + else: + args["status"] = VpnGatewayStatus.UNKNOWN_STATUS + field = data.get("gateway_type", None) if field is not None: args["gateway_type"] = field @@ -1231,6 +1255,12 @@ def marshal_UpdateConnectionRequest( marshal_ConnectionCipher(item, defaults) for item in request.esp_ciphers ] + if request.secret_id is not None: + output["secret_id"] = request.secret_id + + if request.secret_revision is not None: + output["secret_revision"] = request.secret_revision + return output diff --git a/scaleway-async/scaleway_async/s2s_vpn/v1alpha1/types.py b/scaleway-async/scaleway_async/s2s_vpn/v1alpha1/types.py index f507d5a73..bcf8f9f01 100644 --- a/scaleway-async/scaleway_async/s2s_vpn/v1alpha1/types.py +++ b/scaleway-async/scaleway_async/s2s_vpn/v1alpha1/types.py @@ -212,6 +212,11 @@ class Connection: Unique identifier of the connection. """ + srn: str + """ + The SRN of the connection. + """ + project_id: str """ Project ID. @@ -368,6 +373,11 @@ class CustomerGateway: Unique identifier of the customer gateway. """ + srn: str + """ + The SRN of the customer gateway. + """ + project_id: str """ Project ID. @@ -431,6 +441,11 @@ class RoutingPolicy: Unique identifier of the routing policy. """ + srn: str + """ + The SRN of the routing policy. + """ + project_id: str """ Project ID. @@ -501,6 +516,11 @@ class VpnGateway: Unique identifier of the VPN gateway. """ + srn: str + """ + The SRN of the VPN gateway. + """ + project_id: str """ Project ID. @@ -666,7 +686,8 @@ class CreateConnectionRequest: secret: Optional[CreateConnectionRequestSecret] = None """ - Specifies the pre-shared key used for the IPsec tunnel. + If no secret is given, S2S VPN will create one automatically in Secret Manager, reference its secret_id and version in the connection and use the generated PSK. +Secret version is also optional and maybe used to refer to a previous version. If no version is given, "latest" is used. """ bgp_config_ipv4: Optional[CreateConnectionRequestBgpConfig] = None @@ -1288,7 +1309,7 @@ class RenewConnectionPskRequest: generate_revision: Optional[bool] = False """ - Generate a new revision or update to the latest existing one. + Generate a new version or update to the latest existing one. """ @@ -1361,6 +1382,16 @@ class UpdateConnectionRequest: List of ESP ciphers proposed for the IPsec tunnel. """ + secret_id: Optional[str] = None + """ + Secret ID in the client's project containing the PSK. + """ + + secret_revision: Optional[int] = 0 + """ + If not given it will not change. If secret_id is updated, secret_revision should be set accordingly. + """ + @dataclass class UpdateCustomerGatewayRequest: diff --git a/scaleway/scaleway/applesilicon/v1alpha1/marshalling.py b/scaleway/scaleway/applesilicon/v1alpha1/marshalling.py index cb129249e..932eb21d9 100644 --- a/scaleway/scaleway/applesilicon/v1alpha1/marshalling.py +++ b/scaleway/scaleway/applesilicon/v1alpha1/marshalling.py @@ -11,6 +11,7 @@ ) from .types import ( ConnectivityDiagnosticActionType, + RunnerStatus, ServerPrivateNetworkServerStatus, ServerPrivateNetworkStatus, ServerStatus, @@ -344,11 +345,11 @@ def unmarshal_Server(data: Any) -> Server: else: args["zone"] = None - field = data.get("delivered", None) + field = data.get("srn", None) if field is not None: - args["delivered"] = field + args["srn"] = field else: - args["delivered"] = False + args["srn"] = None field = data.get("os", None) if field is not None: @@ -376,6 +377,12 @@ def unmarshal_Server(data: Any) -> Server: else: args["deletable_at"] = None + field = data.get("delivered", None) + if field is not None: + args["delivered"] = field + else: + args["delivered"] = False + field = data.get("vpc_status", None) if field is not None: args["vpc_status"] = field @@ -526,7 +533,7 @@ def unmarshal_Runner(data: Any) -> Runner: if field is not None: args["status"] = field else: - args["status"] = None + args["status"] = RunnerStatus.UNKNOWN_STATUS field = data.get("error_message", None) if field is not None: @@ -534,6 +541,18 @@ def unmarshal_Runner(data: Any) -> Runner: else: args["error_message"] = None + field = data.get("zone", None) + if field is not None: + args["zone"] = field + else: + args["zone"] = None + + field = data.get("srn", None) + if field is not None: + args["srn"] = field + else: + args["srn"] = None + field = data.get("configuration", None) if field is not None: args["configuration"] = unmarshal_RunnerConfigurationV2(field) @@ -941,6 +960,18 @@ def unmarshal_ConnectivityDiagnostic(data: Any) -> ConnectivityDiagnostic: else: args["error_message"] = None + field = data.get("zone", None) + if field is not None: + args["zone"] = field + else: + args["zone"] = None + + field = data.get("srn", None) + if field is not None: + args["srn"] = field + else: + args["srn"] = None + field = data.get("health_details", None) if field is not None: args["health_details"] = unmarshal_ConnectivityDiagnosticServerHealth(field) diff --git a/scaleway/scaleway/applesilicon/v1alpha1/types.py b/scaleway/scaleway/applesilicon/v1alpha1/types.py index 110bf1a43..c3c9c9db1 100644 --- a/scaleway/scaleway/applesilicon/v1alpha1/types.py +++ b/scaleway/scaleway/applesilicon/v1alpha1/types.py @@ -372,6 +372,11 @@ class Server: Zone of the server. """ + srn: str + """ + SRN of the server. + """ + delivered: bool """ Set to true once the server has completed its provisioning steps and is ready to use. Some OS configurations might require a reinstallation of the server before delivery depending on the available stock. A reinstallation after the initial delivery will not change this flag and can be tracked using the server status. @@ -451,9 +456,34 @@ class AppliedRunnerConfigurations: @dataclass class Runner: id: str + """ + UUID of the runner. + """ + status: RunnerStatus + """ + Status of the runner. + """ + error_message: str + """ + Error message of the runner (if any). + """ + + zone: ScwZone + """ + Zone of the runner. + """ + + srn: str + """ + SRN of the runner. + """ + configuration: Optional[RunnerConfigurationV2] = None + """ + Configuration of the runner. + """ @dataclass @@ -627,6 +657,12 @@ class ConnectivityDiagnostic: is_healthy: bool supported_actions: list[ConnectivityDiagnosticActionType] error_message: str + zone: ScwZone + """ + Zone to target. If none is passed will use default zone from the config. + """ + + srn: str health_details: Optional[ConnectivityDiagnosticServerHealth] = None diff --git a/scaleway/scaleway/audit_trail/v1alpha1/__init__.py b/scaleway/scaleway/audit_trail/v1alpha1/__init__.py index 7004c2c8b..1efac5159 100644 --- a/scaleway/scaleway/audit_trail/v1alpha1/__init__.py +++ b/scaleway/scaleway/audit_trail/v1alpha1/__init__.py @@ -82,6 +82,7 @@ from .types import VpcSubnetInfo from .types import WoflWorkflowDefinitionInfo from .types import WoflWorkflowRunInfo +from .types import WoflWorkflowVersionInfo from .types import Resource from .types import EventPrincipal from .types import AuthenticationEvent @@ -217,6 +218,7 @@ "VpcSubnetInfo", "WoflWorkflowDefinitionInfo", "WoflWorkflowRunInfo", + "WoflWorkflowVersionInfo", "Resource", "EventPrincipal", "AuthenticationEvent", diff --git a/scaleway/scaleway/audit_trail/v1alpha1/marshalling.py b/scaleway/scaleway/audit_trail/v1alpha1/marshalling.py index a0f22fb14..4f2fbf9f6 100644 --- a/scaleway/scaleway/audit_trail/v1alpha1/marshalling.py +++ b/scaleway/scaleway/audit_trail/v1alpha1/marshalling.py @@ -87,6 +87,7 @@ VpcSubnetInfo, WoflWorkflowDefinitionInfo, WoflWorkflowRunInfo, + WoflWorkflowVersionInfo, EventPrincipal, Resource, Event, @@ -1633,6 +1634,35 @@ def unmarshal_WoflWorkflowRunInfo(data: Any) -> WoflWorkflowRunInfo: return WoflWorkflowRunInfo(**args) +def unmarshal_WoflWorkflowVersionInfo(data: Any) -> WoflWorkflowVersionInfo: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'WoflWorkflowVersionInfo' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + field = data.get("workflow_definition_id", None) + if field is not None: + args["workflow_definition_id"] = field + else: + args["workflow_definition_id"] = None + + field = data.get("name", None) + if field is not None: + args["name"] = field + else: + args["name"] = None + + field = data.get("workflow_definition_name", None) + if field is not None: + args["workflow_definition_name"] = field + else: + args["workflow_definition_name"] = None + + return WoflWorkflowVersionInfo(**args) + + def unmarshal_EventPrincipal(data: Any) -> EventPrincipal: if not isinstance(data, dict): raise TypeError( @@ -2112,6 +2142,12 @@ def unmarshal_Resource(data: Any) -> Resource: else: args["wofl_workflow_run_info"] = None + field = data.get("wofl_workflow_version_info", None) + if field is not None: + args["wofl_workflow_version_info"] = unmarshal_WoflWorkflowVersionInfo(field) + else: + args["wofl_workflow_version_info"] = None + return Resource(**args) diff --git a/scaleway/scaleway/audit_trail/v1alpha1/types.py b/scaleway/scaleway/audit_trail/v1alpha1/types.py index 9b73d384f..ef195e7e1 100644 --- a/scaleway/scaleway/audit_trail/v1alpha1/types.py +++ b/scaleway/scaleway/audit_trail/v1alpha1/types.py @@ -286,6 +286,7 @@ class ResourceType(str, Enum, metaclass=StrEnumMeta): SERVERLESS_FUNCTIONS_TRIGGER = "serverless_functions_trigger" WOFL_WORKFLOW_DEFINITION = "wofl_workflow_definition" WOFL_WORKFLOW_RUN = "wofl_workflow_run" + WOFL_WORKFLOW_VERSION = "wofl_workflow_version" def __str__(self) -> str: return str(self.value) @@ -671,6 +672,13 @@ class WoflWorkflowRunInfo: workflow_definition_name: Optional[str] = None +@dataclass +class WoflWorkflowVersionInfo: + workflow_definition_id: str + name: str + workflow_definition_name: Optional[str] = None + + @dataclass class Resource: id: str @@ -810,6 +818,8 @@ class Resource: wofl_workflow_run_info: Optional[WoflWorkflowRunInfo] = None + wofl_workflow_version_info: Optional[WoflWorkflowVersionInfo] = None + @dataclass class EventPrincipal: diff --git a/scaleway/scaleway/baremetal/v1/marshalling.py b/scaleway/scaleway/baremetal/v1/marshalling.py index a96f97a03..6be05765c 100644 --- a/scaleway/scaleway/baremetal/v1/marshalling.py +++ b/scaleway/scaleway/baremetal/v1/marshalling.py @@ -1301,6 +1301,12 @@ def unmarshal_Offer(data: Any) -> Offer: else: args["monthly_offer_id"] = None + field = data.get("dual_attach", None) + if field is not None: + args["dual_attach"] = field + else: + args["dual_attach"] = False + return Offer(**args) diff --git a/scaleway/scaleway/baremetal/v1/types.py b/scaleway/scaleway/baremetal/v1/types.py index cd77c890d..b4dad6f45 100644 --- a/scaleway/scaleway/baremetal/v1/types.py +++ b/scaleway/scaleway/baremetal/v1/types.py @@ -1017,6 +1017,11 @@ class Offer: Exist only for hourly offers, to migrate to the monthly offer. """ + dual_attach: Optional[bool] = False + """ + Describe the network topology of the offer. + """ + @dataclass class Option: diff --git a/scaleway/scaleway/s2s_vpn/v1alpha1/api.py b/scaleway/scaleway/s2s_vpn/v1alpha1/api.py index 4ffa9ea9d..5143978b0 100644 --- a/scaleway/scaleway/s2s_vpn/v1alpha1/api.py +++ b/scaleway/scaleway/s2s_vpn/v1alpha1/api.py @@ -702,7 +702,8 @@ def create_connection( :param enable_route_propagation: Defines whether route propagation is enabled or not. :param vpn_gateway_id: ID of the VPN gateway to attach to the connection. :param customer_gateway_id: ID of the customer gateway to attach to the connection. - :param secret: Specifies the pre-shared key used for the IPsec tunnel. + :param secret: If no secret is given, S2S VPN will create one automatically in Secret Manager, reference its secret_id and version in the connection and use the generated PSK. + Secret version is also optional and maybe used to refer to a previous version. If no version is given, "latest" is used. :param bgp_config_ipv4: BGP config of IPv4 session, including interco private IPv4 subnet (first IP assigned to the VPN Gateway, second IP to the Customer Gateway) and attached routing policy. :param bgp_config_ipv6: BGP config of IPv6 session, including interco private IPv6 subnet (first IP assigned to the VPN Gateway, second IP to the Customer Gateway) and attached routing policy. :return: :class:`CreateConnectionResponse ` @@ -763,6 +764,8 @@ def update_connection( initiation_policy: Optional[CreateConnectionRequestInitiationPolicy] = None, ikev2_ciphers: Optional[list[ConnectionCipher]] = None, esp_ciphers: Optional[list[ConnectionCipher]] = None, + secret_id: Optional[str] = None, + secret_revision: Optional[int] = None, ) -> Connection: """ Update a connection. @@ -774,6 +777,8 @@ def update_connection( :param initiation_policy: Who initiates the IPsec tunnel. :param ikev2_ciphers: List of IKE v2 ciphers proposed for the IPsec tunnel. :param esp_ciphers: List of ESP ciphers proposed for the IPsec tunnel. + :param secret_id: Secret ID in the client's project containing the PSK. + :param secret_revision: If not given it will not change. If secret_id is updated, secret_revision should be set accordingly. :return: :class:`Connection ` Usage: @@ -801,6 +806,8 @@ def update_connection( initiation_policy=initiation_policy, ikev2_ciphers=ikev2_ciphers, esp_ciphers=esp_ciphers, + secret_id=secret_id, + secret_revision=secret_revision, ), self.client, ), @@ -853,7 +860,7 @@ def renew_connection_psk( Renew pre-shared key for a given connection. :param connection_id: ID of the connection to renew the PSK. :param region: Region to target. If none is passed will use default region from the config. - :param generate_revision: Generate a new revision or update to the latest existing one. + :param generate_revision: Generate a new version or update to the latest existing one. :return: :class:`RenewConnectionPskResponse ` Usage: diff --git a/scaleway/scaleway/s2s_vpn/v1alpha1/marshalling.py b/scaleway/scaleway/s2s_vpn/v1alpha1/marshalling.py index 988bd45b9..900274d7b 100644 --- a/scaleway/scaleway/s2s_vpn/v1alpha1/marshalling.py +++ b/scaleway/scaleway/s2s_vpn/v1alpha1/marshalling.py @@ -126,6 +126,12 @@ def unmarshal_Connection(data: Any) -> Connection: else: args["id"] = None + field = data.get("srn", None) + if field is not None: + args["srn"] = field + else: + args["srn"] = None + field = data.get("project_id", None) if field is not None: args["project_id"] = field @@ -150,6 +156,18 @@ def unmarshal_Connection(data: Any) -> Connection: else: args["tags"] = [] + field = data.get("created_at", None) + if field is not None: + args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["created_at"] = None + + field = data.get("updated_at", None) + if field is not None: + args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + else: + args["updated_at"] = None + field = data.get("status", None) if field is not None: args["status"] = field @@ -180,18 +198,6 @@ def unmarshal_Connection(data: Any) -> Connection: else: args["secret_revision"] = 0 - field = data.get("created_at", None) - if field is not None: - args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field - else: - args["created_at"] = None - - field = data.get("updated_at", None) - if field is not None: - args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field - else: - args["updated_at"] = None - field = data.get("ikev2_ciphers", None) if field is not None: args["ikev2_ciphers"] = ( @@ -295,6 +301,12 @@ def unmarshal_CustomerGateway(data: Any) -> CustomerGateway: else: args["id"] = None + field = data.get("srn", None) + if field is not None: + args["srn"] = field + else: + args["srn"] = None + field = data.get("project_id", None) if field is not None: args["project_id"] = field @@ -378,6 +390,12 @@ def unmarshal_RoutingPolicy(data: Any) -> RoutingPolicy: else: args["id"] = None + field = data.get("srn", None) + if field is not None: + args["srn"] = field + else: + args["srn"] = None + field = data.get("project_id", None) if field is not None: args["project_id"] = field @@ -489,6 +507,12 @@ def unmarshal_VpnGateway(data: Any) -> VpnGateway: else: args["id"] = None + field = data.get("srn", None) + if field is not None: + args["srn"] = field + else: + args["srn"] = None + field = data.get("project_id", None) if field is not None: args["project_id"] = field @@ -513,12 +537,6 @@ def unmarshal_VpnGateway(data: Any) -> VpnGateway: else: args["tags"] = [] - field = data.get("status", None) - if field is not None: - args["status"] = field - else: - args["status"] = VpnGatewayStatus.UNKNOWN_STATUS - field = data.get("created_at", None) if field is not None: args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field @@ -531,6 +549,12 @@ def unmarshal_VpnGateway(data: Any) -> VpnGateway: else: args["updated_at"] = None + field = data.get("status", None) + if field is not None: + args["status"] = field + else: + args["status"] = VpnGatewayStatus.UNKNOWN_STATUS + field = data.get("gateway_type", None) if field is not None: args["gateway_type"] = field @@ -1231,6 +1255,12 @@ def marshal_UpdateConnectionRequest( marshal_ConnectionCipher(item, defaults) for item in request.esp_ciphers ] + if request.secret_id is not None: + output["secret_id"] = request.secret_id + + if request.secret_revision is not None: + output["secret_revision"] = request.secret_revision + return output diff --git a/scaleway/scaleway/s2s_vpn/v1alpha1/types.py b/scaleway/scaleway/s2s_vpn/v1alpha1/types.py index f507d5a73..bcf8f9f01 100644 --- a/scaleway/scaleway/s2s_vpn/v1alpha1/types.py +++ b/scaleway/scaleway/s2s_vpn/v1alpha1/types.py @@ -212,6 +212,11 @@ class Connection: Unique identifier of the connection. """ + srn: str + """ + The SRN of the connection. + """ + project_id: str """ Project ID. @@ -368,6 +373,11 @@ class CustomerGateway: Unique identifier of the customer gateway. """ + srn: str + """ + The SRN of the customer gateway. + """ + project_id: str """ Project ID. @@ -431,6 +441,11 @@ class RoutingPolicy: Unique identifier of the routing policy. """ + srn: str + """ + The SRN of the routing policy. + """ + project_id: str """ Project ID. @@ -501,6 +516,11 @@ class VpnGateway: Unique identifier of the VPN gateway. """ + srn: str + """ + The SRN of the VPN gateway. + """ + project_id: str """ Project ID. @@ -666,7 +686,8 @@ class CreateConnectionRequest: secret: Optional[CreateConnectionRequestSecret] = None """ - Specifies the pre-shared key used for the IPsec tunnel. + If no secret is given, S2S VPN will create one automatically in Secret Manager, reference its secret_id and version in the connection and use the generated PSK. +Secret version is also optional and maybe used to refer to a previous version. If no version is given, "latest" is used. """ bgp_config_ipv4: Optional[CreateConnectionRequestBgpConfig] = None @@ -1288,7 +1309,7 @@ class RenewConnectionPskRequest: generate_revision: Optional[bool] = False """ - Generate a new revision or update to the latest existing one. + Generate a new version or update to the latest existing one. """ @@ -1361,6 +1382,16 @@ class UpdateConnectionRequest: List of ESP ciphers proposed for the IPsec tunnel. """ + secret_id: Optional[str] = None + """ + Secret ID in the client's project containing the PSK. + """ + + secret_revision: Optional[int] = 0 + """ + If not given it will not change. If secret_id is updated, secret_revision should be set accordingly. + """ + @dataclass class UpdateCustomerGatewayRequest: