UserDefinedPolicy#

class UserDefinedPolicy(title=None, description=None, is_enabled=False, is_auto_resolved=True, filters=None, trigger_conditions=None, impact_types=None, created_by=None, last_updated_time=None, is_expected_to_error_on_conflict=True, policies_to_override=None, trigger_wait_period=None, related_policies=None, entity_type=None, ext_id=None, links=None, tenant_id=None, *args, **kwargs)[source]#

Bases: ExternalizableAbstractModel

Parameters:
  • title (required) – (title) Title of the policy.

  • description – (description) Description of the policy.

  • is_enabled – (is_enabled) Enable/Disable flag for the policy. (Default False)

  • is_auto_resolved – (is_auto_resolved) Indicates whether the auto resolve feature is enabled for this policy. (Default True)

  • filters – (filters) Filter criteria for narrowing down the entities on which user-defined alert policies can be setup.

  • trigger_conditions (required) – (trigger_conditions) Trigger conditions for the policy. If there are multiple trigger conditions, all of them will be considered during the operation.

  • impact_types – (impact_types) Impact Types for the associated resulting alert.

  • created_by – (created_by) Username of the user who created the policy.

  • last_updated_time – (last_updated_time) Last updated time of the policy in ISO 8601 format. This value will be used as the CAS value during updates.

  • is_expected_to_error_on_conflict – (is_expected_to_error_on_conflict) Error if conflicting alert policies are found. (Default True)

  • policies_to_override – (policies_to_override) List of IDs of the alert policies that should be overridden.

  • trigger_wait_period – (trigger_wait_period) Waiting duration in seconds before triggering the alert, when the specified condition is met.

  • related_policies – (related_policies) List of alert policies that are related to the entities of the current policy.

  • entity_type (required) – (entity_type) Entity type associated with the user-defined alert policy. Allowed values are vm, node and cluster.

property created_by#

Username of the user who created the policy.

Type:

str

property description#

Description of the policy.

Type:

str

property entity_type#

Entity type associated with the user-defined alert policy. Allowed values are vm, node and cluster.

Type:

str

property filters#

Filter criteria for narrowing down the entities on which user-defined alert policies can be setup.

Type:

EntityFilter | GroupFilter

property impact_types#

Impact Types for the associated resulting alert.

Type:

list[ ImpactType ]

property is_auto_resolved#

Indicates whether the auto resolve feature is enabled for this policy.

Type:

bool

property is_enabled#

Enable/Disable flag for the policy.

Type:

bool

property is_expected_to_error_on_conflict#

Error if conflicting alert policies are found.

Type:

bool

property last_updated_time#

Last updated time of the policy in ISO 8601 format. This value will be used as the CAS value during updates.

Type:

datetime

property policies_to_override#

List of IDs of the alert policies that should be overridden.

Type:

list[ str ]

property related_policies#

List of alert policies that are related to the entities of the current policy.

Type:

list[ RelatedPolicy ]

property title#

Title of the policy.

Type:

str

to_dict()[source]#

Returns the model properties as a dictionary

to_str()[source]#

Returns the string representation of the model

property trigger_conditions#

Trigger conditions for the policy. If there are multiple trigger conditions, all of them will be considered during the operation.

Type:

list[ TriggerCondition ]

property trigger_wait_period#

Waiting duration in seconds before triggering the alert, when the specified condition is met.

Type:

int