Class: AWSCDK::ECS::BottleRocketImage

Inherits:
Jsii::Object
  • Object
show all
Includes:
AWSCDK::EC2::IMachineImage
Defined in:
ecs/bottle_rocket_image.rb

Overview

Construct an Bottlerocket image from the latest AMI published in SSM.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(props = nil) ⇒ BottleRocketImage

Constructs a new instance of the BottleRocketImage class.

Parameters:



12
13
14
15
16
# File 'ecs/bottle_rocket_image.rb', line 12

def initialize(props = nil)
  props = props.is_a?(Hash) ? ::AWSCDK::ECS::BottleRocketImageProps.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkJvdHRsZVJvY2tldEltYWdlUHJvcHMifQ==")), "props") unless props.nil?
  Jsii::Object.instance_method(:initialize).bind(self).call(props)
end

Class Method Details

.is_bottle_rocket_image(x) ⇒ Boolean

Return whether the given object is a BottleRocketImage.

Parameters:

  • x (Object)

Returns:

  • (Boolean)


28
29
30
31
# File 'ecs/bottle_rocket_image.rb', line 28

def self.is_bottle_rocket_image(x)
  Jsii::Type.check_type(x, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "x")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_ecs.BottleRocketImage", "isBottleRocketImage", [x])
end

.jsii_overridable_methodsObject



18
19
20
21
22
# File 'ecs/bottle_rocket_image.rb', line 18

def self.jsii_overridable_methods
  {
    :get_image => { kind: :method, name: "getImage", is_optional: false },
  }
end

Instance Method Details

#get_image(scope) ⇒ AWSCDK::EC2::MachineImageConfig

Return the correct image.

Parameters:

  • scope (Constructs::Construct)

Returns:



37
38
39
40
# File 'ecs/bottle_rocket_image.rb', line 37

def get_image(scope)
  Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope")
  jsii_call_method("getImage", [scope])
end