Class: AWSCDK::GameLift::CfnContainerGroupDefinition::GameServerContainerDefinitionProperty

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

Overview

Describes the game server container in an existing game server container group.

A game server container identifies a container image with your game server build. A game server container is automatically considered essential; if an essential container fails, the entire container group restarts.

You can update a container definition and deploy the updates to an existing fleet. When creating or updating a game server container group definition, use the property .

Part of: ContainerGroupDefinition

Returned by: DescribeContainerGroupDefinition , ListContainerGroupDefinitions , UpdateContainerGroupDefinition

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(container_name:, image_uri:, server_sdk_version:, depends_on: nil, environment_override: nil, linux_capabilities: nil, mount_points: nil, port_configuration: nil, resolved_image_digest: nil) ⇒ GameServerContainerDefinitionProperty

Returns a new instance of GameServerContainerDefinitionProperty.

Parameters:



999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
# File 'game_lift/cfn_container_group_definition.rb', line 999

def initialize(container_name:, image_uri:, server_sdk_version:, depends_on: nil, environment_override: nil, linux_capabilities: nil, mount_points: nil, port_configuration: nil, resolved_image_digest: nil)
  @container_name = container_name
  Jsii::Type.check_type(@container_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "containerName")
  @image_uri = image_uri
  Jsii::Type.check_type(@image_uri, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "imageUri")
  @server_sdk_version = server_sdk_version
  Jsii::Type.check_type(@server_sdk_version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serverSdkVersion")
  @depends_on = depends_on
  Jsii::Type.check_type(@depends_on, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZ2FtZWxpZnQuQ2ZuQ29udGFpbmVyR3JvdXBEZWZpbml0aW9uLkNvbnRhaW5lckRlcGVuZGVuY3lQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "dependsOn") unless @depends_on.nil?
  @environment_override = environment_override
  Jsii::Type.check_type(@environment_override, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZ2FtZWxpZnQuQ2ZuQ29udGFpbmVyR3JvdXBEZWZpbml0aW9uLkNvbnRhaW5lckVudmlyb25tZW50UHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "environmentOverride") unless @environment_override.nil?
  @linux_capabilities = linux_capabilities.is_a?(Hash) ? ::AWSCDK::GameLift::CfnContainerGroupDefinition::LinuxCapabilitiesProperty.new(**linux_capabilities.transform_keys(&:to_sym)) : linux_capabilities
  Jsii::Type.check_type(@linux_capabilities, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19nYW1lbGlmdC5DZm5Db250YWluZXJHcm91cERlZmluaXRpb24uTGludXhDYXBhYmlsaXRpZXNQcm9wZXJ0eSJ9XX19")), "linuxCapabilities") unless @linux_capabilities.nil?
  @mount_points = mount_points
  Jsii::Type.check_type(@mount_points, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZ2FtZWxpZnQuQ2ZuQ29udGFpbmVyR3JvdXBEZWZpbml0aW9uLkNvbnRhaW5lck1vdW50UG9pbnRQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "mountPoints") unless @mount_points.nil?
  @port_configuration = port_configuration.is_a?(Hash) ? ::AWSCDK::GameLift::CfnContainerGroupDefinition::PortConfigurationProperty.new(**port_configuration.transform_keys(&:to_sym)) : port_configuration
  Jsii::Type.check_type(@port_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19nYW1lbGlmdC5DZm5Db250YWluZXJHcm91cERlZmluaXRpb24uUG9ydENvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "portConfiguration") unless @port_configuration.nil?
  @resolved_image_digest = resolved_image_digest
  Jsii::Type.check_type(@resolved_image_digest, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "resolvedImageDigest") unless @resolved_image_digest.nil?
end

Instance Attribute Details

#container_nameString (readonly)

The container definition identifier.

Container names are unique within a container group definition.



1026
1027
1028
# File 'game_lift/cfn_container_group_definition.rb', line 1026

def container_name
  @container_name
end

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

Indicates that the container relies on the status of other containers in the same container group during startup and shutdown sequences.

A container might have dependencies on multiple containers.



1047
1048
1049
# File 'game_lift/cfn_container_group_definition.rb', line 1047

def depends_on
  @depends_on
end

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

A set of environment variables that's passed to the container on startup.

See the ContainerDefinition::environment parameter in the Amazon Elastic Container Service API Reference .



1054
1055
1056
# File 'game_lift/cfn_container_group_definition.rb', line 1054

def environment_override
  @environment_override
end

#image_uriString (readonly)

The URI to the image that Amazon GameLift Servers uses when deploying this container to a container fleet.

For a more specific identifier, see ResolvedImageDigest .



1033
1034
1035
# File 'game_lift/cfn_container_group_definition.rb', line 1033

def image_uri
  @image_uri
end

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

A set of Linux capabilities that are added to a container's default Docker configuration.

For more detailed information, see the capabilities(7) Linux manual page.



1061
1062
1063
# File 'game_lift/cfn_container_group_definition.rb', line 1061

def linux_capabilities
  @linux_capabilities
end

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

A mount point that binds a path inside the container to a file or directory on the host system and lets it access the file or directory.



1066
1067
1068
# File 'game_lift/cfn_container_group_definition.rb', line 1066

def mount_points
  @mount_points
end

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

The set of ports that are available to bind to processes in the container.

For example, a game server process requires a container port to allow game clients to connect to it. Container ports aren't directly accessed by inbound traffic. Amazon GameLift Servers maps these container ports to externally accessible connection ports, which are assigned as needed from the container fleet's ConnectionPortRange .



1073
1074
1075
# File 'game_lift/cfn_container_group_definition.rb', line 1073

def port_configuration
  @port_configuration
end

#resolved_image_digestString? (readonly)

A unique and immutable identifier for the container image.

The digest is a SHA 256 hash of the container image manifest.



1080
1081
1082
# File 'game_lift/cfn_container_group_definition.rb', line 1080

def resolved_image_digest
  @resolved_image_digest
end

#server_sdk_versionString (readonly)

The Amazon GameLift Servers server SDK version that the game server is integrated with.

Only game servers using 5.2.0 or higher are compatible with container fleets.



1040
1041
1042
# File 'game_lift/cfn_container_group_definition.rb', line 1040

def server_sdk_version
  @server_sdk_version
end

Class Method Details

.jsii_propertiesObject



1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
# File 'game_lift/cfn_container_group_definition.rb', line 1082

def self.jsii_properties
  {
    :container_name => "containerName",
    :image_uri => "imageUri",
    :server_sdk_version => "serverSdkVersion",
    :depends_on => "dependsOn",
    :environment_override => "environmentOverride",
    :linux_capabilities => "linuxCapabilities",
    :mount_points => "mountPoints",
    :port_configuration => "portConfiguration",
    :resolved_image_digest => "resolvedImageDigest",
  }
end

Instance Method Details

#to_jsiiObject



1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
# File 'game_lift/cfn_container_group_definition.rb', line 1096

def to_jsii
  result = {}
  result.merge!({
    "containerName" => @container_name,
    "imageUri" => @image_uri,
    "serverSdkVersion" => @server_sdk_version,
    "dependsOn" => @depends_on,
    "environmentOverride" => @environment_override,
    "linuxCapabilities" => @linux_capabilities,
    "mountPoints" => @mount_points,
    "portConfiguration" => @port_configuration,
    "resolvedImageDigest" => @resolved_image_digest,
  })
  result.compact
end