Skip to content

/AWS1/IF_GMZ=>CREATESTREAMGROUP()

About CreateStreamGroup

Stream groups manage how Amazon GameLift Streams allocates resources and handles concurrent streams, allowing you to effectively manage capacity and costs. Within a stream group, you specify an application to stream, streaming locations and their capacity, and the stream class you want to use when streaming applications to your end-users. A stream class defines the hardware configuration of the compute resources that Amazon GameLift Streams will use when streaming, such as the CPU, GPU, and memory.

Stream capacity represents the number of concurrent streams that can be active at a time. You set stream capacity per location, per stream group. There are two types of capacity, always-on and on-demand:

  • Always-on: The streaming capacity that is allocated and ready to handle stream requests without delay. You pay for this capacity whether it's in use or not. Best for quickest time from streaming request to streaming session. Default is 1 (2 for high stream classes) when creating a stream group or adding a location.

  • On-demand: The streaming capacity that Amazon GameLift Streams can allocate in response to stream requests, and then de-allocate when the session has terminated. This offers a cost control measure at the expense of a greater startup time (typically under 5 minutes). Default is 0 when creating a stream group or adding a location.

Values for capacity must be whole number multiples of the tenancy value of the stream group's stream class.

To adjust the capacity of any ACTIVE stream group, call UpdateStreamGroup.

If the CreateStreamGroup request is successful, Amazon GameLift Streams assigns a unique ID to the stream group resource and sets the status to ACTIVATING. It can take a few minutes for Amazon GameLift Streams to finish creating the stream group while it searches for unallocated compute resources and provisions them. When complete, the stream group status will be ACTIVE and you can start stream sessions by using StartStreamSession. To check the stream group's status, call GetStreamGroup.

Stream groups should be recreated every 3-4 weeks to pick up important service updates and fixes. Stream groups that are older than 180 days can no longer be updated with new application associations. Stream groups expire when they are 365 days old, at which point they can no longer stream sessions. The exact expiration date is indicated by the date value in the ExpiresAt field.

Method Signature

METHODS /AWS1/IF_GMZ~CREATESTREAMGROUP
  IMPORTING
    !IV_DESCRIPTION TYPE /AWS1/GMZDESCRIPTION OPTIONAL
    !IV_STREAMCLASS TYPE /AWS1/GMZSTREAMCLASS OPTIONAL
    !IV_DEFAULTAPPLICATIONID TYPE /AWS1/GMZIDENTIFIER OPTIONAL
    !IT_LOCATIONCONFIGURATIONS TYPE /AWS1/CL_GMZLOCATIONCONF=>TT_LOCATIONCONFIGURATIONS OPTIONAL
    !IT_TAGS TYPE /AWS1/CL_GMZTAGS_W=>TT_TAGS OPTIONAL
    !IV_CLIENTTOKEN TYPE /AWS1/GMZCLIENTTOKEN OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_gmzcreatestrmgroupout
  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_description TYPE /AWS1/GMZDESCRIPTION /AWS1/GMZDESCRIPTION

A descriptive label for the stream group.

iv_streamclass TYPE /AWS1/GMZSTREAMCLASS /AWS1/GMZSTREAMCLASS

The target stream quality for sessions that are hosted in this stream group. Set a stream class that is appropriate to the type of content that you're streaming. Stream class determines the type of computing resources Amazon GameLift Streams uses and impacts the cost of streaming. The following options are available:

A stream class can be one of the following:

  • gen5n_win2022 (NVIDIA, ultra) Supports applications with extremely high 3D scene complexity. Runs applications on Microsoft Windows Server 2022 Base and supports DirectX 12. Compatible with Unreal Engine versions up through 5.4, 32 and 64-bit applications, and anti-cheat technology. Uses NVIDIA A10G Tensor GPU.

    • Reference resolution: 1080p

    • Reference frame rate: 60 fps

    • Workload specifications: 8 vCPUs, 32 GB RAM, 24 GB VRAM

    • Tenancy: Supports 1 concurrent stream session

  • gen5n_high (NVIDIA, high) Supports applications with moderate to high 3D scene complexity. Uses NVIDIA A10G Tensor GPU.

    • Reference resolution: 1080p

    • Reference frame rate: 60 fps

    • Workload specifications: 4 vCPUs, 16 GB RAM, 12 GB VRAM

    • Tenancy: Supports up to 2 concurrent stream sessions

  • gen5n_ultra (NVIDIA, ultra) Supports applications with extremely high 3D scene complexity. Uses dedicated NVIDIA A10G Tensor GPU.

    • Reference resolution: 1080p

    • Reference frame rate: 60 fps

    • Workload specifications: 8 vCPUs, 32 GB RAM, 24 GB VRAM

    • Tenancy: Supports 1 concurrent stream session

  • gen4n_win2022 (NVIDIA, ultra) Supports applications with extremely high 3D scene complexity. Runs applications on Microsoft Windows Server 2022 Base and supports DirectX 12. Compatible with Unreal Engine versions up through 5.4, 32 and 64-bit applications, and anti-cheat technology. Uses NVIDIA T4 Tensor GPU.

    • Reference resolution: 1080p

    • Reference frame rate: 60 fps

    • Workload specifications: 8 vCPUs, 32 GB RAM, 16 GB VRAM

    • Tenancy: Supports 1 concurrent stream session

  • gen4n_high (NVIDIA, high) Supports applications with moderate to high 3D scene complexity. Uses NVIDIA T4 Tensor GPU.

    • Reference resolution: 1080p

    • Reference frame rate: 60 fps

    • Workload specifications: 4 vCPUs, 16 GB RAM, 8 GB VRAM

    • Tenancy: Supports up to 2 concurrent stream sessions

  • gen4n_ultra (NVIDIA, ultra) Supports applications with high 3D scene complexity. Uses dedicated NVIDIA T4 Tensor GPU.

    • Reference resolution: 1080p

    • Reference frame rate: 60 fps

    • Workload specifications: 8 vCPUs, 32 GB RAM, 16 GB VRAM

    • Tenancy: Supports 1 concurrent stream session

