/AWS1/IF_EBN=>RETRIEVEENVIRONMENTINFO()¶
About RetrieveEnvironmentInfo¶
Retrieves the compiled information from a RequestEnvironmentInfo request.
Related Topics
Method Signature¶
METHODS /AWS1/IF_EBN~RETRIEVEENVIRONMENTINFO
IMPORTING
!IV_ENVIRONMENTID TYPE /AWS1/EBNENVIRONMENTID OPTIONAL
!IV_ENVIRONMENTNAME TYPE /AWS1/EBNENVIRONMENTNAME OPTIONAL
!IV_INFOTYPE TYPE /AWS1/EBNENVIRONMENTINFOTYPE OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ebnretrieveenvironm01
RAISING
/AWS1/CX_EBNCLIENTEXC
/AWS1/CX_EBNSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_infotype TYPE /AWS1/EBNENVIRONMENTINFOTYPE /AWS1/EBNENVIRONMENTINFOTYPE¶
The type of information to retrieve.
Optional arguments:¶
iv_environmentid TYPE /AWS1/EBNENVIRONMENTID /AWS1/EBNENVIRONMENTID¶
The ID of the data's environment.
If no such environment is found, returns an
InvalidParameterValueerror.Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns
MissingRequiredParametererror.
iv_environmentname TYPE /AWS1/EBNENVIRONMENTNAME /AWS1/EBNENVIRONMENTNAME¶
The name of the data's environment.
If no such environment is found, returns an
InvalidParameterValueerror.Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns
MissingRequiredParametererror.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_ebnretrieveenvironm01 /AWS1/CL_EBNRETRIEVEENVIRONM01¶
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->retrieveenvironmentinfo(
iv_environmentid = |string|
iv_environmentname = |string|
iv_infotype = |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_environmentinfo( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_environmentinfotype = lo_row_1->get_infotype( ).
lv_ec2instanceid = lo_row_1->get_ec2instanceid( ).
lv_sampletimestamp = lo_row_1->get_sampletimestamp( ).
lv_message = lo_row_1->get_message( ).
ENDIF.
ENDLOOP.
ENDIF.
To retrieve tailed logs¶
The following operation retrieves a link to logs from an environment named my-env:
DATA(lo_result) = lo_client->retrieveenvironmentinfo(
iv_environmentname = |my-env|
iv_infotype = |tail|
).