AWS SDK Version 4 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Container for the parameters to the CreateContainerGroupDefinition operation. Creates a ContainerGroupDefinition that describes a set of containers for hosting your game server with Amazon GameLift Servers managed containers hosting. An Amazon GameLift Servers container group is similar to a container task or pod. Use container group definitions when you create a container fleet with CreateContainerFleet.

A container group definition determines how Amazon GameLift Servers deploys your containers to each instance in a container fleet. You can maintain multiple versions of a container group definition.

There are two types of container groups:

This operation requires Identity and Access Management (IAM) permissions to access container images in Amazon ECR repositories. See IAM permissions for Amazon GameLift Servers for help setting the appropriate permissions.

Request options

Use this operation to make the following types of requests. You can specify values for the minimum required parameters and customize optional values later.

Results

If successful, this request creates a ContainerGroupDefinition resource and assigns a unique ARN value. You can update most properties of a container group definition by calling UpdateContainerGroupDefinition, and optionally save the update as a new version.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.GameLift.AmazonGameLiftRequest
      Amazon.GameLift.Model.CreateContainerGroupDefinitionRequest

Namespace: Amazon.GameLift.Model
Assembly: AWSSDK.GameLift.dll
Version: 3.x.y.z

Syntax

C#
public class CreateContainerGroupDefinitionRequest : AmazonGameLiftRequest
         IAmazonWebServiceRequest

The CreateContainerGroupDefinitionRequest type exposes the following members

Constructors

Properties

NameTypeDescription
Public Property ContainerGroupType Amazon.GameLift.ContainerGroupType

Gets and sets the property ContainerGroupType.

The type of container group being defined. Container group type determines how Amazon GameLift Servers deploys the container group on each fleet instance.

Default value: GAME_SERVER

Public Property GameServerContainerDefinition Amazon.GameLift.Model.GameServerContainerDefinitionInput

Gets and sets the property GameServerContainerDefinition.

The definition for the game server container in this group. Define a game server container only when the container group type is GAME_SERVER. Game server containers specify a container image with your game server build. You can pass in your container definitions as a JSON file.

Public Property Name System.String

Gets and sets the property Name.

A descriptive identifier for the container group definition. The name value must be unique in an Amazon Web Services Region.

Public Property OperatingSystem Amazon.GameLift.ContainerOperatingSystem

Gets and sets the property OperatingSystem.

The platform that all containers in the group use. Containers in a group must run on the same operating system.

Default value: AMAZON_LINUX_2023

Amazon Linux 2 (AL2) will reach end of support on 6/30/2025. See more details in the Amazon Linux 2 FAQs. For game servers that are hosted on AL2 and use server SDK version 4.x for Amazon GameLift Servers, first update the game server build to server SDK 5.x, and then deploy to AL2023 instances. See Migrate to server SDK version 5.

Public Property SupportContainerDefinitions System.Collections.Generic.List<Amazon.GameLift.Model.SupportContainerDefinitionInput>

Gets and sets the property SupportContainerDefinitions.

One or more definition for support containers in this group. You can define a support container in any type of container group. You can pass in your container definitions as a JSON file.

Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.

Public Property Tags System.Collections.Generic.List<Amazon.GameLift.Model.Tag>

Gets and sets the property Tags.

A list of labels to assign to the container group definition resource. Tags are developer-defined key-value pairs. Tagging Amazon Web Services resources are useful for resource management, access management and cost allocation. For more information, see Tagging Amazon Web Services Resources in the Amazon Web Services General Reference.

Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.

Public Property TotalMemoryLimitMebibytes System.Nullable<System.Int32>

Gets and sets the property TotalMemoryLimitMebibytes.

The maximum amount of memory (in MiB) to allocate to the container group. All containers in the group share this memory. If you specify memory limits for an individual container, the total value must be greater than any individual container's memory limit.

Default value: 1024

Public Property TotalVcpuLimit System.Nullable<System.Double>

Gets and sets the property TotalVcpuLimit.

The maximum amount of vCPU units to allocate to the container group (1 vCPU is equal to 1024 CPU units). All containers in the group share this memory. If you specify vCPU limits for individual containers, the total value must be equal to or greater than the sum of the CPU limits for all containers in the group.

Default value: 1

Public Property VersionDescription System.String

Gets and sets the property VersionDescription.

A description for the initial version of this container group definition.

Version Information

.NET:
Supported in: 8.0 and newer, Core 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.7.2 and newer