Class: AWSCDK::Athena::CfnNamedQueryProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
athena/cfn_named_query_props.rb

Overview

Properties for defining a CfnNamedQuery.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(database:, query_string:, description: nil, name: nil, work_group: nil) ⇒ CfnNamedQueryProps

Returns a new instance of CfnNamedQueryProps.

Parameters:

  • database (String)

    The database to which the query belongs.

  • query_string (String)

    The SQL statements that make up the query.

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

    The query description.

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

    The query name.

  • work_group (String, AWSCDK::Interfaces::AWSAthena::IWorkGroupRef, nil) (defaults to: nil)

    The name of the workgroup that contains the named query.



14
15
16
17
18
19
20
21
22
23
24
25
# File 'athena/cfn_named_query_props.rb', line 14

def initialize(database:, query_string:, description: nil, name: nil, work_group: nil)
  @database = database
  Jsii::Type.check_type(@database, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "database")
  @query_string = query_string
  Jsii::Type.check_type(@query_string, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "queryString")
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil?
  @work_group = work_group
  Jsii::Type.check_type(@work_group, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19hdGhlbmEuSVdvcmtHcm91cFJlZiJ9XX19")), "workGroup") unless @work_group.nil?
end

Instance Attribute Details

#databaseString (readonly)

The database to which the query belongs.



31
32
33
# File 'athena/cfn_named_query_props.rb', line 31

def database
  @database
end

#descriptionString? (readonly)

The query description.



41
42
43
# File 'athena/cfn_named_query_props.rb', line 41

def description
  @description
end

#nameString? (readonly)

The query name.



46
47
48
# File 'athena/cfn_named_query_props.rb', line 46

def name
  @name
end

#query_stringString (readonly)

The SQL statements that make up the query.



36
37
38
# File 'athena/cfn_named_query_props.rb', line 36

def query_string
  @query_string
end

#work_groupString, ... (readonly)

The name of the workgroup that contains the named query.



51
52
53
# File 'athena/cfn_named_query_props.rb', line 51

def work_group
  @work_group
end

Class Method Details

.jsii_propertiesObject



53
54
55
56
57
58
59
60
61
# File 'athena/cfn_named_query_props.rb', line 53

def self.jsii_properties
  {
    :database => "database",
    :query_string => "queryString",
    :description => "description",
    :name => "name",
    :work_group => "workGroup",
  }
end

Instance Method Details

#to_jsiiObject



63
64
65
66
67
68
69
70
71
72
73
# File 'athena/cfn_named_query_props.rb', line 63

def to_jsii
  result = {}
  result.merge!({
    "database" => @database,
    "queryString" => @query_string,
    "description" => @description,
    "name" => @name,
    "workGroup" => @work_group,
  })
  result.compact
end