Module: AWSCDK::AppConfig::IEnvironment

Includes:
IResource, Interfaces::AWSAppconfig::IEnvironmentRef
Included in:
Environment
Defined in:
app_config/i_environment.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.jsii_overridable_methodsObject



293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
# File 'app_config/i_environment.rb', line 293

def self.jsii_overridable_methods
  {
    :node => { kind: :property, name: "node", is_optional: false },
    :env => { kind: :property, name: "env", is_optional: false },
    :stack => { kind: :property, name: "stack", is_optional: false },
    :environment_ref => { kind: :property, name: "environmentRef", is_optional: false },
    :application_id => { kind: :property, name: "applicationId", is_optional: false },
    :environment_arn => { kind: :property, name: "environmentArn", is_optional: false },
    :environment_id => { kind: :property, name: "environmentId", is_optional: false },
    :application => { kind: :property, name: "application", is_optional: true },
    :description => { kind: :property, name: "description", is_optional: true },
    :monitors => { kind: :property, name: "monitors", is_optional: true },
    :name => { kind: :property, name: "name", is_optional: true },
    :with => { kind: :method, name: "with", is_optional: false },
    :apply_removal_policy => { kind: :method, name: "applyRemovalPolicy", is_optional: false },
    :add_deployment => { kind: :method, name: "addDeployment", is_optional: false },
    :add_deployments => { kind: :method, name: "addDeployments", is_optional: false },
    :add_extension => { kind: :method, name: "addExtension", is_optional: false },
    :at_deployment_tick => { kind: :method, name: "atDeploymentTick", is_optional: false },
    :grant => { kind: :method, name: "grant", is_optional: false },
    :grant_read_config => { kind: :method, name: "grantReadConfig", is_optional: false },
    :on => { kind: :method, name: "on", is_optional: false },
    :on_deployment_baking => { kind: :method, name: "onDeploymentBaking", is_optional: false },
    :on_deployment_complete => { kind: :method, name: "onDeploymentComplete", is_optional: false },
    :on_deployment_rolled_back => { kind: :method, name: "onDeploymentRolledBack", is_optional: false },
    :on_deployment_start => { kind: :method, name: "onDeploymentStart", is_optional: false },
    :on_deployment_step => { kind: :method, name: "onDeploymentStep", is_optional: false },
    :pre_create_hosted_configuration_version => { kind: :method, name: "preCreateHostedConfigurationVersion", is_optional: false },
    :pre_start_deployment => { kind: :method, name: "preStartDeployment", is_optional: false },
  }
end

Instance Method Details

#add_deployment(configuration) ⇒ void

This method returns an undefined value.

Creates a deployment of the supplied configuration to this environment.

Note that you can only deploy one configuration at a time to an environment. However, you can deploy one configuration each to different environments at the same time. If more than one deployment is requested for this environment, they will occur in the same order they were provided.

Parameters:



132
133
134
135
# File 'app_config/i_environment.rb', line 132

