sym.sdk.templates.approval.ApprovalTemplate

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.

Methods

approve(*[, target_srn, duration])

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

deescalate(*[, target_srn])

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

deny(*[, target_srn, duration])

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

dict()

Represent this resource as a dictionary.

escalate(*[, target_srn, duration])

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

ignore(*[, message])

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

prompt(**kwargs)

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

request(*[, target_srn, duration])

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

Attributes

name

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

srn

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

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.