Class: AWSCDK::GameLift::CfnMatchmakingConfiguration::GamePropertyProperty

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

Overview

This key-value pair can store custom data about a game session.

For example, you might use a GameProperty to track a game session's map, level of difficulty, or remaining time. The difficulty level could be specified like this: {"Key": "difficulty", "Value":"Novice"} .

You can set game properties when creating a game session. You can also modify game properties of an active game session. When searching for game sessions, you can filter on game property keys and values. You can't delete game properties from a game session.

For examples of working with game properties, see Create a game session with properties .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key:, value:) ⇒ GamePropertyProperty

Returns a new instance of GamePropertyProperty.

Parameters:

  • key (String)

    The game property identifier.

  • value (String)

    The game property value.



768
769
770
771
772
773
# File 'game_lift/cfn_matchmaking_configuration.rb', line 768

def initialize(key:, value:)
  @key = key
  Jsii::Type.check_type(@key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "key")
  @value = value
  Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value")
end

Instance Attribute Details

#keyString (readonly)

The game property identifier.



779
780
781
# File 'game_lift/cfn_matchmaking_configuration.rb', line 779

def key
  @key
end

#valueString (readonly)

The game property value.



784
785
786
# File 'game_lift/cfn_matchmaking_configuration.rb', line 784

def value
  @value
end

Class Method Details

.jsii_propertiesObject



786
787
788
789
790
791
# File 'game_lift/cfn_matchmaking_configuration.rb', line 786

def self.jsii_properties
  {
    :key => "key",
    :value => "value",
  }
end

Instance Method Details

#to_jsiiObject



793
794
795
796
797
798
799
800
# File 'game_lift/cfn_matchmaking_configuration.rb', line 793

def to_jsii
  result = {}
  result.merge!({
    "key" => @key,
    "value" => @value,
  })
  result.compact
end