Class: AWSCDK::ElasticBeanstalk::CfnApplication::ApplicationResourceLifecycleConfigProperty

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

Overview

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

The resource lifecycle configuration for an application. Defines lifecycle settings for resources that belong to the application, and the service role that Elastic Beanstalk assumes in order to apply lifecycle settings. The version lifecycle configuration defines lifecycle settings for application versions.

ApplicationResourceLifecycleConfig is a property of the AWS::ElasticBeanstalk::Application resource.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(service_role: nil, version_lifecycle_config: nil) ⇒ ApplicationResourceLifecycleConfigProperty

Returns a new instance of ApplicationResourceLifecycleConfigProperty.

Parameters:



546
547
548
549
550
551
# File 'elastic_beanstalk/cfn_application.rb', line 546

def initialize(service_role: nil, version_lifecycle_config: nil)
  @service_role = service_role
  Jsii::Type.check_type(@service_role, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serviceRole") unless @service_role.nil?
  @version_lifecycle_config = version_lifecycle_config.is_a?(Hash) ? ::AWSCDK::ElasticBeanstalk::CfnApplication::ApplicationVersionLifecycleConfigProperty.new(**version_lifecycle_config.transform_keys(&:to_sym)) : version_lifecycle_config
  Jsii::Type.check_type(@version_lifecycle_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lbGFzdGljYmVhbnN0YWxrLkNmbkFwcGxpY2F0aW9uLkFwcGxpY2F0aW9uVmVyc2lvbkxpZmVjeWNsZUNvbmZpZ1Byb3BlcnR5In1dfX0=")), "versionLifecycleConfig") unless @version_lifecycle_config.nil?
end

Instance Attribute Details

#service_roleString? (readonly)

The ARN of an IAM service role that Elastic Beanstalk has permission to assume.

The ServiceRole property is required the first time that you provide a ResourceLifecycleConfig for the application. After you provide it once, Elastic Beanstalk persists the Service Role with the application, and you don't need to specify it again. You can, however, specify it in subsequent updates to change the Service Role to another value.



559
560
561
# File 'elastic_beanstalk/cfn_application.rb', line 559

def service_role
  @service_role
end

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

Defines lifecycle settings for application versions.



564
565
566
# File 'elastic_beanstalk/cfn_application.rb', line 564

def version_lifecycle_config
  @version_lifecycle_config
end

Class Method Details

.jsii_propertiesObject



566
567
568
569
570
571
# File 'elastic_beanstalk/cfn_application.rb', line 566

def self.jsii_properties
  {
    :service_role => "serviceRole",
    :version_lifecycle_config => "versionLifecycleConfig",
  }
end

Instance Method Details

#to_jsiiObject



573
574
575
576
577
578
579
580
# File 'elastic_beanstalk/cfn_application.rb', line 573

def to_jsii
  result = {}
  result.merge!({
    "serviceRole" => @service_role,
    "versionLifecycleConfig" => @version_lifecycle_config,
  })
  result.compact
end