Class: AWSCDK::ElasticBeanstalk::CfnApplication::ApplicationVersionLifecycleConfigProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
elastic_beanstalk/cfn_application.rb

Overview

Use the ApplicationVersionLifecycleConfig property type to specify application version lifecycle settings for an AWS Elastic Beanstalk application when defining an AWS::ElasticBeanstalk::Application resource in an AWS CloudFormation template.

The application version lifecycle settings for an application. Defines the rules that Elastic Beanstalk applies to an application's versions in order to avoid hitting the per-region limit for application versions.

When Elastic Beanstalk deletes an application version from its database, you can no longer deploy that version to an environment. The source bundle remains in S3 unless you configure the rule to delete it.

ApplicationVersionLifecycleConfig is a property of the ApplicationResourceLifecycleConfig property type.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(max_age_rule: nil, max_count_rule: nil) ⇒ ApplicationVersionLifecycleConfigProperty

Returns a new instance of ApplicationVersionLifecycleConfigProperty.

Parameters:



597
598
599
600
601
602
# File 'elastic_beanstalk/cfn_application.rb', line 597

def initialize(max_age_rule: nil, max_count_rule: nil)
  @max_age_rule = max_age_rule.is_a?(Hash) ? ::AWSCDK::ElasticBeanstalk::CfnApplication::MaxAgeRuleProperty.new(**max_age_rule.transform_keys(&:to_sym)) : max_age_rule
  Jsii::Type.check_type(@max_age_rule, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lbGFzdGljYmVhbnN0YWxrLkNmbkFwcGxpY2F0aW9uLk1heEFnZVJ1bGVQcm9wZXJ0eSJ9XX19")), "maxAgeRule") unless @max_age_rule.nil?
  @max_count_rule = max_count_rule.is_a?(Hash) ? ::AWSCDK::ElasticBeanstalk::CfnApplication::MaxCountRuleProperty.new(**max_count_rule.transform_keys(&:to_sym)) : max_count_rule
  Jsii::Type.check_type(@max_count_rule, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lbGFzdGljYmVhbnN0YWxrLkNmbkFwcGxpY2F0aW9uLk1heENvdW50UnVsZVByb3BlcnR5In1dfX0=")), "maxCountRule") unless @max_count_rule.nil?
end

Instance Attribute Details

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

Specify a max age rule to restrict the length of time that application versions are retained for an application.



608
609
610
# File 'elastic_beanstalk/cfn_application.rb', line 608

def max_age_rule
  @max_age_rule
end

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

Specify a max count rule to restrict the number of application versions that are retained for an application.



613
614
615
# File 'elastic_beanstalk/cfn_application.rb', line 613

def max_count_rule
  @max_count_rule
end

Class Method Details

.jsii_propertiesObject



615
616
617
618
619
620
# File 'elastic_beanstalk/cfn_application.rb', line 615

def self.jsii_properties
  {
    :max_age_rule => "maxAgeRule",
    :max_count_rule => "maxCountRule",
  }
end

Instance Method Details

#to_jsiiObject



622
623
624
625
626
627
628
629
# File 'elastic_beanstalk/cfn_application.rb', line 622

def to_jsii
  result = {}
  result.merge!({
    "maxAgeRule" => @max_age_rule,
    "maxCountRule" => @max_count_rule,
  })
  result.compact
end