DeadlineCloud / Client / search_workers

search_workers#

DeadlineCloud.Client.search_workers(**kwargs)#

Searches for workers.

See also: AWS API Documentation

Request Syntax

response = client.search_workers(
    farmId='string',
    filterExpressions={
        'filters': [
            {
                'dateTimeFilter': {
                    'dateTime': datetime(2015, 1, 1),
                    'name': 'string',
                    'operator': 'EQUAL'|'NOT_EQUAL'|'GREATER_THAN_EQUAL_TO'|'GREATER_THAN'|'LESS_THAN_EQUAL_TO'|'LESS_THAN'
                },
                'groupFilter': {'... recursive ...'},
                'parameterFilter': {
                    'name': 'string',
                    'operator': 'EQUAL'|'NOT_EQUAL'|'GREATER_THAN_EQUAL_TO'|'GREATER_THAN'|'LESS_THAN_EQUAL_TO'|'LESS_THAN',
                    'value': 'string'
                },
                'searchTermFilter': {
                    'searchTerm': 'string'
                },
                'stringFilter': {
                    'name': 'string',
                    'operator': 'EQUAL'|'NOT_EQUAL'|'GREATER_THAN_EQUAL_TO'|'GREATER_THAN'|'LESS_THAN_EQUAL_TO'|'LESS_THAN',
                    'value': 'string'
                }
            },
        ],
        'operator': 'AND'|'OR'
    },
    fleetIds=[
        'string',
    ],
    itemOffset=123,
    pageSize=123,
    sortExpressions=[
        {
            'fieldSort': {
                'name': 'string',
                'sortOrder': 'ASCENDING'|'DESCENDING'
            },
            'parameterSort': {
                'name': 'string',
                'sortOrder': 'ASCENDING'|'DESCENDING'
            },
            'userJobsFirst': {
                'userIdentityId': 'string'
            }
        },
    ]
)
Parameters:
  • farmId (string) –

    [REQUIRED]

    The farm ID in the workers search.

  • filterExpressions (dict) –

    The filter expression, AND or OR, to use when searching among a group of search strings in a resource.

    You can use two groupings per search each within parenthesis ().

    • 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, groupFilter, parameterFilter, searchTermFilter, stringFilter.

        • dateTimeFilter (dict) –

          Filters based on date and time.

          • dateTime (datetime) – [REQUIRED]

            The 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.

        • groupFilter (dict) –

          Filters by group.

        • 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.

        • 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.

    • operator (string) – [REQUIRED]

      The operators to include in the search.

  • fleetIds (list) –

    [REQUIRED]

    The fleet ID of the workers to search for.

    • (string) –

  • itemOffset (integer) –

    [REQUIRED]

    Defines how far into the scrollable list to start the return of results.

  • pageSize (integer) – Specifies the number of items per page for the resource.

  • sortExpressions (list) –

    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: fieldSort, parameterSort, userJobsFirst.

      • fieldSort (dict) –

        Options for sorting by a field.

        • name (string) – [REQUIRED]

          The name of the field.

        • sortOrder (string) – [REQUIRED]

          The sort order for the field.

      • parameterSort (dict) –

        Options for sorting by a parameter.

        • name (string) – [REQUIRED]

          The parameter name to sort by.

        • sortOrder (string) – [REQUIRED]

          The sort order for the parameter.

      • userJobsFirst (dict) –

        Options for sorting a particular user’s jobs first.

        • userIdentityId (string) – [REQUIRED]

          The user’s ID.

Return type:

dict

Returns:

Response Syntax

{
    'nextItemOffset': 123,
    'totalResults': 123,
    'workers': [
        {
            'createdAt': datetime(2015, 1, 1),
            'createdBy': 'string',
            'fleetId': 'string',
            'hostProperties': {
                'ec2InstanceArn': 'string',
                'ec2InstanceType': 'string',
                'hostName': 'string',
                'ipAddresses': {
                    'ipV4Addresses': [
                        'string',
                    ],
                    'ipV6Addresses': [
                        'string',
                    ]
                }
            },
            'status': 'CREATED'|'STARTED'|'STOPPING'|'STOPPED'|'NOT_RESPONDING'|'NOT_COMPATIBLE'|'RUNNING'|'IDLE',
            'updatedAt': datetime(2015, 1, 1),
            'updatedBy': 'string',
            'workerId': 'string'
        },
    ]
}

Response Structure

  • (dict) –

    • nextItemOffset (integer) –

      The next incremental starting point after the defined itemOffset.

    • totalResults (integer) –

      The total number of results in the search.

    • workers (list) –

      The workers for the search.

      • (dict) –

        The details of a worker search.

        • createdAt (datetime) –

          The date and time the resource was created.

        • createdBy (string) –

          The user or system that created this resource.

        • fleetId (string) –

          The fleet ID.

        • hostProperties (dict) –

          Provides the Amazon EC2 instance properties of the worker host.

          • ec2InstanceArn (string) –

            The ARN of the host EC2 instance.

          • ec2InstanceType (string) –

            The instance type of the host EC2 instance.

          • hostName (string) –

            The host name.

          • ipAddresses (dict) –

            The IP address of the host.

            • ipV4Addresses (list) –

              The IpV4 address of the network.

              • (string) –

            • ipV6Addresses (list) –

              The IpV6 address for the network and node component.

              • (string) –

        • status (string) –

          The status of the worker search.

        • updatedAt (datetime) –

          The date and time the resource was updated.

        • updatedBy (string) –

          The user or system that updated this resource.

        • workerId (string) –

          The worker ID.

Exceptions