sym.sdk.templates.approval

Classes

ApprovalTemplate

The ApprovalTemplate object represents a security workflow for access management supported out of the box by Sym.

ApprovalTemplateStep

The ApprovalTemplateStep enum lists the steps in the ApprovalTemplate, each of which can be used in hooks to fire new Events.

class sym.sdk.templates.approval.ApprovalTemplate(srn: Union[sym.sdk.resource.SRN, str])

Bases: sym.sdk.templates.template.Template

The ApprovalTemplate object represents a security workflow for access management supported out of the box by Sym.

Read more about the sym:approval Template.

classmethod approve(*, target_srn: Optional[sym.sdk.resource.SRN] = None, duration: Optional[int] = None, **kwargs)

Generates a request to fire an Event of type approve to approve an outstanding request for access to an AccessTarget.

Parameters
  • target_srn – The SRN of the AccessTarget to request access to. Required only if firing an Event for a Run which has not had a request submitted. Otherwise, defaults to the current Run’s requested AccessTarget.

  • duration – How long the escalation should last. Required only if firing an Event for a Run which has not had a request submitted. Otherwise, defaults to the current Run’s requested duration.

  • **kwargs – Arbitrary additional values to pass through to the fired Event’s payload.

classmethod deescalate(*, target_srn: Optional[sym.sdk.resource.SRN] = None, **kwargs)

Generates a request to fire an Event of type deescalate to begin deescalation of a User for an AccessTarget.

Parameters
  • target_srn – The SRN of the AccessTarget to deescalate the User for. Required only if firing an Event for a Run which has not had a request submitted. Otherwise, defaults to the current Run’s requested AccessTarget.

  • **kwargs – Arbitrary additional values to pass through to the fired Event’s payload.

classmethod deny(*, target_srn: Optional[sym.sdk.resource.SRN] = None, duration: Optional[int] = None, **kwargs)

Generates a request to fire an Event of type deny to deny an outstanding request for access to an AccessTarget.

Parameters
  • target_srn – The SRN of the AccessTarget to request access to. Required only if firing an Event for a Run which has not had a request submitted. Otherwise, defaults to the current Run’s requested AccessTarget.

  • duration – How long the escalation should last. Required only if firing an Event for a Run which has not had a request submitted. Otherwise, defaults to the current Run’s requested duration.

  • **kwargs – Arbitrary additional values to pass through to the fired Event’s payload.

dict()

Represent this resource as a dictionary.

classmethod escalate(*, target_srn: Optional[sym.sdk.resource.SRN] = None, duration: Optional[int] = None, **kwargs)

Generates a request to fire an Event of type escalate to begin escalation of a User for an AccessTarget.

Parameters
  • target_srn – The SRN of the AccessTarget to escalate the User for. Required only if firing an Event for a Run which has not had a request submitted. Otherwise, defaults to the current Run’s requested AccessTarget.

  • duration – How long the escalation should last. Required only if firing an Event for a Run which has not had a request submitted. Otherwise, defaults to the current Run’s requested duration.

  • **kwargs – Arbitrary additional values to pass through to the fired Event’s payload.

classmethod ignore(*, message: Optional[str] = None, **kwargs)

Generates a request to fire an Event of type ignore to nullify the incoming Event and send a message to the acting User.

Parameters
  • message – The message to send to the User who triggered the original Event.

  • **kwargs – Arbitrary additional values to pass through to the fired Event’s payload.

property name

An alias for this resource’s slug, derived from its SRN.

classmethod prompt(**kwargs)

Generates a request to fire an Event of type prompt to pop up a modal for the User to make a request.

Parameters

**kwargs – Arbitrary additional values to pass through to the fired Event’s payload.

classmethod request(*, target_srn: Optional[sym.sdk.resource.SRN] = None, duration: Optional[int] = None, **kwargs)

Generates a request to fire an Event of type request to submit a request for access to an AccessTarget.

Parameters
  • target_srn – The SRN of the AccessTarget to request access to. Required only if firing an Event for a Run which has not had a request submitted. Otherwise, defaults to the current Run’s requested AccessTarget.

  • duration – How long the escalation should last. Required only if firing an Event for a Run which has not had a request submitted. Otherwise, defaults to the current Run’s requested duration.

  • **kwargs – Arbitrary additional values to pass through to the fired Event’s payload.

property srn

A SRN object that represents the unique identifier for this resource.

class sym.sdk.templates.approval.ApprovalTemplateStep(value)

Bases: str, enum.Enum

The ApprovalTemplateStep enum lists the steps in the ApprovalTemplate, each of which can be used in hooks to fire new Events.

Read more about the steps of the sym:approval template.