/AWS1/IF_GML=>REGISTERCOMPUTE()¶
About RegisterCompute¶
This API works with the following fleet types: Anywhere, Container
Registers a compute resource in an Amazon GameLift Servers Anywhere fleet.
For an Anywhere fleet that's running the Amazon GameLift Servers Agent, the Agent handles all compute registry tasks for you. For an Anywhere fleet that doesn't use the Agent, call this operation to register fleet computes.
To register a compute, give the compute a name (must be unique within the fleet) and specify the compute resource's DNS name or IP address. Provide a fleet ID and a fleet location to associate with the compute being registered. You can optionally include the path to a TLS certificate on the compute resource.
If successful, this operation returns compute details, including an Amazon GameLift Servers SDK
endpoint or Agent endpoint. Game server processes running on the compute can use this
endpoint to communicate with the Amazon GameLift Servers service. Each server process includes the SDK
endpoint in its call to the Amazon GameLift Servers server SDK action InitSDK().
To view compute details, call DescribeCompute with the compute name.
Learn more
-
Server SDK reference guides (for version 5.x)
Method Signature¶
METHODS /AWS1/IF_GML~REGISTERCOMPUTE
IMPORTING
!IV_FLEETID TYPE /AWS1/GMLFLEETIDORARN OPTIONAL
!IV_COMPUTENAME TYPE /AWS1/GMLCOMPUTENAME OPTIONAL
!IV_CERTIFICATEPATH TYPE /AWS1/GMLNONZEROANDMAXSTRING OPTIONAL
!IV_DNSNAME TYPE /AWS1/GMLDNSNAMEINPUT OPTIONAL
!IV_IPADDRESS TYPE /AWS1/GMLIPADDRESS OPTIONAL
!IV_LOCATION TYPE /AWS1/GMLLOCATIONSTRINGMODEL OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_gmlregcomputeoutput
RAISING
/AWS1/CX_GMLCONFLICTEXCEPTION
/AWS1/CX_GMLINTERNALSERVICEEX
/AWS1/CX_GMLINVALIDREQUESTEX
/AWS1/CX_GMLLIMITEXCEEDEDEX
/AWS1/CX_GMLNOTREADYEXCEPTION
/AWS1/CX_GMLUNAUTHORIZEDEX
/AWS1/CX_GMLCLIENTEXC
/AWS1/CX_GMLSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_fleetid TYPE /AWS1/GMLFLEETIDORARN /AWS1/GMLFLEETIDORARN¶
A unique identifier for the fleet to register the compute to. You can use either the fleet ID or ARN value.
iv_computename TYPE /AWS1/GMLCOMPUTENAME /AWS1/GMLCOMPUTENAME¶
A descriptive label for the compute resource.
Optional arguments:¶
iv_certificatepath TYPE /AWS1/GMLNONZEROANDMAXSTRING /AWS1/GMLNONZEROANDMAXSTRING¶
The path to a TLS certificate on your compute resource. Amazon GameLift Servers doesn't validate the path and certificate.
iv_dnsname TYPE /AWS1/GMLDNSNAMEINPUT /AWS1/GMLDNSNAMEINPUT¶
The DNS name of the compute resource. Amazon GameLift Servers requires either a DNS name or IP address.
iv_ipaddress TYPE /AWS1/GMLIPADDRESS /AWS1/GMLIPADDRESS¶
The IP address of the compute resource. Amazon GameLift Servers requires either a DNS name or IP address. When registering an Anywhere fleet, an IP address is required.
iv_location TYPE /AWS1/GMLLOCATIONSTRINGMODEL /AWS1/GMLLOCATIONSTRINGMODEL¶
The name of a custom location to associate with the compute resource being registered. This parameter is required when registering a compute for an Anywhere fleet.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_gmlregcomputeoutput /AWS1/CL_GMLREGCOMPUTEOUTPUT¶
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->registercompute(
iv_certificatepath = |string|
iv_computename = |string|
iv_dnsname = |string|
iv_fleetid = |string|
iv_ipaddress = |string|
iv_location = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_compute = lo_result->get_compute( ).
IF lo_compute IS NOT INITIAL.
lv_fleetid = lo_compute->get_fleetid( ).
lv_fleetarn = lo_compute->get_fleetarn( ).
lv_computename = lo_compute->get_computename( ).
lv_computearn = lo_compute->get_computearn( ).
lv_ipaddress = lo_compute->get_ipaddress( ).
lv_dnsname = lo_compute->get_dnsname( ).
lv_computestatus = lo_compute->get_computestatus( ).
lv_locationstringmodel = lo_compute->get_location( ).
lv_timestamp = lo_compute->get_creationtime( ).
lv_operatingsystem = lo_compute->get_operatingsystem( ).
lv_ec2instancetype = lo_compute->get_type( ).
lv_gameliftservicesdkendpo = lo_compute->get_gameliftservicesdkendpt( ).
lv_gameliftagentendpointou = lo_compute->get_gameliftagentendpoint( ).
lv_instanceid = lo_compute->get_instanceid( ).
LOOP AT lo_compute->get_containerattributes( ) 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.
lv_containergroupdefinitio = lo_compute->get_gameservercontainergrd00( ).
ENDIF.
ENDIF.