azure.purview.workflow.operations package¶
- class azure.purview.workflow.operations.ApprovalOperations(*args, **kwargs)[source]¶
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
PurviewWorkflowClient’sapprovalattribute.- approve(task_id: str, approval_response_comment: JSON, *, content_type: str = 'application/json', **kwargs: Any) None[source]¶
- approve(task_id: str, approval_response_comment: IO, *, content_type: str = 'application/json', **kwargs: Any) None
Approve an approval.
- Parameters:
task_id (str) – The task id. Required.
approval_response_comment (JSON or IO) – The request body of approving an approval type of workflow task. Is either a JSON type or a IO type. Required.
- Keyword Arguments:
content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.
- Returns:
None
- Return type:
None
- Raises:
Example
# JSON input template you can fill out and use as your body input. approval_response_comment = { "comment": "str" # Optional. The comment of approving or rejecting an approval type of workflow task. }
- reject(task_id: str, approval_response_comment: JSON, *, content_type: str = 'application/json', **kwargs: Any) None[source]¶
- reject(task_id: str, approval_response_comment: IO, *, content_type: str = 'application/json', **kwargs: Any) None
Reject an approval.
- Parameters:
task_id (str) – The task id. Required.
approval_response_comment (JSON or IO) – The request body of rejecting an approval type of workflow task. Is either a JSON type or a IO type. Required.
- Keyword Arguments:
content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.
- Returns:
None
- Return type:
None
- Raises:
Example
# JSON input template you can fill out and use as your body input. approval_response_comment = { "comment": "str" # Optional. The comment of approving or rejecting an approval type of workflow task. }
- class azure.purview.workflow.operations.TaskStatusOperations(*args, **kwargs)[source]¶
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
PurviewWorkflowClient’stask_statusattribute.- update(task_id: str, task_update_command: JSON, *, content_type: str = 'application/json', **kwargs: Any) None[source]¶
- update(task_id: str, task_update_command: IO, *, content_type: str = 'application/json', **kwargs: Any) None
Update the status of a workflow task request.
- Parameters:
task_id (str) – The task id. Required.
task_update_command (JSON or IO) – Request body of updating workflow task request. Is either a JSON type or a IO type. Required.
- Keyword Arguments:
content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.
- Returns:
None
- Return type:
None
- Raises:
Example
# JSON input template you can fill out and use as your body input. task_update_command = { "newStatus": "str", # The new status will be used to update the task. Required. Known values are: "NotStarted", "InProgress", "Completed", and "Canceled". "comment": "str" # Optional. The comment when update a task. }
- class azure.purview.workflow.operations.UserRequestsOperations(*args, **kwargs)[source]¶
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
PurviewWorkflowClient’suser_requestsattribute.- submit(user_requests_payload: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON[source]¶
- submit(user_requests_payload: IO, *, content_type: str = 'application/json', **kwargs: Any) JSON
Submit a user request for requestor, a user request describes user ask to do operation(s) on Purview. If any workflow’s trigger matches with an operation in request, a run of the workflow is created.
- Parameters:
user_requests_payload (JSON or IO) – The payload of submitting a user request. Is either a JSON type or a IO type. Required.
- Keyword Arguments:
content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.
- Returns:
JSON object
- Return type:
JSON
- Raises:
Example
# JSON input template you can fill out and use as your body input. user_requests_payload = { "operations": [ { "payload": {}, # The payload of each operation which user want to submit. Required. "type": "str" # The operation type. Required. Known values are: "CreateTerm", "UpdateTerm", "DeleteTerm", "ImportTerms", "UpdateAsset", and "GrantDataAccess". } ], "comment": "str" # Optional. The comment when submit a user request. } # response body for status code(s): 200 response == { "operations": [ { "payload": {}, # The payload of each operation which user want to submit. Required. "type": "str", # The operation type. Required. Known values are: "CreateTerm", "UpdateTerm", "DeleteTerm", "ImportTerms", "UpdateAsset", and "GrantDataAccess". "workflowRunIds": [ "str" # Optional. The list of operations user want to submit, each operation matches one Purview API call and will do the operation directly. Required. ] } ], "requestId": "str", # The user request id. Required. "requestor": "str", # The person who submitted the user request. Required. "status": "str", # The status. Required. Known values are: "NotStarted", "InProgress", "Failed", "Completed", "Canceling", "CancellationFailed", and "Canceled". "comment": "str" # Optional. The comment when submit a user request. }
- class azure.purview.workflow.operations.WorkflowOperations(*args, **kwargs)[source]¶
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
PurviewWorkflowClient’sworkflowattribute.- create_or_replace(workflow_id: str, workflow_create_or_update_command: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON[source]¶
- create_or_replace(workflow_id: str, workflow_create_or_update_command: IO, *, content_type: str = 'application/json', **kwargs: Any) JSON
Create or replace a workflow.
- Parameters:
workflow_id (str) – The workflow id. Required.
workflow_create_or_update_command (JSON or IO) – Create or update workflow payload. Is either a JSON type or a IO type. Required.
- Keyword Arguments:
content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.
- Returns:
JSON object
- Return type:
JSON
- Raises:
Example
# JSON input template you can fill out and use as your body input. workflow_create_or_update_command = { "description": "str", # Description of a workflow. Required. "isEnabled": bool, # Whether the workflow enabled or not. Required. "name": "str", # The workflow name. Required. "triggers": [ { "type": "str", # Required. Known values are: "when_term_creation_is_requested", "when_term_deletion_is_requested", "when_term_update_is_requested", "when_terms_import_is_requested", "when_data_access_grant_is_requested", and "when_asset_update_is_requested". "underCollection": "str", # Optional. The collection name. "underGlossary": "str", # Optional. The glossary guid. "underGlossaryHierarchy": "str" # Optional. Glossary term hierarchy path. } ], "actionDag": {} # Optional. The action DAG(Directed Acyclic Graph), it defines actual flow. } # response body for status code(s): 200 response == { "actionDag": {}, # The action DAG(Directed Acyclic Graph), it defines steps to be executed in a workflow run and their order. Required. "description": "str", # Description of a workflow. Required. "id": "str", # The id of workflow. Required. "isEnabled": bool, # Whether the workflow is enabled or not. Required. "name": "str", # The name of a workflow. Required. "triggers": [ { "type": "str", # Required. Known values are: "when_term_creation_is_requested", "when_term_deletion_is_requested", "when_term_update_is_requested", "when_terms_import_is_requested", "when_data_access_grant_is_requested", and "when_asset_update_is_requested". "underCollection": "str", # Optional. The collection name. "underGlossary": "str", # Optional. The glossary guid. "underGlossaryHierarchy": "str" # Optional. Glossary term hierarchy path. } ], "createdBy": "str", # Optional. The person who created the workflow. "createdTime": "2020-02-20 00:00:00", # Optional. The created time of workflow. "lastUpdateTime": "2020-02-20 00:00:00", # Optional. The last update time. "updatedBy": "str" # Optional. The person who updated the workflow. }
- delete(workflow_id: str, **kwargs: Any) None[source]¶
Delete a workflow.
- Parameters:
workflow_id (str) – The workflow id. Required.
- Returns:
None
- Return type:
None
- Raises:
- get(workflow_id: str, **kwargs: Any) MutableMapping[str, Any][source]¶
Get a specific workflow.
- Parameters:
workflow_id (str) – The workflow id. Required.
- Returns:
JSON object
- Return type:
JSON
- Raises:
Example
# response body for status code(s): 200 response == { "actionDag": {}, # The action DAG(Directed Acyclic Graph), it defines steps to be executed in a workflow run and their order. Required. "description": "str", # Description of a workflow. Required. "id": "str", # The id of workflow. Required. "isEnabled": bool, # Whether the workflow is enabled or not. Required. "name": "str", # The name of a workflow. Required. "triggers": [ { "type": "str", # Required. Known values are: "when_term_creation_is_requested", "when_term_deletion_is_requested", "when_term_update_is_requested", "when_terms_import_is_requested", "when_data_access_grant_is_requested", and "when_asset_update_is_requested". "underCollection": "str", # Optional. The collection name. "underGlossary": "str", # Optional. The glossary guid. "underGlossaryHierarchy": "str" # Optional. Glossary term hierarchy path. } ], "createdBy": "str", # Optional. The person who created the workflow. "createdTime": "2020-02-20 00:00:00", # Optional. The created time of workflow. "lastUpdateTime": "2020-02-20 00:00:00", # Optional. The last update time. "updatedBy": "str" # Optional. The person who updated the workflow. }
- validate(workflow_id: str, workflow_validate_query: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON[source]¶
- validate(workflow_id: str, workflow_validate_query: IO, *, content_type: str = 'application/json', **kwargs: Any) JSON
Validate a workflow.
- Parameters:
workflow_id (str) – The workflow id. Required.
workflow_validate_query (JSON or IO) – Check workflow payload. Is either a JSON type or a IO type. Required.
- Keyword Arguments:
content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.
- Returns:
JSON object
- Return type:
JSON
- Raises:
Example
# JSON input template you can fill out and use as your body input. workflow_validate_query = { "description": "str", # Description of a workflow. Required. "isEnabled": bool, # Whether the workflow enabled or not. Required. "name": "str", # The workflow name. Required. "triggers": [ { "type": "str", # Required. Known values are: "when_term_creation_is_requested", "when_term_deletion_is_requested", "when_term_update_is_requested", "when_terms_import_is_requested", "when_data_access_grant_is_requested", and "when_asset_update_is_requested". "underCollection": "str", # Optional. The collection name. "underGlossary": "str", # Optional. The glossary guid. "underGlossaryHierarchy": "str" # Optional. Glossary term hierarchy path. } ], "actionDag": {} # Optional. The action DAG(Directed Acyclic Graph), it defines actual flow. } # response body for status code(s): 200 response == { "value": [ { "location": { "type": "str", # The validation violation location type. Required. Known values are: "workflow", "action", and "actionParameter". "actionName": "str", # Optional. The name of the action where the violation happens. "parameterKey": "str" # Optional. The key of the action parameter where the violation happens. }, "message": "str", # The detail about how the validation rule is violated. Required. "severity": "str" # The severity of the validation rule. Required. Known values are: "error" and "warning". } ] }
- class azure.purview.workflow.operations.WorkflowRunOperations(*args, **kwargs)[source]¶
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
PurviewWorkflowClient’sworkflow_runattribute.- cancel(workflow_run_id: str, run_cancel_reply: JSON, *, content_type: str = 'application/json', **kwargs: Any) None[source]¶
- cancel(workflow_run_id: str, run_cancel_reply: IO, *, content_type: str = 'application/json', **kwargs: Any) None
Cancel a workflow run.
- Parameters:
workflow_run_id (str) – The workflow run id. Required.
run_cancel_reply (JSON or IO) – Reply of canceling a workflow run. Is either a JSON type or a IO type. Required.
- Keyword Arguments:
content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.
- Returns:
None
- Return type:
None
- Raises:
Example
# JSON input template you can fill out and use as your body input. run_cancel_reply = { "comment": "str" # Optional. The comment of canceling a workflow run. }
- get(workflow_run_id: str, **kwargs: Any) MutableMapping[str, Any][source]¶
Get a workflow run.
- Parameters:
workflow_run_id (str) – The workflow run id. Required.
- Returns:
JSON object
- Return type:
JSON
- Raises:
Example
# response body for status code(s): 200 response == { "actionDag": {}, # The action DAG(Directed Acyclic Graph), it defines actual flow. Required. "detail": { "actions": {}, # Any object. Required. "runInput": {} # Built-in variables starts with @runInput. Its properties are determined by trigger type at workflow run time. Required. }, "cancelComment": "str", # Optional. The comment when cancel a workflow run. "cancelTime": "2020-02-20 00:00:00", # Optional. The time of workflow run be canceled. "endTime": "2020-02-20 00:00:00", # Optional. The time of workflow run completed. "id": "str", # Optional. The workflow run id. "requestor": "str", # Optional. The person who submitted the user request. "runPayload": { "payload": {}, # The payload of each operation which user want to submit. Required. "targetValue": "str", # The target value which need involve workflow to update. Required. "type": "str" # The workflow run payload type. Required. Known values are: "CreateTerm", "UpdateTerm", "DeleteTerm", "ImportTerms", "UpdateAsset", and "GrantDataAccess". }, "startTime": "2020-02-20 00:00:00", # Optional. Workflow run start time. "status": "str", # Optional. The status. Known values are: "NotStarted", "InProgress", "Failed", "Completed", "Canceling", "CancellationFailed", and "Canceled". "userRequestId": "str", # Optional. The user request id. "workflowId": "str" # Optional. The workflow id. }
- class azure.purview.workflow.operations.WorkflowRunsOperations(*args, **kwargs)[source]¶
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
PurviewWorkflowClient’sworkflow_runsattribute.- list(*, view_mode: str | None = None, time_window: str | None = None, orderby: str | None = None, run_statuses: List[str] | None = None, workflow_ids: List[str] | None = None, requestors: List[str] | None = None, **kwargs: Any) Iterable[MutableMapping[str, Any]][source]¶
List workflow runs.
- Keyword Arguments:
view_mode (str) – To filter user’s workflow runs or view as admin. Default value is None.
time_window (str) – Time window of filtering items. Known values are: “1d”, “7d”, “30d”, and “90d”. Default value is None.
orderby (str) – The key word which used to sort the results. Known values are: “status desc”, “status asc”, “requestor desc”, “requestor asc”, “startTime desc”, “startTime asc”, “createdTime desc”, and “createdTime asc”. Default value is None.
run_statuses (list[str]) – Filter workflow runs by workflow run status. Default value is None.
workflow_ids (list[str]) – Filter items by workflow id list. Default value is None.
requestors (list[str]) – Requestors’ ids to filter. Default value is None.
- Returns:
An iterator like instance of JSON object
- Return type:
ItemPaged[JSON]
- Raises:
Example
# response body for status code(s): 200 response == { "id": "str", # The workflow run id. Required. "requestor": "str", # The person who submitted the user request. Required. "runPayload": { "targetValue": "str", # The target value which need involve workflow to update. Required. "type": "str" # The workflow run payload type. Required. Known values are: "CreateTerm", "UpdateTerm", "DeleteTerm", "ImportTerms", "UpdateAsset", and "GrantDataAccess". }, "startTime": "2020-02-20 00:00:00", # Workflow run start time. Required. "status": "str", # The status. Required. Known values are: "NotStarted", "InProgress", "Failed", "Completed", "Canceling", "CancellationFailed", and "Canceled". "workflowId": "str", # The workflow id. Required. "cancelComment": "str", # Optional. The comment when cancel a workflow run. "cancelTime": "2020-02-20 00:00:00", # Optional. The time of workflow run be canceled. "endTime": "2020-02-20 00:00:00", # Optional. The time of workflow run completed. "userRequestId": "str" # Optional. The user request id. }
- class azure.purview.workflow.operations.WorkflowTaskOperations(*args, **kwargs)[source]¶
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
PurviewWorkflowClient’sworkflow_taskattribute.- get(task_id: str, **kwargs: Any) MutableMapping[str, Any][source]¶
Get a workflow task.
- Parameters:
task_id (str) – The task id. Required.
- Returns:
JSON object
- Return type:
JSON
- Raises:
Example
- reassign(task_id: str, reassign_command: JSON, *, content_type: str = 'application/json', **kwargs: Any) None[source]¶
- reassign(task_id: str, reassign_command: IO, *, content_type: str = 'application/json', **kwargs: Any) None
Reassign a workflow task.
- Parameters:
task_id (str) – The task id. Required.
reassign_command (JSON or IO) – The request body of reassigning a workflow task. Is either a JSON type or a IO type. Required.
- Keyword Arguments:
content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.
- Returns:
None
- Return type:
None
- Raises:
Example
# JSON input template you can fill out and use as your body input. reassign_command = { "reassignments": [ { "reassignFrom": "str", # Reassign a workflow task from a user or a group. Required. "reassignTo": "str" # Reassign a workflow task to a user or a group. Required. } ] }
- class azure.purview.workflow.operations.WorkflowTasksOperations(*args, **kwargs)[source]¶
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
PurviewWorkflowClient’sworkflow_tasksattribute.- list(*, view_mode: str | None = None, workflow_ids: List[str] | None = None, time_window: str | None = None, orderby: str | None = None, task_types: List[str] | None = None, task_statuses: List[str] | None = None, requestors: List[str] | None = None, assignees: List[str] | None = None, workflow_name_keyword: str | None = None, **kwargs: Any) Iterable[MutableMapping[str, Any]][source]¶
Get all workflow tasks.
- Keyword Arguments:
view_mode (str) – To filter user’s sent, received or history workflow tasks. Default value is None.
workflow_ids (list[str]) – Filter items by workflow id list. Default value is None.
time_window (str) – Time window of filtering items. Known values are: “1d”, “7d”, “30d”, and “90d”. Default value is None.
orderby (str) – The key word which used to sort the results. Known values are: “status desc”, “status asc”, “requestor desc”, “requestor asc”, “startTime desc”, “startTime asc”, “createdTime desc”, and “createdTime asc”. Default value is None.
task_types (list[str]) – Filter items by workflow task type. Default value is None.
task_statuses (list[str]) – Filter workflow tasks by status. Default value is None.
requestors (list[str]) – Requestors’ ids to filter. Default value is None.
assignees (list[str]) – Assignees’ ids to filter. Default value is None.
workflow_name_keyword (str) – The key word which could used to filter workflow item with related workflow. Default value is None.
- Returns:
An iterator like instance of JSON object
- Return type:
ItemPaged[JSON]
- Raises:
Example
- class azure.purview.workflow.operations.WorkflowsOperations(*args, **kwargs)[source]¶
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
PurviewWorkflowClient’sworkflowsattribute.- list(**kwargs: Any) Iterable[MutableMapping[str, Any]][source]¶
List all workflows.
- Returns:
An iterator like instance of JSON object
- Return type:
ItemPaged[JSON]
- Raises:
Example
# response body for status code(s): 200 response == { "description": "str", # Description of a workflow. Required. "id": "str", # The id of workflow. Required. "isEnabled": bool, # Whether the workflow is enabled or not. Required. "name": "str", # The name of a workflow. Required. "triggers": [ { "type": "str", # Required. Known values are: "when_term_creation_is_requested", "when_term_deletion_is_requested", "when_term_update_is_requested", "when_terms_import_is_requested", "when_data_access_grant_is_requested", and "when_asset_update_is_requested". "underCollection": "str", # Optional. The collection name. "underGlossary": "str", # Optional. The glossary guid. "underGlossaryHierarchy": "str" # Optional. Glossary term hierarchy path. } ], "createdBy": "str", # Optional. The person who created the workflow. "createdTime": "2020-02-20 00:00:00", # Optional. The created time of workflow. "lastUpdateTime": "2020-02-20 00:00:00", # Optional. The last update time. "updatedBy": "str" # Optional. The person who updated the workflow. }