Skip to content

/AWS1/CL_GML=>GETCOMPUTEACCESS()

About GetComputeAccess

Requests authorization to remotely connect to a hosting resource in a Amazon GameLift managed fleet. This operation is not used with Amazon GameLift Anywhere fleets.

Request options

Provide the fleet ID and compute name. The compute name varies depending on the type of fleet.

  • For a compute in a managed EC2 fleet, provide an instance ID. Each instance in the fleet is a compute.

  • For a compute in a managed container fleet, provide a compute name. In a container fleet, each game server container group on a fleet instance is assigned a compute name.

Results

If successful, this operation returns a set of temporary Amazon Web Services credentials, including a two-part access key and a session token.

  • With a managed EC2 fleet (where compute type is EC2), use these credentials with Amazon EC2 Systems Manager (SSM) to start a session with the compute. For more details, see Starting a session (CLI) in the Amazon EC2 Systems Manager User Guide.

Method Signature

IMPORTING

Required arguments:

iv_fleetid TYPE /AWS1/GMLFLEETIDORARN /AWS1/GMLFLEETIDORARN

A unique identifier for the fleet that holds the compute resource that you want to connect to. You can use either the fleet ID or ARN value.

iv_computename TYPE /AWS1/GMLCOMPUTENAMEORARN /AWS1/GMLCOMPUTENAMEORARN

A unique identifier for the compute resource that you want to connect to. For an EC2 fleet, use an instance ID. For a managed container fleet, use a compute name. You can retrieve a fleet's compute names by calling ListCompute.

RETURNING

oo_output TYPE REF TO /aws1/cl_gmlgetcomputeaccout /AWS1/CL_GMLGETCOMPUTEACCOUT

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->/aws1/if_gml~getcomputeaccess(
  iv_computename = |string|
  iv_fleetid = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_fleetidorarn = lo_result->get_fleetid( ).
  lv_fleetarn = lo_result->get_fleetarn( ).
  lv_computenameorarn = lo_result->get_computename( ).
  lv_computearn = lo_result->get_computearn( ).
  lo_awscredentials = lo_result->get_credentials( ).
  IF lo_awscredentials IS NOT INITIAL.
    lv_nonemptystring = lo_awscredentials->get_accesskeyid( ).
    lv_nonemptystring = lo_awscredentials->get_secretaccesskey( ).
    lv_nonemptystring = lo_awscredentials->get_sessiontoken( ).
  ENDIF.
  lv_sessiontarget = lo_result->get_target( ).
  LOOP AT lo_result->get_containeridentifiers( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_nonzeroand128maxasciist = lo_row_1->get_containername( ).
      lv_nonemptystring = lo_row_1->get_containerruntimeid( ).
    ENDIF.
  ENDLOOP.
ENDIF.