/AWS1/IF_GMZ=>CREATESTREAMURL()¶
About CreateStreamUrl¶
Creates a stream URL that grants temporary access to a stream session in a web browser without requiring an Amazon Web Services account or client integration.
You can use the stream URL to start a stream session up to the number of times set by UsageLimit, until it expires after UrlExpiresAfterMinutes. Each successful use starts a new stream session.
To make the request idempotent, provide a ClientToken.
Method Signature¶
METHODS /AWS1/IF_GMZ~CREATESTREAMURL
IMPORTING
!IV_IDENTIFIER TYPE /AWS1/GMZIDENTIFIER OPTIONAL
!IV_APPLICATIONIDENTIFIER TYPE /AWS1/GMZIDENTIFIER OPTIONAL
!IV_PROTOCOL TYPE /AWS1/GMZPROTOCOL OPTIONAL
!IV_URLEXPIRESAFTERMINUTES TYPE /AWS1/GMZURLEXPIRESAFTERMINS OPTIONAL
!IV_USAGELIMIT TYPE /AWS1/GMZUSAGELIMIT OPTIONAL
!IV_DESCRIPTION TYPE /AWS1/GMZDESCRIPTION OPTIONAL
!IT_LOCATIONS TYPE /AWS1/CL_GMZLOCATIONLIST_W=>TT_LOCATIONLIST OPTIONAL
!IV_SESSIONLENGTHSECONDS TYPE /AWS1/GMZSESSIONLENGTHSECONDS OPTIONAL
!IT_ADDITIONALLAUNCHARGS TYPE /AWS1/CL_GMZGAMELAUNCHARGLST_W=>TT_GAMELAUNCHARGLIST OPTIONAL
!IT_ADDLENVIRONMENTVARIABLES TYPE /AWS1/CL_GMZENVIRONMENTVARIA00=>TT_ENVIRONMENTVARIABLES OPTIONAL
!IV_ROLEARN TYPE /AWS1/GMZIAMROLEARN OPTIONAL
!IO_DISPLAYCONFIGURATION TYPE REF TO /AWS1/CL_GMZDISPLAYCONF OPTIONAL
!IV_CLIENTTOKEN TYPE /AWS1/GMZCLIENTTOKEN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_gmzcreatestrmurlout
RAISING
/AWS1/CX_GMZACCESSDENIEDEX
/AWS1/CX_GMZCONFLICTEXCEPTION
/AWS1/CX_GMZINTERNALSERVEREX
/AWS1/CX_GMZRESOURCENOTFOUNDEX
/AWS1/CX_GMZSERVICEQUOTAEXCDEX
/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.The stream session runs in this stream group.
iv_applicationidentifier TYPE /AWS1/GMZIDENTIFIER /AWS1/GMZIDENTIFIER¶
An Amazon Resource Name (ARN) or ID that uniquely identifies the application resource. Example ARN:
arn:aws:gameliftstreams:us-west-2:111122223333:application/a-9ZY8X7Wv6. Example ID:a-9ZY8X7Wv6.This application must be associated with the stream group.
iv_protocol TYPE /AWS1/GMZPROTOCOL /AWS1/GMZPROTOCOL¶
The data transport protocol for the stream session. Amazon GameLift Streams supports
WebRTC.
iv_urlexpiresafterminutes TYPE /AWS1/GMZURLEXPIRESAFTERMINS /AWS1/GMZURLEXPIRESAFTERMINS¶
The number of minutes after creation that the stream URL remains valid. After this period, the status of the stream URL changes to
EXPIREDand it can no longer start stream sessions. The minimum is 1 minute. For the maximum, see Regions, quotas, and limitations in the Amazon GameLift Streams Developer Guide.
it_locations TYPE /AWS1/CL_GMZLOCATIONLIST_W=>TT_LOCATIONLIST TT_LOCATIONLIST¶
A list of locations, in order of preference, where Amazon GameLift Streams can place the stream session. Specify each location by its Amazon Web Services Region code, for example
us-east-1. For a complete list of locations that Amazon GameLift Streams supports, refer to Regions, quotas, and limitations in the Amazon GameLift Streams Developer Guide.
Optional arguments:¶
iv_usagelimit TYPE /AWS1/GMZUSAGELIMIT /AWS1/GMZUSAGELIMIT¶
The maximum number of times the stream URL can start a stream session. Each successful use reduces the remaining uses by one. The minimum is 1, and the default is 1. For the maximum, see Regions, quotas, and limitations in the Amazon GameLift Streams Developer Guide.
iv_description TYPE /AWS1/GMZDESCRIPTION /AWS1/GMZDESCRIPTION¶
A descriptive label for the stream URL.
iv_sessionlengthseconds TYPE /AWS1/GMZSESSIONLENGTHSECONDS /AWS1/GMZSESSIONLENGTHSECONDS¶
The maximum length of time, in seconds, that a stream session started from this stream URL can run. Valid values are 1-86400 seconds (1 second to 24 hours). The default is 43200 seconds (12 hours).
it_additionallaunchargs TYPE /AWS1/CL_GMZGAMELAUNCHARGLST_W=>TT_GAMELAUNCHARGLIST TT_GAMELAUNCHARGLIST¶
A list of CLI arguments that are sent to the streaming server when a stream session launches. You can use this to configure the application or stream session details. You can also provide custom arguments that Amazon GameLift Streams passes to your game client.
AdditionalEnvironmentVariablesandAdditionalLaunchArgshave similar purposes.AdditionalEnvironmentVariablespasses data using environment variables; whileAdditionalLaunchArgspasses data using command-line arguments.
it_addlenvironmentvariables TYPE /AWS1/CL_GMZENVIRONMENTVARIA00=>TT_ENVIRONMENTVARIABLES TT_ENVIRONMENTVARIABLES¶
A set of options that you can use to control the stream session runtime environment, expressed as a set of key-value pairs. You can use this to configure the application or stream session details. You can also provide custom environment variables that Amazon GameLift Streams passes to your game client.
If you want to debug your application with environment variables, we recommend that you do so in a local environment outside of Amazon GameLift Streams. For more information, refer to the Compatibility Guidance in the troubleshooting section of the Developer Guide.
AdditionalEnvironmentVariablesandAdditionalLaunchArgshave similar purposes.AdditionalEnvironmentVariablespasses data using environment variables; whileAdditionalLaunchArgspasses data using command-line arguments.
iv_rolearn TYPE /AWS1/GMZIAMROLEARN /AWS1/GMZIAMROLEARN¶
The Amazon Resource Name (ARN) of the IAM role that Amazon GameLift Streams assumes during stream sessions started from this stream URL. For more information, see Provide AWS credentials to your streaming application in the Amazon GameLift Streams Developer Guide.
io_displayconfiguration TYPE REF TO /AWS1/CL_GMZDISPLAYCONF /AWS1/CL_GMZDISPLAYCONF¶
The display settings, such as resolution, for stream sessions started from this stream URL.
iv_clienttoken TYPE /AWS1/GMZCLIENTTOKEN /AWS1/GMZCLIENTTOKEN¶
A unique, case-sensitive identifier that you provide to ensure this request is idempotent. If you retry a request with the same
ClientToken, Amazon GameLift Streams returns the original response without performing the operation again.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_gmzcreatestrmurlout /AWS1/CL_GMZCREATESTRMURLOUT¶
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->createstreamurl(
io_displayconfiguration = new /aws1/cl_gmzdisplayconf(
io_resolution = new /aws1/cl_gmzresolution(
iv_height = 123
iv_width = 123
)
)
it_additionallaunchargs = VALUE /aws1/cl_gmzgamelauncharglst_w=>tt_gamelauncharglist(
( new /aws1/cl_gmzgamelauncharglst_w( |string| ) )
)
it_addlenvironmentvariables = VALUE /aws1/cl_gmzenvironmentvaria00=>tt_environmentvariables(
(
VALUE /aws1/cl_gmzenvironmentvaria00=>ts_environmentvariables_maprow(
key = |string|
value = new /aws1/cl_gmzenvironmentvaria00( |string| )
)
)
)
it_locations = VALUE /aws1/cl_gmzlocationlist_w=>tt_locationlist(
( new /aws1/cl_gmzlocationlist_w( |string| ) )
)
iv_applicationidentifier = |string|
iv_clienttoken = |string|
iv_description = |string|
iv_identifier = |string|
iv_protocol = |string|
iv_rolearn = |string|
iv_sessionlengthseconds = 123
iv_urlexpiresafterminutes = 123
iv_usagelimit = 123
).
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.
ENDIF.