Skip to content

Commit 7cb3e72

Browse files
authored
feat(iam): add GetOrganizationScim method (#1431)
1 parent 25b2505 commit 7cb3e72

File tree

6 files changed

+82
-0
lines changed

6 files changed

+82
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
from .types import GetLogRequest
8080
from .types import GetOrganizationRequest
8181
from .types import GetOrganizationSamlRequest
82+
from .types import GetOrganizationScimRequest
8283
from .types import GetOrganizationSecuritySettingsRequest
8384
from .types import GetPolicyRequest
8485
from .types import GetQuotumRequest
@@ -227,6 +228,7 @@
227228
"GetLogRequest",
228229
"GetOrganizationRequest",
229230
"GetOrganizationSamlRequest",
231+
"GetOrganizationScimRequest",
230232
"GetOrganizationSecuritySettingsRequest",
231233
"GetPolicyRequest",
232234
"GetQuotumRequest",

scaleway-async/scaleway_async/iam/v1alpha1/api.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3337,12 +3337,41 @@ async def delete_saml_certificate(
33373337

33383338
self._throw_on_error(res)
33393339

3340+
async def get_organization_scim(
3341+
self,
3342+
*,
3343+
organization_id: Optional[str] = None,
3344+
) -> Scim:
3345+
"""
3346+
Get SCIM configuration of an Organization.
3347+
:param organization_id:
3348+
:return: :class:`Scim <Scim>`
3349+
3350+
Usage:
3351+
::
3352+
3353+
result = await api.get_organization_scim()
3354+
"""
3355+
3356+
param_organization_id = validate_path_param(
3357+
"organization_id", organization_id or self.client.default_organization_id
3358+
)
3359+
3360+
res = self._request(
3361+
"GET",
3362+
f"/iam/v1alpha1/organizations/{param_organization_id}/scim",
3363+
)
3364+
3365+
self._throw_on_error(res)
3366+
return unmarshal_Scim(res.json())
3367+
33403368
async def enable_organization_scim(
33413369
self,
33423370
*,
33433371
organization_id: Optional[str] = None,
33443372
) -> Scim:
33453373
"""
3374+
Enable SCIM for an Organization.
33463375
:param organization_id: ID of the Organization.
33473376
:return: :class:`Scim <Scim>`
33483377
@@ -3371,6 +3400,7 @@ async def delete_scim(
33713400
scim_id: str,
33723401
) -> None:
33733402
"""
3403+
Disable SCIM for an Organization.
33743404
:param scim_id: ID of the SCIM configuration.
33753405
33763406
Usage:
@@ -3399,6 +3429,7 @@ async def list_scim_tokens(
33993429
page_size: Optional[int] = None,
34003430
) -> ListScimTokensResponse:
34013431
"""
3432+
List SCIM tokens.
34023433
:param scim_id: ID of the SCIM configuration.
34033434
:param order_by: Sort order of SCIM tokens.
34043435
:param page: Requested page number. Value must be greater or equal to 1.
@@ -3437,6 +3468,7 @@ async def list_scim_tokens_all(
34373468
page_size: Optional[int] = None,
34383469
) -> list[ScimToken]:
34393470
"""
3471+
List SCIM tokens.
34403472
:param scim_id: ID of the SCIM configuration.
34413473
:param order_by: Sort order of SCIM tokens.
34423474
:param page: Requested page number. Value must be greater or equal to 1.
@@ -3469,6 +3501,7 @@ async def create_scim_token(
34693501
scim_id: str,
34703502
) -> CreateScimTokenResponse:
34713503
"""
3504+
Create a SCIM token.
34723505
:param scim_id: ID of the SCIM configuration.
34733506
:return: :class:`CreateScimTokenResponse <CreateScimTokenResponse>`
34743507
@@ -3496,6 +3529,7 @@ async def delete_scim_token(
34963529
token_id: str,
34973530
) -> None:
34983531
"""
3532+
Delete a SCIM token.
34993533
:param token_id: The SCIM token ID.
35003534
35013535
Usage:

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,6 +1415,11 @@ class GetOrganizationSamlRequest:
14151415
"""
14161416

14171417

1418+
@dataclass
1419+
class GetOrganizationScimRequest:
1420+
organization_id: Optional[str] = None
1421+
1422+
14181423
@dataclass
14191424
class GetOrganizationSecuritySettingsRequest:
14201425
organization_id: Optional[str] = None

scaleway/scaleway/iam/v1alpha1/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
from .types import GetLogRequest
8080
from .types import GetOrganizationRequest
8181
from .types import GetOrganizationSamlRequest
82+
from .types import GetOrganizationScimRequest
8283
from .types import GetOrganizationSecuritySettingsRequest
8384
from .types import GetPolicyRequest
8485
from .types import GetQuotumRequest
@@ -227,6 +228,7 @@
227228
"GetLogRequest",
228229
"GetOrganizationRequest",
229230
"GetOrganizationSamlRequest",
231+
"GetOrganizationScimRequest",
230232
"GetOrganizationSecuritySettingsRequest",
231233
"GetPolicyRequest",
232234
"GetQuotumRequest",

scaleway/scaleway/iam/v1alpha1/api.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3337,12 +3337,41 @@ def delete_saml_certificate(
33373337

33383338
self._throw_on_error(res)
33393339

3340+
def get_organization_scim(
3341+
self,
3342+
*,
3343+
organization_id: Optional[str] = None,
3344+
) -> Scim:
3345+
"""
3346+
Get SCIM configuration of an Organization.
3347+
:param organization_id:
3348+
:return: :class:`Scim <Scim>`
3349+
3350+
Usage:
3351+
::
3352+
3353+
result = api.get_organization_scim()
3354+
"""
3355+
3356+
param_organization_id = validate_path_param(
3357+
"organization_id", organization_id or self.client.default_organization_id
3358+
)
3359+
3360+
res = self._request(
3361+
"GET",
3362+
f"/iam/v1alpha1/organizations/{param_organization_id}/scim",
3363+
)
3364+
3365+
self._throw_on_error(res)
3366+
return unmarshal_Scim(res.json())
3367+
33403368
def enable_organization_scim(
33413369
self,
33423370
*,
33433371
organization_id: Optional[str] = None,
33443372
) -> Scim:
33453373
"""
3374+
Enable SCIM for an Organization.
33463375
:param organization_id: ID of the Organization.
33473376
:return: :class:`Scim <Scim>`
33483377
@@ -3371,6 +3400,7 @@ def delete_scim(
33713400
scim_id: str,
33723401
) -> None:
33733402
"""
3403+
Disable SCIM for an Organization.
33743404
:param scim_id: ID of the SCIM configuration.
33753405
33763406
Usage:
@@ -3399,6 +3429,7 @@ def list_scim_tokens(
33993429
page_size: Optional[int] = None,
34003430
) -> ListScimTokensResponse:
34013431
"""
3432+
List SCIM tokens.
34023433
:param scim_id: ID of the SCIM configuration.
34033434
:param order_by: Sort order of SCIM tokens.
34043435
:param page: Requested page number. Value must be greater or equal to 1.
@@ -3437,6 +3468,7 @@ def list_scim_tokens_all(
34373468
page_size: Optional[int] = None,
34383469
) -> list[ScimToken]:
34393470
"""
3471+
List SCIM tokens.
34403472
:param scim_id: ID of the SCIM configuration.
34413473
:param order_by: Sort order of SCIM tokens.
34423474
:param page: Requested page number. Value must be greater or equal to 1.
@@ -3469,6 +3501,7 @@ def create_scim_token(
34693501
scim_id: str,
34703502
) -> CreateScimTokenResponse:
34713503
"""
3504+
Create a SCIM token.
34723505
:param scim_id: ID of the SCIM configuration.
34733506
:return: :class:`CreateScimTokenResponse <CreateScimTokenResponse>`
34743507
@@ -3496,6 +3529,7 @@ def delete_scim_token(
34963529
token_id: str,
34973530
) -> None:
34983531
"""
3532+
Delete a SCIM token.
34993533
:param token_id: The SCIM token ID.
35003534
35013535
Usage:

scaleway/scaleway/iam/v1alpha1/types.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,6 +1415,11 @@ class GetOrganizationSamlRequest:
14151415
"""
14161416

14171417

1418+
@dataclass
1419+
class GetOrganizationScimRequest:
1420+
organization_id: Optional[str] = None
1421+
1422+
14181423
@dataclass
14191424
class GetOrganizationSecuritySettingsRequest:
14201425
organization_id: Optional[str] = None

0 commit comments

Comments
 (0)