CfnFleet
- class aws_cdk.aws_gamelift.CfnFleet(scope, id, *, name, anywhere_configuration=None, apply_capacity=None, build_id=None, certificate_configuration=None, compute_type=None, container_groups_configuration=None, description=None, desired_ec2_instances=None, ec2_inbound_permissions=None, ec2_instance_type=None, fleet_type=None, instance_role_arn=None, instance_role_credentials_provider=None, locations=None, log_paths=None, max_size=None, metric_groups=None, min_size=None, new_game_session_protection_policy=None, peer_vpc_aws_account_id=None, peer_vpc_id=None, resource_creation_limit_policy=None, runtime_configuration=None, scaling_policies=None, script_id=None, server_launch_parameters=None, server_launch_path=None)
Bases:
CfnResource
The
AWS::GameLift::Fleet
resource creates an Amazon GameLift (GameLift) fleet to host custom game server or Realtime Servers.A fleet is a set of EC2 instances, configured with instructions to run game servers on each instance.
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-fleet.html
- CloudformationResource:
AWS::GameLift::Fleet
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_gamelift as gamelift cfn_fleet = gamelift.CfnFleet(self, "MyCfnFleet", name="name", # the properties below are optional anywhere_configuration=gamelift.CfnFleet.AnywhereConfigurationProperty( cost="cost" ), apply_capacity="applyCapacity", build_id="buildId", certificate_configuration=gamelift.CfnFleet.CertificateConfigurationProperty( certificate_type="certificateType" ), compute_type="computeType", container_groups_configuration=gamelift.CfnFleet.ContainerGroupsConfigurationProperty( connection_port_range=gamelift.CfnFleet.ConnectionPortRangeProperty( from_port=123, to_port=123 ), container_group_definition_names=["containerGroupDefinitionNames"], # the properties below are optional container_groups_per_instance=gamelift.CfnFleet.ContainerGroupsPerInstanceProperty( desired_replica_container_groups_per_instance=123, max_replica_container_groups_per_instance=123 ) ), description="description", desired_ec2_instances=123, ec2_inbound_permissions=[gamelift.CfnFleet.IpPermissionProperty( from_port=123, ip_range="ipRange", protocol="protocol", to_port=123 )], ec2_instance_type="ec2InstanceType", fleet_type="fleetType", instance_role_arn="instanceRoleArn", instance_role_credentials_provider="instanceRoleCredentialsProvider", locations=[gamelift.CfnFleet.LocationConfigurationProperty( location="location", # the properties below are optional location_capacity=gamelift.CfnFleet.LocationCapacityProperty( desired_ec2_instances=123, max_size=123, min_size=123 ) )], log_paths=["logPaths"], max_size=123, metric_groups=["metricGroups"], min_size=123, new_game_session_protection_policy="newGameSessionProtectionPolicy", peer_vpc_aws_account_id="peerVpcAwsAccountId", peer_vpc_id="peerVpcId", resource_creation_limit_policy=gamelift.CfnFleet.ResourceCreationLimitPolicyProperty( new_game_sessions_per_creator=123, policy_period_in_minutes=123 ), runtime_configuration=gamelift.CfnFleet.RuntimeConfigurationProperty( game_session_activation_timeout_seconds=123, max_concurrent_game_session_activations=123, server_processes=[gamelift.CfnFleet.ServerProcessProperty( concurrent_executions=123, launch_path="launchPath", # the properties below are optional parameters="parameters" )] ), scaling_policies=[gamelift.CfnFleet.ScalingPolicyProperty( metric_name="metricName", name="name", # the properties below are optional comparison_operator="comparisonOperator", evaluation_periods=123, location="location", policy_type="policyType", scaling_adjustment=123, scaling_adjustment_type="scalingAdjustmentType", status="status", target_configuration=gamelift.CfnFleet.TargetConfigurationProperty( target_value=123 ), threshold=123, update_status="updateStatus" )], script_id="scriptId", server_launch_parameters="serverLaunchParameters", server_launch_path="serverLaunchPath" )
- Parameters:
scope (
Construct
) – Scope in which this resource is defined.id (
str
) – Construct identifier for this resource (unique in its scope).name (
str
) – A descriptive label that is associated with a fleet. Fleet names do not need to be unique.anywhere_configuration (
Union
[IResolvable
,AnywhereConfigurationProperty
,Dict
[str
,Any
],None
]) – Amazon GameLift Anywhere configuration options.apply_capacity (
Optional
[str
]) – Current resource capacity settings for managed EC2 fleets and container fleets. For multi-location fleets, location values might refer to a fleet’s remote location or its home Region. Returned by: DescribeFleetCapacity , DescribeFleetLocationCapacity , UpdateFleetCapacitybuild_id (
Optional
[str
]) – A unique identifier for a build to be deployed on the new fleet. If you are deploying the fleet with a custom game build, you must specify this property. The build must have been successfully uploaded to Amazon GameLift and be in aREADY
status. This fleet setting cannot be changed once the fleet is created.certificate_configuration (
Union
[IResolvable
,CertificateConfigurationProperty
,Dict
[str
,Any
],None
]) – Prompts Amazon GameLift to generate a TLS/SSL certificate for the fleet. Amazon GameLift uses the certificates to encrypt traffic between game clients and the game servers running on Amazon GameLift. By default, theCertificateConfiguration
isDISABLED
. You can’t change this property after you create the fleet. AWS Certificate Manager (ACM) certificates expire after 13 months. Certificate expiration can cause fleets to fail, preventing players from connecting to instances in the fleet. We recommend you replace fleets before 13 months, consider using fleet aliases for a smooth transition. .. epigraph:: ACM isn’t available in all AWS regions. A fleet creation request with certificate generation enabled in an unsupported Region, fails with a 4xx error. For more information about the supported Regions, see Supported Regions in the AWS Certificate Manager User Guide .compute_type (
Optional
[str
]) – The type of compute resource used to host your game servers. -EC2
– The game server build is deployed to Amazon EC2 instances for cloud hosting. This is the default setting. -CONTAINER
– Container images with your game server build and supporting software are deployed to Amazon EC2 instances for cloud hosting. With this compute type, you must specify theContainerGroupsConfiguration
parameter. -ANYWHERE
– Game servers or container images with your game server and supporting software are deployed to compute resources that are provided and managed by you. With this compute type, you can also set theAnywhereConfiguration
parameter.container_groups_configuration (
Union
[IResolvable
,ContainerGroupsConfigurationProperty
,Dict
[str
,Any
],None
]) – This data type is used with the Amazon GameLift containers feature, which is currently in public preview.. Configuration details for a set of container groups, for use when creating a fleet with compute typeCONTAINER
. Used with:CreateFleet
description (
Optional
[str
]) – A description for the fleet.desired_ec2_instances (
Union
[int
,float
,None
]) – The number of EC2 instances that you want this fleet to host. When creating a new fleet, GameLift automatically sets this value to “1” and initiates a single instance. Once the fleet is active, update this value to trigger GameLift to add or remove instances from the fleet.ec2_inbound_permissions (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,IpPermissionProperty
,Dict
[str
,Any
]]],None
]) – The IP address ranges and port settings that allow inbound traffic to access game server processes and other processes on this fleet. Set this parameter for EC2 and container fleets. You can leave this parameter empty when creating the fleet, but you must callUpdateFleetPortSettings
to set it before players can connect to game sessions. As a best practice, we recommend opening ports for remote access only when you need them and closing them when you’re finished. For Realtime Servers fleets, Amazon GameLift automatically sets TCP and UDP ranges. To manage inbound access for a container fleet, set this parameter to the same port numbers that you set for the fleet’s connection port range. During the life of the fleet, update this parameter to control which connection ports are open to inbound traffic.ec2_instance_type (
Optional
[str
]) – The Amazon GameLift-supported Amazon EC2 instance type to use with EC2 and container fleets. Instance type determines the computing resources that will be used to host your game servers, including CPU, memory, storage, and networking capacity. See Amazon Elastic Compute Cloud Instance Types for detailed descriptions of Amazon EC2 instance types.fleet_type (
Optional
[str
]) – Indicates whether to use On-Demand or Spot instances for this fleet. By default, this property is set toON_DEMAND
. Learn more about when to use On-Demand versus Spot Instances . This fleet property can’t be changed after the fleet is created.instance_role_arn (
Optional
[str
]) – A unique identifier for an IAM role with access permissions to other AWS services. Any application that runs on an instance in the fleet–including install scripts, server processes, and other processes–can use these permissions to interact with AWS resources that you own or have access to. For more information about using the role with your game server builds, see Communicate with other AWS resources from your fleets . This attribute is used with fleets whereComputeType
is “EC2” or “Container”.instance_role_credentials_provider (
Optional
[str
]) –Indicates that fleet instances maintain a shared credentials file for the IAM role defined in
InstanceRoleArn
. Shared credentials allow applications that are deployed with the game server executable to communicate with other AWS resources. This property is used only when the game server is integrated with the server SDK version 5.x. For more information about using shared credentials, see Communicate with other AWS resources from your fleets . This attribute is used with fleets whereComputeType
is “EC2” or “Container”.locations (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,LocationConfigurationProperty
,Dict
[str
,Any
]]],None
]) – A set of remote locations to deploy additional instances to and manage as part of the fleet. This parameter can only be used when creating fleets in AWS Regions that support multiple locations. You can add any Amazon GameLift-supported AWS Region as a remote location, in the form of an AWS Region code, such asus-west-2
or Local Zone code. To create a fleet with instances in the home Region only, don’t set this parameter. When using this parameter, Amazon GameLift requires you to include your home location in the request.log_paths (
Optional
[Sequence
[str
]]) – (deprecated) This parameter is no longer used. When hosting a custom game build, specify where Amazon GameLift should store log files using the Amazon GameLift server API call ProcessReady()max_size (
Union
[int
,float
,None
]) – The maximum number of instances that are allowed in the specified fleet location. If this parameter is not set, the default is 1.metric_groups (
Optional
[Sequence
[str
]]) – The name of an AWS CloudWatch metric group to add this fleet to. A metric group is used to aggregate the metrics for multiple fleets. You can specify an existing metric group name or set a new name to create a new metric group. A fleet can be included in only one metric group at a time.min_size (
Union
[int
,float
,None
]) – The minimum number of instances that are allowed in the specified fleet location. If this parameter is not set, the default is 0.new_game_session_protection_policy (
Optional
[str
]) – The status of termination protection for active game sessions on the fleet. By default, this property is set toNoProtection
. - NoProtection - Game sessions can be terminated during active gameplay as a result of a scale-down event. - FullProtection - Game sessions inACTIVE
status cannot be terminated during a scale-down event.peer_vpc_aws_account_id (
Optional
[str
]) – Used when peering your Amazon GameLift fleet with a VPC, the unique identifier for the AWS account that owns the VPC. You can find your account ID in the AWS Management Console under account settings.peer_vpc_id (
Optional
[str
]) – A unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet. The VPC must be in the same Region as your fleet. To look up a VPC ID, use the VPC Dashboard in the AWS Management Console . Learn more about VPC peering in VPC Peering with Amazon GameLift Fleets .resource_creation_limit_policy (
Union
[IResolvable
,ResourceCreationLimitPolicyProperty
,Dict
[str
,Any
],None
]) – A policy that limits the number of game sessions that an individual player can create on instances in this fleet within a specified span of time.runtime_configuration (
Union
[IResolvable
,RuntimeConfigurationProperty
,Dict
[str
,Any
],None
]) – Instructions for how to launch and maintain server processes on instances in the fleet. The runtime configuration defines one or more server process configurations, each identifying a build executable or Realtime script file and the number of processes of that type to run concurrently. .. epigraph:: TheRuntimeConfiguration
parameter is required unless the fleet is being configured using the older parametersServerLaunchPath
andServerLaunchParameters
, which are still supported for backward compatibility.scaling_policies (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,ScalingPolicyProperty
,Dict
[str
,Any
]]],None
]) – Rule that controls how a fleet is scaled. Scaling policies are uniquely identified by the combination of name and fleet ID.script_id (
Optional
[str
]) – The unique identifier for a Realtime configuration script to be deployed on fleet instances. You can use either the script ID or ARN. Scripts must be uploaded to Amazon GameLift prior to creating the fleet. This fleet property cannot be changed later. .. epigraph:: You can’t use the!Ref
command to reference a script created with a CloudFormation template for the fleet propertyScriptId
. Instead, useFn::GetAtt Script.Arn
orFn::GetAtt Script.Id
to retrieve either of these properties as input forScriptId
. Alternatively, enter aScriptId
string manually.server_launch_parameters (
Optional
[str
]) – (deprecated) This parameter is no longer used but is retained for backward compatibility. Instead, specify server launch parameters in the RuntimeConfiguration parameter. A request must specify either a runtime configuration or values for both ServerLaunchParameters and ServerLaunchPath.server_launch_path (
Optional
[str
]) – (deprecated) This parameter is no longer used. Instead, specify a server launch path using the RuntimeConfiguration parameter. Requests that specify a server launch path and launch parameters instead of a runtime configuration will continue to work.
Methods
- add_deletion_override(path)
Syntactic sugar for
addOverride(path, undefined)
.- Parameters:
path (
str
) – The path of the value to delete.- Return type:
None
- add_dependency(target)
Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.
- Parameters:
target (
CfnResource
) –- Return type:
None
- add_depends_on(target)
(deprecated) Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
- Parameters:
target (
CfnResource
) –- Deprecated:
use addDependency
- Stability:
deprecated
- Return type:
None
- add_metadata(key, value)
Add a value to the CloudFormation Resource Metadata.
- Parameters:
key (
str
) –value (
Any
) –
- See:
- Return type:
None
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.
- add_override(path, value)
Adds an override to the synthesized CloudFormation resource.
To add a property override, either use
addPropertyOverride
or prefixpath
with “Properties.” (i.e.Properties.TopicName
).If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.
To include a literal
.
in the property name, prefix with a\
. In most programming languages you will need to write this as"\\."
because the\
itself will need to be escaped.For example:
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"]) cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")
would add the overrides Example:
"Properties": { "GlobalSecondaryIndexes": [ { "Projection": { "NonKeyAttributes": [ "myattribute" ] ... } ... }, { "ProjectionType": "INCLUDE" ... }, ] ... }
The
value
argument toaddOverride
will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.- Parameters:
path (
str
) –The path of the property, you can use dot notation to override values in complex types. Any intermediate keys will be created as needed.
value (
Any
) –The value. Could be primitive or complex.
- Return type:
None
- add_property_deletion_override(property_path)
Adds an override that deletes the value of a property from the resource definition.
- Parameters:
property_path (
str
) – The path to the property.- Return type:
None
- add_property_override(property_path, value)
Adds an override to a resource property.
Syntactic sugar for
addOverride("Properties.<...>", value)
.- Parameters:
property_path (
str
) – The path of the property.value (
Any
) – The value.
- Return type:
None
- apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)
Sets the deletion policy of the resource based on the removal policy specified.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.
The resource can be deleted (
RemovalPolicy.DESTROY
), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN
). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT
). A list of resources that support this policy can be found in the following link:- Parameters:
policy (
Optional
[RemovalPolicy
]) –apply_to_update_replace_policy (
Optional
[bool
]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: truedefault (
Optional
[RemovalPolicy
]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resource, please consult that specific resource’s documentation.
- See:
- Return type:
None
- get_att(attribute_name, type_hint=None)
Returns a token for an runtime attribute of this resource.
Ideally, use generated attribute accessors (e.g.
resource.arn
), but this can be used for future compatibility in case there is no generated attribute.- Parameters:
attribute_name (
str
) – The name of the attribute.type_hint (
Optional
[ResolutionTypeHint
]) –
- Return type:
- get_metadata(key)
Retrieve a value value from the CloudFormation Resource Metadata.
- Parameters:
key (
str
) –- See:
- Return type:
Any
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.
- inspect(inspector)
Examines the CloudFormation resource and discloses attributes.
- Parameters:
inspector (
TreeInspector
) – tree inspector to collect and process attributes.- Return type:
None
- obtain_dependencies()
Retrieves an array of resources this resource depends on.
This assembles dependencies on resources across stacks (including nested stacks) automatically.
- Return type:
List
[Union
[Stack
,CfnResource
]]
- obtain_resource_dependencies()
Get a shallow copy of dependencies between this resource and other resources in the same stack.
- Return type:
List
[CfnResource
]
- override_logical_id(new_logical_id)
Overrides the auto-generated logical ID with a specific ID.
- Parameters:
new_logical_id (
str
) – The new logical ID to use for this stack element.- Return type:
None
- remove_dependency(target)
Indicates that this resource no longer depends on another resource.
This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.
- Parameters:
target (
CfnResource
) –- Return type:
None
- replace_dependency(target, new_target)
Replaces one dependency with another.
- Parameters:
target (
CfnResource
) – The dependency to replace.new_target (
CfnResource
) – The new dependency to add.
- Return type:
None
- to_string()
Returns a string representation of this construct.
- Return type:
str
- Returns:
a string representation of this resource
Attributes
- CFN_RESOURCE_TYPE_NAME = 'AWS::GameLift::Fleet'
- anywhere_configuration
Amazon GameLift Anywhere configuration options.
- apply_capacity
Current resource capacity settings for managed EC2 fleets and container fleets.
- attr_container_groups_configuration_container_groups_per_instance_max_replica_container_groups_per_instance
The maximum possible number of replica container groups that each fleet instance can have.
- CloudformationAttribute:
ContainerGroupsConfiguration.ContainerGroupsPerInstance.MaxReplicaContainerGroupsPerInstance
- attr_fleet_id
A unique identifier for the fleet.
- CloudformationAttribute:
FleetId
- build_id
A unique identifier for a build to be deployed on the new fleet.
- certificate_configuration
Prompts Amazon GameLift to generate a TLS/SSL certificate for the fleet.
- cfn_options
Options for this resource, such as condition, update policy etc.
- cfn_resource_type
AWS resource type.
- compute_type
The type of compute resource used to host your game servers.
- container_groups_configuration
This data type is used with the Amazon GameLift containers feature, which is currently in public preview..
- creation_stack
return:
the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.
- description
A description for the fleet.
- desired_ec2_instances
The number of EC2 instances that you want this fleet to host.
- ec2_inbound_permissions
The IP address ranges and port settings that allow inbound traffic to access game server processes and other processes on this fleet.
- ec2_instance_type
The Amazon GameLift-supported Amazon EC2 instance type to use with EC2 and container fleets.
- fleet_type
Indicates whether to use On-Demand or Spot instances for this fleet.
- instance_role_arn
A unique identifier for an IAM role with access permissions to other AWS services.
- instance_role_credentials_provider
Indicates that fleet instances maintain a shared credentials file for the IAM role defined in
InstanceRoleArn
.
- locations
A set of remote locations to deploy additional instances to and manage as part of the fleet.
- log_paths
(deprecated) This parameter is no longer used.
- Deprecated:
this property has been deprecated
- Stability:
deprecated
- logical_id
The logical ID for this CloudFormation stack element.
The logical ID of the element is calculated from the path of the resource node in the construct tree.
To override this value, use
overrideLogicalId(newLogicalId)
.- Returns:
the logical ID as a stringified token. This value will only get resolved during synthesis.
- max_size
The maximum number of instances that are allowed in the specified fleet location.
- metric_groups
The name of an AWS CloudWatch metric group to add this fleet to.
- min_size
The minimum number of instances that are allowed in the specified fleet location.
- name
A descriptive label that is associated with a fleet.
- new_game_session_protection_policy
The status of termination protection for active game sessions on the fleet.
- node
The tree node.
- peer_vpc_aws_account_id
Used when peering your Amazon GameLift fleet with a VPC, the unique identifier for the AWS account that owns the VPC.
- peer_vpc_id
A unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet.
- ref
Return a string that will be resolved to a CloudFormation
{ Ref }
for this element.If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through
Lazy.any({ produce: resource.ref })
.
- resource_creation_limit_policy
A policy that limits the number of game sessions that an individual player can create on instances in this fleet within a specified span of time.
- runtime_configuration
Instructions for how to launch and maintain server processes on instances in the fleet.
- scaling_policies
Rule that controls how a fleet is scaled.
- script_id
The unique identifier for a Realtime configuration script to be deployed on fleet instances.
- server_launch_parameters
(deprecated) This parameter is no longer used but is retained for backward compatibility.
- Deprecated:
this property has been deprecated
- Stability:
deprecated
- server_launch_path
(deprecated) This parameter is no longer used.
- Deprecated:
this property has been deprecated
- Stability:
deprecated
- stack
The stack in which this element is defined.
CfnElements must be defined within a stack scope (directly or indirectly).
Static Methods
- classmethod is_cfn_element(x)
Returns
true
if a construct is a stack element (i.e. part of the synthesized cloudformation template).Uses duck-typing instead of
instanceof
to allow stack elements from different versions of this library to be included in the same stack.- Parameters:
x (
Any
) –- Return type:
bool
- Returns:
The construct as a stack element or undefined if it is not a stack element.
- classmethod is_cfn_resource(x)
Check whether the given object is a CfnResource.
- Parameters:
x (
Any
) –- Return type:
bool
- classmethod is_construct(x)
Checks if
x
is a construct.Use this method instead of
instanceof
to properly detectConstruct
instances, even when the construct library is symlinked.Explanation: in JavaScript, multiple copies of the
constructs
library on disk are seen as independent, completely different libraries. As a consequence, the classConstruct
in each copy of theconstructs
library is seen as a different class, and an instance of one class will not test asinstanceof
the other class.npm install
will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of theconstructs
library can be accidentally installed, andinstanceof
will behave unpredictably. It is safest to avoid usinginstanceof
, and using this type-testing method instead.- Parameters:
x (
Any
) – Any object.- Return type:
bool
- Returns:
true if
x
is an object created from a class which extendsConstruct
.
AnywhereConfigurationProperty
- class CfnFleet.AnywhereConfigurationProperty(*, cost)
Bases:
object
Amazon GameLift configuration options for your Anywhere fleets.
- Parameters:
cost (
str
) – The cost to run your fleet per hour. Amazon GameLift uses the provided cost of your fleet to balance usage in queues. For more information about queues, see Setting up queues in the Amazon GameLift Developer Guide .- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_gamelift as gamelift anywhere_configuration_property = gamelift.CfnFleet.AnywhereConfigurationProperty( cost="cost" )
Attributes
- cost
The cost to run your fleet per hour.
Amazon GameLift uses the provided cost of your fleet to balance usage in queues. For more information about queues, see Setting up queues in the Amazon GameLift Developer Guide .
CertificateConfigurationProperty
- class CfnFleet.CertificateConfigurationProperty(*, certificate_type)
Bases:
object
Determines whether a TLS/SSL certificate is generated for a fleet.
This feature must be enabled when creating the fleet. All instances in a fleet share the same certificate. The certificate can be retrieved by calling the GameLift Server SDK operation
GetInstanceCertificate
.- Parameters:
certificate_type (
str
) – Indicates whether a TLS/SSL certificate is generated for a fleet. Valid values include: - GENERATED - Generate a TLS/SSL certificate for this fleet. - DISABLED - (default) Do not generate a TLS/SSL certificate for this fleet.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_gamelift as gamelift certificate_configuration_property = gamelift.CfnFleet.CertificateConfigurationProperty( certificate_type="certificateType" )
Attributes
- certificate_type
Indicates whether a TLS/SSL certificate is generated for a fleet.
Valid values include:
GENERATED - Generate a TLS/SSL certificate for this fleet.
DISABLED - (default) Do not generate a TLS/SSL certificate for this fleet.
ConnectionPortRangeProperty
- class CfnFleet.ConnectionPortRangeProperty(*, from_port, to_port)
Bases:
object
This operation has been expanded to use with the Amazon GameLift containers feature, which is currently in public preview..
The set of port numbers to open on each instance in a container fleet. Connection ports are used by inbound traffic to connect with processes that are running in containers on the fleet.
Part of:
ContainerGroupsConfiguration
,ContainerGroupsAttributes
- Parameters:
from_port (
Union
[int
,float
]) – Starting value for the port range.to_port (
Union
[int
,float
]) – Ending value for the port. Port numbers are end-inclusive. This value must be equal to or greater thanFromPort
.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_gamelift as gamelift connection_port_range_property = gamelift.CfnFleet.ConnectionPortRangeProperty( from_port=123, to_port=123 )
Attributes
- from_port
Starting value for the port range.
- to_port
Ending value for the port.
Port numbers are end-inclusive. This value must be equal to or greater than
FromPort
.
ContainerGroupsConfigurationProperty
- class CfnFleet.ContainerGroupsConfigurationProperty(*, connection_port_range, container_group_definition_names, container_groups_per_instance=None)
Bases:
object
This data type is used with the Amazon GameLift containers feature, which is currently in public preview..
Configuration details for a set of container groups, for use when creating a fleet with compute type
CONTAINER
.Used with:
CreateFleet
- Parameters:
connection_port_range (
Union
[IResolvable
,ConnectionPortRangeProperty
,Dict
[str
,Any
]]) – A set of ports to allow inbound traffic, including game clients, to connect to processes running in the container fleet. Connection ports are dynamically mapped to container ports, which are assigned to individual processes running in a container. The connection port range must have enough ports to map to all container ports across a fleet instance. To calculate the minimum connection ports needed, use the following formula: [Total number of container ports as defined for containers in the replica container group] * [Desired or calculated number of replica container groups per instance] + [Total number of container ports as defined for containers in the daemon container group] As a best practice, double the minimum number of connection ports. .. epigraph:: Use the fleet’sEC2InboundPermissions
property to control external access to connection ports. Set this property to the connection port numbers that you want to open access to. SeeIpPermission
for more details.container_group_definition_names (
Sequence
[str
]) – The list of container group definition names to deploy to a new container fleet.container_groups_per_instance (
Union
[IResolvable
,ContainerGroupsPerInstanceProperty
,Dict
[str
,Any
],None
]) – The number of container groups per instance.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_gamelift as gamelift container_groups_configuration_property = gamelift.CfnFleet.ContainerGroupsConfigurationProperty( connection_port_range=gamelift.CfnFleet.ConnectionPortRangeProperty( from_port=123, to_port=123 ), container_group_definition_names=["containerGroupDefinitionNames"], # the properties below are optional container_groups_per_instance=gamelift.CfnFleet.ContainerGroupsPerInstanceProperty( desired_replica_container_groups_per_instance=123, max_replica_container_groups_per_instance=123 ) )
Attributes
- connection_port_range
A set of ports to allow inbound traffic, including game clients, to connect to processes running in the container fleet.
Connection ports are dynamically mapped to container ports, which are assigned to individual processes running in a container. The connection port range must have enough ports to map to all container ports across a fleet instance. To calculate the minimum connection ports needed, use the following formula:
[Total number of container ports as defined for containers in the replica container group] * [Desired or calculated number of replica container groups per instance] + [Total number of container ports as defined for containers in the daemon container group]
As a best practice, double the minimum number of connection ports. .. epigraph:
Use the fleet's ``EC2InboundPermissions`` property to control external access to connection ports. Set this property to the connection port numbers that you want to open access to. See ``IpPermission`` for more details.
- container_group_definition_names
The list of container group definition names to deploy to a new container fleet.
- container_groups_per_instance
The number of container groups per instance.
ContainerGroupsPerInstanceProperty
- class CfnFleet.ContainerGroupsPerInstanceProperty(*, desired_replica_container_groups_per_instance=None, max_replica_container_groups_per_instance=None)
Bases:
object
This data type is used with the Amazon GameLift containers feature, which is currently in public preview..
Determines how many replica container groups that Amazon GameLift deploys to each instance in a container fleet.
Amazon GameLift calculates the maximum possible replica groups per instance based on the instance ‘s CPU and memory resources. When deploying a fleet, Amazon GameLift places replica container groups on each fleet instance based on the following:
If no desired value is set, Amazon GameLift places the calculated maximum.
If a desired number is set to a value higher than the calculated maximum, fleet creation fails..
If a desired number is set to a value lower than the calculated maximum, Amazon GameLift places the desired number.
Part of:
ContainerGroupsConfiguration
,ContainerGroupsAttributes
Returned by:
DescribeFleetAttributes
,CreateFleet
- Parameters:
desired_replica_container_groups_per_instance (
Union
[int
,float
,None
]) – The desired number of replica container groups to place on each fleet instance.max_replica_container_groups_per_instance (
Union
[int
,float
,None
]) – The maximum possible number of replica container groups that each fleet instance can have.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_gamelift as gamelift container_groups_per_instance_property = gamelift.CfnFleet.ContainerGroupsPerInstanceProperty( desired_replica_container_groups_per_instance=123, max_replica_container_groups_per_instance=123 )
Attributes
- desired_replica_container_groups_per_instance
The desired number of replica container groups to place on each fleet instance.
- max_replica_container_groups_per_instance
The maximum possible number of replica container groups that each fleet instance can have.
IpPermissionProperty
- class CfnFleet.IpPermissionProperty(*, from_port, ip_range, protocol, to_port)
Bases:
object
A range of IP addresses and port settings that allow inbound traffic to connect to server processes on an instance in a fleet.
New game sessions are assigned an IP address/port number combination, which must fall into the fleet’s allowed ranges. Fleets with custom game builds must have permissions explicitly set. For Realtime Servers fleets, GameLift automatically opens two port ranges, one for TCP messaging and one for UDP.
- Parameters:
from_port (
Union
[int
,float
]) – A starting value for a range of allowed port numbers. For fleets using Linux builds, only ports22
and1026-60000
are valid. For fleets using Windows builds, only ports1026-60000
are valid.ip_range (
str
) – A range of allowed IP addresses. This value must be expressed in CIDR notation. Example: “000.000.000.000/[subnet mask]
“ or optionally the shortened version “0.0.0.0/[subnet mask]
“.protocol (
str
) – The network communication protocol used by the fleet.to_port (
Union
[int
,float
]) – An ending value for a range of allowed port numbers. Port numbers are end-inclusive. This value must be equal to or greater thanFromPort
. For fleets using Linux builds, only ports22
and1026-60000
are valid. For fleets using Windows builds, only ports1026-60000
are valid.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_gamelift as gamelift ip_permission_property = gamelift.CfnFleet.IpPermissionProperty( from_port=123, ip_range="ipRange", protocol="protocol", to_port=123 )
Attributes
- from_port
A starting value for a range of allowed port numbers.
For fleets using Linux builds, only ports
22
and1026-60000
are valid.For fleets using Windows builds, only ports
1026-60000
are valid.
- ip_range
A range of allowed IP addresses.
This value must be expressed in CIDR notation. Example: “
000.000.000.000/[subnet mask]
“ or optionally the shortened version “0.0.0.0/[subnet mask]
“.
- protocol
The network communication protocol used by the fleet.
- to_port
An ending value for a range of allowed port numbers.
Port numbers are end-inclusive. This value must be equal to or greater than
FromPort
.For fleets using Linux builds, only ports
22
and1026-60000
are valid.For fleets using Windows builds, only ports
1026-60000
are valid.
LocationCapacityProperty
- class CfnFleet.LocationCapacityProperty(*, desired_ec2_instances, max_size, min_size)
Bases:
object
Current resource capacity settings for managed EC2 fleets and container fleets.
For multi-location fleets, location values might refer to a fleet’s remote location or its home Region.
Returned by: DescribeFleetCapacity , DescribeFleetLocationCapacity , UpdateFleetCapacity
- Parameters:
desired_ec2_instances (
Union
[int
,float
]) – The number of Amazon EC2 instances you want to maintain in the specified fleet location. This value must fall between the minimum and maximum size limits. Changes in desired instance value can take up to 1 minute to be reflected when viewing the fleet’s capacity settings.max_size (
Union
[int
,float
]) – The maximum number of instances that are allowed in the specified fleet location. If this parameter is not set, the default is 1.min_size (
Union
[int
,float
]) – The minimum number of instances that are allowed in the specified fleet location. If this parameter is not set, the default is 0.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_gamelift as gamelift location_capacity_property = gamelift.CfnFleet.LocationCapacityProperty( desired_ec2_instances=123, max_size=123, min_size=123 )
Attributes
- desired_ec2_instances
The number of Amazon EC2 instances you want to maintain in the specified fleet location.
This value must fall between the minimum and maximum size limits. Changes in desired instance value can take up to 1 minute to be reflected when viewing the fleet’s capacity settings.
- max_size
The maximum number of instances that are allowed in the specified fleet location.
If this parameter is not set, the default is 1.
- min_size
The minimum number of instances that are allowed in the specified fleet location.
If this parameter is not set, the default is 0.
LocationConfigurationProperty
- class CfnFleet.LocationConfigurationProperty(*, location, location_capacity=None)
Bases:
object
This data type has been expanded to use with the Amazon GameLift containers feature, which is currently in public preview..
A remote location where a multi-location fleet can deploy game servers for game hosting.
- Parameters:
location (
str
) – An AWS Region code, such asus-west-2
.location_capacity (
Union
[IResolvable
,LocationCapacityProperty
,Dict
[str
,Any
],None
]) –Current resource capacity settings for managed EC2 fleets and container fleets. For multi-location fleets, location values might refer to a fleet’s remote location or its home Region. Returned by: DescribeFleetCapacity , DescribeFleetLocationCapacity , UpdateFleetCapacity
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_gamelift as gamelift location_configuration_property = gamelift.CfnFleet.LocationConfigurationProperty( location="location", # the properties below are optional location_capacity=gamelift.CfnFleet.LocationCapacityProperty( desired_ec2_instances=123, max_size=123, min_size=123 ) )
Attributes
- location
An AWS Region code, such as
us-west-2
.
- location_capacity
Current resource capacity settings for managed EC2 fleets and container fleets.
For multi-location fleets, location values might refer to a fleet’s remote location or its home Region.
Returned by: DescribeFleetCapacity , DescribeFleetLocationCapacity , UpdateFleetCapacity
ResourceCreationLimitPolicyProperty
- class CfnFleet.ResourceCreationLimitPolicyProperty(*, new_game_sessions_per_creator=None, policy_period_in_minutes=None)
Bases:
object
A policy that limits the number of game sessions a player can create on the same fleet.
This optional policy gives game owners control over how players can consume available game server resources. A resource creation policy makes the following statement: “An individual player can create a maximum number of new game sessions within a specified time period”.
The policy is evaluated when a player tries to create a new game session. For example, assume you have a policy of 10 new game sessions and a time period of 60 minutes. On receiving a
CreateGameSession
request, Amazon GameLift checks that the player (identified byCreatorId
) has created fewer than 10 game sessions in the past 60 minutes.- Parameters:
new_game_sessions_per_creator (
Union
[int
,float
,None
]) – A policy that puts limits on the number of game sessions that a player can create within a specified span of time. With this policy, you can control players’ ability to consume available resources. The policy is evaluated when a player tries to create a new game session. On receiving aCreateGameSession
request, Amazon GameLift checks that the player (identified byCreatorId
) has created fewer than game session limit in the specified time period.policy_period_in_minutes (
Union
[int
,float
,None
]) – The time span used in evaluating the resource creation limit policy.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_gamelift as gamelift resource_creation_limit_policy_property = gamelift.CfnFleet.ResourceCreationLimitPolicyProperty( new_game_sessions_per_creator=123, policy_period_in_minutes=123 )
Attributes
- new_game_sessions_per_creator
A policy that puts limits on the number of game sessions that a player can create within a specified span of time.
With this policy, you can control players’ ability to consume available resources.
The policy is evaluated when a player tries to create a new game session. On receiving a
CreateGameSession
request, Amazon GameLift checks that the player (identified byCreatorId
) has created fewer than game session limit in the specified time period.
- policy_period_in_minutes
The time span used in evaluating the resource creation limit policy.
RuntimeConfigurationProperty
- class CfnFleet.RuntimeConfigurationProperty(*, game_session_activation_timeout_seconds=None, max_concurrent_game_session_activations=None, server_processes=None)
Bases:
object
A collection of server process configurations that describe the set of processes to run on each instance in a fleet.
Server processes run either an executable in a custom game build or a Realtime Servers script. GameLift launches the configured processes, manages their life cycle, and replaces them as needed. Each instance checks regularly for an updated runtime configuration.
A GameLift instance is limited to 50 processes running concurrently. To calculate the total number of processes in a runtime configuration, add the values of the
ConcurrentExecutions
parameter for each ServerProcess. Learn more about Running Multiple Processes on a Fleet .- Parameters:
game_session_activation_timeout_seconds (
Union
[int
,float
,None
]) – The maximum amount of time (in seconds) allowed to launch a new game session and have it report ready to host players. During this time, the game session is in statusACTIVATING
. If the game session does not become active before the timeout, it is ended and the game session status is changed toTERMINATED
.max_concurrent_game_session_activations (
Union
[int
,float
,None
]) – The number of game sessions in statusACTIVATING
to allow on an instance or container. This setting limits the instance resources that can be used for new game activations at any one time.server_processes (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,ServerProcessProperty
,Dict
[str
,Any
]]],None
]) – A collection of server process configurations that identify what server processes to run on fleet computes.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_gamelift as gamelift runtime_configuration_property = gamelift.CfnFleet.RuntimeConfigurationProperty( game_session_activation_timeout_seconds=123, max_concurrent_game_session_activations=123, server_processes=[gamelift.CfnFleet.ServerProcessProperty( concurrent_executions=123, launch_path="launchPath", # the properties below are optional parameters="parameters" )] )
Attributes
- game_session_activation_timeout_seconds
The maximum amount of time (in seconds) allowed to launch a new game session and have it report ready to host players.
During this time, the game session is in status
ACTIVATING
. If the game session does not become active before the timeout, it is ended and the game session status is changed toTERMINATED
.
- max_concurrent_game_session_activations
The number of game sessions in status
ACTIVATING
to allow on an instance or container.This setting limits the instance resources that can be used for new game activations at any one time.
- server_processes
A collection of server process configurations that identify what server processes to run on fleet computes.
ScalingPolicyProperty
- class CfnFleet.ScalingPolicyProperty(*, metric_name, name, comparison_operator=None, evaluation_periods=None, location=None, policy_type=None, scaling_adjustment=None, scaling_adjustment_type=None, status=None, target_configuration=None, threshold=None, update_status=None)
Bases:
object
Rule that controls how a fleet is scaled.
Scaling policies are uniquely identified by the combination of name and fleet ID.
- Parameters:
metric_name (
str
) – Name of the Amazon GameLift-defined metric that is used to trigger a scaling adjustment. For detailed descriptions of fleet metrics, see Monitor Amazon GameLift with Amazon CloudWatch . - ActivatingGameSessions – Game sessions in the process of being created. - ActiveGameSessions – Game sessions that are currently running. - ActiveInstances – Fleet instances that are currently running at least one game session. - AvailableGameSessions – Additional game sessions that fleet could host simultaneously, given current capacity. - AvailablePlayerSessions – Empty player slots in currently active game sessions. This includes game sessions that are not currently accepting players. Reserved player slots are not included. - CurrentPlayerSessions – Player slots in active game sessions that are being used by a player or are reserved for a player. - IdleInstances – Active instances that are currently hosting zero game sessions. - PercentAvailableGameSessions – Unused percentage of the total number of game sessions that a fleet could host simultaneously, given current capacity. Use this metric for a target-based scaling policy. - PercentIdleInstances – Percentage of the total number of active instances that are hosting zero game sessions. - QueueDepth – Pending game session placement requests, in any queue, where the current fleet is the top-priority destination. - WaitTime – Current wait time for pending game session placement requests, in any queue, where the current fleet is the top-priority destination.name (
str
) – A descriptive label that is associated with a fleet’s scaling policy. Policy names do not need to be unique.comparison_operator (
Optional
[str
]) – Comparison operator to use when measuring a metric against the threshold value.evaluation_periods (
Union
[int
,float
,None
]) – Length of time (in minutes) the metric must be at or beyond the threshold before a scaling event is triggered.location (
Optional
[str
]) – The fleet location.policy_type (
Optional
[str
]) – The type of scaling policy to create. For a target-based policy, set the parameter MetricName to ‘PercentAvailableGameSessions’ and specify a TargetConfiguration . For a rule-based policy set the following parameters: MetricName , ComparisonOperator , Threshold , EvaluationPeriods , ScalingAdjustmentType , and ScalingAdjustment .scaling_adjustment (
Union
[int
,float
,None
]) – Amount of adjustment to make, based on the scaling adjustment type.scaling_adjustment_type (
Optional
[str
]) – The type of adjustment to make to a fleet’s instance count. - ChangeInCapacity – add (or subtract) the scaling adjustment value from the current instance count. Positive values scale up while negative values scale down. - ExactCapacity – set the instance count to the scaling adjustment value. - PercentChangeInCapacity – increase or reduce the current instance count by the scaling adjustment, read as a percentage. Positive values scale up while negative values scale down.status (
Optional
[str
]) – Current status of the scaling policy. The scaling policy can be in force only when in anACTIVE
status. Scaling policies can be suspended for individual fleets. If the policy is suspended for a fleet, the policy status does not change. - ACTIVE – The scaling policy can be used for auto-scaling a fleet. - UPDATE_REQUESTED – A request to update the scaling policy has been received. - UPDATING – A change is being made to the scaling policy. - DELETE_REQUESTED – A request to delete the scaling policy has been received. - DELETING – The scaling policy is being deleted. - DELETED – The scaling policy has been deleted. - ERROR – An error occurred in creating the policy. It should be removed and recreated.target_configuration (
Union
[IResolvable
,TargetConfigurationProperty
,Dict
[str
,Any
],None
]) – An object that contains settings for a target-based scaling policy.threshold (
Union
[int
,float
,None
]) – Metric value used to trigger a scaling event.update_status (
Optional
[str
]) – The current status of the fleet’s scaling policies in a requested fleet location. The statusPENDING_UPDATE
indicates that an update was requested for the fleet but has not yet been completed for the location.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_gamelift as gamelift scaling_policy_property = gamelift.CfnFleet.ScalingPolicyProperty( metric_name="metricName", name="name", # the properties below are optional comparison_operator="comparisonOperator", evaluation_periods=123, location="location", policy_type="policyType", scaling_adjustment=123, scaling_adjustment_type="scalingAdjustmentType", status="status", target_configuration=gamelift.CfnFleet.TargetConfigurationProperty( target_value=123 ), threshold=123, update_status="updateStatus" )
Attributes
- comparison_operator
Comparison operator to use when measuring a metric against the threshold value.
- evaluation_periods
Length of time (in minutes) the metric must be at or beyond the threshold before a scaling event is triggered.
- location
The fleet location.
- metric_name
Name of the Amazon GameLift-defined metric that is used to trigger a scaling adjustment.
For detailed descriptions of fleet metrics, see Monitor Amazon GameLift with Amazon CloudWatch .
ActivatingGameSessions – Game sessions in the process of being created.
ActiveGameSessions – Game sessions that are currently running.
ActiveInstances – Fleet instances that are currently running at least one game session.
AvailableGameSessions – Additional game sessions that fleet could host simultaneously, given current capacity.
AvailablePlayerSessions – Empty player slots in currently active game sessions. This includes game sessions that are not currently accepting players. Reserved player slots are not included.
CurrentPlayerSessions – Player slots in active game sessions that are being used by a player or are reserved for a player.
IdleInstances – Active instances that are currently hosting zero game sessions.
PercentAvailableGameSessions – Unused percentage of the total number of game sessions that a fleet could host simultaneously, given current capacity. Use this metric for a target-based scaling policy.
PercentIdleInstances – Percentage of the total number of active instances that are hosting zero game sessions.
QueueDepth – Pending game session placement requests, in any queue, where the current fleet is the top-priority destination.
WaitTime – Current wait time for pending game session placement requests, in any queue, where the current fleet is the top-priority destination.
- name
A descriptive label that is associated with a fleet’s scaling policy.
Policy names do not need to be unique.
- policy_type
The type of scaling policy to create.
For a target-based policy, set the parameter MetricName to ‘PercentAvailableGameSessions’ and specify a TargetConfiguration . For a rule-based policy set the following parameters: MetricName , ComparisonOperator , Threshold , EvaluationPeriods , ScalingAdjustmentType , and ScalingAdjustment .
- scaling_adjustment
Amount of adjustment to make, based on the scaling adjustment type.
- scaling_adjustment_type
The type of adjustment to make to a fleet’s instance count.
ChangeInCapacity – add (or subtract) the scaling adjustment value from the current instance count. Positive values scale up while negative values scale down.
ExactCapacity – set the instance count to the scaling adjustment value.
PercentChangeInCapacity – increase or reduce the current instance count by the scaling adjustment, read as a percentage. Positive values scale up while negative values scale down.
- status
Current status of the scaling policy.
The scaling policy can be in force only when in an
ACTIVE
status. Scaling policies can be suspended for individual fleets. If the policy is suspended for a fleet, the policy status does not change.ACTIVE – The scaling policy can be used for auto-scaling a fleet.
UPDATE_REQUESTED – A request to update the scaling policy has been received.
UPDATING – A change is being made to the scaling policy.
DELETE_REQUESTED – A request to delete the scaling policy has been received.
DELETING – The scaling policy is being deleted.
DELETED – The scaling policy has been deleted.
ERROR – An error occurred in creating the policy. It should be removed and recreated.
- target_configuration
An object that contains settings for a target-based scaling policy.
- threshold
Metric value used to trigger a scaling event.
- update_status
The current status of the fleet’s scaling policies in a requested fleet location.
The status
PENDING_UPDATE
indicates that an update was requested for the fleet but has not yet been completed for the location.
ServerProcessProperty
- class CfnFleet.ServerProcessProperty(*, concurrent_executions, launch_path, parameters=None)
Bases:
object
A set of instructions for launching server processes on each instance in a fleet.
Server processes run either an executable in a custom game build or a Realtime Servers script.
- Parameters:
concurrent_executions (
Union
[int
,float
]) – The number of server processes using this configuration that run concurrently on each instance or container..launch_path (
str
) – The location of a game build executable or Realtime script. Game builds and Realtime scripts are installed on instances at the root: - Windows (custom game builds only):C:\game
. Example: “C:\game\MyGame\server.exe
“ - Linux:/local/game
. Examples: “/local/game/MyGame/server.exe
“ or “/local/game/MyRealtimeScript.js
“ .. epigraph:: Amazon GameLift doesn’t support the use of setup scripts that launch the game executable. For custom game builds, this parameter must indicate the executable that calls the server SDK operationsinitSDK()
andProcessReady()
.parameters (
Optional
[str
]) – An optional list of parameters to pass to the server executable or Realtime script on launch. Length Constraints: Minimum length of 1. Maximum length of 1024. Pattern: [A-Za-z0-9_:.+/- =@{},?’[]”]+
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_gamelift as gamelift server_process_property = gamelift.CfnFleet.ServerProcessProperty( concurrent_executions=123, launch_path="launchPath", # the properties below are optional parameters="parameters" )
Attributes
- concurrent_executions
The number of server processes using this configuration that run concurrently on each instance or container..
- launch_path
The location of a game build executable or Realtime script.
Game builds and Realtime scripts are installed on instances at the root:
Windows (custom game builds only):
C:\game
. Example: “C:\game\MyGame\server.exe
“Linux:
/local/game
. Examples: “/local/game/MyGame/server.exe
“ or “/local/game/MyRealtimeScript.js
“
Amazon GameLift doesn’t support the use of setup scripts that launch the game executable. For custom game builds, this parameter must indicate the executable that calls the server SDK operations
initSDK()
andProcessReady()
.
- parameters
An optional list of parameters to pass to the server executable or Realtime script on launch.
Length Constraints: Minimum length of 1. Maximum length of 1024.
Pattern: [A-Za-z0-9_:.+/- =@{},?’[]”]+
TargetConfigurationProperty
- class CfnFleet.TargetConfigurationProperty(*, target_value)
Bases:
object
Settings for a target-based scaling policy.
A target-based policy tracks a particular fleet metric specifies a target value for the metric. As player usage changes, the policy triggers Amazon GameLift to adjust capacity so that the metric returns to the target value. The target configuration specifies settings as needed for the target based policy, including the target value.
- Parameters:
target_value (
Union
[int
,float
]) – Desired value to use with a target-based scaling policy. The value must be relevant for whatever metric the scaling policy is using. For example, in a policy using the metric PercentAvailableGameSessions, the target value should be the preferred size of the fleet’s buffer (the percent of capacity that should be idle and ready for new game sessions).- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_gamelift as gamelift target_configuration_property = gamelift.CfnFleet.TargetConfigurationProperty( target_value=123 )
Attributes
- target_value
Desired value to use with a target-based scaling policy.
The value must be relevant for whatever metric the scaling policy is using. For example, in a policy using the metric PercentAvailableGameSessions, the target value should be the preferred size of the fleet’s buffer (the percent of capacity that should be idle and ready for new game sessions).