Class: AWSCDK::EC2::AmazonLinux2023ImageSSMParameterProps
- Inherits:
-
AmazonLinuxImageSSMParameterCommonOptions
- Object
- AmazonLinuxImageSSMParameterCommonOptions
- AWSCDK::EC2::AmazonLinux2023ImageSSMParameterProps
- Defined in:
- ec2/amazon_linux2023_image_ssm_parameter_props.rb
Overview
Properties specific to al2023 images.
Instance Attribute Summary collapse
-
#additional_cache_key ⇒ String?
readonly
Adds an additional discriminator to the
cdk.context.jsoncache key. -
#cached_in_context ⇒ Boolean?
readonly
Whether the AMI ID is cached to be stable between deployments.
-
#cpu_type ⇒ AWSCDK::EC2::AmazonLinuxCpuType?
readonly
CPU Type.
-
#edition ⇒ AWSCDK::EC2::AmazonLinuxEdition?
readonly
What edition of Amazon Linux to use.
-
#kernel ⇒ AWSCDK::EC2::AmazonLinux2023Kernel?
readonly
What kernel version of Amazon Linux to use.
-
#user_data ⇒ AWSCDK::EC2::UserData?
readonly
Initial user data.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(additional_cache_key: nil, cached_in_context: nil, user_data: nil, cpu_type: nil, edition: nil, kernel: nil) ⇒ AmazonLinux2023ImageSSMParameterProps
constructor
A new instance of AmazonLinux2023ImageSSMParameterProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(additional_cache_key: nil, cached_in_context: nil, user_data: nil, cpu_type: nil, edition: nil, kernel: nil) ⇒ AmazonLinux2023ImageSSMParameterProps
Returns a new instance of AmazonLinux2023ImageSSMParameterProps.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'ec2/amazon_linux2023_image_ssm_parameter_props.rb', line 13 def initialize(additional_cache_key: nil, cached_in_context: nil, user_data: nil, cpu_type: nil, edition: nil, kernel: 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? @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? @user_data = user_data Jsii::Type.check_type(@user_data, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLlVzZXJEYXRhIn0=")), "userData") unless @user_data.nil? @cpu_type = cpu_type Jsii::Type.check_type(@cpu_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkFtYXpvbkxpbnV4Q3B1VHlwZSJ9")), "cpuType") unless @cpu_type.nil? @edition = edition Jsii::Type.check_type(@edition, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkFtYXpvbkxpbnV4RWRpdGlvbiJ9")), "edition") unless @edition.nil? @kernel = kernel Jsii::Type.check_type(@kernel, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkFtYXpvbkxpbnV4MjAyM0tlcm5lbCJ9")), "kernel") unless @kernel.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.
32 33 34 |
# File 'ec2/amazon_linux2023_image_ssm_parameter_props.rb', line 32 def additional_cache_key @additional_cache_key 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.
51 52 53 |
# File 'ec2/amazon_linux2023_image_ssm_parameter_props.rb', line 51 def cached_in_context @cached_in_context end |
#cpu_type ⇒ AWSCDK::EC2::AmazonLinuxCpuType? (readonly)
Default: AmazonLinuxCpuType.X86_64
CPU Type.
61 62 63 |
# File 'ec2/amazon_linux2023_image_ssm_parameter_props.rb', line 61 def cpu_type @cpu_type end |
#edition ⇒ AWSCDK::EC2::AmazonLinuxEdition? (readonly)
Default: AmazonLinuxEdition.Standard
What edition of Amazon Linux to use.
66 67 68 |
# File 'ec2/amazon_linux2023_image_ssm_parameter_props.rb', line 66 def edition @edition end |
#kernel ⇒ AWSCDK::EC2::AmazonLinux2023Kernel? (readonly)
Default: AmazonLinux2023Kernel.DEFAULT
What kernel version of Amazon Linux to use.
71 72 73 |
# File 'ec2/amazon_linux2023_image_ssm_parameter_props.rb', line 71 def kernel @kernel end |
#user_data ⇒ AWSCDK::EC2::UserData? (readonly)
Default: - Empty UserData for Linux machines
Initial user data.
56 57 58 |
# File 'ec2/amazon_linux2023_image_ssm_parameter_props.rb', line 56 def user_data @user_data end |
Class Method Details
.jsii_properties ⇒ Object
73 74 75 76 77 78 79 80 81 82 |
# File 'ec2/amazon_linux2023_image_ssm_parameter_props.rb', line 73 def self.jsii_properties { :additional_cache_key => "additionalCacheKey", :cached_in_context => "cachedInContext", :user_data => "userData", :cpu_type => "cpuType", :edition => "edition", :kernel => "kernel", } end |
Instance Method Details
#to_jsii ⇒ Object
84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'ec2/amazon_linux2023_image_ssm_parameter_props.rb', line 84 def to_jsii result = {} result.merge!(super) result.merge!({ "additionalCacheKey" => @additional_cache_key, "cachedInContext" => @cached_in_context, "userData" => @user_data, "cpuType" => @cpu_type, "edition" => @edition, "kernel" => @kernel, }) result.compact end |