Class: AWSCDK::Logs::QueryStringProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
logs/query_string_props.rb

Overview

Properties for a QueryString.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(display: nil, fields: nil, filter: nil, filter_statements: nil, limit: nil, parse: nil, parse_statements: nil, sort: nil, stats: nil, stats_statements: nil) ⇒ QueryStringProps

Returns a new instance of QueryStringProps.

Parameters:

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

    Specifies which fields to display in the query results.

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

    Retrieves the specified fields from log events for display.

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

    A single statement for filtering the results of a query based on a boolean expression.

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

    An array of one or more statements for filtering the results of a query based on a boolean expression.

  • limit (Numeric, nil) (defaults to: nil)

    Specifies the number of log events returned by the query.

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

    A single statement for parsing data from a log field and creating ephemeral fields that can be processed further in the query.

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

    An array of one or more statements for parsing data from a log field and creating ephemeral fields that can be processed further in the query.

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

    Sorts the retrieved log events.

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

    A single statement for using log field values to calculate aggregate statistics.

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

    An array of one or more statements for calculating aggregate statistics.



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'logs/query_string_props.rb', line 17

def initialize(display: nil, fields: nil, filter: nil, filter_statements: nil, limit: nil, parse: nil, parse_statements: nil, sort: nil, stats: nil, stats_statements: nil)
  @display = display
  Jsii::Type.check_type(@display, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "display") unless @display.nil?
  @fields = fields
  Jsii::Type.check_type(@fields, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "fields") unless @fields.nil?
  @filter = filter
  Jsii::Type.check_type(@filter, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "filter") unless @filter.nil?
  @filter_statements = filter_statements
  Jsii::Type.check_type(@filter_statements, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "filterStatements") unless @filter_statements.nil?
  @limit = limit
  Jsii::Type.check_type(@limit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "limit") unless @limit.nil?
  @parse = parse
  Jsii::Type.check_type(@parse, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "parse") unless @parse.nil?
  @parse_statements = parse_statements
  Jsii::Type.check_type(@parse_statements, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "parseStatements") unless @parse_statements.nil?
  @sort = sort
  Jsii::Type.check_type(@sort, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "sort") unless @sort.nil?
  @stats = stats
  Jsii::Type.check_type(@stats, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "stats") unless @stats.nil?
  @stats_statements = stats_statements
  Jsii::Type.check_type(@stats_statements, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "statsStatements") unless @stats_statements.nil?
end

Instance Attribute Details

#displayString? (readonly)

Note:

Default: - no display in QueryString

Specifies which fields to display in the query results.

Returns:

  • (String, nil)


44
45
46
# File 'logs/query_string_props.rb', line 44

def display
  @display
end

#fieldsArray<String>? (readonly)

Note:

Default: - no fields in QueryString

Retrieves the specified fields from log events for display.

Returns:

  • (Array<String>, nil)


49
50
51
# File 'logs/query_string_props.rb', line 49

def fields
  @fields
end

#filterString? (readonly)

Deprecated.

Use filterStatements instead

Note:

Default: - no filter in QueryString

A single statement for filtering the results of a query based on a boolean expression.

Returns:

  • (String, nil)


55
56
57
# File 'logs/query_string_props.rb', line 55

def filter
  @filter
end

#filter_statementsArray<String>? (readonly)

Note:

Default: - no filter in QueryString

An array of one or more statements for filtering the results of a query based on a boolean expression.

Each provided statement generates a separate filter line in the query string.

Note: If provided, this property overrides any value provided for the filter property.

Returns:

  • (Array<String>, nil)


64
65
66
# File 'logs/query_string_props.rb', line 64

def filter_statements
  @filter_statements
end

#limitNumeric? (readonly)

Note:

Default: - no limit in QueryString

Specifies the number of log events returned by the query.

Returns:

  • (Numeric, nil)


69
70
71
# File 'logs/query_string_props.rb', line 69

def limit
  @limit
end

#parseString? (readonly)

Deprecated.

Use parseStatements instead

Note:

Default: - no parse in QueryString

A single statement for parsing data from a log field and creating ephemeral fields that can be processed further in the query.

Returns:

  • (String, nil)


75
76
77
# File 'logs/query_string_props.rb', line 75

def parse
  @parse
end

#parse_statementsArray<String>? (readonly)

Note:

Default: - no parse in QueryString

An array of one or more statements for parsing data from a log field and creating ephemeral fields that can be processed further in the query.

Each provided statement generates a separate parse line in the query string.

Note: If provided, this property overrides any value provided for the parse property.

Returns:

  • (Array<String>, nil)


85
86
87
# File 'logs/query_string_props.rb', line 85

def parse_statements
  @parse_statements
end

#sortString? (readonly)

Note:

Default: - no sort in QueryString

Sorts the retrieved log events.

Returns:

  • (String, nil)


90
91
92
# File 'logs/query_string_props.rb', line 90

def sort
  @sort
end

#statsString? (readonly)

Deprecated.

Use statsStatements instead

Note:

Default: - no stats in QueryString

A single statement for using log field values to calculate aggregate statistics.

Returns:

  • (String, nil)


96
97
98
# File 'logs/query_string_props.rb', line 96

def stats
  @stats
end

#stats_statementsArray<String>? (readonly)

Note:

Default: - no stats in QueryString

An array of one or more statements for calculating aggregate statistics.

CloudWatch Logs Insights supports up to two stats commands in a single query. Each provided statement generates a separate stats line in the query string.

Note: If provided, this property overrides any value provided for the stats property.

Returns:

  • (Array<String>, nil)


106
107
108
# File 'logs/query_string_props.rb', line 106

def stats_statements
  @stats_statements
end

Class Method Details

.jsii_propertiesObject



108
109
110
111
112
113
114
115
116
117
118
119
120
121
# File 'logs/query_string_props.rb', line 108

def self.jsii_properties
  {
    :display => "display",
    :fields => "fields",
    :filter => "filter",
    :filter_statements => "filterStatements",
    :limit => "limit",
    :parse => "parse",
    :parse_statements => "parseStatements",
    :sort => "sort",
    :stats => "stats",
    :stats_statements => "statsStatements",
  }
end

Instance Method Details

#to_jsiiObject



123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# File 'logs/query_string_props.rb', line 123

def to_jsii
  result = {}
  result.merge!({
    "display" => @display,
    "fields" => @fields,
    "filter" => @filter,
    "filterStatements" => @filter_statements,
    "limit" => @limit,
    "parse" => @parse,
    "parseStatements" => @parse_statements,
    "sort" => @sort,
    "stats" => @stats,
    "statsStatements" => @stats_statements,
  })
  result.compact
end