Class: AWSCDK::GameLift::CfnContainerFleet::GameSessionCreationLimitPolicyProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::GameLift::CfnContainerFleet::GameSessionCreationLimitPolicyProperty
- Defined in:
- game_lift/cfn_container_fleet.rb
Overview
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 Servers checks that the player (identified by CreatorId ) has created fewer than game session limit in the specified time period.
Instance Attribute Summary collapse
-
#new_game_sessions_per_creator ⇒ Numeric?
readonly
A policy that puts limits on the number of game sessions that a player can create within a specified span of time.
-
#policy_period_in_minutes ⇒ Numeric?
readonly
The time span used in evaluating the resource creation limit policy.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(new_game_sessions_per_creator: nil, policy_period_in_minutes: nil) ⇒ GameSessionCreationLimitPolicyProperty
constructor
A new instance of GameSessionCreationLimitPolicyProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(new_game_sessions_per_creator: nil, policy_period_in_minutes: nil) ⇒ GameSessionCreationLimitPolicyProperty
Returns a new instance of GameSessionCreationLimitPolicyProperty.
975 976 977 978 979 980 |
# File 'game_lift/cfn_container_fleet.rb', line 975 def initialize(new_game_sessions_per_creator: nil, policy_period_in_minutes: nil) @new_game_sessions_per_creator = new_game_sessions_per_creator Jsii::Type.check_type(@new_game_sessions_per_creator, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "newGameSessionsPerCreator") unless @new_game_sessions_per_creator.nil? @policy_period_in_minutes = policy_period_in_minutes Jsii::Type.check_type(@policy_period_in_minutes, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "policyPeriodInMinutes") unless @policy_period_in_minutes.nil? end |
Instance Attribute Details
#new_game_sessions_per_creator ⇒ Numeric? (readonly)
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 evaluates when a player tries to create a new game session. On receiving a CreateGameSession request, Amazon GameLift Servers checks that the player (identified by CreatorId ) has created fewer than game session limit in the specified time period.
990 991 992 |
# File 'game_lift/cfn_container_fleet.rb', line 990 def new_game_sessions_per_creator @new_game_sessions_per_creator end |
#policy_period_in_minutes ⇒ Numeric? (readonly)
The time span used in evaluating the resource creation limit policy.
995 996 997 |
# File 'game_lift/cfn_container_fleet.rb', line 995 def policy_period_in_minutes @policy_period_in_minutes end |
Class Method Details
.jsii_properties ⇒ Object
997 998 999 1000 1001 1002 |
# File 'game_lift/cfn_container_fleet.rb', line 997 def self.jsii_properties { :new_game_sessions_per_creator => "newGameSessionsPerCreator", :policy_period_in_minutes => "policyPeriodInMinutes", } end |
Instance Method Details
#to_jsii ⇒ Object
1004 1005 1006 1007 1008 1009 1010 1011 |
# File 'game_lift/cfn_container_fleet.rb', line 1004 def to_jsii result = {} result.merge!({ "newGameSessionsPerCreator" => @new_game_sessions_per_creator, "policyPeriodInMinutes" => @policy_period_in_minutes, }) result.compact end |