Class: AWSCDK::AppConfig::EnvironmentAttributes

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

Overview

Attributes of an existing AWS AppConfig environment to import it.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(application:, environment_id:, description: nil, monitors: nil, name: nil) ⇒ EnvironmentAttributes

Returns a new instance of EnvironmentAttributes.

Parameters:

  • application (AWSCDK::AppConfig::IApplication)

    The application associated with the environment.

  • environment_id (String)

    The ID of the environment.

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

    The description of the environment.

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

    The monitors for the environment.

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

    The name of the environment.



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

def initialize(application:, environment_id:, description: nil, monitors: nil, name: nil)
  @application = application
  Jsii::Type.check_type(@application, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwY29uZmlnLklBcHBsaWNhdGlvbiJ9")), "application")
  @environment_id = environment_id
  Jsii::Type.check_type(@environment_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "environmentId")
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @monitors = monitors
  Jsii::Type.check_type(@monitors, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBjb25maWcuTW9uaXRvciJ9LCJraW5kIjoiYXJyYXkifX0=")), "monitors") unless @monitors.nil?
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil?
end

Instance Attribute Details

#applicationAWSCDK::AppConfig::IApplication (readonly)

The application associated with the environment.



28
29
30
# File 'app_config/environment_attributes.rb', line 28

def application
  @application
end

#descriptionString? (readonly)

Note:

Default: - None.

The description of the environment.

Returns:

  • (String, nil)


37
38
39
# File 'app_config/environment_attributes.rb', line 37

def description
  @description
end

#environment_idString (readonly)

The ID of the environment.

Returns:

  • (String)


32
33
34
# File 'app_config/environment_attributes.rb', line 32

def environment_id
  @environment_id
end

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

Note:

Default: - None.

The monitors for the environment.

Returns:



42
43
44
# File 'app_config/environment_attributes.rb', line 42

def monitors
  @monitors
end

#nameString? (readonly)

Note:

Default: - None.

The name of the environment.

Returns:

  • (String, nil)


47
48
49
# File 'app_config/environment_attributes.rb', line 47

def name
  @name
end

Class Method Details

.jsii_propertiesObject



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

def self.jsii_properties
  {
    :application => "application",
    :environment_id => "environmentId",
    :description => "description",
    :monitors => "monitors",
    :name => "name",
  }
end

Instance Method Details

#to_jsiiObject



59
60
61
62
63
64
65
66
67
68
69
# File 'app_config/environment_attributes.rb', line 59

def to_jsii
  result = {}
  result.merge!({
    "application" => @application,
    "environmentId" => @environment_id,
    "description" => @description,
    "monitors" => @monitors,
    "name" => @name,
  })
  result.compact
end