Skip to content

query_objects async

query_objects(
    pipeline_id: id,
    sphere: string,
    *,
    config_overrides: Optional[AsyncDataPipelineClientConfig] = None,
    query: Optional[Query] = None,
    marker: Optional[string] = None,
    limit: Optional[int] = None,
) -> QueryObjectsOutput

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

POST / HTTP/1.1 Content-Type: application/x-amz-json-1.1 X-Amz-Target: DataPipeline.QueryObjects Content-Length: 123 Host: datapipeline.us-east-1.amazonaws.com X-Amz-Date: Mon, 12 Nov 2012 17:49:52 GMT Authorization: AuthParams {"pipelineId": "df-06372391ZG65EXAMPLE", "query": {"selectors": [ ] }, "sphere": "INSTANCE", "marker": "", "limit": 10} x-amzn-RequestId: 14d704c1-0775-11e2-af6f-6bc7a6be60d9 Content-Type: application/x-amz-json-1.1 Content-Length: 72 Date: Mon, 12 Nov 2012 17:50:53 GMT {"hasMoreResults": false, "ids": ["@SayHello_1_2012-09-25T17:00:00"] }

Parameters:

  • pipeline_id (id) –

    The ID of the pipeline.

  • query (Optional[Query], default: None ) –

    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.

  • sphere (string) –

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

  • marker (Optional[string], default: None ) –

    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 (Optional[int], default: None ) –

    The maximum number of object names that QueryObjects will return in a single call. The default value is 100.

Raises:

  • InternalServiceError –

    An internal service error occurred.

  • InvalidRequestException –

    The request was not valid. Verify that your request was properly formatted, that the signature was generated with the correct credentials, and that you haven't exceeded any of the service limits for your account.

  • PipelineDeletedException –

    The specified pipeline has been deleted.

  • PipelineNotFoundException –

    The specified pipeline was not found. Verify that you used the correct user and account identifiers.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_data_pipeline/_services/async_data_pipeline.py
async def query_objects(
    self,
    pipeline_id: "capo_data_pipeline.types.id.id",
    sphere: "capo_data_pipeline.types.string.string",
    *,
    config_overrides: Optional[AsyncDataPipelineClientConfig] = None,
    query: Optional["capo_data_pipeline.types.query.Query"] = None,
    marker: Optional["capo_data_pipeline.types.string.string"] = None,
    limit: Optional["capo_data_pipeline.types.int.int"] = None,
) -> "capo_data_pipeline.types.query_objects_output.QueryObjectsOutput":
    """<p>Queries the specified pipeline for the names of objects that match the specified set of conditions.</p> <examples> <request> POST / HTTP/1.1 Content-Type: application/x-amz-json-1.1 X-Amz-Target: DataPipeline.QueryObjects Content-Length: 123 Host: datapipeline.us-east-1.amazonaws.com X-Amz-Date: Mon, 12 Nov 2012 17:49:52 GMT Authorization: AuthParams {"pipelineId": "df-06372391ZG65EXAMPLE", "query": {"selectors": [ ] }, "sphere": "INSTANCE", "marker": "", "limit": 10} </request> <response> x-amzn-RequestId: 14d704c1-0775-11e2-af6f-6bc7a6be60d9 Content-Type: application/x-amz-json-1.1 Content-Length: 72 Date: Mon, 12 Nov 2012 17:50:53 GMT {"hasMoreResults": false, "ids": ["@SayHello_1_2012-09-25T17:00:00"] } </response> </examples>

    Args:
        pipeline_id: <p>The ID of the pipeline.</p>
        query: <p>The query that defines the objects to be returned. The <code>Query</code> 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.</p>
        sphere: <p>Indicates whether the query applies to components or instances. The possible values are: <code>COMPONENT</code>, <code>INSTANCE</code>, and <code>ATTEMPT</code>.</p>
        marker: <p>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 <code>QueryObjects</code> with the marker value from the previous call to retrieve the next set of results.</p>
        limit: <p>The maximum number of object names that <code>QueryObjects</code> will return in a single call. The default value is 100. </p>

    Raises:
        capo_data_pipeline.errors.internal_service_error.InternalServiceError: <p>An internal service error occurred.</p>
        capo_data_pipeline.errors.invalid_request_exception.InvalidRequestException: <p>The request was not valid. Verify that your request was properly formatted, that the signature was generated with the correct credentials, and that you haven't exceeded any of the service limits for your account.</p>
        capo_data_pipeline.errors.pipeline_deleted_exception.PipelineDeletedException: <p>The specified pipeline has been deleted.</p>
        capo_data_pipeline.errors.pipeline_not_found_exception.PipelineNotFoundException: <p>The specified pipeline was not found. Verify that you used the correct user and account identifiers.</p>
        capo_data_pipeline.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_data_pipeline.types.query_objects_input.QueryObjectsInput]",
    ) -> AsyncOperationResponse[
        "capo_data_pipeline.types.query_objects_output.QueryObjectsOutput"
    ]:
        import capo_data_pipeline._operations.data_pipeline.query_objects

        (
            output,
            http_response,
        ) = await capo_data_pipeline._operations.data_pipeline.query_objects.async_query_objects(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("QueryObjects")
    )
    input_: capo_data_pipeline.types.query_objects_input.QueryObjectsInput = {
        "pipeline_id": pipeline_id,
        "sphere": sphere,
    }
    if query is not None:
        input_["query"] = query
    if marker is not None:
        input_["marker"] = marker
    if limit is not None:
        input_["limit"] = limit

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output