sym.sdk.templates.approval¶
Classes
The |
|
The |
- 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 typeapprove
to approve an outstanding request for access to anAccessTarget
.- Parameters
target_srn – The
SRN
of theAccessTarget
to request access to. Required only if firing anEvent
for aRun
which has not had a request submitted. Otherwise, defaults to the currentRun
’s requestedAccessTarget
.duration – How long the escalation should last. Required only if firing an
Event
for aRun
which has not had a request submitted. Otherwise, defaults to the currentRun
’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 typedeescalate
to begin deescalation of aUser
for anAccessTarget
.- Parameters
target_srn – The
SRN
of theAccessTarget
to deescalate theUser
for. Required only if firing anEvent
for aRun
which has not had a request submitted. Otherwise, defaults to the currentRun
’s requestedAccessTarget
.**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 typedeny
to deny an outstanding request for access to anAccessTarget
.- Parameters
target_srn – The
SRN
of theAccessTarget
to request access to. Required only if firing anEvent
for aRun
which has not had a request submitted. Otherwise, defaults to the currentRun
’s requestedAccessTarget
.duration – How long the escalation should last. Required only if firing an
Event
for aRun
which has not had a request submitted. Otherwise, defaults to the currentRun
’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 typeescalate
to begin escalation of aUser
for anAccessTarget
.- Parameters
target_srn – The
SRN
of theAccessTarget
to escalate theUser
for. Required only if firing anEvent
for aRun
which has not had a request submitted. Otherwise, defaults to the currentRun
’s requestedAccessTarget
.duration – How long the escalation should last. Required only if firing an
Event
for aRun
which has not had a request submitted. Otherwise, defaults to the currentRun
’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 typeignore
to nullify the incomingEvent
and send a message to the actingUser
.
- classmethod prompt(**kwargs)¶
Generates a request to fire an
Event
of typeprompt
to pop up a modal for theUser
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 typerequest
to submit a request for access to anAccessTarget
.- Parameters
target_srn – The
SRN
of theAccessTarget
to request access to. Required only if firing anEvent
for aRun
which has not had a request submitted. Otherwise, defaults to the currentRun
’s requestedAccessTarget
.duration – How long the escalation should last. Required only if firing an
Event
for aRun
which has not had a request submitted. Otherwise, defaults to the currentRun
’s requested duration.**kwargs – Arbitrary additional values to pass through to the fired
Event
’s payload.
- class sym.sdk.templates.approval.ApprovalTemplateStep(value)¶
-
The
ApprovalTemplateStep
enum lists the steps in theApprovalTemplate
, each of which can be used in hooks to fire newEvents
.Read more about the steps of the sym:approval template.