Skip to content

/AWS1/IF_MCI=>GETENVIRONMENT()

About GetEnvironment

Describes a specific Environment

Method Signature

METHODS /AWS1/IF_MCI~GETENVIRONMENT
  IMPORTING
    !IV_ID TYPE /AWS1/MCIENVIRONMENTID OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_mcigetenvresponse
  RAISING
    /AWS1/CX_MCIACCESSDENIEDEX
    /AWS1/CX_MCIINTERCNCTCLIENTEX
    /AWS1/CX_MCIINTERCNCTSERVEREX
    /AWS1/CX_MCIINTERCNCTVLDTNEX
    /AWS1/CX_MCIRESOURCENOTFOUNDEX
    /AWS1/CX_MCISERVICEQUOTAEXCDEX
    /AWS1/CX_MCITHROTTLINGEX
    /AWS1/CX_MCICLIENTEXC
    /AWS1/CX_MCISERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_id TYPE /AWS1/MCIENVIRONMENTID /AWS1/MCIENVIRONMENTID

The identifier of the specific Environment to describe.

RETURNING

oo_output TYPE REF TO /aws1/cl_mcigetenvresponse /AWS1/CL_MCIGETENVRESPONSE

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->getenvironment( |string| ).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_environment = lo_result->get_environment( ).
  IF lo_environment IS NOT INITIAL.
    lo_provider = lo_environment->get_provider( ).
    IF lo_provider IS NOT INITIAL.
      lv_cloudserviceprovider = lo_provider->get_cloudserviceprovider( ).
      lv_lastmileprovider = lo_provider->get_lastmileprovider( ).
    ENDIF.
    lv_location = lo_environment->get_location( ).
    lv_environmentid = lo_environment->get_environmentid( ).
    lv_environmentstate = lo_environment->get_state( ).
    lo_bandwidths = lo_environment->get_bandwidths( ).
    IF lo_bandwidths IS NOT INITIAL.
      LOOP AT lo_bandwidths->get_available( ) into lo_row.
        lo_row_1 = lo_row.
        IF lo_row_1 IS NOT INITIAL.
          lv_connectionbandwidth = lo_row_1->get_value( ).
        ENDIF.
      ENDLOOP.
      LOOP AT lo_bandwidths->get_supported( ) into lo_row.
        lo_row_1 = lo_row.
        IF lo_row_1 IS NOT INITIAL.
          lv_connectionbandwidth = lo_row_1->get_value( ).
        ENDIF.
      ENDLOOP.
    ENDIF.
    lv_producttype = lo_environment->get_type( ).
    lv_string = lo_environment->get_activationpageurl( ).
    lv_remoteaccountidentifier = lo_environment->get_remoteidentifiertype( ).
  ENDIF.
ENDIF.

Get a specific environment

Get a specific environment

DATA(lo_result) = lo_client->getenvironment( |mce-aws-acme-1| ).