incident_io_client.api.workflows_v2.workflows_v2_update_workflow
asyncio
async
asyncio(
id: str,
*,
client: Union[AuthenticatedClient, Client],
body: UpdateWorkflowPayload
) -> Optional[WorkflowsV2UpdateWorkflowResponseBody]
UpdateWorkflow Workflows V2
Updates a workflow
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id |
str
|
|
required |
body |
UpdateWorkflowPayload
|
Example: {'annotations': {'incident.io/terraform/version': '3.0.0'}, 'condition_groups': [{'conditions': [{'operation': 'one_of', 'param_bindings': [{'array_value': [{'literal': 'SEV123', 'reference': 'incident.severity'}], 'value': {'literal': 'SEV123', 'reference': 'incident.severity'}}], 'subject': 'incident.severity'}]}], 'continue_on_step_error': True, 'delay': {'conditions_apply_over_delay': False, 'for_seconds': 60}, 'expressions': [{'else_branch': {'result': {'array_value': [{'literal': 'SEV123', 'reference': 'incident.severity'}], 'value': {'literal': 'SEV123', 'reference': 'incident.severity'}}}, 'label': 'Team Slack channel', 'operations': [{'branches': {'branches': [{'condition_groups': [{'conditions': [{'operation': 'one_of', 'param_bindings': [{'array_value': [{'literal': 'SEV123', 'reference': 'incident.severity'}], 'value': {'literal': 'SEV123', 'reference': 'incident.severity'}}], 'subject': 'incident.severity'}]}], 'result': {'array_value': [{'literal': 'SEV123', 'reference': 'incident.severity'}], 'value': {'literal': 'SEV123', 'reference': 'incident.severity'}}}], 'returns': {'array': True, 'type': 'IncidentStatus'}}, 'filter': {'condition_groups': [{'conditions': [{'operation': 'one_of', 'param_bindings': [{'array_value': [{'literal': 'SEV123', 'reference': 'incident.severity'}], 'value': {'literal': 'SEV123', 'reference': 'incident.severity'}}], 'subject': 'incident.severity'}]}]}, 'navigate': {'reference': 'catalog_attribute["01FCNDV6P870EA6S7TK1DSYD5H"]'}, 'operation_type': 'navigate', 'parse': {'returns': {'array': True, 'type': 'IncidentStatus'}, 'source': 'metadata.annotations["github.com/repo"]'}}], 'reference': 'abc123', 'root_reference': 'incident.status'}], 'folder': 'My folder 01', 'include_private_incidents': True, 'name': 'My workflow', 'once_for': ['incident.url'], 'runs_on_incident_modes': ['standard', 'retrospective'], 'runs_on_incidents': 'newly_created', 'shortform': 'abc123', 'state': 'active', 'steps': [{'for_each': 'abc123', 'id': 'abc123', 'name': 'pagerduty.escalate', 'param_bindings': [{'array_value': [{'literal': 'SEV123', 'reference': 'incident.severity'}], 'value': {'literal': 'SEV123', 'reference': 'incident.severity'}}]}]}. |
required |
Raises:
Type | Description |
---|---|
UnexpectedStatus
|
If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. |
TimeoutException
|
If the request takes longer than Client.timeout. |
Returns:
Type | Description |
---|---|
Optional[WorkflowsV2UpdateWorkflowResponseBody]
|
WorkflowsV2UpdateWorkflowResponseBody |
Source code in incident_io_client/api/workflows_v2/workflows_v2_update_workflow.py
asyncio_detailed
async
asyncio_detailed(
id: str,
*,
client: Union[AuthenticatedClient, Client],
body: UpdateWorkflowPayload
) -> Response[WorkflowsV2UpdateWorkflowResponseBody]
UpdateWorkflow Workflows V2
Updates a workflow
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id |
str
|
|
required |
body |
UpdateWorkflowPayload
|
Example: {'annotations': {'incident.io/terraform/version': '3.0.0'}, 'condition_groups': [{'conditions': [{'operation': 'one_of', 'param_bindings': [{'array_value': [{'literal': 'SEV123', 'reference': 'incident.severity'}], 'value': {'literal': 'SEV123', 'reference': 'incident.severity'}}], 'subject': 'incident.severity'}]}], 'continue_on_step_error': True, 'delay': {'conditions_apply_over_delay': False, 'for_seconds': 60}, 'expressions': [{'else_branch': {'result': {'array_value': [{'literal': 'SEV123', 'reference': 'incident.severity'}], 'value': {'literal': 'SEV123', 'reference': 'incident.severity'}}}, 'label': 'Team Slack channel', 'operations': [{'branches': {'branches': [{'condition_groups': [{'conditions': [{'operation': 'one_of', 'param_bindings': [{'array_value': [{'literal': 'SEV123', 'reference': 'incident.severity'}], 'value': {'literal': 'SEV123', 'reference': 'incident.severity'}}], 'subject': 'incident.severity'}]}], 'result': {'array_value': [{'literal': 'SEV123', 'reference': 'incident.severity'}], 'value': {'literal': 'SEV123', 'reference': 'incident.severity'}}}], 'returns': {'array': True, 'type': 'IncidentStatus'}}, 'filter': {'condition_groups': [{'conditions': [{'operation': 'one_of', 'param_bindings': [{'array_value': [{'literal': 'SEV123', 'reference': 'incident.severity'}], 'value': {'literal': 'SEV123', 'reference': 'incident.severity'}}], 'subject': 'incident.severity'}]}]}, 'navigate': {'reference': 'catalog_attribute["01FCNDV6P870EA6S7TK1DSYD5H"]'}, 'operation_type': 'navigate', 'parse': {'returns': {'array': True, 'type': 'IncidentStatus'}, 'source': 'metadata.annotations["github.com/repo"]'}}], 'reference': 'abc123', 'root_reference': 'incident.status'}], 'folder': 'My folder 01', 'include_private_incidents': True, 'name': 'My workflow', 'once_for': ['incident.url'], 'runs_on_incident_modes': ['standard', 'retrospective'], 'runs_on_incidents': 'newly_created', 'shortform': 'abc123', 'state': 'active', 'steps': [{'for_each': 'abc123', 'id': 'abc123', 'name': 'pagerduty.escalate', 'param_bindings': [{'array_value': [{'literal': 'SEV123', 'reference': 'incident.severity'}], 'value': {'literal': 'SEV123', 'reference': 'incident.severity'}}]}]}. |
required |
Raises:
Type | Description |
---|---|
UnexpectedStatus
|
If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. |
TimeoutException
|
If the request takes longer than Client.timeout. |
Returns:
Type | Description |
---|---|
Response[WorkflowsV2UpdateWorkflowResponseBody]
|
Response[WorkflowsV2UpdateWorkflowResponseBody] |
Source code in incident_io_client/api/workflows_v2/workflows_v2_update_workflow.py
sync
sync(
id: str,
*,
client: Union[AuthenticatedClient, Client],
body: UpdateWorkflowPayload
) -> Optional[WorkflowsV2UpdateWorkflowResponseBody]
UpdateWorkflow Workflows V2
Updates a workflow
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id |
str
|
|
required |
body |
UpdateWorkflowPayload
|
Example: {'annotations': {'incident.io/terraform/version': '3.0.0'}, 'condition_groups': [{'conditions': [{'operation': 'one_of', 'param_bindings': [{'array_value': [{'literal': 'SEV123', 'reference': 'incident.severity'}], 'value': {'literal': 'SEV123', 'reference': 'incident.severity'}}], 'subject': 'incident.severity'}]}], 'continue_on_step_error': True, 'delay': {'conditions_apply_over_delay': False, 'for_seconds': 60}, 'expressions': [{'else_branch': {'result': {'array_value': [{'literal': 'SEV123', 'reference': 'incident.severity'}], 'value': {'literal': 'SEV123', 'reference': 'incident.severity'}}}, 'label': 'Team Slack channel', 'operations': [{'branches': {'branches': [{'condition_groups': [{'conditions': [{'operation': 'one_of', 'param_bindings': [{'array_value': [{'literal': 'SEV123', 'reference': 'incident.severity'}], 'value': {'literal': 'SEV123', 'reference': 'incident.severity'}}], 'subject': 'incident.severity'}]}], 'result': {'array_value': [{'literal': 'SEV123', 'reference': 'incident.severity'}], 'value': {'literal': 'SEV123', 'reference': 'incident.severity'}}}], 'returns': {'array': True, 'type': 'IncidentStatus'}}, 'filter': {'condition_groups': [{'conditions': [{'operation': 'one_of', 'param_bindings': [{'array_value': [{'literal': 'SEV123', 'reference': 'incident.severity'}], 'value': {'literal': 'SEV123', 'reference': 'incident.severity'}}], 'subject': 'incident.severity'}]}]}, 'navigate': {'reference': 'catalog_attribute["01FCNDV6P870EA6S7TK1DSYD5H"]'}, 'operation_type': 'navigate', 'parse': {'returns': {'array': True, 'type': 'IncidentStatus'}, 'source': 'metadata.annotations["github.com/repo"]'}}], 'reference': 'abc123', 'root_reference': 'incident.status'}], 'folder': 'My folder 01', 'include_private_incidents': True, 'name': 'My workflow', 'once_for': ['incident.url'], 'runs_on_incident_modes': ['standard', 'retrospective'], 'runs_on_incidents': 'newly_created', 'shortform': 'abc123', 'state': 'active', 'steps': [{'for_each': 'abc123', 'id': 'abc123', 'name': 'pagerduty.escalate', 'param_bindings': [{'array_value': [{'literal': 'SEV123', 'reference': 'incident.severity'}], 'value': {'literal': 'SEV123', 'reference': 'incident.severity'}}]}]}. |
required |
Raises:
Type | Description |
---|---|
UnexpectedStatus
|
If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. |
TimeoutException
|
If the request takes longer than Client.timeout. |
Returns:
Type | Description |
---|---|
Optional[WorkflowsV2UpdateWorkflowResponseBody]
|
WorkflowsV2UpdateWorkflowResponseBody |
Source code in incident_io_client/api/workflows_v2/workflows_v2_update_workflow.py
sync_detailed
sync_detailed(
id: str,
*,
client: Union[AuthenticatedClient, Client],
body: UpdateWorkflowPayload
) -> Response[WorkflowsV2UpdateWorkflowResponseBody]
UpdateWorkflow Workflows V2
Updates a workflow
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id |
str
|
|
required |
body |
UpdateWorkflowPayload
|
Example: {'annotations': {'incident.io/terraform/version': '3.0.0'}, 'condition_groups': [{'conditions': [{'operation': 'one_of', 'param_bindings': [{'array_value': [{'literal': 'SEV123', 'reference': 'incident.severity'}], 'value': {'literal': 'SEV123', 'reference': 'incident.severity'}}], 'subject': 'incident.severity'}]}], 'continue_on_step_error': True, 'delay': {'conditions_apply_over_delay': False, 'for_seconds': 60}, 'expressions': [{'else_branch': {'result': {'array_value': [{'literal': 'SEV123', 'reference': 'incident.severity'}], 'value': {'literal': 'SEV123', 'reference': 'incident.severity'}}}, 'label': 'Team Slack channel', 'operations': [{'branches': {'branches': [{'condition_groups': [{'conditions': [{'operation': 'one_of', 'param_bindings': [{'array_value': [{'literal': 'SEV123', 'reference': 'incident.severity'}], 'value': {'literal': 'SEV123', 'reference': 'incident.severity'}}], 'subject': 'incident.severity'}]}], 'result': {'array_value': [{'literal': 'SEV123', 'reference': 'incident.severity'}], 'value': {'literal': 'SEV123', 'reference': 'incident.severity'}}}], 'returns': {'array': True, 'type': 'IncidentStatus'}}, 'filter': {'condition_groups': [{'conditions': [{'operation': 'one_of', 'param_bindings': [{'array_value': [{'literal': 'SEV123', 'reference': 'incident.severity'}], 'value': {'literal': 'SEV123', 'reference': 'incident.severity'}}], 'subject': 'incident.severity'}]}]}, 'navigate': {'reference': 'catalog_attribute["01FCNDV6P870EA6S7TK1DSYD5H"]'}, 'operation_type': 'navigate', 'parse': {'returns': {'array': True, 'type': 'IncidentStatus'}, 'source': 'metadata.annotations["github.com/repo"]'}}], 'reference': 'abc123', 'root_reference': 'incident.status'}], 'folder': 'My folder 01', 'include_private_incidents': True, 'name': 'My workflow', 'once_for': ['incident.url'], 'runs_on_incident_modes': ['standard', 'retrospective'], 'runs_on_incidents': 'newly_created', 'shortform': 'abc123', 'state': 'active', 'steps': [{'for_each': 'abc123', 'id': 'abc123', 'name': 'pagerduty.escalate', 'param_bindings': [{'array_value': [{'literal': 'SEV123', 'reference': 'incident.severity'}], 'value': {'literal': 'SEV123', 'reference': 'incident.severity'}}]}]}. |
required |
Raises:
Type | Description |
---|---|
UnexpectedStatus
|
If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. |
TimeoutException
|
If the request takes longer than Client.timeout. |
Returns:
Type | Description |
---|---|
Response[WorkflowsV2UpdateWorkflowResponseBody]
|
Response[WorkflowsV2UpdateWorkflowResponseBody] |