def add_deployment(configuration)
  Jsii::Type.check_type(configuration, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwY29uZmlnLklDb25maWd1cmF0aW9uIn0=")), "configuration")
  jsii_call_method("addDeployment", [configuration])
end

#add_deployments(*configurations) ⇒ void

This method returns an undefined value.

Creates a deployment for each of the supplied configurations to this environment.

These configurations will be deployed in the same order as the input array.

Parameters:



143
144
145
146
147
148
# File 'app_config/i_environment.rb', line 143

def add_deployments(*configurations)
  configurations.each_with_index do |item, index|
    Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwY29uZmlnLklDb25maWd1cmF0aW9uIn0=")), "configurations[#{index}]")
  end
  jsii_call_method("addDeployments", [*configurations])
end

#add_extension(extension) ⇒ void

This method returns an undefined value.

Adds an extension association to the environment.

Parameters:



154
155
156
157
# File 'app_config/i_environment.rb', line 154

def add_extension(extension)
  Jsii::Type.check_type(extension, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwY29uZmlnLklFeHRlbnNpb24ifQ==")), "extension")
  jsii_call_method("addExtension", [extension])
end

#applicationAWSCDK::AppConfig::IApplication?

The application associated with the environment.



68
69
70
# File 'app_config/i_environment.rb', line 68

def application()
  jsii_get_property("application")
end

#application_idString

The ID of the application associated to the environment.

Returns:

  • (String)


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

def application_id()
  jsii_get_property("applicationId")
end

#apply_removal_policy(policy) ⇒ void

This method returns an undefined value.

Apply the given removal policy to this resource.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

Parameters:



119
120
121
122
# File 'app_config/i_environment.rb', line 119

def apply_removal_policy(policy)
  Jsii::Type.check_type(policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "policy")
  jsii_call_method("applyRemovalPolicy", [policy])
end

#at_deployment_tick(event_destination, options = nil) ⇒ void

This method returns an undefined value.

Adds an AT_DEPLOYMENT_TICK extension with the provided event destination and also creates an extension association to an application.

Parameters:



164
165
166
167
168
169
# File 'app_config/i_environment.rb', line 164

def at_deployment_tick(event_destination, options = nil)
  Jsii::Type.check_type(event_destination, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwY29uZmlnLklFdmVudERlc3RpbmF0aW9uIn0=")), "eventDestination")
  options = options.is_a?(Hash) ? ::AWSCDK::AppConfig::ExtensionOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwY29uZmlnLkV4dGVuc2lvbk9wdGlvbnMifQ==")), "options") unless options.nil?
  jsii_call_method("atDeploymentTick", [event_destination, options])
end

#descriptionString?

The description of the environment.

Returns:

  • (String, nil)


75
76
77
# File 'app_config/i_environment.rb', line 75

def description()
  jsii_get_property("description")
end

#envAWSCDK::Interfaces::ResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed in a Stack (those created by creating new class instances like new Role(), new Bucket(), etc.), this is always the same as the environment of the stack they belong to.

For referenced resources (those obtained from referencing methods like Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be different than the stack they were imported into.



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

def env()
  jsii_get_property("env")
end

#environment_arnString

The Amazon Resource Name (ARN) of the environment.

Returns:

  • (String)


54
55
56
# File 'app_config/i_environment.rb', line 54

def environment_arn()
  jsii_get_property("environmentArn")
end

#environment_idString

The ID of the environment.

Returns:

  • (String)


61
62
63
# File 'app_config/i_environment.rb', line 61

def environment_id()
  jsii_get_property("environmentId")
end

#environment_refAWSCDK::Interfaces::AWSAppconfig::EnvironmentReference

A reference to a Environment resource.



40
41
42
# File 'app_config/i_environment.rb', line 40

def environment_ref()
  jsii_get_property("environmentRef")
end

#grant(grantee, *actions) ⇒ AWSCDK::IAM::Grant

Adds an IAM policy statement associated with this environment to an IAM principal's policy.

Parameters:

  • grantee (AWSCDK::IAM::IGrantable)

    the principal (no-op if undefined).

  • actions (Array<String>)

    the set of actions to allow (i.e., 'appconfig:GetLatestConfiguration', 'appconfig:StartConfigurationSession', etc.).

Returns:



176
177
178
179
180
181
182
# File 'app_config/i_environment.rb', line 176

def grant(grantee, *actions)
  Jsii::Type.check_type(grantee, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "grantee")
  actions.each_with_index do |item, index|
    Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "actions[#{index}]")
  end
  jsii_call_method("grant", [grantee, *actions])
end

#grant_read_config(grantee) ⇒ AWSCDK::IAM::Grant

Permits an IAM principal to perform read operations on this environment's configurations.

Actions: GetLatestConfiguration, StartConfigurationSession.

Parameters:

Returns:



190
191
192
193
# File 'app_config/i_environment.rb', line 190

def grant_read_config(grantee)
  Jsii::Type.check_type(grantee, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "grantee")
  jsii_call_method("grantReadConfig", [grantee])
end

#monitorsArray<AWSCDK::AppConfig::Monitor>?

The monitors for the environment.

Returns:



82
83
84
# File 'app_config/i_environment.rb', line 82

def monitors()
  jsii_get_property("monitors")
end

#nameString?

The name of the environment.

Returns:

  • (String, nil)


89
90
91
# File 'app_config/i_environment.rb', line 89

def name()
  jsii_get_property("name")
end

#nodeConstructs::Node

The tree node.

Returns:

  • (Constructs::Node)


11
12
13
# File 'app_config/i_environment.rb', line 11

def node()
  jsii_get_property("node")
end

#on(action_point, event_destination, options = nil) ⇒ void

This method returns an undefined value.

Adds an extension defined by the action point and event destination and also creates an extension association to the environment.

Parameters:



201
202
203
204
205
206
207
# File 'app_config/i_environment.rb', line 201

def on(action_point, event_destination, options = nil)
  Jsii::Type.check_type(action_point, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwY29uZmlnLkFjdGlvblBvaW50In0=")), "actionPoint")
  Jsii::Type.check_type(event_destination, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwY29uZmlnLklFdmVudERlc3RpbmF0aW9uIn0=")), "eventDestination")
  options = options.is_a?(Hash) ? ::AWSCDK::AppConfig::ExtensionOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwY29uZmlnLkV4dGVuc2lvbk9wdGlvbnMifQ==")), "options") unless options.nil?
  jsii_call_method("on", [action_point, event_destination, options])
end

#on_deployment_baking(event_destination, options = nil) ⇒ void

This method returns an undefined value.

Adds an ON_DEPLOYMENT_BAKING extension with the provided event destination and also creates an extension association to the environment.

Parameters:



214
215
216
217
218
219
# File 'app_config/i_environment.rb', line 214

def on_deployment_baking(event_destination, options = nil)
  Jsii::Type.check_type(event_destination, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwY29uZmlnLklFdmVudERlc3RpbmF0aW9uIn0=")), "eventDestination")
  options = options.is_a?(Hash) ? ::AWSCDK::AppConfig::ExtensionOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwY29uZmlnLkV4dGVuc2lvbk9wdGlvbnMifQ==")), "options") unless options.nil?
  jsii_call_method("onDeploymentBaking", [event_destination, options])
end

#on_deployment_complete(event_destination, options = nil) ⇒ void

This method returns an undefined value.

Adds an ON_DEPLOYMENT_COMPLETE extension with the provided event destination and also creates an extension association to the environment.

Parameters:



226
227
228
229
230
231
# File 'app_config/i_environment.rb', line 226

def on_deployment_complete(event_destination, options = nil)
  Jsii::Type.check_type(event_destination, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwY29uZmlnLklFdmVudERlc3RpbmF0aW9uIn0=")), "eventDestination")
  options = options.is_a?(Hash) ? ::AWSCDK::AppConfig::ExtensionOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwY29uZmlnLkV4dGVuc2lvbk9wdGlvbnMifQ==")), "options") unless options.nil?
  jsii_call_method("onDeploymentComplete", [event_destination, options])
end

#on_deployment_rolled_back(event_destination, options = nil) ⇒ void

This method returns an undefined value.

Adds an ON_DEPLOYMENT_ROLLED_BACK extension with the provided event destination and also creates an extension association to the environment.

Parameters:



238
239
240
241
242
243
# File 'app_config/i_environment.rb', line 238

def on_deployment_rolled_back(event_destination, options = nil)
  Jsii::Type.check_type(event_destination, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwY29uZmlnLklFdmVudERlc3RpbmF0aW9uIn0=")), "eventDestination")
  options = options.is_a?(Hash) ? ::AWSCDK::AppConfig::ExtensionOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwY29uZmlnLkV4dGVuc2lvbk9wdGlvbnMifQ==")), "options") unless options.nil?
  jsii_call_method("onDeploymentRolledBack", [event_destination, options])
end

#on_deployment_start(event_destination, options = nil) ⇒ void

This method returns an undefined value.

Adds an ON_DEPLOYMENT_START extension with the provided event destination and also creates an extension association to the environment.

Parameters:



250
251
252
253
254
255
# File 'app_config/i_environment.rb', line 250

def on_deployment_start(event_destination, options = nil)
  Jsii::Type.check_type(event_destination, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwY29uZmlnLklFdmVudERlc3RpbmF0aW9uIn0=")), "eventDestination")
  options = options.is_a?(Hash) ? ::AWSCDK::AppConfig::ExtensionOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwY29uZmlnLkV4dGVuc2lvbk9wdGlvbnMifQ==")), "options") unless options.nil?
  jsii_call_method("onDeploymentStart", [event_destination, options])
end

#on_deployment_step(event_destination, options = nil) ⇒ void

This method returns an undefined value.

Adds an ON_DEPLOYMENT_STEP extension with the provided event destination and also creates an extension association to the environment.

Parameters:



262
263
264
265
266
267
# File 'app_config/i_environment.rb', line 262

def on_deployment_step(event_destination, options = nil)
  Jsii::Type.check_type(event_destination, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwY29uZmlnLklFdmVudERlc3RpbmF0aW9uIn0=")), "eventDestination")
  options = options.is_a?(Hash) ? ::AWSCDK::AppConfig::ExtensionOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwY29uZmlnLkV4dGVuc2lvbk9wdGlvbnMifQ==")), "options") unless options.nil?
  jsii_call_method("onDeploymentStep", [event_destination, options])
end

#pre_create_hosted_configuration_version(event_destination, options = nil) ⇒ void

This method returns an undefined value.

Adds a PRE_CREATE_HOSTED_CONFIGURATION_VERSION extension with the provided event destination and also creates an extension association to the environment.

Parameters:



274
275
276
277
278
279
# File 'app_config/i_environment.rb', line 274

def pre_create_hosted_configuration_version(event_destination, options = nil)
  Jsii::Type.check_type(event_destination, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwY29uZmlnLklFdmVudERlc3RpbmF0aW9uIn0=")), "eventDestination")
  options = options.is_a?(Hash) ? ::AWSCDK::AppConfig::ExtensionOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwY29uZmlnLkV4dGVuc2lvbk9wdGlvbnMifQ==")), "options") unless options.nil?
  jsii_call_method("preCreateHostedConfigurationVersion", [event_destination, options])
end

#pre_start_deployment(event_destination, options = nil) ⇒ void

This method returns an undefined value.

Adds a PRE_START_DEPLOYMENT extension with the provided event destination and also creates an extension association to the environment.

Parameters:



286
287
288
289
290
291
# File 'app_config/i_environment.rb', line 286

def pre_start_deployment(event_destination, options = nil)
  Jsii::Type.check_type(event_destination, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwY29uZmlnLklFdmVudERlc3RpbmF0aW9uIn0=")), "eventDestination")
  options = options.is_a?(Hash) ? ::AWSCDK::AppConfig::ExtensionOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwY29uZmlnLkV4dGVuc2lvbk9wdGlvbnMifQ==")), "options") unless options.nil?
  jsii_call_method("preStartDeployment", [event_destination, options])
end

#stackAWSCDK::Stack

The stack in which this resource is defined.

Returns:



33
34
35
# File 'app_config/i_environment.rb', line 33

def stack()
  jsii_get_property("stack")
end

#with(*mixins) ⇒ Constructs::IConstruct

Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited.

Parameters:

  • mixins (Array<Constructs::IMixin>)

    The mixins to apply.

Returns:

  • (Constructs::IConstruct)

    This construct for chaining



100
101
102
103
104
105
# File 'app_config/i_environment.rb', line 100

def with(*mixins)
  mixins.each_with_index do |item, index|
    Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklNaXhpbiJ9")), "mixins[#{index}]")
  end
  jsii_call_method("with", [*mixins])
end