Class: AWSCDK::ECS::BottleRocketImageProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ECS::BottleRocketImageProps
- Defined in:
- ecs/bottle_rocket_image_props.rb
Overview
Properties for BottleRocketImage.
Instance Attribute Summary collapse
-
#additional_cache_key ⇒ String?
readonly
Adds an additional discriminator to the
cdk.context.jsoncache key. -
#architecture ⇒ AWSCDK::EC2::InstanceArchitecture?
readonly
The CPU architecture.
-
#cached_in_context ⇒ Boolean?
readonly
Whether the AMI ID is cached to be stable between deployments.
-
#variant ⇒ AWSCDK::ECS::BottlerocketECSVariant?
readonly
The Amazon ECS variant to use.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(additional_cache_key: nil, architecture: nil, cached_in_context: nil, variant: nil) ⇒ BottleRocketImageProps
constructor
A new instance of BottleRocketImageProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(additional_cache_key: nil, architecture: nil, cached_in_context: nil, variant: nil) ⇒ BottleRocketImageProps
Returns a new instance of BottleRocketImageProps.
11 12 13 14 15 16 17 18 19 20 |
# File 'ecs/bottle_rocket_image_props.rb', line 11 def initialize(additional_cache_key: nil, architecture: nil, cached_in_context: nil, variant: nil) @additional_cache_key = additional_cache_key Jsii::Type.check_type(@additional_cache_key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "additionalCacheKey") unless @additional_cache_key.nil? @architecture = architecture Jsii::Type.check_type(@architecture, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkluc3RhbmNlQXJjaGl0ZWN0dXJlIn0=")), "architecture") unless @architecture.nil? @cached_in_context = cached_in_context Jsii::Type.check_type(@cached_in_context, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "cachedInContext") unless @cached_in_context.nil? @variant = variant Jsii::Type.check_type(@variant, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkJvdHRsZXJvY2tldEVjc1ZhcmlhbnQifQ==")), "variant") unless @variant.nil? end |
Instance Attribute Details
#additional_cache_key ⇒ String? (readonly)
Default: - no additional cache key
Adds an additional discriminator to the cdk.context.json cache key.
26 27 28 |
# File 'ecs/bottle_rocket_image_props.rb', line 26 def additional_cache_key @additional_cache_key end |
#architecture ⇒ AWSCDK::EC2::InstanceArchitecture? (readonly)
Default: - x86_64
The CPU architecture.
31 32 33 |
# File 'ecs/bottle_rocket_image_props.rb', line 31 def architecture @architecture end |
#cached_in_context ⇒ Boolean? (readonly)
Default: false
Whether the AMI ID is cached to be stable between deployments.
By default, the newest image is used on each deployment. This will cause instances to be replaced whenever a new version is released, and may cause downtime if there aren't enough running instances in the AutoScalingGroup to reschedule the tasks on.
If set to true, the AMI ID will be cached in cdk.context.json and the
same value will be used on future runs. Your instances will not be replaced
but your AMI version will grow old over time. To refresh the AMI lookup,
you will have to evict the value from the cache using the cdk context
command. See https://docs.aws.amazon.com/cdk/latest/guide/context.html for
more information.
Can not be set to true in environment-agnostic stacks.
50 51 52 |
# File 'ecs/bottle_rocket_image_props.rb', line 50 def cached_in_context @cached_in_context end |
#variant ⇒ AWSCDK::ECS::BottlerocketECSVariant? (readonly)
Default: - BottlerocketEcsVariant.AWS_ECS_1
The Amazon ECS variant to use.
55 56 57 |
# File 'ecs/bottle_rocket_image_props.rb', line 55 def variant @variant end |
Class Method Details
.jsii_properties ⇒ Object
57 58 59 60 61 62 63 64 |
# File 'ecs/bottle_rocket_image_props.rb', line 57 def self.jsii_properties { :additional_cache_key => "additionalCacheKey", :architecture => "architecture", :cached_in_context => "cachedInContext", :variant => "variant", } end |
Instance Method Details
#to_jsii ⇒ Object
66 67 68 69 70 71 72 73 74 75 |
# File 'ecs/bottle_rocket_image_props.rb', line 66 def to_jsii result = {} result.merge!({ "additionalCacheKey" => @additional_cache_key, "architecture" => @architecture, "cachedInContext" => @cached_in_context, "variant" => @variant, }) result.compact end |