Class: AWSCDK::GameLift::CfnMatchmakingConfigurationProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
game_lift/cfn_matchmaking_configuration_props.rb

Overview

Properties for defining a CfnMatchmakingConfiguration.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(acceptance_required:, name:, request_timeout_seconds:, rule_set_name:, acceptance_timeout_seconds: nil, additional_player_count: nil, backfill_mode: nil, creation_time: nil, custom_event_data: nil, description: nil, flex_match_mode: nil, game_properties: nil, game_session_data: nil, game_session_queue_arns: nil, notification_target: nil, rule_set_arn: nil, tags: nil) ⇒ CfnMatchmakingConfigurationProps

Returns a new instance of CfnMatchmakingConfigurationProps.

Parameters:

  • acceptance_required (Boolean, AWSCDK::IResolvable)

    A flag that determines whether a match that was created with this configuration must be accepted by the matched players.

  • name (String)

    A unique identifier for the matchmaking configuration.

  • request_timeout_seconds (Numeric)

    The maximum duration, in seconds, that a matchmaking ticket can remain in process before timing out.

  • rule_set_name (String)

    A unique identifier for the matchmaking rule set to use with this configuration.

  • acceptance_timeout_seconds (Numeric, nil) (defaults to: nil)

    The length of time (in seconds) to wait for players to accept a proposed match, if acceptance is required.

  • additional_player_count (Numeric, nil) (defaults to: nil)

    The number of player slots in a match to keep open for future players.

  • backfill_mode (String, nil) (defaults to: nil)

    The method used to backfill game sessions that are created with this matchmaking configuration.

  • creation_time (String, nil) (defaults to: nil)

    A time stamp indicating when this data object was created.

  • custom_event_data (String, nil) (defaults to: nil)

    Information to add to all events related to the matchmaking configuration.

  • description (String, nil) (defaults to: nil)

    A description for the matchmaking configuration.

  • flex_match_mode (String, nil) (defaults to: nil)

    Indicates whether this matchmaking configuration is being used with Amazon GameLift Servers hosting or as a standalone matchmaking solution.

  • game_properties (AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::GameLift::CfnMatchmakingConfiguration::GamePropertyProperty>, nil) (defaults to: nil)

    A set of custom properties for a game session, formatted as key-value pairs.

  • game_session_data (String, nil) (defaults to: nil)

    A set of custom game session properties, formatted as a single string value.

  • game_session_queue_arns (Array<String>, nil) (defaults to: nil)

    The Amazon Resource Name ( ARN ) that is assigned to a Amazon GameLift Servers game session queue resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::gamesessionqueue/<queue name> . Queues can be located in any Region. Queues are used to start new Amazon GameLift Servers-hosted game sessions for matches that are created with this matchmaking configuration. If FlexMatchMode is set to STANDALONE , do not set this parameter.

  • notification_target (String, nil) (defaults to: nil)

    An SNS topic ARN that is set up to receive matchmaking notifications.

  • rule_set_arn (String, nil) (defaults to: nil)

    The Amazon Resource Name ( ARN ) associated with the GameLift matchmaking rule set resource that this configuration uses.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    A list of labels to assign to the new matchmaking configuration resource.



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'game_lift/cfn_matchmaking_configuration_props.rb', line 26

