container_fleets
Creates, updates, deletes or gets a container_fleet resource or lists container_fleets in a region
Overview
| Name | container_fleets |
| Type | Resource |
| Description | The AWS::GameLift::ContainerFleet resource creates an Amazon GameLift (GameLift) container fleet to host game servers. |
| Id | awscc.gamelift.container_fleets |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
fleet_id | string | Unique fleet ID |
fleet_role_arn | string | A unique identifier for an AWS IAM role that manages access to your AWS services. Create a role or look up a role's ARN from the IAM dashboard in the AWS Management Console. |
description | string | A human-readable description of a fleet. |
game_server_container_group_definition_name | string | The name of the container group definition that will be created per game server. You must specify GAME_SERVER container group. You have the option to also specify one PER_INSTANCE container group. |
game_server_container_group_definition_arn | string | The Amazon Resource Name (ARN) of the game server container group definition. This field will be empty if GameServerContainerGroupDefinitionName is not specified. |
per_instance_container_group_definition_name | string | The name of the container group definition that will be created per instance. This field is optional if you specify GameServerContainerGroupDefinitionName. |
per_instance_container_group_definition_arn | string | The Amazon Resource Name (ARN) of the per instance container group definition. This field will be empty if PerInstanceContainerGroupDefinitionName is not specified. |
instance_connection_port_range | object | Defines the range of ports on the instance that allow inbound traffic to connect with containers in a fleet. |
instance_inbound_permissions | array | A range of IP addresses and port settings that allow inbound traffic to connect to server processes on an Amazon GameLift server. |
game_server_container_groups_per_instance | integer | The number of desired game server container groups per instance, a number between 1-5000. |
maximum_game_server_container_groups_per_instance | integer | The maximum number of game server container groups per instance, a number between 1-5000. |
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"). |
status | string | The current status of the container fleet. |
deployment_details | object | Provides information about the last deployment ID and its status. |
deployment_configuration | object | Provides details about how to drain old tasks and replace them with new updated tasks. |
instance_type | string | The name of an EC2 instance type that is supported in Amazon GameLift. A fleet instance type determines the computing resources of each instance in the fleet, including CPU, memory, storage, and networking capacity. Amazon GameLift supports the following EC2 instance types. See Amazon EC2 Instance Types for detailed descriptions. |
billing_type | string | Indicates whether to use On-Demand instances or Spot instances for this fleet. If empty, the default is ON_DEMAND. Both categories of instances use identical hardware and configurations based on the instance type selected for this fleet. |
locations | array | |
scaling_policies | array | A list of rules that control how a fleet is scaled. |
metric_groups | array | The name of an Amazon CloudWatch metric group. A metric group aggregates the metrics for all fleets in the group. Specify a string containing the metric group name. You can use an existing name or use a new name to create a new metric group. Currently, this parameter can have only one string. |
new_game_session_protection_policy | string | A game session protection policy to apply to all game sessions hosted on instances in this fleet. When protected, active game sessions cannot be terminated during a scale-down event. If this parameter is not set, instances in this fleet default to no protection. You can change a fleet's protection policy to affect future game sessions on the fleet. You can also set protection for individual game sessions. |
game_session_creation_limit_policy | object | A policy that limits the number of game sessions an individual player can create over a span of time for this fleet. |
log_configuration | object | A policy the location and provider of logs from the fleet. |
tags | array | An array of key-value pairs to apply to this resource. |
fleet_arn | string | The Amazon Resource Name (ARN) that is assigned to a Amazon GameLift container fleet resource and uniquely identifies it across all AWS Regions. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
fleet_id | string | Unique fleet ID |
region | string | AWS region. |
For more information, see AWS::GameLift::ContainerFleet.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | container_fleets | INSERT | FleetRoleArn, region |
delete_resource | container_fleets | DELETE | Identifier, region |
update_resource | container_fleets | UPDATE | Identifier, PatchDocument, region |
list_resources | container_fleets_list_only | SELECT | region |
get_resource | container_fleets | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual container_fleet.
SELECT
region,
fleet_id,
fleet_role_arn,
description,
game_server_container_group_definition_name,
game_server_container_group_definition_arn,
per_instance_container_group_definition_name,
per_instance_container_group_definition_arn,
instance_connection_port_range,
instance_inbound_permissions,
game_server_container_groups_per_instance,
maximum_game_server_container_groups_per_instance,
creation_time,
status,
deployment_details,
deployment_configuration,
instance_type,
billing_type,
locations,
scaling_policies,
metric_groups,
new_game_session_protection_policy,
game_session_creation_limit_policy,
log_configuration,
tags,
fleet_arn
FROM awscc.gamelift.container_fleets
WHERE
region = 'us-east-1' AND
Identifier = '{{ fleet_id }}';
Lists all container_fleets in a region.
SELECT
region,
fleet_id
FROM awscc.gamelift.container_fleets_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new container_fleet resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.gamelift.container_fleets (
FleetRoleArn,
region
)
SELECT
'{{ fleet_role_arn }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.gamelift.container_fleets (
FleetRoleArn,
Description,
GameServerContainerGroupDefinitionName,
PerInstanceContainerGroupDefinitionName,
InstanceConnectionPortRange,
InstanceInboundPermissions,
GameServerContainerGroupsPerInstance,
DeploymentConfiguration,
InstanceType,
BillingType,
Locations,
ScalingPolicies,
MetricGroups,
NewGameSessionProtectionPolicy,
GameSessionCreationLimitPolicy,
LogConfiguration,
Tags,
region
)
SELECT
'{{ fleet_role_arn }}',
'{{ description }}',
'{{ game_server_container_group_definition_name }}',
'{{ per_instance_container_group_definition_name }}',
'{{ instance_connection_port_range }}',
'{{ instance_inbound_permissions }}',
'{{ game_server_container_groups_per_instance }}',
'{{ deployment_configuration }}',
'{{ instance_type }}',
'{{ billing_type }}',
'{{ locations }}',
'{{ scaling_policies }}',
'{{ metric_groups }}',
'{{ new_game_session_protection_policy }}',
'{{ game_session_creation_limit_policy }}',
'{{ log_configuration }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: container_fleet
props:
- name: fleet_role_arn
value: '{{ fleet_role_arn }}'
- name: description
value: '{{ description }}'
- name: game_server_container_group_definition_name
value: '{{ game_server_container_group_definition_name }}'
- name: per_instance_container_group_definition_name
value: '{{ per_instance_container_group_definition_name }}'
- name: instance_connection_port_range
value:
from_port: '{{ from_port }}'
to_port: '{{ to_port }}'
- name: instance_inbound_permissions
value:
- from_port: '{{ from_port }}'
ip_range: '{{ ip_range }}'
protocol: '{{ protocol }}'
to_port: '{{ to_port }}'
- name: game_server_container_groups_per_instance
value: '{{ game_server_container_groups_per_instance }}'
- name: deployment_configuration
value:
protection_strategy: '{{ protection_strategy }}'
minimum_healthy_percentage: '{{ minimum_healthy_percentage }}'
impairment_strategy: '{{ impairment_strategy }}'
- name: instance_type
value: '{{ instance_type }}'
- name: billing_type
value: '{{ billing_type }}'
- name: locations
value:
- location:
location_name: '{{ location_name }}'
tags:
- key: '{{ key }}'
value: '{{ value }}'
location_capacity:
desired_ec2_instances: '{{ desired_ec2_instances }}'
min_size: '{{ min_size }}'
max_size: '{{ max_size }}'
- name: scaling_policies
value:
- comparison_operator: '{{ comparison_operator }}'
evaluation_periods: '{{ evaluation_periods }}'
location: null
metric_name: '{{ metric_name }}'
name: '{{ name }}'
policy_type: '{{ policy_type }}'
scaling_adjustment: '{{ scaling_adjustment }}'
scaling_adjustment_type: '{{ scaling_adjustment_type }}'
status: '{{ status }}'
target_configuration:
target_value: null
threshold: null
update_status: '{{ update_status }}'
- name: metric_groups
value:
- '{{ metric_groups[0] }}'
- name: new_game_session_protection_policy
value: '{{ new_game_session_protection_policy }}'
- name: game_session_creation_limit_policy
value:
new_game_sessions_per_creator: '{{ new_game_sessions_per_creator }}'
policy_period_in_minutes: '{{ policy_period_in_minutes }}'
- name: log_configuration
value:
log_destination: '{{ log_destination }}'
log_group_arn: '{{ log_group_arn }}'
s3_bucket_name: '{{ s3_bucket_name }}'
- name: tags
value:
- null
UPDATE example
Use the following StackQL query and manifest file to update a container_fleet resource, using stack-deploy.
/*+ update */
UPDATE awscc.gamelift.container_fleets
SET PatchDocument = string('{{ {
"FleetRoleArn": fleet_role_arn,
"Description": description,
"GameServerContainerGroupDefinitionName": game_server_container_group_definition_name,
"PerInstanceContainerGroupDefinitionName": per_instance_container_group_definition_name,
"InstanceConnectionPortRange": instance_connection_port_range,
"InstanceInboundPermissions": instance_inbound_permissions,
"GameServerContainerGroupsPerInstance": game_server_container_groups_per_instance,
"DeploymentConfiguration": deployment_configuration,
"Locations": locations,
"ScalingPolicies": scaling_policies,
"MetricGroups": metric_groups,
"NewGameSessionProtectionPolicy": new_game_session_protection_policy,
"GameSessionCreationLimitPolicy": game_session_creation_limit_policy,
"LogConfiguration": log_configuration,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ fleet_id }}';
DELETE example
/*+ delete */
DELETE FROM awscc.gamelift.container_fleets
WHERE
Identifier = '{{ fleet_id }}' AND
region = 'us-east-1';
Permissions
To operate on the container_fleets resource, the following permissions are required:
- Create
- Read
- Delete
- List
- Update
gamelift:CreateContainerFleet,
gamelift:DescribeContainerFleet,
gamelift:DescribeFleetDeployment,
gamelift:DescribeFleetLocationAttributes,
gamelift:DescribeFleetLocationCapacity,
gamelift:DescribeScalingPolicies,
gamelift:ListTagsForResource,
gamelift:PutScalingPolicy,
gamelift:StopFleetActions,
gamelift:TagResource,
gamelift:UpdateFleetCapacity,
iam:PassRole
gamelift:DescribeContainerFleet,
gamelift:DescribeFleetLocationAttributes,
gamelift:DescribeFleetLocationCapacity,
gamelift:DescribeScalingPolicies,
gamelift:ListTagsForResource
gamelift:DeleteContainerFleet,
gamelift:DescribeContainerFleet
gamelift:ListContainerFleets
gamelift:CreateFleetLocations,
gamelift:DeleteFleetLocations,
gamelift:DeleteScalingPolicy,
gamelift:DescribeContainerFleet,
gamelift:DescribeFleetDeployment,
gamelift:DescribeFleetLocationAttributes,
gamelift:DescribeFleetLocationCapacity,
gamelift:DescribeScalingPolicies,
gamelift:ListTagsForResource,
gamelift:PutScalingPolicy,
gamelift:StartFleetActions,
gamelift:StopFleetActions,
gamelift:TagResource,
gamelift:UntagResource,
gamelift:UpdateContainerFleet,
gamelift:UpdateFleetCapacity,
iam:PassRole