CfnFleetPropsMixin
- class aws_cdk.mixins_preview.aws_gamelift.mixins.CfnFleetPropsMixin(props, *, strategy=None)
Bases:
MixinThe
AWS::GameLift::Fleetresource 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
- Mixin:
true
- 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.mixins_preview import mixins from aws_cdk.mixins_preview.aws_gamelift import mixins as gamelift_mixins cfn_fleet_props_mixin = gamelift_mixins.CfnFleetPropsMixin(gamelift_mixins.CfnFleetMixinProps( anywhere_configuration=gamelift_mixins.CfnFleetPropsMixin.AnywhereConfigurationProperty( cost="cost" ), apply_capacity="applyCapacity", build_id="buildId", certificate_configuration=gamelift_mixins.CfnFleetPropsMixin.CertificateConfigurationProperty( certificate_type="certificateType" ), compute_type="computeType", description="description", desired_ec2_instances=123, ec2_inbound_permissions=[gamelift_mixins.CfnFleetPropsMixin.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_mixins.CfnFleetPropsMixin.LocationConfigurationProperty( location="location", location_capacity=gamelift_mixins.CfnFleetPropsMixin.LocationCapacityProperty( desired_ec2_instances=123, max_size=123, min_size=123 ) )], log_paths=["logPaths"], max_size=123, metric_groups=["metricGroups"], min_size=123, name="name", new_game_session_protection_policy="newGameSessionProtectionPolicy", peer_vpc_aws_account_id="peerVpcAwsAccountId", peer_vpc_id="peerVpcId", resource_creation_limit_policy=gamelift_mixins.CfnFleetPropsMixin.ResourceCreationLimitPolicyProperty( new_game_sessions_per_creator=123, policy_period_in_minutes=123 ), runtime_configuration=gamelift_mixins.CfnFleetPropsMixin.RuntimeConfigurationProperty( game_session_activation_timeout_seconds=123, max_concurrent_game_session_activations=123, server_processes=[gamelift_mixins.CfnFleetPropsMixin.ServerProcessProperty( concurrent_executions=123, launch_path="launchPath", parameters="parameters" )] ), scaling_policies=[gamelift_mixins.CfnFleetPropsMixin.ScalingPolicyProperty( comparison_operator="comparisonOperator", evaluation_periods=123, location="location", metric_name="metricName", name="name", policy_type="policyType", scaling_adjustment=123, scaling_adjustment_type="scalingAdjustmentType", status="status", target_configuration=gamelift_mixins.CfnFleetPropsMixin.TargetConfigurationProperty( target_value=123 ), threshold=123, update_status="updateStatus" )], script_id="scriptId", server_launch_parameters="serverLaunchParameters", server_launch_path="serverLaunchPath", tags=[CfnTag( key="key", value="value" )] ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::GameLift::Fleet.- Parameters:
props (
Union[CfnFleetMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['anywhereConfiguration', 'applyCapacity', 'buildId', 'certificateConfiguration', 'computeType', 'description', 'desiredEc2Instances', 'ec2InboundPermissions', 'ec2InstanceType', 'fleetType', 'instanceRoleArn', 'instanceRoleCredentialsProvider', 'locations', 'logPaths', 'maxSize', 'metricGroups', 'minSize', 'name', 'newGameSessionProtectionPolicy', 'peerVpcAwsAccountId', 'peerVpcId', 'resourceCreationLimitPolicy', 'runtimeConfiguration', 'scalingPolicies', 'scriptId', 'serverLaunchParameters', 'serverLaunchPath', 'tags']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
AnywhereConfigurationProperty
- class CfnFleetPropsMixin.AnywhereConfigurationProperty(*, cost=None)
Bases:
objectAmazon GameLift Servers configuration options for your Anywhere fleets.
- Parameters:
cost (
Optional[str]) – The cost to run your fleet per hour. Amazon GameLift Servers 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 Servers 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.mixins_preview.aws_gamelift import mixins as gamelift_mixins anywhere_configuration_property = gamelift_mixins.CfnFleetPropsMixin.AnywhereConfigurationProperty( cost="cost" )
Attributes
- cost
The cost to run your fleet per hour.
Amazon GameLift Servers 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 Servers Developer Guide .
CertificateConfigurationProperty
- class CfnFleetPropsMixin.CertificateConfigurationProperty(*, certificate_type=None)
Bases:
objectDetermines 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 (
Optional[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.mixins_preview.aws_gamelift import mixins as gamelift_mixins certificate_configuration_property = gamelift_mixins.CfnFleetPropsMixin.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.
IpPermissionProperty
- class CfnFleetPropsMixin.IpPermissionProperty(*, from_port=None, ip_range=None, protocol=None, to_port=None)
Bases:
objectA 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,None]) – A starting value for a range of allowed port numbers. For fleets using Linux builds, only ports22and1026-60000are valid. For fleets using Windows builds, only ports1026-60000are valid.ip_range (
Optional[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 (
Optional[str]) – The network communication protocol used by the fleet.to_port (
Union[int,float,None]) – 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 ports22and1026-60000are valid. For fleets using Windows builds, only ports1026-60000are 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.mixins_preview.aws_gamelift import mixins as gamelift_mixins ip_permission_property = gamelift_mixins.CfnFleetPropsMixin.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
22and1026-60000are valid.For fleets using Windows builds, only ports
1026-60000are 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
22and1026-60000are valid.For fleets using Windows builds, only ports
1026-60000are valid.
LocationCapacityProperty
- class CfnFleetPropsMixin.LocationCapacityProperty(*, desired_ec2_instances=None, max_size=None, min_size=None)
Bases:
objectCurrent resource capacity settings for managed EC2 fleets and managed 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,None]) – 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,None]) – 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,None]) – 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.mixins_preview.aws_gamelift import mixins as gamelift_mixins location_capacity_property = gamelift_mixins.CfnFleetPropsMixin.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 CfnFleetPropsMixin.LocationConfigurationProperty(*, location=None, location_capacity=None)
Bases:
objectA remote location where a multi-location fleet can deploy game servers for game hosting.
- Parameters:
location (
Optional[str]) – An AWS Region code, such asus-west-2. For a list of supported Regions and Local Zones, see Amazon GameLift Servers service locations for managed hosting.location_capacity (
Union[IResolvable,LocationCapacityProperty,Dict[str,Any],None]) –Current resource capacity settings for managed EC2 fleets and managed 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.mixins_preview.aws_gamelift import mixins as gamelift_mixins location_configuration_property = gamelift_mixins.CfnFleetPropsMixin.LocationConfigurationProperty( location="location", location_capacity=gamelift_mixins.CfnFleetPropsMixin.LocationCapacityProperty( desired_ec2_instances=123, max_size=123, min_size=123 ) )
Attributes
- location
An AWS Region code, such as
us-west-2.For a list of supported Regions and Local Zones, see Amazon GameLift Servers service locations for managed hosting.
- location_capacity
Current resource capacity settings for managed EC2 fleets and managed 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 CfnFleetPropsMixin.ResourceCreationLimitPolicyProperty(*, new_game_sessions_per_creator=None, policy_period_in_minutes=None)
Bases:
objectA 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
CreateGameSessionrequest, 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 aCreateGameSessionrequest, Amazon GameLift Servers 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.mixins_preview.aws_gamelift import mixins as gamelift_mixins resource_creation_limit_policy_property = gamelift_mixins.CfnFleetPropsMixin.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
CreateGameSessionrequest, Amazon GameLift Servers 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 CfnFleetPropsMixin.RuntimeConfigurationProperty(*, game_session_activation_timeout_seconds=None, max_concurrent_game_session_activations=None, server_processes=None)
Bases:
objectA 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
ConcurrentExecutionsparameter 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 statusACTIVATINGto allow on an instance or compute. 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.mixins_preview.aws_gamelift import mixins as gamelift_mixins runtime_configuration_property = gamelift_mixins.CfnFleetPropsMixin.RuntimeConfigurationProperty( game_session_activation_timeout_seconds=123, max_concurrent_game_session_activations=123, server_processes=[gamelift_mixins.CfnFleetPropsMixin.ServerProcessProperty( concurrent_executions=123, launch_path="launchPath", 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
ACTIVATINGto allow on an instance or compute.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 CfnFleetPropsMixin.ScalingPolicyProperty(*, comparison_operator=None, evaluation_periods=None, location=None, metric_name=None, name=None, policy_type=None, scaling_adjustment=None, scaling_adjustment_type=None, status=None, target_configuration=None, threshold=None, update_status=None)
Bases:
objectRule that controls how a fleet is scaled.
Scaling policies are uniquely identified by the combination of name and fleet ID.
- Parameters:
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.metric_name (
Optional[str]) – Name of the Amazon GameLift Servers-defined metric that is used to trigger a scaling adjustment. For detailed descriptions of fleet metrics, see Monitor Amazon GameLift Servers 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 (
Optional[str]) – A descriptive label that is associated with a fleet’s scaling policy. Policy names do not need to be unique.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 anACTIVEstatus. 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_UPDATEindicates 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.mixins_preview.aws_gamelift import mixins as gamelift_mixins scaling_policy_property = gamelift_mixins.CfnFleetPropsMixin.ScalingPolicyProperty( comparison_operator="comparisonOperator", evaluation_periods=123, location="location", metric_name="metricName", name="name", policy_type="policyType", scaling_adjustment=123, scaling_adjustment_type="scalingAdjustmentType", status="status", target_configuration=gamelift_mixins.CfnFleetPropsMixin.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 Servers-defined metric that is used to trigger a scaling adjustment.
For detailed descriptions of fleet metrics, see Monitor Amazon GameLift Servers 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
ACTIVEstatus. 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_UPDATEindicates that an update was requested for the fleet but has not yet been completed for the location.
ServerProcessProperty
- class CfnFleetPropsMixin.ServerProcessProperty(*, concurrent_executions=None, launch_path=None, parameters=None)
Bases:
objectA 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,None]) – The number of server processes using this configuration that run concurrently on each instance or compute.launch_path (
Optional[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 Servers 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.mixins_preview.aws_gamelift import mixins as gamelift_mixins server_process_property = gamelift_mixins.CfnFleetPropsMixin.ServerProcessProperty( concurrent_executions=123, launch_path="launchPath", parameters="parameters" )
Attributes
- concurrent_executions
The number of server processes using this configuration that run concurrently on each instance or compute.
- 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 Servers 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 CfnFleetPropsMixin.TargetConfigurationProperty(*, target_value=None)
Bases:
objectSettings 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 Servers 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,None]) – 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.mixins_preview.aws_gamelift import mixins as gamelift_mixins target_configuration_property = gamelift_mixins.CfnFleetPropsMixin.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).