synology_apm.sdk.collections.saas module¶
SaasCollection — collection interface for SaaS tenants (Cloud Applications).
- class synology_apm.sdk.collections.saas.SaasCollection(session)¶
Bases:
objectLists all SaaS tenants connected to APM (M365 + GWS).
Accessed via APMClient.saas; should not be instantiated directly.
- async get_m365_tenant(tenant_id)¶
Fetch details for a specific M365 tenant.
- Parameters:
tenant_id (str) – Azure AD tenant UUID.
- Returns:
SaasTenant with protected_data_bytes set to 0 (usage data is not available for this lookup).
- Raises:
ResourceNotFoundError – The specified tenant was not found.
APIError – Server returned an unexpected error.
- Return type:
- async list(limit=500, offset=0)¶
List all connected SaaS tenants (M365 + GWS).
- Parameters:
- Returns:
(list of SaasTenant (M365 first, GWS after), total count)
- Raises:
AuthenticationError – Session has expired.
APIError – Server returned an unexpected error.
- Return type:
tuple[list[SaasTenant], int]