/AWS1/IF_DPI=>QUERYOBJECTS()¶
About QueryObjects¶
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"] }
Method Signature¶
METHODS /AWS1/IF_DPI~QUERYOBJECTS
IMPORTING
!IV_PIPELINEID TYPE /AWS1/DPIID OPTIONAL
!IO_QUERY TYPE REF TO /AWS1/CL_DPIQUERY OPTIONAL
!IV_SPHERE TYPE /AWS1/DPISTRING OPTIONAL
!IV_MARKER TYPE /AWS1/DPISTRING OPTIONAL
!IV_LIMIT TYPE /AWS1/DPIINT OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_dpiqueryobjectsoutput
RAISING
/AWS1/CX_DPIINTERNALSVCERROR
/AWS1/CX_DPIINVALIDREQUESTEX
/AWS1/CX_DPIPIPELINEDELETEDEX
/AWS1/CX_DPIPIPELINENOTFOUNDEX
/AWS1/CX_DPICLIENTEXC
/AWS1/CX_DPISERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_pipelineid TYPE /AWS1/DPIID /AWS1/DPIID¶
The ID of the pipeline.
iv_sphere TYPE /AWS1/DPISTRING /AWS1/DPISTRING¶
Indicates whether the query applies to components or instances. The possible values are:
COMPONENT,INSTANCE, andATTEMPT.
Optional arguments:¶
io_query TYPE REF TO /AWS1/CL_DPIQUERY /AWS1/CL_DPIQUERY¶
The query that defines the objects to be returned. The
Queryobject 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.
iv_marker TYPE /AWS1/DPISTRING /AWS1/DPISTRING¶
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
QueryObjectswith the marker value from the previous call to retrieve the next set of results.
iv_limit TYPE /AWS1/DPIINT /AWS1/DPIINT¶
The maximum number of object names that
QueryObjectswill return in a single call. The default value is 100.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_dpiqueryobjectsoutput /AWS1/CL_DPIQUERYOBJECTSOUTPUT¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->queryobjects(
io_query = new /aws1/cl_dpiquery(
it_selectors = VALUE /aws1/cl_dpiselector=>tt_selectorlist(
(
new /aws1/cl_dpiselector(
io_operator = new /aws1/cl_dpioperator(
it_values = VALUE /aws1/cl_dpistringlist_w=>tt_stringlist(
( new /aws1/cl_dpistringlist_w( |string| ) )
)
iv_type = |string|
)
iv_fieldname = |string|
)
)
)
)
iv_limit = 123
iv_marker = |string|
iv_pipelineid = |string|
iv_sphere = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
LOOP AT lo_result->get_ids( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_id = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
lv_string = lo_result->get_marker( ).
lv_boolean = lo_result->get_hasmoreresults( ).
ENDIF.