Class: AWSCDK::Config::CfnStoredQueryProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
config/cfn_stored_query_props.rb

Overview

Properties for defining a CfnStoredQuery.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(query_expression:, query_name:, query_description: nil, tags: nil) ⇒ CfnStoredQueryProps

Returns a new instance of CfnStoredQueryProps.

Parameters:

  • query_expression (String)

    The expression of the query.

  • query_name (String)

    The name of the query.

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

    A unique description for the query.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    An array of key-value pairs to apply to this resource.



13
14
15
16
17
18
19
20
21
22
# File 'config/cfn_stored_query_props.rb', line 13

def initialize(query_expression:, query_name:, query_description: nil, tags: nil)
  @query_expression = query_expression
  Jsii::Type.check_type(@query_expression, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "queryExpression")
  @query_name = query_name
  Jsii::Type.check_type(@query_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "queryName")
  @query_description = query_description
  Jsii::Type.check_type(@query_description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "queryDescription") unless @query_description.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#query_descriptionString? (readonly)

A unique description for the query.



40
41
42
# File 'config/cfn_stored_query_props.rb', line 40

def query_description
  @query_description
end

#query_expressionString (readonly)

The expression of the query.

For example, SELECT resourceId, resourceType, supplementaryConfiguration.BucketVersioningConfiguration.status WHERE resourceType = 'AWS::S3::Bucket' AND supplementaryConfiguration.BucketVersioningConfiguration.status = 'Off'.



30
31
32
# File 'config/cfn_stored_query_props.rb', line 30

def query_expression
  @query_expression
end

#query_nameString (readonly)

The name of the query.



35
36
37
# File 'config/cfn_stored_query_props.rb', line 35

def query_name
  @query_name
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

An array of key-value pairs to apply to this resource.



45
46
47
# File 'config/cfn_stored_query_props.rb', line 45

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



47
48
49
50
51
52
53
54
# File 'config/cfn_stored_query_props.rb', line 47

def self.jsii_properties
  {
    :query_expression => "queryExpression",
    :query_name => "queryName",
    :query_description => "queryDescription",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



56
57
58
59
60
61
62
63
64
65
# File 'config/cfn_stored_query_props.rb', line 56

def to_jsii
  result = {}
  result.merge!({
    "queryExpression" => @query_expression,
    "queryName" => @query_name,
    "queryDescription" => @query_description,
    "tags" => @tags,
  })
  result.compact
end