def initialize(acceptance_required:, name:, request_timeout_seconds:, rule_set_name:, acceptance_timeout_seconds: nil, additional_player_count: nil, backfill_mode: nil, creation_time: nil, custom_event_data: nil, description: nil, flex_match_mode: nil, game_properties: nil, game_session_data: nil, game_session_queue_arns: nil, notification_target: nil, rule_set_arn: nil, tags: nil)
  @acceptance_required = acceptance_required
  Jsii::Type.check_type(@acceptance_required, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "acceptanceRequired")
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @request_timeout_seconds = request_timeout_seconds
  Jsii::Type.check_type(@request_timeout_seconds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "requestTimeoutSeconds")
  @rule_set_name = rule_set_name
  Jsii::Type.check_type(@rule_set_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ruleSetName")
  @acceptance_timeout_seconds = acceptance_timeout_seconds
  Jsii::Type.check_type(@acceptance_timeout_seconds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "acceptanceTimeoutSeconds") unless @acceptance_timeout_seconds.nil?
  @additional_player_count = additional_player_count
  Jsii::Type.check_type(@additional_player_count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "additionalPlayerCount") unless @additional_player_count.nil?
  @backfill_mode = backfill_mode
  Jsii::Type.check_type(@backfill_mode, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "backfillMode") unless @backfill_mode.nil?
  @creation_time = creation_time
  Jsii::Type.check_type(@creation_time, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "creationTime") unless @creation_time.nil?
  @custom_event_data = custom_event_data
  Jsii::Type.check_type(@custom_event_data, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "customEventData") unless @custom_event_data.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @flex_match_mode = flex_match_mode
  Jsii::Type.check_type(@flex_match_mode, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "flexMatchMode") unless @flex_match_mode.nil?
  @game_properties = game_properties
  Jsii::Type.check_type(@game_properties, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZ2FtZWxpZnQuQ2ZuTWF0Y2htYWtpbmdDb25maWd1cmF0aW9uLkdhbWVQcm9wZXJ0eVByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "gameProperties") unless @game_properties.nil?
  @game_session_data = game_session_data
  Jsii::Type.check_type(@game_session_data, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "gameSessionData") unless @game_session_data.nil?
  @game_session_queue_arns = game_session_queue_arns
  Jsii::Type.check_type(@game_session_queue_arns, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "gameSessionQueueArns") unless @game_session_queue_arns.nil?
  @notification_target = notification_target
  Jsii::Type.check_type(@notification_target, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "notificationTarget") unless @notification_target.nil?
  @rule_set_arn = rule_set_arn
  Jsii::Type.check_type(@rule_set_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ruleSetArn") unless @rule_set_arn.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#acceptance_requiredBoolean, AWSCDK::IResolvable (readonly)

A flag that determines whether a match that was created with this configuration must be accepted by the matched players.

To require acceptance, set to TRUE . With this option enabled, matchmaking tickets use the status REQUIRES_ACCEPTANCE to indicate when a completed potential match is waiting for player acceptance.



69
70
71
# File 'game_lift/cfn_matchmaking_configuration_props.rb', line 69

def acceptance_required
  @acceptance_required
end

#acceptance_timeout_secondsNumeric? (readonly)

The length of time (in seconds) to wait for players to accept a proposed match, if acceptance is required.



95
96
97
# File 'game_lift/cfn_matchmaking_configuration_props.rb', line 95

def acceptance_timeout_seconds
  @acceptance_timeout_seconds
end

#additional_player_countNumeric? (readonly)

The number of player slots in a match to keep open for future players.

For example, if the configuration's rule set specifies a match for a single 12-person team, and the additional player count is set to 2, only 10 players are selected for the match. This parameter is not used if FlexMatchMode is set to STANDALONE .



102
103
104
# File 'game_lift/cfn_matchmaking_configuration_props.rb', line 102

def additional_player_count
  @additional_player_count
end

#backfill_modeString? (readonly)

The method used to backfill game sessions that are created with this matchmaking configuration.

Specify MANUAL when your game manages backfill requests manually or does not use the match backfill feature. Specify AUTOMATIC to have GameLift create a StartMatchBackfill request whenever a game session has one or more open slots. Learn more about manual and automatic backfill in Backfill Existing Games with FlexMatch . Automatic backfill is not available when FlexMatchMode is set to STANDALONE .



109
110
111
# File 'game_lift/cfn_matchmaking_configuration_props.rb', line 109

def backfill_mode
  @backfill_mode
end

#creation_timeString? (readonly)

A time stamp indicating when this data object was created.

Format is a number expressed in Unix time as milliseconds (for example "1469498468.057" ).



116
117
118
# File 'game_lift/cfn_matchmaking_configuration_props.rb', line 116

def creation_time
  @creation_time
end

#custom_event_dataString? (readonly)

Information to add to all events related to the matchmaking configuration.



121
122
123
# File 'game_lift/cfn_matchmaking_configuration_props.rb', line 121

def custom_event_data
  @custom_event_data
end

#descriptionString? (readonly)

A description for the matchmaking configuration.



126
127
128
# File 'game_lift/cfn_matchmaking_configuration_props.rb', line 126

def description
  @description
end

#flex_match_modeString? (readonly)

Indicates whether this matchmaking configuration is being used with Amazon GameLift Servers hosting or as a standalone matchmaking solution.

  • STANDALONE - FlexMatch forms matches and returns match information, including players and team assignments, in a MatchmakingSucceeded event.
  • WITH_QUEUE - FlexMatch forms matches and uses the specified Amazon GameLift Servers queue to start a game session for the match.


134
135
136
# File 'game_lift/cfn_matchmaking_configuration_props.rb', line 134

def flex_match_mode
  @flex_match_mode
end

#game_propertiesAWSCDK::IResolvable, ... (readonly)

A set of custom properties for a game session, formatted as key-value pairs.

These properties are passed to a game server process with a request to start a new game session. See Start a Game Session . This parameter is not used if FlexMatchMode is set to STANDALONE .



141
142
143
# File 'game_lift/cfn_matchmaking_configuration_props.rb', line 141

def game_properties
  @game_properties
end

#game_session_dataString? (readonly)

A set of custom game session properties, formatted as a single string value.

This data is passed to a game server process with a request to start a new game session. See Start a Game Session . This parameter is not used if FlexMatchMode is set to STANDALONE .



148
149
150
# File 'game_lift/cfn_matchmaking_configuration_props.rb', line 148

def game_session_data
  @game_session_data
end

#game_session_queue_arnsArray<String>? (readonly)

The Amazon Resource Name ( ARN ) that is assigned to a Amazon GameLift Servers game session queue resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::gamesessionqueue/<queue name> . Queues can be located in any Region. Queues are used to start new Amazon GameLift Servers-hosted game sessions for matches that are created with this matchmaking configuration. If FlexMatchMode is set to STANDALONE , do not set this parameter.



153
154
155
# File 'game_lift/cfn_matchmaking_configuration_props.rb', line 153

def game_session_queue_arns
  @game_session_queue_arns
end

#nameString (readonly)

A unique identifier for the matchmaking configuration.

This name is used to identify the configuration associated with a matchmaking request or ticket.



76
77
78
# File 'game_lift/cfn_matchmaking_configuration_props.rb', line 76

def name
  @name
end

#notification_targetString? (readonly)

An SNS topic ARN that is set up to receive matchmaking notifications.

See Setting up notifications for matchmaking for more information.



160
161
162
# File 'game_lift/cfn_matchmaking_configuration_props.rb', line 160

def notification_target
  @notification_target
end

#request_timeout_secondsNumeric (readonly)

The maximum duration, in seconds, that a matchmaking ticket can remain in process before timing out.

Requests that fail due to timing out can be resubmitted as needed.



83
84
85
# File 'game_lift/cfn_matchmaking_configuration_props.rb', line 83

def request_timeout_seconds
  @request_timeout_seconds
end

#rule_set_arnString? (readonly)

The Amazon Resource Name ( ARN ) associated with the GameLift matchmaking rule set resource that this configuration uses.



165
166
167
# File 'game_lift/cfn_matchmaking_configuration_props.rb', line 165

def rule_set_arn
  @rule_set_arn
end

#rule_set_nameString (readonly)

A unique identifier for the matchmaking rule set to use with this configuration.

You can use either the rule set name or ARN value. A matchmaking configuration can only use rule sets that are defined in the same Region.



90
91
92
# File 'game_lift/cfn_matchmaking_configuration_props.rb', line 90

def rule_set_name
  @rule_set_name
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

A list of labels to assign to the new matchmaking configuration resource.

Tags are developer-defined key-value pairs. Tagging AWS resources are useful for resource management, access management and cost allocation. For more information, see Tagging AWS Resources in the AWS General Reference . Once the resource is created, you can use TagResource, UntagResource, and ListTagsForResource to add, remove, and view tags. The maximum tag limit may be lower than stated. See the AWS General Reference for actual tagging limits.



172
173
174
# File 'game_lift/cfn_matchmaking_configuration_props.rb', line 172

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
# File 'game_lift/cfn_matchmaking_configuration_props.rb', line 174

def self.jsii_properties
  {
    :acceptance_required => "acceptanceRequired",
    :name => "name",
    :request_timeout_seconds => "requestTimeoutSeconds",
    :rule_set_name => "ruleSetName",
    :acceptance_timeout_seconds => "acceptanceTimeoutSeconds",
    :additional_player_count => "additionalPlayerCount",
    :backfill_mode => "backfillMode",
    :creation_time => "creationTime",
    :custom_event_data => "customEventData",
    :description => "description",
    :flex_match_mode => "flexMatchMode",
    :game_properties => "gameProperties",
    :game_session_data => "gameSessionData",
    :game_session_queue_arns => "gameSessionQueueArns",
    :notification_target => "notificationTarget",
    :rule_set_arn => "ruleSetArn",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
# File 'game_lift/cfn_matchmaking_configuration_props.rb', line 196

def to_jsii
  result = {}
  result.merge!({
    "acceptanceRequired" => @acceptance_required,
    "name" => @name,
    "requestTimeoutSeconds" => @request_timeout_seconds,
    "ruleSetName" => @rule_set_name,
    "acceptanceTimeoutSeconds" => @acceptance_timeout_seconds,
    "additionalPlayerCount" => @additional_player_count,
    "backfillMode" => @backfill_mode,
    "creationTime" => @creation_time,
    "customEventData" => @custom_event_data,
    "description" => @description,
    "flexMatchMode" => @flex_match_mode,
    "gameProperties" => @game_properties,
    "gameSessionData" => @game_session_data,
    "gameSessionQueueArns" => @game_session_queue_arns,
    "notificationTarget" => @notification_target,
    "ruleSetArn" => @rule_set_arn,
    "tags" => @tags,
  })
  result.compact
end