You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::RDS::EventCategoryMap

Inherits:
Object
  • Object
show all
Defined in:
gems/aws-sdk-rds/lib/aws-sdk-rds/event_category_map.rb

Defined Under Namespace

Classes: Collection

Read-Only Attributes collapse

Instance Method Summary collapse

Constructor Details

#initialize(source_type, options = {}) ⇒ EventCategoryMap #initialize(options = {}) ⇒ EventCategoryMap

Returns a new instance of EventCategoryMap

Overloads:

  • #initialize(source_type, options = {}) ⇒ EventCategoryMap

    Parameters:

    • source_type (String)

    Options Hash (options):

  • #initialize(options = {}) ⇒ EventCategoryMap

    Options Hash (options):

    • :source_type (required, String)
    • :client (Client)


19
20
21
22
23
24
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/event_category_map.rb', line 19

def initialize(*args)
  options = Hash === args.last ? args.pop.dup : {}
  @source_type = extract_source_type(args, options)
  @data = options.delete(:data)
  @client = options.delete(:client) || Client.new(options)
end

Instance Method Details

#clientClient

Returns:



42
43
44
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/event_category_map.rb', line 42

def client
  @client
end

#dataTypes::EventCategoriesMap

Returns the data for this Aws::RDS::EventCategoryMap. Calls Client#describe_event_categories if #data_loaded? is false.

Returns:



62
63
64
65
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/event_category_map.rb', line 62

def data
  load unless @data
  @data
end

#data_loaded?Boolean

Returns true if this resource is loaded. Accessing attributes or #data on an unloaded resource will trigger a call to #load.

Returns:

  • (Boolean)

    Returns true if this resource is loaded. Accessing attributes or #data on an unloaded resource will trigger a call to #load.



70
71
72
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/event_category_map.rb', line 70

def data_loaded?
  !!@data
end

#event_categoriesArray<String>

The event categories for the specified source type

Returns:

  • (Array<String>)


35
36
37
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/event_category_map.rb', line 35

def event_categories
  data.event_categories
end

#loadself Also known as: reload

Loads, or reloads #data for the current Aws::RDS::EventCategoryMap. Returns self making it possible to chain methods.

event_category_map.reload.data

Returns:

  • (self)


52
53
54
55
56
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/event_category_map.rb', line 52

def load
  resp = @client.describe_event_categories(source_type: @name)
  @data = resp.event_categories_map_list[0]
  self
end

#source_typeString

Returns:

  • (String)


29
30
31
# File 'gems/aws-sdk-rds/lib/aws-sdk-rds/event_category_map.rb', line 29

def source_type
  @source_type
end