From 7ed268c14507dbce7996867f4be9a05df21c14f0 Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Fri, 22 Aug 2025 14:14:50 +0000 Subject: [PATCH] feat: update generated APIs --- .../scaleway_async/iam/v1alpha1/__init__.py | 4 ++++ .../scaleway_async/iam/v1alpha1/api.py | 24 +++++++++++++++++++ .../iam/v1alpha1/marshalling.py | 24 +++++++++++++++++++ .../scaleway_async/iam/v1alpha1/types.py | 18 ++++++++++++++ scaleway/scaleway/iam/v1alpha1/__init__.py | 4 ++++ scaleway/scaleway/iam/v1alpha1/api.py | 24 +++++++++++++++++++ scaleway/scaleway/iam/v1alpha1/marshalling.py | 24 +++++++++++++++++++ scaleway/scaleway/iam/v1alpha1/types.py | 18 ++++++++++++++ 8 files changed, 140 insertions(+) diff --git a/scaleway-async/scaleway_async/iam/v1alpha1/__init__.py b/scaleway-async/scaleway_async/iam/v1alpha1/__init__.py index ae8c64ef7..576d72635 100644 --- a/scaleway-async/scaleway_async/iam/v1alpha1/__init__.py +++ b/scaleway-async/scaleway_async/iam/v1alpha1/__init__.py @@ -74,6 +74,7 @@ from .types import GetPolicyRequest from .types import GetQuotumRequest from .types import GetSSHKeyRequest +from .types import GetSamlInformationRequest from .types import GetUserConnectionsRequest from .types import GetUserConnectionsResponse from .types import GetUserRequest @@ -114,6 +115,7 @@ from .types import RemoveGroupMemberRequest from .types import RemoveUserConnectionRequest from .types import Saml +from .types import SamlInformation from .types import SetGroupMembersRequest from .types import SetOrganizationAliasRequest from .types import SetRulesRequest @@ -208,6 +210,7 @@ "GetPolicyRequest", "GetQuotumRequest", "GetSSHKeyRequest", + "GetSamlInformationRequest", "GetUserConnectionsRequest", "GetUserConnectionsResponse", "GetUserRequest", @@ -248,6 +251,7 @@ "RemoveGroupMemberRequest", "RemoveUserConnectionRequest", "Saml", + "SamlInformation", "SetGroupMembersRequest", "SetOrganizationAliasRequest", "SetRulesRequest", diff --git a/scaleway-async/scaleway_async/iam/v1alpha1/api.py b/scaleway-async/scaleway_async/iam/v1alpha1/api.py index 567b84f7a..739a7f792 100644 --- a/scaleway-async/scaleway_async/iam/v1alpha1/api.py +++ b/scaleway-async/scaleway_async/iam/v1alpha1/api.py @@ -75,6 +75,7 @@ SSHKey, Saml, SamlCertificate, + SamlInformation, SetGroupMembersRequest, SetOrganizationAliasRequest, SetRulesRequest, @@ -124,6 +125,7 @@ unmarshal_Organization, unmarshal_OrganizationSecuritySettings, unmarshal_Saml, + unmarshal_SamlInformation, unmarshal_SetRulesResponse, unmarshal_ValidateUserMFAOTPResponse, marshal_AddGroupMemberRequest, @@ -3274,3 +3276,25 @@ async def delete_saml_certificate( ) self._throw_on_error(res) + + async def get_saml_information( + self, + ) -> SamlInformation: + """ + Get SAML information. + + :return: :class:`SamlInformation ` + + Usage: + :: + + result = await api.get_saml_information() + """ + + res = self._request( + "GET", + "/iam/v1alpha1/saml-information", + ) + + self._throw_on_error(res) + return unmarshal_SamlInformation(res.json()) diff --git a/scaleway-async/scaleway_async/iam/v1alpha1/marshalling.py b/scaleway-async/scaleway_async/iam/v1alpha1/marshalling.py index aa1e8f0ca..41e28dc9e 100644 --- a/scaleway-async/scaleway_async/iam/v1alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/iam/v1alpha1/marshalling.py @@ -56,6 +56,7 @@ Organization, OrganizationSecuritySettings, Saml, + SamlInformation, SetRulesResponse, ValidateUserMFAOTPResponse, AddGroupMemberRequest, @@ -1598,6 +1599,29 @@ def unmarshal_Saml(data: Any) -> Saml: return Saml(**args) +def unmarshal_SamlInformation(data: Any) -> SamlInformation: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'SamlInformation' failed as data isn't a dictionary." + ) + + args: Dict[str, Any] = {} + + field = data.get("entity_id", None) + if field is not None: + args["entity_id"] = field + else: + args["entity_id"] = None + + field = data.get("assertion_consumer_service_url", None) + if field is not None: + args["assertion_consumer_service_url"] = field + else: + args["assertion_consumer_service_url"] = None + + return SamlInformation(**args) + + def unmarshal_SetRulesResponse(data: Any) -> SetRulesResponse: if not isinstance(data, dict): raise TypeError( diff --git a/scaleway-async/scaleway_async/iam/v1alpha1/types.py b/scaleway-async/scaleway_async/iam/v1alpha1/types.py index 2d3746817..78232941d 100644 --- a/scaleway-async/scaleway_async/iam/v1alpha1/types.py +++ b/scaleway-async/scaleway_async/iam/v1alpha1/types.py @@ -1384,6 +1384,11 @@ class GetSSHKeyRequest: """ +@dataclass +class GetSamlInformationRequest: + pass + + @dataclass class GetUserConnectionsRequest: user_id: str @@ -2159,6 +2164,19 @@ class Saml: """ +@dataclass +class SamlInformation: + entity_id: str + """ + Entity ID. + """ + + assertion_consumer_service_url: str + """ + SAML Assertion Consumer Service url. + """ + + @dataclass class SetGroupMembersRequest: group_id: str diff --git a/scaleway/scaleway/iam/v1alpha1/__init__.py b/scaleway/scaleway/iam/v1alpha1/__init__.py index ae8c64ef7..576d72635 100644 --- a/scaleway/scaleway/iam/v1alpha1/__init__.py +++ b/scaleway/scaleway/iam/v1alpha1/__init__.py @@ -74,6 +74,7 @@ from .types import GetPolicyRequest from .types import GetQuotumRequest from .types import GetSSHKeyRequest +from .types import GetSamlInformationRequest from .types import GetUserConnectionsRequest from .types import GetUserConnectionsResponse from .types import GetUserRequest @@ -114,6 +115,7 @@ from .types import RemoveGroupMemberRequest from .types import RemoveUserConnectionRequest from .types import Saml +from .types import SamlInformation from .types import SetGroupMembersRequest from .types import SetOrganizationAliasRequest from .types import SetRulesRequest @@ -208,6 +210,7 @@ "GetPolicyRequest", "GetQuotumRequest", "GetSSHKeyRequest", + "GetSamlInformationRequest", "GetUserConnectionsRequest", "GetUserConnectionsResponse", "GetUserRequest", @@ -248,6 +251,7 @@ "RemoveGroupMemberRequest", "RemoveUserConnectionRequest", "Saml", + "SamlInformation", "SetGroupMembersRequest", "SetOrganizationAliasRequest", "SetRulesRequest", diff --git a/scaleway/scaleway/iam/v1alpha1/api.py b/scaleway/scaleway/iam/v1alpha1/api.py index 3cf88156a..caaace958 100644 --- a/scaleway/scaleway/iam/v1alpha1/api.py +++ b/scaleway/scaleway/iam/v1alpha1/api.py @@ -75,6 +75,7 @@ SSHKey, Saml, SamlCertificate, + SamlInformation, SetGroupMembersRequest, SetOrganizationAliasRequest, SetRulesRequest, @@ -124,6 +125,7 @@ unmarshal_Organization, unmarshal_OrganizationSecuritySettings, unmarshal_Saml, + unmarshal_SamlInformation, unmarshal_SetRulesResponse, unmarshal_ValidateUserMFAOTPResponse, marshal_AddGroupMemberRequest, @@ -3274,3 +3276,25 @@ def delete_saml_certificate( ) self._throw_on_error(res) + + def get_saml_information( + self, + ) -> SamlInformation: + """ + Get SAML information. + + :return: :class:`SamlInformation ` + + Usage: + :: + + result = api.get_saml_information() + """ + + res = self._request( + "GET", + "/iam/v1alpha1/saml-information", + ) + + self._throw_on_error(res) + return unmarshal_SamlInformation(res.json()) diff --git a/scaleway/scaleway/iam/v1alpha1/marshalling.py b/scaleway/scaleway/iam/v1alpha1/marshalling.py index aa1e8f0ca..41e28dc9e 100644 --- a/scaleway/scaleway/iam/v1alpha1/marshalling.py +++ b/scaleway/scaleway/iam/v1alpha1/marshalling.py @@ -56,6 +56,7 @@ Organization, OrganizationSecuritySettings, Saml, + SamlInformation, SetRulesResponse, ValidateUserMFAOTPResponse, AddGroupMemberRequest, @@ -1598,6 +1599,29 @@ def unmarshal_Saml(data: Any) -> Saml: return Saml(**args) +def unmarshal_SamlInformation(data: Any) -> SamlInformation: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'SamlInformation' failed as data isn't a dictionary." + ) + + args: Dict[str, Any] = {} + + field = data.get("entity_id", None) + if field is not None: + args["entity_id"] = field + else: + args["entity_id"] = None + + field = data.get("assertion_consumer_service_url", None) + if field is not None: + args["assertion_consumer_service_url"] = field + else: + args["assertion_consumer_service_url"] = None + + return SamlInformation(**args) + + def unmarshal_SetRulesResponse(data: Any) -> SetRulesResponse: if not isinstance(data, dict): raise TypeError( diff --git a/scaleway/scaleway/iam/v1alpha1/types.py b/scaleway/scaleway/iam/v1alpha1/types.py index 2d3746817..78232941d 100644 --- a/scaleway/scaleway/iam/v1alpha1/types.py +++ b/scaleway/scaleway/iam/v1alpha1/types.py @@ -1384,6 +1384,11 @@ class GetSSHKeyRequest: """ +@dataclass +class GetSamlInformationRequest: + pass + + @dataclass class GetUserConnectionsRequest: user_id: str @@ -2159,6 +2164,19 @@ class Saml: """ +@dataclass +class SamlInformation: + entity_id: str + """ + Entity ID. + """ + + assertion_consumer_service_url: str + """ + SAML Assertion Consumer Service url. + """ + + @dataclass class SetGroupMembersRequest: group_id: str