Class: AWSCDK::ConstructSelector

Inherits:
Jsii::Object
  • Object
show all
Defined in:
construct_selector.rb

Overview

Selects constructs from a construct tree based on various criteria.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConstructSelector

Returns a new instance of ConstructSelector.



8
9
10
# File 'construct_selector.rb', line 8

def initialize
  Jsii::Object.instance_method(:initialize).bind(self).call
end

Class Method Details

.allAWSCDK::IConstructSelector

Selects all constructs in the tree.



20
21
22
# File 'construct_selector.rb', line 20

def self.all()
  Jsii::Kernel.instance.call_static("aws-cdk-lib.ConstructSelector", "all", [])
end

.by_id(pattern) ⇒ AWSCDK::IConstructSelector

Selects constructs whose construct IDs match a pattern.

Uses glob like matching.

Parameters:

  • pattern (String)

Returns:



30
31
32
33
# File 'construct_selector.rb', line 30

def self.by_id(pattern)
  Jsii::Type.check_type(pattern, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "pattern")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.ConstructSelector", "byId", [pattern])
end

.by_path(pattern) ⇒ AWSCDK::IConstructSelector

Selects constructs whose construct paths match a pattern.

Uses glob like matching.

Parameters:

  • pattern (String)

Returns:



41
42
43
44
# File 'construct_selector.rb', line 41

def self.by_path(pattern)
  Jsii::Type.check_type(pattern, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "pattern")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.ConstructSelector", "byPath", [pattern])
end

.cfn_resourceAWSCDK::IConstructSelector

Selects CfnResource constructs or the default CfnResource child.



49
50
51
# File 'construct_selector.rb', line 49

def self.cfn_resource()
  Jsii::Kernel.instance.call_static("aws-cdk-lib.ConstructSelector", "cfnResource", [])
end

.jsii_overridable_methodsObject



12
13
14
15
# File 'construct_selector.rb', line 12

def self.jsii_overridable_methods
  {
  }
end

.only_itselfAWSCDK::IConstructSelector

Selects only the provided construct.



56
57
58
# File 'construct_selector.rb', line 56

def self.only_itself()
  Jsii::Kernel.instance.call_static("aws-cdk-lib.ConstructSelector", "onlyItself", [])
end

.resources_of_type(*types) ⇒ AWSCDK::IConstructSelector

Selects constructs of a specific type.

Parameters:

  • types (Array<String>)

Returns:



64
65
66
67
68
69
# File 'construct_selector.rb', line 64

def self.resources_of_type(*types)
  types.each_with_index do |item, index|
    Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "types[#{index}]")
  end
  Jsii::Kernel.instance.call_static("aws-cdk-lib.ConstructSelector", "resourcesOfType", [*types])
end