Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions scaleway-async/scaleway_async/iam/v1alpha1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -208,6 +210,7 @@
"GetPolicyRequest",
"GetQuotumRequest",
"GetSSHKeyRequest",
"GetSamlInformationRequest",
"GetUserConnectionsRequest",
"GetUserConnectionsResponse",
"GetUserRequest",
Expand Down Expand Up @@ -248,6 +251,7 @@
"RemoveGroupMemberRequest",
"RemoveUserConnectionRequest",
"Saml",
"SamlInformation",
"SetGroupMembersRequest",
"SetOrganizationAliasRequest",
"SetRulesRequest",
Expand Down
24 changes: 24 additions & 0 deletions scaleway-async/scaleway_async/iam/v1alpha1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
SSHKey,
Saml,
SamlCertificate,
SamlInformation,
SetGroupMembersRequest,
SetOrganizationAliasRequest,
SetRulesRequest,
Expand Down Expand Up @@ -124,6 +125,7 @@
unmarshal_Organization,
unmarshal_OrganizationSecuritySettings,
unmarshal_Saml,
unmarshal_SamlInformation,
unmarshal_SetRulesResponse,
unmarshal_ValidateUserMFAOTPResponse,
marshal_AddGroupMemberRequest,
Expand Down Expand Up @@ -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 <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())
24 changes: 24 additions & 0 deletions scaleway-async/scaleway_async/iam/v1alpha1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
Organization,
OrganizationSecuritySettings,
Saml,
SamlInformation,
SetRulesResponse,
ValidateUserMFAOTPResponse,
AddGroupMemberRequest,
Expand Down Expand Up @@ -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(
Expand Down
18 changes: 18 additions & 0 deletions scaleway-async/scaleway_async/iam/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1384,6 +1384,11 @@ class GetSSHKeyRequest:
"""


@dataclass
class GetSamlInformationRequest:
pass


@dataclass
class GetUserConnectionsRequest:
user_id: str
Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions scaleway/scaleway/iam/v1alpha1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -208,6 +210,7 @@
"GetPolicyRequest",
"GetQuotumRequest",
"GetSSHKeyRequest",
"GetSamlInformationRequest",
"GetUserConnectionsRequest",
"GetUserConnectionsResponse",
"GetUserRequest",
Expand Down Expand Up @@ -248,6 +251,7 @@
"RemoveGroupMemberRequest",
"RemoveUserConnectionRequest",
"Saml",
"SamlInformation",
"SetGroupMembersRequest",
"SetOrganizationAliasRequest",
"SetRulesRequest",
Expand Down
24 changes: 24 additions & 0 deletions scaleway/scaleway/iam/v1alpha1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
SSHKey,
Saml,
SamlCertificate,
SamlInformation,
SetGroupMembersRequest,
SetOrganizationAliasRequest,
SetRulesRequest,
Expand Down Expand Up @@ -124,6 +125,7 @@
unmarshal_Organization,
unmarshal_OrganizationSecuritySettings,
unmarshal_Saml,
unmarshal_SamlInformation,
unmarshal_SetRulesResponse,
unmarshal_ValidateUserMFAOTPResponse,
marshal_AddGroupMemberRequest,
Expand Down Expand Up @@ -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 <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())
24 changes: 24 additions & 0 deletions scaleway/scaleway/iam/v1alpha1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
Organization,
OrganizationSecuritySettings,
Saml,
SamlInformation,
SetRulesResponse,
ValidateUserMFAOTPResponse,
AddGroupMemberRequest,
Expand Down Expand Up @@ -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(
Expand Down
18 changes: 18 additions & 0 deletions scaleway/scaleway/iam/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1384,6 +1384,11 @@ class GetSSHKeyRequest:
"""


@dataclass
class GetSamlInformationRequest:
pass


@dataclass
class GetUserConnectionsRequest:
user_id: str
Expand Down Expand Up @@ -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
Expand Down
Loading