createStreamGroup method

Future<CreateStreamGroupOutput> createStreamGroup({
  1. required String description,
  2. required StreamClass streamClass,
  3. String? clientToken,
  4. String? defaultApplicationIdentifier,
  5. List<LocationConfiguration>? locationConfigurations,
  6. Map<String, String>? tags,
})

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. The following capacity settings are available:

  • Always-on capacity: This setting, if non-zero, indicates minimum streaming capacity which is allocated to you and is never released back to the service. You pay for this base level of capacity at all times, whether used or idle.
  • Maximum capacity: This indicates the maximum capacity that the service can allocate for you. Newly created streams may take a few minutes to start. Capacity is released back to the service when idle. You pay for capacity that is allocated to you until it is released.
  • Target-idle capacity: This indicates idle capacity which the service pre-allocates and holds for you in anticipation of future activity. This helps to insulate your users from capacity-allocation delays. You pay for capacity which is held in this intentional idle state.
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.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter description : A descriptive label for the stream group.

Parameter streamClass : 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:

  • gen6n_pro_win2022 (NVIDIA, pro) Supports applications with extremely high 3D scene complexity which require maximum resources. Runs applications on Microsoft Windows Server 2022 Base and supports DirectX 12. Compatible with Unreal Engine versions up through 5.6, 32 and 64-bit applications, and anti-cheat technology. Powered by NVIDIA L4 Tensor Core GPUs.
    • Reference resolution: 1080p
    • Reference frame rate: 60 fps
    • Workload specifications: 16 vCPUs, 64 GB RAM, 24 GB VRAM
    • Tenancy: Supports 1 concurrent stream session
  • gen6n_pro (NVIDIA, pro) Supports applications with extremely high 3D scene complexity which require maximum resources. Powered by NVIDIA L4 Tensor Core GPUs.
    • Reference resolution: 1080p
    • Reference frame rate: 60 fps
    • Workload specifications: 16 vCPUs, 64 GB RAM, 24 GB VRAM
    • Tenancy: Supports 1 concurrent stream session
  • gen6n_ultra_win2022 (NVIDIA, ultra) Supports applications with high 3D scene complexity. Runs applications on Microsoft Windows Server 2022 Base and supports DirectX 12. Compatible with Unreal Engine versions up through 5.6, 32 and 64-bit applications, and anti-cheat technology. Powered by NVIDIA L4 Tensor Core GPUs.
    • Reference resolution: 1080p
    • Reference frame rate: 60 fps
    • Workload specifications: 8 vCPUs, 32 GB RAM, 24 GB VRAM
    • Tenancy: Supports 1 concurrent stream session
  • gen6n_ultra (NVIDIA, ultra) Supports applications with high 3D scene complexity. Powered by NVIDIA L4 Tensor Core GPUs.
    • Reference resolution: 1080p
    • Reference frame rate: 60 fps
    • Workload specifications: 8 vCPUs, 32 GB RAM, 24 GB VRAM
    • Tenancy: Supports 1 concurrent stream session
  • gen6n_high (NVIDIA, high) Supports applications with moderate to high 3D scene complexity. Powered by NVIDIA L4 Tensor Core GPUs.
    • 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
  • gen6n_medium (NVIDIA, medium) Supports applications with moderate 3D scene complexity. Powered by NVIDIA L4 Tensor Core GPUs.
    • Reference resolution: 1080p
    • Reference frame rate: 60 fps
    • Workload specifications: 2 vCPUs, 8 GB RAM, 6 GB VRAM
    • Tenancy: Supports up to 4 concurrent stream sessions
  • gen6n_small (NVIDIA, small) Supports applications with lightweight 3D scene complexity and low CPU usage. Powered by NVIDIA L4 Tensor Core GPUs.
    • Reference resolution: 1080p
    • Reference frame rate: 60 fps
    • Workload specifications: 1 vCPUs, 4 GB RAM, 2 GB VRAM
    • Tenancy: Supports up to 12 concurrent stream sessions
  • gen6n_medium_win2022 (NVIDIA, medium) Supports applications with low 3D scene complexity. Powered by NVIDIA L4 Tensor Core GPUs.
    • Reference resolution: 1080p
    • Reference frame rate: 60 fps
    • Workload specifications: 8 vCPUs, 32 GB RAM, 6 GB VRAM
    • Tenancy: Supports 1 concurrent stream session
  • gen6n_small_win2022 (NVIDIA, small) Supports applications with low 3D scene complexity. Powered by NVIDIA L4 Tensor Core GPUs.
    • Reference resolution: 1080p
    • Reference frame rate: 60 fps
    • Workload specifications: 2 vCPUs, 8 GB RAM, 3 GB VRAM
    • Tenancy: Supports 1 concurrent stream session
  • gen6e_pro_win2022 (NVIDIA, pro) Supports applications with extremely high 3D scene complexity which require maximum resources. Runs applications on Microsoft Windows Server 2022 Base and supports DirectX 12. Compatible with Unreal Engine versions up through 5.6, 32 and 64-bit applications, and anti-cheat technology. Powered by NVIDIA L40S Tensor Core GPUs.
    • Reference resolution: 1080p
    • Reference frame rate: 60 fps
    • Workload specifications: 16 vCPUs, 128 GB RAM, 48 GB VRAM
    • Tenancy: Supports 1 concurrent stream session
  • gen6e_pro (NVIDIA, pro) Supports applications with extremely high 3D scene complexity which require maximum resources. Powered by NVIDIA L40S Tensor Core GPUs.
    • Reference resolution: 1080p
    • Reference frame rate: 60 fps
    • Workload specifications: 16 vCPUs, 128 GB RAM, 48 GB VRAM
    • Tenancy: Supports 1 concurrent stream session
  • 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.6, 32 and 64-bit applications, and anti-cheat technology. Powered by NVIDIA A10G Tensor Core GPUs.
    • 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. Powered by NVIDIA A10G Tensor Core GPUs.
    • 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. Powered by NVIDIA A10G Tensor Core GPUs.
    • 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.6, 32 and 64-bit applications, and anti-cheat technology. Powered by NVIDIA T4 Tensor Core GPUs.
    • 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. Powered by NVIDIA T4 Tensor Core GPUs.
    • 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. Powered by NVIDIA T4 Tensor Core GPUs.
    • Reference resolution: 1080p
    • Reference frame rate: 60 fps
    • Workload specifications: 8 vCPUs, 32 GB RAM, 16 GB VRAM
    • Tenancy: Supports 1 concurrent stream session

Parameter clientToken : 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.

Parameter defaultApplicationIdentifier : 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.

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

Parameter 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.

Implementation

Future<CreateStreamGroupOutput> createStreamGroup({
  required String description,
  required StreamClass streamClass,
  String? clientToken,
  String? defaultApplicationIdentifier,
  List<LocationConfiguration>? locationConfigurations,
  Map<String, String>? tags,
}) async {
  final $payload = <String, dynamic>{
    'Description': description,
    'StreamClass': streamClass.value,
    'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
    if (defaultApplicationIdentifier != null)
      'DefaultApplicationIdentifier': defaultApplicationIdentifier,
    if (locationConfigurations != null)
      'LocationConfigurations': locationConfigurations,
    if (tags != null) 'Tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/streamgroups',
    exceptionFnMap: _exceptionFns,
  );
  return CreateStreamGroupOutput.fromJson(response);
}