Class: AWSCDK::CloudFormation::CfnGuardHook::StackRolesProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cloud_formation/cfn_guard_hook.rb

Overview

Specifies the stack roles for the StackFilters property type to include or exclude specific stacks from Hook invocations based on their associated IAM roles.

For more information, see CloudFormation Hooks stack level filters .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(exclude: nil, include: nil) ⇒ StackRolesProperty

Returns a new instance of StackRolesProperty.

Parameters:

  • exclude (Array<String>, nil) (defaults to: nil)

    The IAM role ARNs for stacks you want to exclude.

  • include (Array<String>, nil) (defaults to: nil)

    The IAM role ARNs to target stacks associated with these roles.



877
878
879
880
881
882
# File 'cloud_formation/cfn_guard_hook.rb', line 877

def initialize(exclude: nil, include: nil)
  @exclude = exclude
  Jsii::Type.check_type(@exclude, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "exclude") unless @exclude.nil?
  @include = include
  Jsii::Type.check_type(@include, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "include") unless @include.nil?
end

Instance Attribute Details

#excludeArray<String>? (readonly)

The IAM role ARNs for stacks you want to exclude.

The Hook will be invoked on all stacks except those initiated by the specified roles.



890
891
892
# File 'cloud_formation/cfn_guard_hook.rb', line 890

def exclude
  @exclude
end

#includeArray<String>? (readonly)

The IAM role ARNs to target stacks associated with these roles.

Only stack operations initiated by these roles will invoke the Hook.



897
898
899
# File 'cloud_formation/cfn_guard_hook.rb', line 897

def include
  @include
end

Class Method Details

.jsii_propertiesObject



899
900
901
902
903
904
# File 'cloud_formation/cfn_guard_hook.rb', line 899

def self.jsii_properties
  {
    :exclude => "exclude",
    :include => "include",
  }
end

Instance Method Details

#to_jsiiObject



906
907
908
909
910
911
912
913
# File 'cloud_formation/cfn_guard_hook.rb', line 906

def to_jsii
  result = {}
  result.merge!({
    "exclude" => @exclude,
    "include" => @include,
  })
  result.compact
end