Skip to content

get_flow_template

get_flow_template(
    id: Urn,
    *,
    config_overrides: Optional[IoTThingsGraphClientConfig] = None,
    revision_number: Optional[Version] = None,
) -> GetFlowTemplateResponse

Gets the latest version of the DefinitionDocument and FlowTemplateSummary for the specified workflow.

Parameters:

  • id (Urn) –

    The ID of the workflow.

    The ID should be in the following format.

    urn:tdm:REGION/ACCOUNT ID/default:workflow:WORKFLOWNAME

  • revision_number (Optional[Version], default: None ) –

    The number of the workflow revision to retrieve.

Raises:

Source code in docs_src/capo_iotthingsgraph/_services/io_t_things_graph.py
def get_flow_template(
    self,
    id: "capo_iotthingsgraph.types.urn.Urn",
    *,
    config_overrides: Optional[IoTThingsGraphClientConfig] = None,
    revision_number: Optional["capo_iotthingsgraph.types.version.Version"] = None,
) -> "capo_iotthingsgraph.types.get_flow_template_response.GetFlowTemplateResponse":
    """<p>Gets the latest version of the <code>DefinitionDocument</code> and <code>FlowTemplateSummary</code> for the specified workflow.</p>

    Args:
        id: <p>The ID of the workflow.</p> <p>The ID should be in the following format.</p> <p> <code>urn:tdm:REGION/ACCOUNT ID/default:workflow:WORKFLOWNAME</code> </p>
        revision_number: <p>The number of the workflow revision to retrieve.</p>

    Raises:
        capo_iotthingsgraph.errors.internal_failure_exception.InternalFailureException: <p></p>
        capo_iotthingsgraph.errors.invalid_request_exception.InvalidRequestException: <p></p>
        capo_iotthingsgraph.errors.resource_not_found_exception.ResourceNotFoundException: <p></p>
        capo_iotthingsgraph.errors.throttling_exception.ThrottlingException: <p></p>
        capo_iotthingsgraph.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_iotthingsgraph.types.get_flow_template_request.GetFlowTemplateRequest]",
    ) -> OperationResponse[
        "capo_iotthingsgraph.types.get_flow_template_response.GetFlowTemplateResponse"
    ]:
        import capo_iotthingsgraph._operations.iot_things_graph_front_end_service.get_flow_template

        output, http_response = (
            capo_iotthingsgraph._operations.iot_things_graph_front_end_service.get_flow_template.get_flow_template(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetFlowTemplate")
    )
    input_: capo_iotthingsgraph.types.get_flow_template_request.GetFlowTemplateRequest = {
        "id": id
    }
    if revision_number is not None:
        input_["revision_number"] = revision_number

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output