Class: AWSCDK::ElasticBeanstalk::CfnApplication::MaxAgeRuleProperty

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

Overview

Use the MaxAgeRule property type to specify a max age rule to restrict the length of time that application versions are retained for an AWS Elastic Beanstalk application when defining an AWS::ElasticBeanstalk::Application resource in an AWS CloudFormation template.

A lifecycle rule that deletes application versions after the specified number of days.

MaxAgeRule is a property of the ApplicationVersionLifecycleConfig property type.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(delete_source_from_s3: nil, enabled: nil, max_age_in_days: nil) ⇒ MaxAgeRuleProperty

Returns a new instance of MaxAgeRuleProperty.

Parameters:

  • delete_source_from_s3 (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Set to true to delete a version's source bundle from Amazon S3 when Elastic Beanstalk deletes the application version.

  • enabled (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Specify true to apply the rule, or false to disable it.

  • max_age_in_days (Numeric, nil) (defaults to: nil)

    Specify the number of days to retain an application versions.



645
646
647
648
649
650
651
652
# File 'elastic_beanstalk/cfn_application.rb', line 645

def initialize(delete_source_from_s3: nil, enabled: nil, max_age_in_days: nil)
  @delete_source_from_s3 = delete_source_from_s3
  Jsii::Type.check_type(@delete_source_from_s3, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "deleteSourceFromS3") unless @delete_source_from_s3.nil?
  @enabled = enabled
  Jsii::Type.check_type(@enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enabled") unless @enabled.nil?
  @max_age_in_days = max_age_in_days
  Jsii::Type.check_type(@max_age_in_days, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxAgeInDays") unless @max_age_in_days.nil?
end

Instance Attribute Details

#delete_source_from_s3Boolean, ... (readonly)

Set to true to delete a version's source bundle from Amazon S3 when Elastic Beanstalk deletes the application version.



658
659
660
# File 'elastic_beanstalk/cfn_application.rb', line 658

def delete_source_from_s3
  @delete_source_from_s3
end

#enabledBoolean, ... (readonly)

Specify true to apply the rule, or false to disable it.



663
664
665
# File 'elastic_beanstalk/cfn_application.rb', line 663

def enabled
  @enabled
end

#max_age_in_daysNumeric? (readonly)

Specify the number of days to retain an application versions.



668
669
670
# File 'elastic_beanstalk/cfn_application.rb', line 668

def max_age_in_days
  @max_age_in_days
end

Class Method Details

.jsii_propertiesObject



670
671
672
673
674
675
676
# File 'elastic_beanstalk/cfn_application.rb', line 670

def self.jsii_properties
  {
    :delete_source_from_s3 => "deleteSourceFromS3",
    :enabled => "enabled",
    :max_age_in_days => "maxAgeInDays",
  }
end

Instance Method Details

#to_jsiiObject



678
679
680
681
682
683
684
685
686
# File 'elastic_beanstalk/cfn_application.rb', line 678

def to_jsii
  result = {}
  result.merge!({
    "deleteSourceFromS3" => @delete_source_from_s3,
    "enabled" => @enabled,
    "maxAgeInDays" => @max_age_in_days,
  })
  result.compact
end