Skip to content

/AWS1/IF_GMZ=>GETSTREAMURL()

About GetStreamUrl

Retrieves properties for a stream URL, including its current status, usage, and the stream sessions started through it.

If you delete the stream group or application that backs the stream URL, this operation updates the status of the stream URL to REVOKED.

Method Signature

METHODS /AWS1/IF_GMZ~GETSTREAMURL
  IMPORTING
    !IV_IDENTIFIER TYPE /AWS1/GMZIDENTIFIER OPTIONAL
    !IV_STREAMURLIDENTIFIER TYPE /AWS1/GMZIDENTIFIER OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_gmzgetstreamurloutput
  RAISING
    /AWS1/CX_GMZACCESSDENIEDEX
    /AWS1/CX_GMZINTERNALSERVEREX
    /AWS1/CX_GMZRESOURCENOTFOUNDEX
    /AWS1/CX_GMZTHROTTLINGEX
    /AWS1/CX_GMZVALIDATIONEX
    /AWS1/CX_GMZCLIENTEXC
    /AWS1/CX_GMZSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_identifier TYPE /AWS1/GMZIDENTIFIER /AWS1/GMZIDENTIFIER

An Amazon Resource Name (ARN) or ID that uniquely identifies the stream group resource. Example ARN: arn:aws:gameliftstreams:us-west-2:111122223333:streamgroup/sg-1AB2C3De4. Example ID: sg-1AB2C3De4.

This is the stream group that owns the stream URL.

iv_streamurlidentifier TYPE /AWS1/GMZIDENTIFIER /AWS1/GMZIDENTIFIER

The unique identifier of the stream URL. Specify a stream URL ID or Amazon Resource Name (ARN). Example ARN: arn:aws:gameliftstreams:us-west-2:111122223333:streamurl/sg-1AB2C3De4/su-1AB2C3De4. Example ID: su-1AB2C3De4.

RETURNING

oo_output TYPE REF TO /aws1/cl_gmzgetstreamurloutput /AWS1/CL_GMZGETSTREAMURLOUTPUT

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->getstreamurl(
  iv_identifier = |string|
  iv_streamurlidentifier = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_arn = lo_result->get_arn( ).
  lv_id = lo_result->get_streamurlid( ).
  lv_streamsessionstreamurl = lo_result->get_streamurl( ).
  lv_streamurlstatus = lo_result->get_status( ).
  lv_streamurlstatusreason = lo_result->get_statusreason( ).
  lv_timestamp = lo_result->get_expiresat( ).
  lv_timestamp = lo_result->get_createdat( ).
  lv_usagelimit = lo_result->get_usagelimit( ).
  lv_remaininguses = lo_result->get_remaininguses( ).
  lv_arn = lo_result->get_streamgrouparn( ).
  lv_arn = lo_result->get_applicationarn( ).
  lv_protocol = lo_result->get_protocol( ).
  LOOP AT lo_result->get_locations( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_locationname = lo_row_1->get_value( ).
    ENDIF.
  ENDLOOP.
  lv_sessionlengthseconds = lo_result->get_sessionlengthseconds( ).
  lv_description = lo_result->get_description( ).
  LOOP AT lo_result->get_additionallaunchargs( ) into lo_row_2.
    lo_row_3 = lo_row_2.
    IF lo_row_3 IS NOT INITIAL.
      lv_string = lo_row_3->get_value( ).
    ENDIF.
  ENDLOOP.
  LOOP AT lo_result->get_addlenvironmentvariables( ) into ls_row_4.
    lv_key = ls_row_4-key.
    lo_value = ls_row_4-value.
    IF lo_value IS NOT INITIAL.
      lv_string = lo_value->get_value( ).
    ENDIF.
  ENDLOOP.
  lv_iamrolearn = lo_result->get_rolearn( ).
  lo_displayconfiguration = lo_result->get_displayconfiguration( ).
  IF lo_displayconfiguration IS NOT INITIAL.
    lo_resolution = lo_displayconfiguration->get_resolution( ).
    IF lo_resolution IS NOT INITIAL.
      lv_resolutionwidth = lo_resolution->get_width( ).
      lv_resolutionheight = lo_resolution->get_height( ).
    ENDIF.
  ENDIF.
  LOOP AT lo_result->get_streamsessions( ) into lo_row_5.
    lo_row_6 = lo_row_5.
    IF lo_row_6 IS NOT INITIAL.
      lv_arn = lo_row_6->get_arn( ).
      lv_userid = lo_row_6->get_userid( ).
      lv_streamsessionstatus = lo_row_6->get_status( ).
      lv_streamsessionstatusreas = lo_row_6->get_statusreason( ).
      lv_protocol = lo_row_6->get_protocol( ).
      lv_timestamp = lo_row_6->get_lastupdatedat( ).
      lv_timestamp = lo_row_6->get_createdat( ).
      lv_arn = lo_row_6->get_applicationarn( ).
      lo_exportfilesmetadata = lo_row_6->get_exportfilesmetadata( ).
      IF lo_exportfilesmetadata IS NOT INITIAL.
        lv_exportfilesstatus = lo_exportfilesmetadata->get_status( ).
        lv_exportfilesreason = lo_exportfilesmetadata->get_statusreason( ).
        lv_outputuri = lo_exportfilesmetadata->get_outputuri( ).
      ENDIF.
      lv_locationname = lo_row_6->get_location( ).
      lv_iamrolearn = lo_row_6->get_rolearn( ).
    ENDIF.
  ENDLOOP.
ENDIF.