:doc:`IoTThingsGraph <../../iotthingsgraph>` / Client / create_flow_template

********************
create_flow_template
********************



.. py:method:: IoTThingsGraph.Client.create_flow_template(**kwargs)

  

  Creates a workflow template. Workflows can be created only in the user's namespace. (The public namespace contains only entities.) The workflow can contain only entities in the specified namespace. The workflow is validated against the entities in the latest version of the user's namespace unless another namespace version is specified in the request.

  

  .. danger::

        This operation is deprecated and may not function as expected. This operation should not be used going forward and is only kept for the purpose of backwards compatiblity.


  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iotthingsgraph-2018-09-06/CreateFlowTemplate>`_  


  **Request Syntax**
  ::

    response = client.create_flow_template(
        definition={
            'language': 'GRAPHQL',
            'text': 'string'
        },
        compatibleNamespaceVersion=123
    )
    
  :type definition: dict
  :param definition: **[REQUIRED]** 

    The workflow ``DefinitionDocument``.

    

  
    - **language** *(string) --* **[REQUIRED]** 

      The language used to define the entity. ``GRAPHQL`` is the only valid value.

      

    
    - **text** *(string) --* **[REQUIRED]** 

      The GraphQL text that defines the entity.

      

    
  
  :type compatibleNamespaceVersion: integer
  :param compatibleNamespaceVersion: 

    The namespace version in which the workflow is to be created.

     

    If no value is specified, the latest version is used by default.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'summary': {
              'id': 'string',
              'arn': 'string',
              'revisionNumber': 123,
              'createdAt': datetime(2015, 1, 1)
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **summary** *(dict) --* 

        The summary object that describes the created workflow.

        
        

        - **id** *(string) --* 

          The ID of the workflow.

          
        

        - **arn** *(string) --* 

          The ARN of the workflow.

          
        

        - **revisionNumber** *(integer) --* 

          The revision number of the workflow.

          
        

        - **createdAt** *(datetime) --* 

          The date when the workflow was created.

          
    
  
  **Exceptions**
  
  *   :py:class:`IoTThingsGraph.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`IoTThingsGraph.Client.exceptions.ResourceAlreadyExistsException`

  
  *   :py:class:`IoTThingsGraph.Client.exceptions.ThrottlingException`

  
  *   :py:class:`IoTThingsGraph.Client.exceptions.LimitExceededException`

  
  *   :py:class:`IoTThingsGraph.Client.exceptions.InternalFailureException`

  