Class: AWSCDK::GameLift::CfnContainerGroupDefinition::ContainerDependencyProperty

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

Overview

A container's dependency on another container in the same container group.

The dependency impacts how the dependent container is able to start or shut down based the status of the other container.

For example, ContainerA is configured with the following dependency: a START dependency on ContainerB . This means that ContainerA can't start until ContainerB has started. It also means that ContainerA must shut down before ContainerB .

Part of: GameServerContainerDefinition , GameServerContainerDefinitionInput , SupportContainerDefinition , SupportContainerDefinitionInput

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(condition:, container_name:) ⇒ ContainerDependencyProperty

Returns a new instance of ContainerDependencyProperty.

Parameters:

  • condition (String)

    The condition that the dependency container must reach before the dependent container can start. Valid conditions include:.

  • container_name (String)

    A descriptive label for the container definition that this container depends on.



694
695
696
697
698
699
# File 'game_lift/cfn_container_group_definition.rb', line 694

def initialize(condition:, container_name:)
  @condition = condition
  Jsii::Type.check_type(@condition, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "condition")
  @container_name = container_name
  Jsii::Type.check_type(@container_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "containerName")
end

Instance Attribute Details

#conditionString (readonly)

The condition that the dependency container must reach before the dependent container can start. Valid conditions include:.

  • START - The dependency container must have started.
  • COMPLETE - The dependency container has run to completion (exits). Use this condition with nonessential containers, such as those that run a script and then exit. The dependency container can't be an essential container.
  • SUCCESS - The dependency container has run to completion and exited with a zero status. The dependency container can't be an essential container.
  • HEALTHY - The dependency container has passed its Docker health check. Use this condition with dependency containers that have health checks configured. This condition is confirmed at container group startup only.


710
711
712
# File 'game_lift/cfn_container_group_definition.rb', line 710

def condition
  @condition
end

#container_nameString (readonly)

A descriptive label for the container definition that this container depends on.



715
716
717
# File 'game_lift/cfn_container_group_definition.rb', line 715

def container_name
  @container_name
end

Class Method Details

.jsii_propertiesObject



717
718
719
720
721
722
# File 'game_lift/cfn_container_group_definition.rb', line 717

def self.jsii_properties
  {
    :condition => "condition",
    :container_name => "containerName",
  }
end

Instance Method Details

#to_jsiiObject



724
725
726
727
728
729
730
731
# File 'game_lift/cfn_container_group_definition.rb', line 724

def to_jsii
  result = {}
  result.merge!({
    "condition" => @condition,
    "containerName" => @container_name,
  })
  result.compact
end