Class CfnStreamGroup

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggableV2, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.110.0 (build 336b265)", date="2025-04-24T21:15:53.880Z") @Stability(Stable) public class CfnStreamGroup extends CfnResource implements IInspectable, ITaggableV2
The AWS::GameLiftStreams::StreamGroup resource defines a group of compute resources that will be running and streaming your game.

When you create a stream group, you specify the hardware configuration (CPU, GPU, RAM) that will run your game (known as the stream class ), the geographical locations where your game can run, and the number of streams that can run simultaneously in each location (known as stream capacity ). Stream groups manage how Amazon GameLift Streams allocates resources and handles concurrent streams, allowing you to effectively manage capacity and costs.

There are two types of stream 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.
  • 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).

Application association is not currently supported in AWS CloudFormation . To link additional applications to a stream group, use the Amazon GameLift Streams console or the AWS CLI .

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.gameliftstreams.*;
 CfnStreamGroup cfnStreamGroup = CfnStreamGroup.Builder.create(this, "MyCfnStreamGroup")
         .description("description")
         .locationConfigurations(List.of(LocationConfigurationProperty.builder()
                 .locationName("locationName")
                 // the properties below are optional
                 .alwaysOnCapacity(123)
                 .onDemandCapacity(123)
                 .build()))
         .streamClass("streamClass")
         // the properties below are optional
         .defaultApplication(DefaultApplicationProperty.builder()
                 .arn("arn")
                 .id("id")
                 .build())
         .tags(Map.of(
                 "tagsKey", "tags"))
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnStreamGroup

      protected CfnStreamGroup(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnStreamGroup

      protected CfnStreamGroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnStreamGroup

      @Stability(Stable) public CfnStreamGroup(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnStreamGroupProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      An Amazon Resource Name (ARN) that uniquely identifies the stream group resource. For example: arn:aws:gameliftstreams:us-west-2:123456789012:streamgroup/sg-1AB2C3De4 .
    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
      An ID that uniquely identifies the stream group resource.

      For example: sg-1AB2C3De4 .

    • getCdkTagManager

      @Stability(Stable) @NotNull public TagManager getCdkTagManager()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getCdkTagManager in interface ITaggableV2
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getDescription

      @Stability(Stable) @NotNull public String getDescription()
      A descriptive label for the stream group.
    • setDescription

      @Stability(Stable) public void setDescription(@NotNull String value)
      A descriptive label for the stream group.
    • getLocationConfigurations

      @Stability(Stable) @NotNull public Object getLocationConfigurations()
      A set of one or more locations and the streaming capacity for each location.
    • setLocationConfigurations

      @Stability(Stable) public void setLocationConfigurations(@NotNull IResolvable value)
      A set of one or more locations and the streaming capacity for each location.
    • setLocationConfigurations

      @Stability(Stable) public void setLocationConfigurations(@NotNull List<Object> value)
      A set of one or more locations and the streaming capacity for each location.
    • getStreamClass

      @Stability(Stable) @NotNull public String getStreamClass()
      The target stream quality for sessions that are hosted in this stream group.
    • setStreamClass

      @Stability(Stable) public void setStreamClass(@NotNull String value)
      The target stream quality for sessions that are hosted in this stream group.
    • getDefaultApplication

      @Stability(Stable) @Nullable public Object getDefaultApplication()
      Object that identifies the Amazon GameLift Streams application to stream with this stream group.
    • setDefaultApplication

      @Stability(Stable) public void setDefaultApplication(@Nullable IResolvable value)
      Object that identifies the Amazon GameLift Streams application to stream with this stream group.
    • setDefaultApplication

      @Stability(Stable) public void setDefaultApplication(@Nullable CfnStreamGroup.DefaultApplicationProperty value)
      Object that identifies the Amazon GameLift Streams application to stream with this stream group.
    • getTags

      @Stability(Stable) @Nullable public Map<String,String> getTags()
      A list of labels to assign to the new stream group resource.
    • setTags

      @Stability(Stable) public void setTags(@Nullable Map<String,String> value)
      A list of labels to assign to the new stream group resource.