DataPipeline / Client / query_objects

query_objects#

DataPipeline.Client.query_objects(**kwargs)#

Queries the specified pipeline for the names of objects that match the specified set of conditions.

See also: AWS API Documentation

Request Syntax

response = client.query_objects(
    pipelineId='string',
    query={
        'selectors': [
            {
                'fieldName': 'string',
                'operator': {
                    'type': 'EQ'|'REF_EQ'|'LE'|'GE'|'BETWEEN',
                    'values': [
                        'string',
                    ]
                }
            },
        ]
    },
    sphere='string',
    marker='string',
    limit=123
)
Parameters:
  • pipelineId (string) –

    [REQUIRED]

    The ID of the pipeline.

  • query (dict) –

    The query that defines the objects to be returned. The Query object can contain a maximum of ten selectors. The conditions in the query are limited to top-level String fields in the object. These filters can be applied to components, instances, and attempts.

    • selectors (list) –

      List of selectors that define the query. An object must satisfy all of the selectors to match the query.

      • (dict) –

        A comparision that is used to determine whether a query should return this object.

        • fieldName (string) –

          The name of the field that the operator will be applied to. The field name is the “key” portion of the field definition in the pipeline definition syntax that is used by the AWS Data Pipeline API. If the field is not set on the object, the condition fails.

        • operator (dict) –

          Contains a logical operation for comparing the value of a field with a specified value.

          • type (string) –

            The logical operation to be performed: equal ( EQ), equal reference ( REF_EQ), less than or equal ( LE), greater than or equal ( GE), or between ( BETWEEN). Equal reference ( REF_EQ) can be used only with reference fields. The other comparison types can be used only with String fields. The comparison types you can use apply only to certain object fields, as detailed below.

            The comparison operators EQ and REF_EQ act on the following fields:

            • name

            • @sphere

            • parent

            • @componentParent

            • @instanceParent

            • @status

            • @scheduledStartTime

            • @scheduledEndTime

            • @actualStartTime

            • @actualEndTime

            The comparison operators GE, LE, and BETWEEN act on the following fields:

            • @scheduledStartTime

            • @scheduledEndTime

            • @actualStartTime

            • @actualEndTime

            Note that fields beginning with the at sign (@) are read-only and set by the web service. When you name fields, you should choose names containing only alpha-numeric values, as symbols may be reserved by AWS Data Pipeline. User-defined fields that you add to a pipeline should prefix their name with the string “my”.

          • values (list) –

            The value that the actual field value will be compared with.

            • (string) –

  • sphere (string) –

    [REQUIRED]

    Indicates whether the query applies to components or instances. The possible values are: COMPONENT, INSTANCE, and ATTEMPT.

  • marker (string) – The starting point for the results to be returned. For the first call, this value should be empty. As long as there are more results, continue to call QueryObjects with the marker value from the previous call to retrieve the next set of results.

  • limit (integer) – The maximum number of object names that QueryObjects will return in a single call. The default value is 100.

Return type:

dict

Returns:

Response Syntax

{
    'ids': [
        'string',
    ],
    'marker': 'string',
    'hasMoreResults': True|False
}

Response Structure

  • (dict) –

    Contains the output of QueryObjects.

    • ids (list) –

      The identifiers that match the query selectors.

      • (string) –

    • marker (string) –

      The starting point for the next page of results. To view the next page of results, call QueryObjects again with this marker value. If the value is null, there are no more results.

    • hasMoreResults (boolean) –

      Indicates whether there are more results that can be obtained by a subsequent call.

Exceptions