:doc:`DeadlineCloud <../../deadline>` / Client / search_steps

************
search_steps
************



.. py:method:: DeadlineCloud.Client.search_steps(**kwargs)

  

  Searches for steps.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/deadline-2023-10-12/SearchSteps>`_  


  **Request Syntax**
  ::

    response = client.search_steps(
        farmId='string',
        queueIds=[
            'string',
        ],
        jobId='string',
        filterExpressions={
            'filters': [
                {
                    'dateTimeFilter': {
                        'name': 'string',
                        'operator': 'EQUAL'|'NOT_EQUAL'|'GREATER_THAN_EQUAL_TO'|'GREATER_THAN'|'LESS_THAN_EQUAL_TO'|'LESS_THAN'|'ANY_EQUALS'|'ALL_NOT_EQUALS',
                        'dateTime': datetime(2015, 1, 1)
                    },
                    'parameterFilter': {
                        'name': 'string',
                        'operator': 'EQUAL'|'NOT_EQUAL'|'GREATER_THAN_EQUAL_TO'|'GREATER_THAN'|'LESS_THAN_EQUAL_TO'|'LESS_THAN'|'ANY_EQUALS'|'ALL_NOT_EQUALS',
                        'value': 'string'
                    },
                    'searchTermFilter': {
                        'searchTerm': 'string',
                        'matchType': 'FUZZY_MATCH'|'CONTAINS'
                    },
                    'stringFilter': {
                        'name': 'string',
                        'operator': 'EQUAL'|'NOT_EQUAL'|'GREATER_THAN_EQUAL_TO'|'GREATER_THAN'|'LESS_THAN_EQUAL_TO'|'LESS_THAN'|'ANY_EQUALS'|'ALL_NOT_EQUALS',
                        'value': 'string'
                    },
                    'stringListFilter': {
                        'name': 'string',
                        'operator': 'EQUAL'|'NOT_EQUAL'|'GREATER_THAN_EQUAL_TO'|'GREATER_THAN'|'LESS_THAN_EQUAL_TO'|'LESS_THAN'|'ANY_EQUALS'|'ALL_NOT_EQUALS',
                        'values': [
                            'string',
                        ]
                    },
                    'groupFilter': {'... recursive ...'}
                },
            ],
            'operator': 'AND'|'OR'
        },
        sortExpressions=[
            {
                'userJobsFirst': {
                    'userIdentityId': 'string'
                },
                'fieldSort': {
                    'sortOrder': 'ASCENDING'|'DESCENDING',
                    'name': 'string'
                },
                'parameterSort': {
                    'sortOrder': 'ASCENDING'|'DESCENDING',
                    'name': 'string'
                }
            },
        ],
        itemOffset=123,
        pageSize=123
    )
    
  :type farmId: string
  :param farmId: **[REQUIRED]** 

    The farm ID to use for the step search.

    

  
  :type queueIds: list
  :param queueIds: **[REQUIRED]** 

    The queue IDs in the step search.

    

  
    - *(string) --* 

    

  :type jobId: string
  :param jobId: 

    The job ID to use in the step search.

    

  
  :type filterExpressions: dict
  :param filterExpressions: 

    The search terms for a resource.

    

  
    - **filters** *(list) --* **[REQUIRED]** 

      The filters to use for the search.

      

    
      - *(dict) --* 

        The type of search filter to apply.

        .. note::    This is a Tagged Union structure. Only one of the     following top level keys can be set: ``dateTimeFilter``, ``parameterFilter``, ``searchTermFilter``, ``stringFilter``, ``stringListFilter``, ``groupFilter``. 

      
        - **dateTimeFilter** *(dict) --* 

          Filters based on date and time.

          

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

            The name of the date-time field to filter on.

            

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

            The type of comparison to use to filter the results.

            

          
          - **dateTime** *(datetime) --* **[REQUIRED]** 

            The date and time.

            

          
        
        - **parameterFilter** *(dict) --* 

          Filters by parameter.

          

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

            The name of the parameter to filter on.

            

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

            The type of comparison to use to filter results.

            

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

            The parameter's value.

            

          
        
        - **searchTermFilter** *(dict) --* 

          Filters by a specified search term.

          

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

            The term to search for.

            

          
          - **matchType** *(string) --* 

            Specifies how Deadline Cloud matches your search term in the results. If you don't specify a ``matchType`` the default is ``FUZZY_MATCH``.

             

            
            * ``FUZZY_MATCH`` - Matches if a portion of the search term is found in the result.
             
            * ``CONTAINS`` - Matches if the exact search term is contained in the result.
            

            

          
        
        - **stringFilter** *(dict) --* 

          Filters by a string.

          

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

            The field name to search.

            

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

            The type of comparison to use for this search.

            

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

            The string to search for.

            

          
        
        - **stringListFilter** *(dict) --* 

          Filters by a list of strings.

          

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

            The field name to search.

            

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

            The type of comparison to use for this search.

            

          
          - **values** *(list) --* **[REQUIRED]** 

            The list of string values to search for.

            

          
            - *(string) --* 

            
        
        
        - **groupFilter** *(dict) --* 

          Filters by group.

          

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

      The operators to include in the search.

      

    
  
  :type sortExpressions: list
  :param sortExpressions: 

    The search terms for a resource.

    

  
    - *(dict) --* 

      The resources to search.

      .. note::    This is a Tagged Union structure. Only one of the     following top level keys can be set: ``userJobsFirst``, ``fieldSort``, ``parameterSort``. 

    
      - **userJobsFirst** *(dict) --* 

        Options for sorting a particular user's jobs first.

        

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

          The user's ID.

          

        
      
      - **fieldSort** *(dict) --* 

        Options for sorting by a field.

        

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

          The sort order for the field.

          

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

          The name of the field.

          

        
      
      - **parameterSort** *(dict) --* 

        Options for sorting by a parameter.

        

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

          The sort order for the parameter.

          

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

          The parameter name to sort by.

          

        
      
    

  :type itemOffset: integer
  :param itemOffset: **[REQUIRED]** 

    The offset for the search results.

    

  
  :type pageSize: integer
  :param pageSize: 

    Specifies the number of results to return.

    

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

    
    ::

      {
          'steps': [
              {
                  'stepId': 'string',
                  'jobId': 'string',
                  'queueId': 'string',
                  'name': 'string',
                  'lifecycleStatus': 'CREATE_COMPLETE'|'UPDATE_IN_PROGRESS'|'UPDATE_FAILED'|'UPDATE_SUCCEEDED',
                  'lifecycleStatusMessage': 'string',
                  'taskRunStatus': 'PENDING'|'READY'|'ASSIGNED'|'STARTING'|'SCHEDULED'|'INTERRUPTING'|'RUNNING'|'SUSPENDED'|'CANCELED'|'FAILED'|'SUCCEEDED'|'NOT_COMPATIBLE',
                  'targetTaskRunStatus': 'READY'|'FAILED'|'SUCCEEDED'|'CANCELED'|'SUSPENDED'|'PENDING',
                  'taskRunStatusCounts': {
                      'string': 123
                  },
                  'taskFailureRetryCount': 123,
                  'createdAt': datetime(2015, 1, 1),
                  'createdBy': 'string',
                  'startedAt': datetime(2015, 1, 1),
                  'endedAt': datetime(2015, 1, 1),
                  'updatedAt': datetime(2015, 1, 1),
                  'updatedBy': 'string',
                  'parameterSpace': {
                      'parameters': [
                          {
                              'name': 'string',
                              'type': 'INT'|'FLOAT'|'STRING'|'PATH'|'CHUNK_INT',
                              'chunks': {
                                  'defaultTaskCount': 123,
                                  'targetRuntimeSeconds': 123,
                                  'rangeConstraint': 'CONTIGUOUS'|'NONCONTIGUOUS'
                              }
                          },
                      ],
                      'combination': 'string'
                  }
              },
          ],
          'nextItemOffset': 123,
          'totalResults': 123
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **steps** *(list) --* 

        The steps in the search.

        
        

        - *(dict) --* 

          The details of a step search.

          
          

          - **stepId** *(string) --* 

            The step ID.

            
          

          - **jobId** *(string) --* 

            The job ID.

            
          

          - **queueId** *(string) --* 

            The queue ID.

            
          

          - **name** *(string) --* 

            The step name.

            
          

          - **lifecycleStatus** *(string) --* 

            The life cycle status.

            
          

          - **lifecycleStatusMessage** *(string) --* 

            The life cycle status message.

            
          

          - **taskRunStatus** *(string) --* 

            The task run status for the job.

             

            
            * ``PENDING``–pending and waiting for resources.
             
            * ``READY``–ready to be processed.
             
            * ``ASSIGNED``–assigned and will run next on a worker.
             
            * ``SCHEDULED``–scheduled to be run on a worker.
             
            * ``INTERRUPTING``–being interrupted.
             
            * ``RUNNING``–running on a worker.
             
            * ``SUSPENDED``–the task is suspended.
             
            * ``CANCELED``–the task has been canceled.
             
            * ``FAILED``–the task has failed.
             
            * ``SUCCEEDED``–the task has succeeded.
            

            
          

          - **targetTaskRunStatus** *(string) --* 

            The task status to update the job's tasks to.

            
          

          - **taskRunStatusCounts** *(dict) --* 

            The number of tasks running on the job.

            
            

            - *(string) --* 
              

              - *(integer) --* 
        
      
          

          - **taskFailureRetryCount** *(integer) --* 

            The total number of times tasks from the step failed and were retried.

            
          

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

            The date and time the resource was created.

            
          

          - **createdBy** *(string) --* 

            The user or system that created this resource.

            
          

          - **startedAt** *(datetime) --* 

            The date and time the resource started running.

            
          

          - **endedAt** *(datetime) --* 

            The date and time the resource ended running.

            
          

          - **updatedAt** *(datetime) --* 

            The date and time the resource was updated.

            
          

          - **updatedBy** *(string) --* 

            The user or system that updated this resource.

            
          

          - **parameterSpace** *(dict) --* 

            The parameters and combination expressions for the search.

            
            

            - **parameters** *(list) --* 

              The parameters to search for.

              
              

              - *(dict) --* 

                The details of a step parameter.

                
                

                - **name** *(string) --* 

                  The name of the parameter.

                  
                

                - **type** *(string) --* 

                  The data type of the parameter.

                  
                

                - **chunks** *(dict) --* 

                  The configuration for task chunking.

                  
                  

                  - **defaultTaskCount** *(integer) --* 

                    The number of tasks to combine into a single chunk by default.

                    
                  

                  - **targetRuntimeSeconds** *(integer) --* 

                    The number of seconds to aim for when forming chunks.

                    
                  

                  - **rangeConstraint** *(string) --* 

                    Specifies whether the chunked ranges must be contiguous or can have gaps between them.

                    
              
            
          
            

            - **combination** *(string) --* 

              The combination expression to use in the search.

              
        
      
    
      

      - **nextItemOffset** *(integer) --* 

        The next item offset for the search results.

        
      

      - **totalResults** *(integer) --* 

        The total number of results in the search.

        
  
  **Exceptions**
  
  *   :py:class:`DeadlineCloud.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`DeadlineCloud.Client.exceptions.InternalServerErrorException`

  
  *   :py:class:`DeadlineCloud.Client.exceptions.ResourceNotFoundException`

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

  
  *   :py:class:`DeadlineCloud.Client.exceptions.ValidationException`

  