Class: AWSCDK::AppConfig::EnvironmentProps

Inherits:
EnvironmentOptions
  • Object
show all
Defined in:
app_config/environment_props.rb

Overview

Properties for the Environment construct.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(deletion_protection_check: nil, description: nil, environment_name: nil, monitors: nil, application:) ⇒ EnvironmentProps

Returns a new instance of EnvironmentProps.

Parameters:

  • deletion_protection_check (AWSCDK::AppConfig::DeletionProtectionCheck, nil) (defaults to: nil)

    A property to prevent accidental deletion of active environments.

  • description (String, nil) (defaults to: nil)

    The description of the environment.

  • environment_name (String, nil) (defaults to: nil)

    The name of the environment.

  • monitors (Array<AWSCDK::AppConfig::Monitor>, nil) (defaults to: nil)

    The monitors for the environment.

  • application (AWSCDK::AppConfig::IApplication)

    The application to be associated with the environment.



12
13
14
15
16
17
18
19
20
21
22
23
# File 'app_config/environment_props.rb', line 12

def initialize(deletion_protection_check: nil, description: nil, environment_name: nil, monitors: nil, application:)
  @deletion_protection_check = deletion_protection_check
  Jsii::Type.check_type(@deletion_protection_check, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwY29uZmlnLkRlbGV0aW9uUHJvdGVjdGlvbkNoZWNrIn0=")), "deletionProtectionCheck") unless @deletion_protection_check.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @environment_name = environment_name
  Jsii::Type.check_type(@environment_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "environmentName") unless @environment_name.nil?
  @monitors = monitors
  Jsii::Type.check_type(@monitors, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBjb25maWcuTW9uaXRvciJ9LCJraW5kIjoiYXJyYXkifX0=")), "monitors") unless @monitors.nil?
  @application = application
  Jsii::Type.check_type(@application, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwY29uZmlnLklBcHBsaWNhdGlvbiJ9")), "application")
end

Instance Attribute Details

#applicationAWSCDK::AppConfig::IApplication (readonly)

The application to be associated with the environment.



48
49
50
# File 'app_config/environment_props.rb', line 48

def application
  @application
end

#deletion_protection_checkAWSCDK::AppConfig::DeletionProtectionCheck? (readonly)

Note:

Default: undefined - AppConfig default is ACCOUNT_DEFAULT

A property to prevent accidental deletion of active environments.



29
30
31
# File 'app_config/environment_props.rb', line 29

def deletion_protection_check
  @deletion_protection_check
end

#descriptionString? (readonly)

Note:

Default: - No description.

The description of the environment.

Returns:

  • (String, nil)


34
35
36
# File 'app_config/environment_props.rb', line 34

def description
  @description
end

#environment_nameString? (readonly)

Note:

Default: - A name is generated.

The name of the environment.

Returns:

  • (String, nil)


39
40
41
# File 'app_config/environment_props.rb', line 39

def environment_name
  @environment_name
end

#monitorsArray<AWSCDK::AppConfig::Monitor>? (readonly)

Note:

Default: - No monitors.

The monitors for the environment.

Returns:



44
45
46
# File 'app_config/environment_props.rb', line 44

def monitors
  @monitors
end

Class Method Details

.jsii_propertiesObject



50
51
52
53
54
55
56
57
58
# File 'app_config/environment_props.rb', line 50

def self.jsii_properties
  {
    :deletion_protection_check => "deletionProtectionCheck",
    :description => "description",
    :environment_name => "environmentName",
    :monitors => "monitors",
    :application => "application",
  }
end

Instance Method Details

#to_jsiiObject



60
61
62
63
64
65
66
67
68
69
70
71
# File 'app_config/environment_props.rb', line 60

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "deletionProtectionCheck" => @deletion_protection_check,
    "description" => @description,
    "environmentName" => @environment_name,
    "monitors" => @monitors,
    "application" => @application,
  })
  result.compact
end