4.5.1. Enforcements

API for working with enforcements.

class axonius_api_client.api.enforcements.enforcements.Enforcements(auth, **kwargs)[source]

Bases: axonius_api_client.api.mixins.ModelMixins

API working with enforcements.

Notes

Future versions of API client 4.x branch will be expanded quite a bit to make it user friendly. The current incarnation should be considered BETA until such time.

Parameters

auth (axonius_api_client.auth.models.Model) –

get(generator=False)[source]

Get Enforcements.

Parameters

generator (bool) – return an iterator for objects that will yield rows as they are fetched

Return type

typing.Union[typing.Generator[axonius_api_client.api.json_api.enforcements.EnforcementDetails, None, None], typing.List[dict]]

get_generator()[source]

Get Axonius system users using a generator.

Return type

typing.Generator[axonius_api_client.api.json_api.enforcements.EnforcementDetails, None, None]

get_by_name(value)[source]

Get an enforcement by name.

Parameters

value (str) – object name

Raises

NotFoundError – if not found

Return type

axonius_api_client.api.json_api.enforcements.EnforcementDetails

get_by_uuid(value)[source]

Get an enforcement by uuid.

Raises

NotFoundError – if user not found

Parameters

value (str) –

Return type

axonius_api_client.api.json_api.enforcements.EnforcementDetails

get_action_types()[source]

Pass.

Return type

typing.List[axonius_api_client.api.json_api.enforcements.Action]

_get_action_types()[source]

Pass.

Return type

typing.List[axonius_api_client.api.json_api.enforcements.Action]

_create(name, main, success=None, failure=None, post=None, triggers=None)[source]

Create an enforcement set.

Parameters
Return type

str

_get(limit=2000, offset=0)[source]

Direct API method to get enforcements.

Parameters
  • limit (int) – limit to N rows per page

  • offset (int) – start at row N

Return type

typing.List[axonius_api_client.api.json_api.enforcements.EnforcementDetails]

__init__(auth, **kwargs)

Mixins for API Models.

Parameters
__repr__()

Show info for this model object.

Return type

str

__str__()

Show info for this model object.

Return type

str

_init(**kwargs)

Post init method for subclasses to use for extra setup.

LOG: logging.Logger

Logger for this object.

auth

axonius_api_client.auth.models.Mixins authentication object.

http

axonius_api_client.http.Http client to use to send requests,