sym.sdk.flow

Models representing Flows, Environments, and Runs.

Classes

Environment

The Environment class represents an instance of a sym_environment resource, which contains shared configuration values across Flow instances.

Flow

The Flow class represents an instance of a sym_flow resource, which defines an approval workflow in Sym, allowing users to request temporary and auto-expiring access to sensitive resources.

Run

A Run represents an instance of a Flow in progress.

class sym.sdk.flow.Environment(srn: Union[sym.sdk.resource.SRN, str])

Bases: sym.sdk.resource.SymResource

The Environment class represents an instance of a sym_environment resource, which contains shared configuration values across Flow instances.

Read more about Environments.

dict()

Represent this resource as a dictionary.

property integrations

A dictionary containing all Integrations that may be used in the implementation for a Flow, as defined in Terraform.

For example, if Slack and AWS Lambda Integrations are specified in the Environment, the integrations dictionary would look like this:

{
    "slack": <sym.sdk.strategies.integration.Integration>,
    "aws_lambda": <sym.sdk.strategies.integration.Integration>
}
property name

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

property srn

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

class sym.sdk.flow.Flow(srn: Union[sym.sdk.resource.SRN, str])

Bases: sym.sdk.resource.SymResource

The Flow class represents an instance of a sym_flow resource, which defines an approval workflow in Sym, allowing users to request temporary and auto-expiring access to sensitive resources.

Read more about Flows.

dict()

Represent this resource as a dictionary.

property environment

A reference to the Environment attached to this Flow.

property fields

A dictionary of Prompt Field names to Prompt Field objects, as defined by the prompt_field blocks in Terraform.

property name

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

property srn

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

property strategy

A reference to the Strategy attached to this Flow, if any.

property vars

A dict containing user-supplied values from the Flow’s definition in Terraform.

This dict might contain, for example, your team’s PagerDuty schedule ID.

class sym.sdk.flow.Run(srn: Union[sym.sdk.resource.SRN, str])

Bases: sym.sdk.resource.SymResource

A Run represents an instance of a Flow in progress.

For example, each new access request will generate a new Run with data pertaining to that specific access request.

property actors

A dict mapping Event names to the User that created each Event. There will be one entry for each Event in the current Run.

For example, with a sym:approval Flow, after the “approve” Event is received, the actors may look like this:

{
    "prompt": <User A>,
    "request": <User A>,
    "approve": <User B>
}
property contexts

A dict mapping Event names to the context attached to each Event. There will be one entry for each Event in the current Run.

For example, with a sym:approval Flow, after the “approve” Event is received, the contexts may look like this:

{
    "request": {
        "additional_id": "12345"
    }
}
dict()

Represent this resource as a dictionary.

property name

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

property source_channel

A Channel object, which contains information about the where the Run’s first Event came from.

property srn

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