container_group_definitions
Creates, updates, deletes or gets a container_group_definition resource or lists container_group_definitions in a region
Overview
| Name | container_group_definitions |
| Type | Resource |
| Description | The AWS::GameLift::ContainerGroupDefinition resource creates an Amazon GameLift container group definition. |
| Id | awscc.gamelift.container_group_definitions |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
container_group_definition_arn | string | The Amazon Resource Name (ARN) that is assigned to a Amazon GameLift container group resource and uniquely identifies it across all AWS Regions. |
creation_time | string | A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057"). |
operating_system | string | The operating system of the container group |
name | string | A descriptive label for the container group definition. |
container_group_type | string | The scope of the container group |
total_memory_limit_mebibytes | integer | The total memory limit of container groups following this definition in MiB |
total_vcpu_limit | number | The total amount of virtual CPUs on the container group definition |
game_server_container_definition | object | Specifies the information required to run game servers with this container group |
support_container_definitions | array | A collection of support container definitions that define the containers in this group. |
version_number | integer | The version of this ContainerGroupDefinition |
source_version_number | integer | A specific ContainerGroupDefinition version to be updated |
version_description | string | The description of this version |
status | string | A string indicating ContainerGroupDefinition status. |
status_reason | string | A string indicating the reason for ContainerGroupDefinition status. |
tags | array | An array of key-value pairs to apply to this resource. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
name | string | A descriptive label for the container group definition. |
region | string | AWS region. |
For more information, see AWS::GameLift::ContainerGroupDefinition.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | container_group_definitions | INSERT | Name, OperatingSystem, TotalMemoryLimitMebibytes, TotalVcpuLimit, region |
delete_resource | container_group_definitions | DELETE | Identifier, region |
update_resource | container_group_definitions | UPDATE | Identifier, PatchDocument, region |
list_resources | container_group_definitions_list_only | SELECT | region |
get_resource | container_group_definitions | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual container_group_definition.
SELECT
region,
container_group_definition_arn,
creation_time,
operating_system,
name,
container_group_type,
total_memory_limit_mebibytes,
total_vcpu_limit,
game_server_container_definition,
support_container_definitions,
version_number,
source_version_number,
version_description,
status,
status_reason,
tags
FROM awscc.gamelift.container_group_definitions
WHERE
region = '{{ region }}' AND
Identifier = '{{ name }}';
Lists all container_group_definitions in a region.
SELECT
region,
name
FROM awscc.gamelift.container_group_definitions_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new container_group_definition resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.gamelift.container_group_definitions (
OperatingSystem,
Name,
TotalMemoryLimitMebibytes,
TotalVcpuLimit,
region
)
SELECT
'{{ operating_system }}',
'{{ name }}',
'{{ total_memory_limit_mebibytes }}',
'{{ total_vcpu_limit }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.gamelift.container_group_definitions (
OperatingSystem,
Name,
ContainerGroupType,
TotalMemoryLimitMebibytes,
TotalVcpuLimit,
GameServerContainerDefinition,
SupportContainerDefinitions,
SourceVersionNumber,
VersionDescription,
Tags,
region
)
SELECT
'{{ operating_system }}',
'{{ name }}',
'{{ container_group_type }}',
'{{ total_memory_limit_mebibytes }}',
'{{ total_vcpu_limit }}',
'{{ game_server_container_definition }}',
'{{ support_container_definitions }}',
'{{ source_version_number }}',
'{{ version_description }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: container_group_definition
props:
- name: operating_system
value: '{{ operating_system }}'
- name: name
value: '{{ name }}'
- name: container_group_type
value: '{{ container_group_type }}'
- name: total_memory_limit_mebibytes
value: '{{ total_memory_limit_mebibytes }}'
- name: total_vcpu_limit
value: null
- name: game_server_container_definition
value:
container_name: '{{ container_name }}'
depends_on:
- container_name: '{{ container_name }}'
condition: '{{ condition }}'
server_sdk_version: '{{ server_sdk_version }}'
image_uri: '{{ image_uri }}'
resolved_image_digest: '{{ resolved_image_digest }}'
environment_override:
- name: '{{ name }}'
value: '{{ value }}'
port_configuration:
container_port_ranges:
- from_port: '{{ from_port }}'
protocol: '{{ protocol }}'
to_port: '{{ to_port }}'
mount_points:
- instance_path: '{{ instance_path }}'
container_path: '{{ container_path }}'
access_level: '{{ access_level }}'
- name: support_container_definitions
value:
- container_name: '{{ container_name }}'
vcpu: null
depends_on:
- null
essential: '{{ essential }}'
image_uri: '{{ image_uri }}'
resolved_image_digest: '{{ resolved_image_digest }}'
memory_hard_limit_mebibytes: '{{ memory_hard_limit_mebibytes }}'
environment_override:
- null
port_configuration: null
health_check:
command:
- '{{ command[0] }}'
interval: '{{ interval }}'
timeout: '{{ timeout }}'
retries: '{{ retries }}'
start_period: '{{ start_period }}'
mount_points:
- null
- name: source_version_number
value: '{{ source_version_number }}'
- name: version_description
value: '{{ version_description }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a container_group_definition resource, using stack-deploy.
/*+ update */
UPDATE awscc.gamelift.container_group_definitions
SET PatchDocument = string('{{ {
"OperatingSystem": operating_system,
"TotalMemoryLimitMebibytes": total_memory_limit_mebibytes,
"TotalVcpuLimit": total_vcpu_limit,
"GameServerContainerDefinition": game_server_container_definition,
"SupportContainerDefinitions": support_container_definitions,
"SourceVersionNumber": source_version_number,
"VersionDescription": version_description,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ name }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.gamelift.container_group_definitions
WHERE
Identifier = '{{ name }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the container_group_definitions resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
gamelift:CreateContainerGroupDefinition,
gamelift:DescribeContainerGroupDefinition,
gamelift:ListTagsForResource,
gamelift:TagResource,
ecr:BatchCheckLayerAvailability,
ecr:BatchGetImage,
ecr:GetDownloadUrlForLayer,
ecr:DescribeImages,
ecr:GetAuthorizationToken
gamelift:DescribeContainerGroupDefinition,
gamelift:ListTagsForResource
gamelift:DescribeContainerGroupDefinition,
gamelift:UpdateContainerGroupDefinition,
gamelift:ListTagsForResource,
gamelift:TagResource,
gamelift:UntagResource
gamelift:DeleteContainerGroupDefinition
gamelift:ListContainerGroupDefinitions