Skip to content

uap

ArkUAPService

Bases: ArkUAPBaseService

Source code in ark_sdk_python/services/uap/ark_uap_service.py
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
class ArkUAPService(ArkUAPBaseService):

    def list_policies(self) -> ArkUAPPolicyResultsResponse:
        """
         Retrieves all policies.

        Raises:
         ArkServiceException: If failed to get all policies.

         Returns:
             ArkUAPPolicyResultsResponse: The response containing all policies.
        """
        return self._base_list_policies(ArkUAPFilters())

    def policies_stats(self) -> ArkUAPPoliciesStats:
        """
        Calculates policies statistics

        Raises:
            ArkServiceException: _description_

        Returns:
            ArkUAPPoliciesStats: Summary of policies by status and provider.
        """
        return self._base_policies_stats(ArkUAPFilters())

    def list_policies_by(self, policies_filter: ArkUAPFilters) -> ArkUAPPolicyResultsResponse:
        """
        Retrieves policies based on the provided filters.

        Args:
            policies_filter (ArkUAPFilters): The filters to apply when retrieving policies.

        Raises:
            ArkServiceException: _description_

        Returns:
            ArkUAPPolicyResultsResponse: The response containing the filtered policies.
        """
        return self._base_list_policies(policies_filter)

    @staticmethod
    @overrides
    def service_config() -> ArkServiceConfig:
        return SERVICE_CONFIG

list_policies()

Retrieves all policies.

Raises:

Type Description
ArkServiceException

If failed to get all policies.

Returns

ArkUAPPolicyResultsResponse: The response containing all policies.

Source code in ark_sdk_python/services/uap/ark_uap_service.py
18
19
20
21
22
23
24
25
26
27
28
def list_policies(self) -> ArkUAPPolicyResultsResponse:
    """
     Retrieves all policies.

    Raises:
     ArkServiceException: If failed to get all policies.

     Returns:
         ArkUAPPolicyResultsResponse: The response containing all policies.
    """
    return self._base_list_policies(ArkUAPFilters())

list_policies_by(policies_filter)

Retrieves policies based on the provided filters.

Parameters:

Name Type Description Default
policies_filter ArkUAPFilters

The filters to apply when retrieving policies.

required

Raises:

Type Description
ArkServiceException

description

Returns:

Name Type Description
ArkUAPPolicyResultsResponse ArkUAPPolicyResultsResponse

The response containing the filtered policies.

Source code in ark_sdk_python/services/uap/ark_uap_service.py
42
43
44
45
46
47
48
49
50
51
52
53
54
55
def list_policies_by(self, policies_filter: ArkUAPFilters) -> ArkUAPPolicyResultsResponse:
    """
    Retrieves policies based on the provided filters.

    Args:
        policies_filter (ArkUAPFilters): The filters to apply when retrieving policies.

    Raises:
        ArkServiceException: _description_

    Returns:
        ArkUAPPolicyResultsResponse: The response containing the filtered policies.
    """
    return self._base_list_policies(policies_filter)

policies_stats()

Calculates policies statistics

Raises:

Type Description
ArkServiceException

description

Returns:

Name Type Description
ArkUAPPoliciesStats ArkUAPPoliciesStats

Summary of policies by status and provider.

Source code in ark_sdk_python/services/uap/ark_uap_service.py
30
31
32
33
34
35
36
37
38
39
40
def policies_stats(self) -> ArkUAPPoliciesStats:
    """
    Calculates policies statistics

    Raises:
        ArkServiceException: _description_

    Returns:
        ArkUAPPoliciesStats: Summary of policies by status and provider.
    """
    return self._base_policies_stats(ArkUAPFilters())