Trigger
Package: flyte.remote
class Trigger(
pb2: trigger_definition_pb2.Trigger,
details: TriggerDetails | None,
)| Parameter | Type | Description |
|---|---|---|
pb2 |
trigger_definition_pb2.Trigger |
|
details |
TriggerDetails | None |
Methods
| Method | Description |
|---|---|
create() |
Create a new trigger in the Flyte platform. |
delete() |
Delete a trigger by its name. |
get() |
Retrieve a trigger by its name and associated task name. |
get_details() |
Get detailed information about this trigger. |
listall() |
List all triggers associated with a specific task or all tasks if no task name is provided. |
to_dict() |
Convert the object to a JSON-serializable dictionary. |
to_json() |
Convert the object to a JSON string. |
update() |
Pause a trigger by its name and associated task name. |
create()
Default invocation is sync and will block.
To call it asynchronously, use the function .aio() on the method name itself, e.g.,:
result = await Trigger.create.aio().
def create(
cls,
trigger: flyte.Trigger,
task_name: str,
task_version: str | None,
) -> TriggerCreate a new trigger in the Flyte platform.
| Parameter | Type | Description |
|---|---|---|
cls |
||
trigger |
flyte.Trigger |
The flyte.Trigger object containing the trigger definition. |
task_name |
str |
Optional name of the task to associate with the trigger. |
task_version |
str | None |
delete()
Default invocation is sync and will block.
To call it asynchronously, use the function .aio() on the method name itself, e.g.,:
result = await Trigger.delete.aio().
def delete(
cls,
name: str,
task_name: str,
)Delete a trigger by its name.
| Parameter | Type | Description |
|---|---|---|
cls |
||
name |
str |
|
task_name |
str |
get()
Default invocation is sync and will block.
To call it asynchronously, use the function .aio() on the method name itself, e.g.,:
result = await Trigger.get.aio().
def get(
cls,
name: str,
task_name: str,
) -> TriggerDetailsRetrieve a trigger by its name and associated task name.
| Parameter | Type | Description |
|---|---|---|
cls |
||
name |
str |
|
task_name |
str |
get_details()
def get_details()Get detailed information about this trigger.
listall()
Default invocation is sync and will block.
To call it asynchronously, use the function .aio() on the method name itself, e.g.,:
result = await Trigger.listall.aio().
def listall(
cls,
task_name: str | None,
task_version: str | None,
limit: int,
) -> AsyncIterator[Trigger]List all triggers associated with a specific task or all tasks if no task name is provided.
| Parameter | Type | Description |
|---|---|---|
cls |
||
task_name |
str | None |
|
task_version |
str | None |
|
limit |
int |
to_dict()
def to_dict()Convert the object to a JSON-serializable dictionary.
Returns: dict: A dictionary representation of the object.
to_json()
def to_json()Convert the object to a JSON string.
Returns: str: A JSON string representation of the object.
update()
Default invocation is sync and will block.
To call it asynchronously, use the function .aio() on the method name itself, e.g.,:
result = await Trigger.update.aio().
def update(
cls,
name: str,
task_name: str,
active: bool,
)Pause a trigger by its name and associated task name.
| Parameter | Type | Description |
|---|---|---|
cls |
||
name |
str |
|
task_name |
str |
|
active |
bool |
Properties
| Property | Type | Description |
|---|---|---|
automation_spec |
None |
|
id |
None |
|
is_active |
None |
|
name |
None |
|
task_name |
None |