Class: AWSCDK::GameLift::CfnAliasProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::GameLift::CfnAliasProps
- Defined in:
- game_lift/cfn_alias_props.rb
Overview
Properties for defining a CfnAlias.
Instance Attribute Summary collapse
-
#description ⇒ String?
readonly
A human-readable description of the alias.
-
#name ⇒ String
readonly
A descriptive label that is associated with an alias.
-
#routing_strategy ⇒ AWSCDK::IResolvable, AWSCDK::GameLift::CfnAlias::RoutingStrategyProperty
readonly
The routing configuration, including routing type and fleet target, for the alias.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
An array of key-value pairs to apply to this resource.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name:, routing_strategy:, description: nil, tags: nil) ⇒ CfnAliasProps
constructor
A new instance of CfnAliasProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(name:, routing_strategy:, description: nil, tags: nil) ⇒ CfnAliasProps
Returns a new instance of CfnAliasProps.
13 14 15 16 17 18 19 20 21 22 |
# File 'game_lift/cfn_alias_props.rb', line 13 def initialize(name:, routing_strategy:, description: nil, tags: nil) @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") @routing_strategy = routing_strategy.is_a?(Hash) ? ::AWSCDK::GameLift::CfnAlias::RoutingStrategyProperty.new(**routing_strategy.transform_keys(&:to_sym)) : routing_strategy Jsii::Type.check_type(@routing_strategy, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19nYW1lbGlmdC5DZm5BbGlhcy5Sb3V0aW5nU3RyYXRlZ3lQcm9wZXJ0eSJ9XX19")), "routingStrategy") @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? end |
Instance Attribute Details
#description ⇒ String? (readonly)
A human-readable description of the alias.
40 41 42 |
# File 'game_lift/cfn_alias_props.rb', line 40 def description @description end |
#name ⇒ String (readonly)
A descriptive label that is associated with an alias.
Alias names do not need to be unique.
30 31 32 |
# File 'game_lift/cfn_alias_props.rb', line 30 def name @name end |
#routing_strategy ⇒ AWSCDK::IResolvable, AWSCDK::GameLift::CfnAlias::RoutingStrategyProperty (readonly)
The routing configuration, including routing type and fleet target, for the alias.
35 36 37 |
# File 'game_lift/cfn_alias_props.rb', line 35 def routing_strategy @routing_strategy end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
An array of key-value pairs to apply to this resource.
45 46 47 |
# File 'game_lift/cfn_alias_props.rb', line 45 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
47 48 49 50 51 52 53 54 |
# File 'game_lift/cfn_alias_props.rb', line 47 def self.jsii_properties { :name => "name", :routing_strategy => "routingStrategy", :description => "description", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
56 57 58 59 60 61 62 63 64 65 |
# File 'game_lift/cfn_alias_props.rb', line 56 def to_jsii result = {} result.merge!({ "name" => @name, "routingStrategy" => @routing_strategy, "description" => @description, "tags" => @tags, }) result.compact end |