Loop Blocks¶
Accessed via client.loop_blocks.
pyawe.client.LoopBlocksClient
¶
Methods for the /loop-blocks resource.
create
¶
create(name: str, workflow_id: Union[UUID, str], loop_type: str, loop_config: Any) -> CreateLoopBlockResponse
Create a loop block task inside a workflow.
Creates both the outer task (of type "loop_block") and an empty
inner workflow that will be executed on each iteration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Name shown on the loop block node and used as the inner workflow name. |
required |
workflow_id
|
Union[UUID, str]
|
UUID of the outer workflow. |
required |
loop_type
|
str
|
|
required |
loop_config
|
Any
|
Type-dependent configuration dict:
|
required |
Returns:
| Type | Description |
|---|---|
CreateLoopBlockResponse
|
class: |
CreateLoopBlockResponse
|
outer task and loop block record. |
Raises:
| Type | Description |
|---|---|
AweAuthError
|
If not authenticated. |
AweValidationError
|
On a 400 response. |
get
¶
Fetch a loop block.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
loop_block_id
|
Union[UUID, str]
|
UUID of the loop block. |
required |
Returns:
| Type | Description |
|---|---|
LoopBlock
|
class: |
Raises:
| Type | Description |
|---|---|
AweNotFoundError
|
If the loop block does not exist. |
AweAuthError
|
If not authenticated. |
update
¶
update(loop_block_id: Union[UUID, str], *, name: Optional[str] = None, loop_type: Optional[str] = None, loop_config: Optional[Any] = None) -> LoopBlock
Update a loop block; only supplied fields are changed.
Renaming the loop block also renames the inner workflow.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
loop_block_id
|
Union[UUID, str]
|
UUID of the loop block. |
required |
name
|
Optional[str]
|
New name. |
None
|
loop_type
|
Optional[str]
|
New loop type. |
None
|
loop_config
|
Optional[Any]
|
New loop configuration. |
None
|
Returns:
| Type | Description |
|---|---|
LoopBlock
|
The updated :class: |
Raises:
| Type | Description |
|---|---|
AweNotFoundError
|
If the loop block does not exist. |
AweAuthError
|
If not authenticated. |
delete
¶
Delete a loop block.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
loop_block_id
|
Union[UUID, str]
|
UUID of the loop block. |
required |
Raises:
| Type | Description |
|---|---|
AweNotFoundError
|
If the loop block does not exist. |
AweAuthError
|
If not authenticated. |