/AWS1/IF_GML=>UPDATEFLEETATTRIBUTES()¶
About UpdateFleetAttributes¶
This API works with the following fleet types: EC2, Anywhere, Container
Updates a fleet's mutable attributes, such as game session protection and resource creation limits.
To update fleet attributes, specify the fleet ID and the property values that you want to change. If successful, Amazon GameLift Servers returns the identifiers for the updated fleet.
A managed fleet's runtime environment, which depends on the fleet's Amazon Machine Image {AMI} version, can't be updated. You must create a new fleet. As a best practice, we recommend replacing your managed fleets every 30 days to maintain a secure and up-to-date runtime environment for your hosted game servers. For guidance, see Security best practices for Amazon GameLift Servers.
Learn more
Setting up Amazon GameLift Servers fleets
Method Signature¶
METHODS /AWS1/IF_GML~UPDATEFLEETATTRIBUTES
IMPORTING
!IV_FLEETID TYPE /AWS1/GMLFLEETIDORARN OPTIONAL
!IV_NAME TYPE /AWS1/GMLNONZEROANDMAXSTRING OPTIONAL
!IV_DESCRIPTION TYPE /AWS1/GMLNONZEROANDMAXSTRING OPTIONAL
!IV_NEWGAMESESSPROTECTIONPLY TYPE /AWS1/GMLPROTECTIONPOLICY OPTIONAL
!IO_RESOURCECREATIONLIMITPLY TYPE REF TO /AWS1/CL_GMLRESRCCREATIONLMT00 OPTIONAL
!IT_METRICGROUPS TYPE /AWS1/CL_GMLMETRICGROUPLIST_W=>TT_METRICGROUPLIST OPTIONAL
!IO_ANYWHERECONFIGURATION TYPE REF TO /AWS1/CL_GMLANYWHERECONF OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_gmlupdfleetattrsout
RAISING
/AWS1/CX_GMLCONFLICTEXCEPTION
/AWS1/CX_GMLINTERNALSERVICEEX
/AWS1/CX_GMLINVFLEETSTATUSEX
/AWS1/CX_GMLINVALIDREQUESTEX
/AWS1/CX_GMLLIMITEXCEEDEDEX
/AWS1/CX_GMLNOTFOUNDEXCEPTION
/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 update attribute metadata for. You can use either the fleet ID or ARN value.
Optional arguments:¶
iv_name TYPE /AWS1/GMLNONZEROANDMAXSTRING /AWS1/GMLNONZEROANDMAXSTRING¶
A descriptive label that is associated with a fleet. Fleet names do not need to be unique.
iv_description TYPE /AWS1/GMLNONZEROANDMAXSTRING /AWS1/GMLNONZEROANDMAXSTRING¶
A human-readable description of a fleet.
iv_newgamesessprotectionply TYPE /AWS1/GMLPROTECTIONPOLICY /AWS1/GMLPROTECTIONPOLICY¶
The game session protection policy to apply to all new game sessions created in this fleet. Game sessions that already exist are not affected. You can set protection for individual game sessions using UpdateGameSession .
NoProtection -- The game session can be terminated during a scale-down event.
FullProtection -- If the game session is in an
ACTIVEstatus, it cannot be terminated during a scale-down event.
io_resourcecreationlimitply TYPE REF TO /AWS1/CL_GMLRESRCCREATIONLMT00 /AWS1/CL_GMLRESRCCREATIONLMT00¶
Policy settings that limit the number of game sessions an individual player can create over a span of time.
it_metricgroups TYPE /AWS1/CL_GMLMETRICGROUPLIST_W=>TT_METRICGROUPLIST TT_METRICGROUPLIST¶
The name of a metric group to add this fleet to. Use a metric group in Amazon CloudWatch to aggregate the metrics from multiple fleets. Provide an existing metric group name, or create a new metric group by providing a new name. A fleet can only be in one metric group at a time.
io_anywhereconfiguration TYPE REF TO /AWS1/CL_GMLANYWHERECONF /AWS1/CL_GMLANYWHERECONF¶
Amazon GameLift Servers Anywhere configuration options.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_gmlupdfleetattrsout /AWS1/CL_GMLUPDFLEETATTRSOUT¶
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->updatefleetattributes(
io_anywhereconfiguration = new /aws1/cl_gmlanywhereconf( |string| )
io_resourcecreationlimitply = new /aws1/cl_gmlresrccreationlmt00(
iv_newgamesessionspercreator = 123
iv_policyperiodinminutes = 123
)
it_metricgroups = VALUE /aws1/cl_gmlmetricgrouplist_w=>tt_metricgrouplist(
( new /aws1/cl_gmlmetricgrouplist_w( |string| ) )
)
iv_description = |string|
iv_fleetid = |string|
iv_name = |string|
iv_newgamesessprotectionply = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_fleetid = lo_result->get_fleetid( ).
lv_fleetarn = lo_result->get_fleetarn( ).
ENDIF.