Optional arguments:

iv_defaultapplicationid TYPE /AWS1/GMZIDENTIFIER /AWS1/GMZIDENTIFIER

The unique identifier of the Amazon GameLift Streams application that you want to set as the default application in a stream group. The application that you specify must be in READY status. The default application is pre-cached on always-on compute resources, reducing stream startup times. Other applications are automatically cached as needed.

If you do not link an application when you create a stream group, you will need to link one later, before you can start streaming, using AssociateApplications.

This value is 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.

it_locationconfigurations TYPE /AWS1/CL_GMZLOCATIONCONF=>TT_LOCATIONCONFIGURATIONS TT_LOCATIONCONFIGURATIONS

A set of one or more locations and the streaming capacity for each location.

it_tags TYPE /AWS1/CL_GMZTAGS_W=>TT_TAGS TT_TAGS

A list of labels to assign to the new stream group resource. Tags are developer-defined key-value pairs. Tagging Amazon Web Services resources is useful for resource management, access management and cost allocation. See Tagging Amazon Web Services Resources in the Amazon Web Services General Reference. You can use TagResource to add tags, UntagResource to remove tags, and ListTagsForResource to view tags on existing resources.

iv_clienttoken TYPE /AWS1/GMZCLIENTTOKEN /AWS1/GMZCLIENTTOKEN

A unique identifier that represents a client request. The request is idempotent, which ensures that an API request completes only once. When users send a request, Amazon GameLift Streams automatically populates this field.

RETURNING

oo_output TYPE REF TO /aws1/cl_gmzcreatestrmgroupout /AWS1/CL_GMZCREATESTRMGROUPOUT

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->createstreamgroup(
  it_locationconfigurations = VALUE /aws1/cl_gmzlocationconf=>tt_locationconfigurations(
    (
      new /aws1/cl_gmzlocationconf(
        iv_alwaysoncapacity = 123
        iv_locationname = |string|
        iv_ondemandcapacity = 123
      )
    )
  )
  it_tags = VALUE /aws1/cl_gmztags_w=>tt_tags(
    (
      VALUE /aws1/cl_gmztags_w=>ts_tags_maprow(
        key = |string|
        value = new /aws1/cl_gmztags_w( |string| )
      )
    )
  )
  iv_clienttoken = |string|
  iv_defaultapplicationid = |string|
  iv_description = |string|
  iv_streamclass = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_identifier = lo_result->get_arn( ).
  lv_description = lo_result->get_description( ).
  lo_defaultapplication = lo_result->get_defaultapplication( ).
  IF lo_defaultapplication IS NOT INITIAL.
    lv_id = lo_defaultapplication->get_id( ).
    lv_arn = lo_defaultapplication->get_arn( ).
  ENDIF.
  LOOP AT lo_result->get_locationstates( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_locationname = lo_row_1->get_locationname( ).
      lv_streamgrouplocationstat = lo_row_1->get_status( ).
      lv_alwaysoncapacity = lo_row_1->get_alwaysoncapacity( ).
      lv_ondemandcapacity = lo_row_1->get_ondemandcapacity( ).
      lv_capacityvalue = lo_row_1->get_requestedcapacity( ).
      lv_capacityvalue = lo_row_1->get_allocatedcapacity( ).
      lv_capacityvalue = lo_row_1->get_idlecapacity( ).
    ENDIF.
  ENDLOOP.
  lv_streamclass = lo_result->get_streamclass( ).
  lv_id = lo_result->get_id( ).
  lv_streamgroupstatus = lo_result->get_status( ).
  lv_streamgroupstatusreason = lo_result->get_statusreason( ).
  lv_timestamp = lo_result->get_lastupdatedat( ).
  lv_timestamp = lo_result->get_createdat( ).
  lv_timestamp = lo_result->get_expiresat( ).
  LOOP AT lo_result->get_associatedapplications( ) into lo_row_2.
    lo_row_3 = lo_row_2.
    IF lo_row_3 IS NOT INITIAL.
      lv_arn = lo_row_3->get_value( ).
    ENDIF.
  ENDLOOP.
ENDIF.