Class: AWSCDK::AppConfig::EnvironmentOptions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
app_config/environment_options.rb

Overview

Options for the Environment construct.

Direct Known Subclasses

EnvironmentProps

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) ⇒ EnvironmentOptions

Returns a new instance of EnvironmentOptions.

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.



11
12
13
14
15
16
17
18
19
20
# File 'app_config/environment_options.rb', line 11

def initialize(deletion_protection_check: nil, description: nil, environment_name: nil, monitors: nil)
  @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?
end

Instance Attribute Details

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

Note:

Default: undefined - AppConfig default is ACCOUNT_DEFAULT

A property to prevent accidental deletion of active environments.



26
27
28
# File 'app_config/environment_options.rb', line 26

def deletion_protection_check
  @deletion_protection_check
end

#descriptionString? (readonly)

Note:

Default: - No description.

The description of the environment.

Returns:

  • (String, nil)


31
32
33
# File 'app_config/environment_options.rb', line 31

def description
  @description
end

#environment_nameString? (readonly)

Note:

Default: - A name is generated.

The name of the environment.

Returns:

  • (String, nil)


36
37
38
# File 'app_config/environment_options.rb', line 36

def environment_name
  @environment_name
end

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

Note:

Default: - No monitors.

The monitors for the environment.

Returns:



41
42
43
# File 'app_config/environment_options.rb', line 41

def monitors
  @monitors
end

Class Method Details

.jsii_propertiesObject



43
44
45
46
47
48
49
50
# File 'app_config/environment_options.rb', line 43

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

Instance Method Details

#to_jsiiObject



52
53
54
55
56
57
58
59
60
61
# File 'app_config/environment_options.rb', line 52

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