aws-sdk-rds 1.0.0.rc2 → 1.0.0.rc3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/aws-sdk-rds.rb +2 -2
- data/lib/aws-sdk-rds/account_quota.rb +79 -81
- data/lib/aws-sdk-rds/certificate.rb +99 -101
- data/lib/aws-sdk-rds/client.rb +10575 -9119
- data/lib/aws-sdk-rds/client_api.rb +3049 -3023
- data/lib/aws-sdk-rds/db_cluster.rb +1005 -1007
- data/lib/aws-sdk-rds/db_cluster_parameter_group.rb +204 -206
- data/lib/aws-sdk-rds/db_cluster_snapshot.rb +430 -432
- data/lib/aws-sdk-rds/db_engine.rb +208 -210
- data/lib/aws-sdk-rds/db_engine_version.rb +218 -219
- data/lib/aws-sdk-rds/db_instance.rb +2747 -2567
- data/lib/aws-sdk-rds/db_log_file.rb +145 -147
- data/lib/aws-sdk-rds/db_parameter_group.rb +411 -413
- data/lib/aws-sdk-rds/db_parameter_group_family.rb +135 -137
- data/lib/aws-sdk-rds/db_security_group.rb +316 -318
- data/lib/aws-sdk-rds/db_snapshot.rb +705 -650
- data/lib/aws-sdk-rds/db_snapshot_attribute.rb +137 -139
- data/lib/aws-sdk-rds/db_subnet_group.rb +161 -163
- data/lib/aws-sdk-rds/errors.rb +4 -13
- data/lib/aws-sdk-rds/event.rb +108 -110
- data/lib/aws-sdk-rds/event_category_map.rb +73 -75
- data/lib/aws-sdk-rds/event_subscription.rb +313 -315
- data/lib/aws-sdk-rds/option_group.rb +247 -249
- data/lib/aws-sdk-rds/option_group_option.rb +135 -137
- data/lib/aws-sdk-rds/parameter.rb +116 -118
- data/lib/aws-sdk-rds/pending_maintenance_action.rb +182 -184
- data/lib/aws-sdk-rds/plugins/cross_region_copying.rb +64 -0
- data/lib/aws-sdk-rds/reserved_db_instance.rb +156 -158
- data/lib/aws-sdk-rds/reserved_db_instances_offering.rb +154 -156
- data/lib/aws-sdk-rds/resource.rb +2395 -2288
- data/lib/aws-sdk-rds/resource_pending_maintenance_action_list.rb +89 -91
- data/lib/aws-sdk-rds/types.rb +12091 -10977
- data/lib/aws-sdk-rds/waiters.rb +127 -128
- metadata +3 -2
data/lib/aws-sdk-rds/errors.rb
CHANGED
@@ -1,23 +1,14 @@
|
|
1
1
|
# WARNING ABOUT GENERATED CODE
|
2
2
|
#
|
3
|
-
# This file is generated. See the contributing for
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
4
|
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
5
|
#
|
6
6
|
# WARNING ABOUT GENERATED CODE
|
7
7
|
|
8
|
-
module Aws
|
9
|
-
module
|
10
|
-
module Errors
|
8
|
+
module Aws::RDS
|
9
|
+
module Errors
|
11
10
|
|
12
|
-
|
11
|
+
extend Aws::Errors::DynamicErrors
|
13
12
|
|
14
|
-
# Raised when calling #load or #data on a resource class that can not be
|
15
|
-
# loaded. This can happen when:
|
16
|
-
#
|
17
|
-
# * A resource class has identifiers, but no data attributes.
|
18
|
-
# * Resource data is only available when making an API call that
|
19
|
-
# enumerates all resources of that type.
|
20
|
-
class ResourceNotLoadable < RuntimeError; end
|
21
|
-
end
|
22
13
|
end
|
23
14
|
end
|
data/lib/aws-sdk-rds/event.rb
CHANGED
@@ -1,134 +1,132 @@
|
|
1
1
|
# WARNING ABOUT GENERATED CODE
|
2
2
|
#
|
3
|
-
# This file is generated. See the contributing for
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
4
|
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
5
|
#
|
6
6
|
# WARNING ABOUT GENERATED CODE
|
7
7
|
|
8
|
-
module Aws
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
end
|
8
|
+
module Aws::RDS
|
9
|
+
class Event
|
10
|
+
|
11
|
+
extend Aws::Deprecations
|
12
|
+
|
13
|
+
# @overload def initialize(source_id, date, options = {})
|
14
|
+
# @param [String] source_id
|
15
|
+
# @param [String] date
|
16
|
+
# @option options [Client] :client
|
17
|
+
# @overload def initialize(options = {})
|
18
|
+
# @option options [required, String] :source_id
|
19
|
+
# @option options [required, String] :date
|
20
|
+
# @option options [Client] :client
|
21
|
+
def initialize(*args)
|
22
|
+
options = Hash === args.last ? args.pop.dup : {}
|
23
|
+
@source_id = extract_source_id(args, options)
|
24
|
+
@date = extract_date(args, options)
|
25
|
+
@data = options.delete(:data)
|
26
|
+
@client = options.delete(:client) || Client.new(options)
|
27
|
+
end
|
29
28
|
|
30
|
-
|
29
|
+
# @!group Read-Only Attributes
|
31
30
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
31
|
+
# @return [String]
|
32
|
+
def source_id
|
33
|
+
@source_id
|
34
|
+
end
|
35
|
+
alias :source_identifier :source_id
|
37
36
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
37
|
+
# @return [String]
|
38
|
+
def date
|
39
|
+
@date
|
40
|
+
end
|
42
41
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
42
|
+
# Specifies the source type for this event.
|
43
|
+
# @return [String]
|
44
|
+
def source_type
|
45
|
+
data.source_type
|
46
|
+
end
|
48
47
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
48
|
+
# Provides the text of this event.
|
49
|
+
# @return [String]
|
50
|
+
def message
|
51
|
+
data.message
|
52
|
+
end
|
54
53
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
54
|
+
# Specifies the category for the event.
|
55
|
+
# @return [Array<String>]
|
56
|
+
def event_categories
|
57
|
+
data.event_categories
|
58
|
+
end
|
60
59
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
60
|
+
# The Amazon Resource Name (ARN) for the event.
|
61
|
+
# @return [String]
|
62
|
+
def source_arn
|
63
|
+
data.source_arn
|
64
|
+
end
|
66
65
|
|
67
|
-
|
66
|
+
# @!endgroup
|
68
67
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
68
|
+
# @return [Client]
|
69
|
+
def client
|
70
|
+
@client
|
71
|
+
end
|
73
72
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
73
|
+
# @raise [NotImplementedError]
|
74
|
+
# @api private
|
75
|
+
def load
|
76
|
+
msg = "#load is not implemented, data only available via enumeration"
|
77
|
+
raise NotImplementedError, msg
|
78
|
+
end
|
79
|
+
alias :reload :load
|
80
|
+
|
81
|
+
# @raise [NotImplementedError] Raises when {#data_loaded?} is `false`.
|
82
|
+
# @return [Types::Event]
|
83
|
+
# Returns the data for this {Event}.
|
84
|
+
def data
|
85
|
+
load unless @data
|
86
|
+
@data
|
87
|
+
end
|
89
88
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
89
|
+
# @return [Boolean]
|
90
|
+
# Returns `true` if this resource is loaded. Accessing attributes or
|
91
|
+
# {#data} on an unloaded resource will trigger a call to {#load}.
|
92
|
+
def data_loaded?
|
93
|
+
!!@data
|
94
|
+
end
|
96
95
|
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
end
|
96
|
+
# @deprecated
|
97
|
+
# @api private
|
98
|
+
def identifiers
|
99
|
+
{
|
100
|
+
source_id: @source_id,
|
101
|
+
date: @date
|
102
|
+
}
|
103
|
+
end
|
104
|
+
deprecated(:identifiers)
|
105
|
+
|
106
|
+
private
|
107
|
+
|
108
|
+
def extract_source_id(args, options)
|
109
|
+
value = args[0] || options.delete(:source_id)
|
110
|
+
case value
|
111
|
+
when String then value
|
112
|
+
when nil then raise ArgumentError, "missing required option :source_id"
|
113
|
+
else
|
114
|
+
msg = "expected :source_id to be a String, got #{value.class}"
|
115
|
+
raise ArgumentError, msg
|
118
116
|
end
|
117
|
+
end
|
119
118
|
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
end
|
119
|
+
def extract_date(args, options)
|
120
|
+
value = args[1] || options.delete(:date)
|
121
|
+
case value
|
122
|
+
when String then value
|
123
|
+
when nil then raise ArgumentError, "missing required option :date"
|
124
|
+
else
|
125
|
+
msg = "expected :date to be a String, got #{value.class}"
|
126
|
+
raise ArgumentError, msg
|
129
127
|
end
|
130
|
-
|
131
|
-
class Collection < Aws::Resources::Collection; end
|
132
128
|
end
|
129
|
+
|
130
|
+
class Collection < Aws::Resources::Collection; end
|
133
131
|
end
|
134
132
|
end
|
@@ -1,98 +1,96 @@
|
|
1
1
|
# WARNING ABOUT GENERATED CODE
|
2
2
|
#
|
3
|
-
# This file is generated. See the contributing for
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
4
|
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
5
|
#
|
6
6
|
# WARNING ABOUT GENERATED CODE
|
7
7
|
|
8
|
-
module Aws
|
9
|
-
|
10
|
-
class EventCategoryMap
|
8
|
+
module Aws::RDS
|
9
|
+
class EventCategoryMap
|
11
10
|
|
12
|
-
|
11
|
+
extend Aws::Deprecations
|
13
12
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
13
|
+
# @overload def initialize(source_type, options = {})
|
14
|
+
# @param [String] source_type
|
15
|
+
# @option options [Client] :client
|
16
|
+
# @overload def initialize(options = {})
|
17
|
+
# @option options [required, String] :source_type
|
18
|
+
# @option options [Client] :client
|
19
|
+
def initialize(*args)
|
20
|
+
options = Hash === args.last ? args.pop.dup : {}
|
21
|
+
@source_type = extract_source_type(args, options)
|
22
|
+
@data = options.delete(:data)
|
23
|
+
@client = options.delete(:client) || Client.new(options)
|
24
|
+
end
|
26
25
|
|
27
|
-
|
26
|
+
# @!group Read-Only Attributes
|
28
27
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
28
|
+
# @return [String]
|
29
|
+
def source_type
|
30
|
+
@source_type
|
31
|
+
end
|
33
32
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
33
|
+
# The event categories for the specified source type
|
34
|
+
# @return [Array<String>]
|
35
|
+
def event_categories
|
36
|
+
data.event_categories
|
37
|
+
end
|
39
38
|
|
40
|
-
|
39
|
+
# @!endgroup
|
41
40
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
41
|
+
# @return [Client]
|
42
|
+
def client
|
43
|
+
@client
|
44
|
+
end
|
46
45
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
46
|
+
# Loads, or reloads {#data} for the current {EventCategoryMap}.
|
47
|
+
# Returns `self` making it possible to chain methods.
|
48
|
+
#
|
49
|
+
# event_category_map.reload.data
|
50
|
+
#
|
51
|
+
# @return [self]
|
52
|
+
def load
|
53
|
+
resp = @client.describe_event_categories(source_type: @name)
|
54
|
+
@data = resp.eventcategoriesmaplist[0]
|
55
|
+
self
|
56
|
+
end
|
57
|
+
alias :reload :load
|
59
58
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
59
|
+
# @return [Types::EventCategoriesMap]
|
60
|
+
# Returns the data for this {EventCategoryMap}. Calls
|
61
|
+
# {Client#describe_event_categories} if {#data_loaded?} is `false`.
|
62
|
+
def data
|
63
|
+
load unless @data
|
64
|
+
@data
|
65
|
+
end
|
67
66
|
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
67
|
+
# @return [Boolean]
|
68
|
+
# Returns `true` if this resource is loaded. Accessing attributes or
|
69
|
+
# {#data} on an unloaded resource will trigger a call to {#load}.
|
70
|
+
def data_loaded?
|
71
|
+
!!@data
|
72
|
+
end
|
74
73
|
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
74
|
+
# @deprecated
|
75
|
+
# @api private
|
76
|
+
def identifiers
|
77
|
+
{ source_type: @source_type }
|
78
|
+
end
|
79
|
+
deprecated(:identifiers)
|
81
80
|
|
82
|
-
|
81
|
+
private
|
83
82
|
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
end
|
83
|
+
def extract_source_type(args, options)
|
84
|
+
value = args[0] || options.delete(:source_type)
|
85
|
+
case value
|
86
|
+
when String then value
|
87
|
+
when nil then raise ArgumentError, "missing required option :source_type"
|
88
|
+
else
|
89
|
+
msg = "expected :source_type to be a String, got #{value.class}"
|
90
|
+
raise ArgumentError, msg
|
93
91
|
end
|
94
|
-
|
95
|
-
class Collection < Aws::Resources::Collection; end
|
96
92
|
end
|
93
|
+
|
94
|
+
class Collection < Aws::Resources::Collection; end
|
97
95
|
end
|
98
96
|
end
|
@@ -1,352 +1,350 @@
|
|
1
1
|
# WARNING ABOUT GENERATED CODE
|
2
2
|
#
|
3
|
-
# This file is generated. See the contributing for
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
4
|
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
5
|
#
|
6
6
|
# WARNING ABOUT GENERATED CODE
|
7
7
|
|
8
|
-
module Aws
|
9
|
-
|
10
|
-
class EventSubscription
|
8
|
+
module Aws::RDS
|
9
|
+
class EventSubscription
|
11
10
|
|
12
|
-
|
11
|
+
extend Aws::Deprecations
|
13
12
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
13
|
+
# @overload def initialize(name, options = {})
|
14
|
+
# @param [String] name
|
15
|
+
# @option options [Client] :client
|
16
|
+
# @overload def initialize(options = {})
|
17
|
+
# @option options [required, String] :name
|
18
|
+
# @option options [Client] :client
|
19
|
+
def initialize(*args)
|
20
|
+
options = Hash === args.last ? args.pop.dup : {}
|
21
|
+
@name = extract_name(args, options)
|
22
|
+
@data = options.delete(:data)
|
23
|
+
@client = options.delete(:client) || Client.new(options)
|
24
|
+
end
|
26
25
|
|
27
|
-
|
26
|
+
# @!group Read-Only Attributes
|
28
27
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
28
|
+
# @return [String]
|
29
|
+
def name
|
30
|
+
@name
|
31
|
+
end
|
32
|
+
alias :cust_subscription_id :name
|
34
33
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
34
|
+
# The AWS customer account associated with the RDS event notification
|
35
|
+
# subscription.
|
36
|
+
# @return [String]
|
37
|
+
def customer_aws_id
|
38
|
+
data.customer_aws_id
|
39
|
+
end
|
41
40
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
41
|
+
# The topic ARN of the RDS event notification subscription.
|
42
|
+
# @return [String]
|
43
|
+
def sns_topic_arn
|
44
|
+
data.sns_topic_arn
|
45
|
+
end
|
47
46
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
47
|
+
# The status of the RDS event notification subscription.
|
48
|
+
#
|
49
|
+
# Constraints:
|
50
|
+
#
|
51
|
+
# Can be one of the following: creating \| modifying \| deleting \|
|
52
|
+
# active \| no-permission \| topic-not-exist
|
53
|
+
#
|
54
|
+
# The status "no-permission" indicates that RDS no longer has
|
55
|
+
# permission to post to the SNS topic. The status "topic-not-exist"
|
56
|
+
# indicates that the topic was deleted after the subscription was
|
57
|
+
# created.
|
58
|
+
# @return [String]
|
59
|
+
def status
|
60
|
+
data.status
|
61
|
+
end
|
63
62
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
63
|
+
# The time the RDS event notification subscription was created.
|
64
|
+
# @return [String]
|
65
|
+
def subscription_creation_time
|
66
|
+
data.subscription_creation_time
|
67
|
+
end
|
69
68
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
69
|
+
# The source type for the RDS event notification subscription.
|
70
|
+
# @return [String]
|
71
|
+
def source_type
|
72
|
+
data.source_type
|
73
|
+
end
|
75
74
|
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
75
|
+
# A list of source IDs for the RDS event notification subscription.
|
76
|
+
# @return [Array<String>]
|
77
|
+
def source_ids_list
|
78
|
+
data.source_ids_list
|
79
|
+
end
|
81
80
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
81
|
+
# A list of event categories for the RDS event notification
|
82
|
+
# subscription.
|
83
|
+
# @return [Array<String>]
|
84
|
+
def event_categories_list
|
85
|
+
data.event_categories_list
|
86
|
+
end
|
88
87
|
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
88
|
+
# A Boolean value indicating if the subscription is enabled. True
|
89
|
+
# indicates the subscription is enabled.
|
90
|
+
# @return [Boolean]
|
91
|
+
def enabled
|
92
|
+
data.enabled
|
93
|
+
end
|
95
94
|
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
95
|
+
# The Amazon Resource Name (ARN) for the event subscription.
|
96
|
+
# @return [String]
|
97
|
+
def event_subscription_arn
|
98
|
+
data.event_subscription_arn
|
99
|
+
end
|
101
100
|
|
102
|
-
|
101
|
+
# @!endgroup
|
103
102
|
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
103
|
+
# @return [Client]
|
104
|
+
def client
|
105
|
+
@client
|
106
|
+
end
|
108
107
|
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
108
|
+
# Loads, or reloads {#data} for the current {EventSubscription}.
|
109
|
+
# Returns `self` making it possible to chain methods.
|
110
|
+
#
|
111
|
+
# event_subscription.reload.data
|
112
|
+
#
|
113
|
+
# @return [self]
|
114
|
+
def load
|
115
|
+
resp = @client.describe_event_subscriptions(subscription_name: @name)
|
116
|
+
@data = resp.eventsubscriptionslist[0]
|
117
|
+
self
|
118
|
+
end
|
119
|
+
alias :reload :load
|
121
120
|
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
121
|
+
# @return [Types::EventSubscription]
|
122
|
+
# Returns the data for this {EventSubscription}. Calls
|
123
|
+
# {Client#describe_event_subscriptions} if {#data_loaded?} is `false`.
|
124
|
+
def data
|
125
|
+
load unless @data
|
126
|
+
@data
|
127
|
+
end
|
129
128
|
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
129
|
+
# @return [Boolean]
|
130
|
+
# Returns `true` if this resource is loaded. Accessing attributes or
|
131
|
+
# {#data} on an unloaded resource will trigger a call to {#load}.
|
132
|
+
def data_loaded?
|
133
|
+
!!@data
|
134
|
+
end
|
136
135
|
|
137
|
-
|
136
|
+
# @!group Actions
|
138
137
|
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
138
|
+
# @example Request syntax with placeholder values
|
139
|
+
#
|
140
|
+
# eventsubscription = event_subscription.add_subscriber({
|
141
|
+
# source_identifier: "String", # required
|
142
|
+
# })
|
143
|
+
# @param [Hash] options ({})
|
144
|
+
# @option options [required, String] :source_identifier
|
145
|
+
# The identifier of the event source to be added. An identifier must
|
146
|
+
# begin with a letter and must contain only ASCII letters, digits, and
|
147
|
+
# hyphens; it cannot end with a hyphen or contain two consecutive
|
148
|
+
# hyphens.
|
149
|
+
#
|
150
|
+
# Constraints:
|
151
|
+
#
|
152
|
+
# * If the source type is a DB instance, then a `DBInstanceIdentifier`
|
153
|
+
# must be supplied.
|
154
|
+
#
|
155
|
+
# * If the source type is a DB security group, a `DBSecurityGroupName`
|
156
|
+
# must be supplied.
|
157
|
+
#
|
158
|
+
# * If the source type is a DB parameter group, a `DBParameterGroupName`
|
159
|
+
# must be supplied.
|
160
|
+
#
|
161
|
+
# * If the source type is a DB snapshot, a `DBSnapshotIdentifier` must
|
162
|
+
# be supplied.
|
163
|
+
# @return [EventSubscription]
|
164
|
+
def add_subscriber(options = {})
|
165
|
+
options = options.merge(subscription_name: @name)
|
166
|
+
resp = @client.add_source_identifier_to_subscription(options)
|
167
|
+
EventSubscription.new(
|
168
|
+
name: resp.data.event_subscription.cust_subscription_id,
|
169
|
+
data: resp.data.event_subscription,
|
170
|
+
client: @client
|
171
|
+
)
|
172
|
+
end
|
174
173
|
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
174
|
+
# @example Request syntax with placeholder values
|
175
|
+
#
|
176
|
+
# eventsubscription = event_subscription.create({
|
177
|
+
# sns_topic_arn: "String", # required
|
178
|
+
# source_type: "String",
|
179
|
+
# event_categories: ["String"],
|
180
|
+
# source_ids: ["String"],
|
181
|
+
# enabled: false,
|
182
|
+
# tags: [
|
183
|
+
# {
|
184
|
+
# key: "String",
|
185
|
+
# value: "String",
|
186
|
+
# },
|
187
|
+
# ],
|
188
|
+
# })
|
189
|
+
# @param [Hash] options ({})
|
190
|
+
# @option options [required, String] :sns_topic_arn
|
191
|
+
# The Amazon Resource Name (ARN) of the SNS topic created for event
|
192
|
+
# notification. The ARN is created by Amazon SNS when you create a topic
|
193
|
+
# and subscribe to it.
|
194
|
+
# @option options [String] :source_type
|
195
|
+
# The type of source that will be generating the events. For example, if
|
196
|
+
# you want to be notified of events generated by a DB instance, you
|
197
|
+
# would set this parameter to db-instance. if this value is not
|
198
|
+
# specified, all events are returned.
|
199
|
+
#
|
200
|
+
# Valid values: `db-instance` \| `db-cluster` \| `db-parameter-group` \|
|
201
|
+
# `db-security-group` \| `db-snapshot` \| `db-cluster-snapshot`
|
202
|
+
# @option options [Array<String>] :event_categories
|
203
|
+
# A list of event categories for a SourceType that you want to subscribe
|
204
|
+
# to. You can see a list of the categories for a given SourceType in the
|
205
|
+
# [Events][1] topic in the Amazon RDS User Guide or by using the
|
206
|
+
# **DescribeEventCategories** action.
|
207
|
+
#
|
208
|
+
#
|
209
|
+
#
|
210
|
+
# [1]: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html
|
211
|
+
# @option options [Array<String>] :source_ids
|
212
|
+
# The list of identifiers of the event sources for which events will be
|
213
|
+
# returned. If not specified, then all sources are included in the
|
214
|
+
# response. An identifier must begin with a letter and must contain only
|
215
|
+
# ASCII letters, digits, and hyphens; it cannot end with a hyphen or
|
216
|
+
# contain two consecutive hyphens.
|
217
|
+
#
|
218
|
+
# Constraints:
|
219
|
+
#
|
220
|
+
# * If SourceIds are supplied, SourceType must also be provided.
|
221
|
+
#
|
222
|
+
# * If the source type is a DB instance, then a `DBInstanceIdentifier`
|
223
|
+
# must be supplied.
|
224
|
+
#
|
225
|
+
# * If the source type is a DB security group, a `DBSecurityGroupName`
|
226
|
+
# must be supplied.
|
227
|
+
#
|
228
|
+
# * If the source type is a DB parameter group, a `DBParameterGroupName`
|
229
|
+
# must be supplied.
|
230
|
+
#
|
231
|
+
# * If the source type is a DB snapshot, a `DBSnapshotIdentifier` must
|
232
|
+
# be supplied.
|
233
|
+
# @option options [Boolean] :enabled
|
234
|
+
# A Boolean value; set to **true** to activate the subscription, set to
|
235
|
+
# **false** to create the subscription but not active it.
|
236
|
+
# @option options [Array<Types::Tag>] :tags
|
237
|
+
# A list of tags.
|
238
|
+
# @return [EventSubscription]
|
239
|
+
def create(options = {})
|
240
|
+
options = options.merge(subscription_name: @name)
|
241
|
+
resp = @client.create_event_subscription(options)
|
242
|
+
EventSubscription.new(
|
243
|
+
name: resp.data.event_subscription.cust_subscription_id,
|
244
|
+
data: resp.data.event_subscription,
|
245
|
+
client: @client
|
246
|
+
)
|
247
|
+
end
|
249
248
|
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
249
|
+
# @example Request syntax with placeholder values
|
250
|
+
#
|
251
|
+
# event_subscription.delete()
|
252
|
+
# @param [Hash] options ({})
|
253
|
+
# @return [EventSubscription]
|
254
|
+
def delete(options = {})
|
255
|
+
options = options.merge(subscription_name: @name)
|
256
|
+
resp = @client.delete_event_subscription(options)
|
257
|
+
EventSubscription.new(
|
258
|
+
name: resp.data.event_subscription.cust_subscription_id,
|
259
|
+
data: resp.data.event_subscription,
|
260
|
+
client: @client
|
261
|
+
)
|
262
|
+
end
|
264
263
|
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
264
|
+
# @example Request syntax with placeholder values
|
265
|
+
#
|
266
|
+
# eventsubscription = event_subscription.modify({
|
267
|
+
# sns_topic_arn: "String",
|
268
|
+
# source_type: "String",
|
269
|
+
# event_categories: ["String"],
|
270
|
+
# enabled: false,
|
271
|
+
# })
|
272
|
+
# @param [Hash] options ({})
|
273
|
+
# @option options [String] :sns_topic_arn
|
274
|
+
# The Amazon Resource Name (ARN) of the SNS topic created for event
|
275
|
+
# notification. The ARN is created by Amazon SNS when you create a topic
|
276
|
+
# and subscribe to it.
|
277
|
+
# @option options [String] :source_type
|
278
|
+
# The type of source that will be generating the events. For example, if
|
279
|
+
# you want to be notified of events generated by a DB instance, you
|
280
|
+
# would set this parameter to db-instance. if this value is not
|
281
|
+
# specified, all events are returned.
|
282
|
+
#
|
283
|
+
# Valid values: db-instance \| db-parameter-group \| db-security-group
|
284
|
+
# \| db-snapshot
|
285
|
+
# @option options [Array<String>] :event_categories
|
286
|
+
# A list of event categories for a SourceType that you want to subscribe
|
287
|
+
# to. You can see a list of the categories for a given SourceType in the
|
288
|
+
# [Events][1] topic in the Amazon RDS User Guide or by using the
|
289
|
+
# **DescribeEventCategories** action.
|
290
|
+
#
|
291
|
+
#
|
292
|
+
#
|
293
|
+
# [1]: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html
|
294
|
+
# @option options [Boolean] :enabled
|
295
|
+
# A Boolean value; set to **true** to activate the subscription.
|
296
|
+
# @return [EventSubscription]
|
297
|
+
def modify(options = {})
|
298
|
+
options = options.merge(subscription_name: @name)
|
299
|
+
resp = @client.modify_event_subscription(options)
|
300
|
+
EventSubscription.new(
|
301
|
+
name: resp.data.event_subscription.cust_subscription_id,
|
302
|
+
data: resp.data.event_subscription,
|
303
|
+
client: @client
|
304
|
+
)
|
305
|
+
end
|
307
306
|
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
307
|
+
# @example Request syntax with placeholder values
|
308
|
+
#
|
309
|
+
# eventsubscription = event_subscription.remove_subscriber({
|
310
|
+
# source_identifier: "String", # required
|
311
|
+
# })
|
312
|
+
# @param [Hash] options ({})
|
313
|
+
# @option options [required, String] :source_identifier
|
314
|
+
# The source identifier to be removed from the subscription, such as the
|
315
|
+
# **DB instance identifier** for a DB instance or the name of a security
|
316
|
+
# group.
|
317
|
+
# @return [EventSubscription]
|
318
|
+
def remove_subscriber(options = {})
|
319
|
+
options = options.merge(subscription_name: @name)
|
320
|
+
resp = @client.remove_source_identifier_from_subscription(options)
|
321
|
+
EventSubscription.new(
|
322
|
+
name: resp.data.event_subscription.cust_subscription_id,
|
323
|
+
data: resp.data.event_subscription,
|
324
|
+
client: @client
|
325
|
+
)
|
326
|
+
end
|
328
327
|
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
328
|
+
# @deprecated
|
329
|
+
# @api private
|
330
|
+
def identifiers
|
331
|
+
{ name: @name }
|
332
|
+
end
|
333
|
+
deprecated(:identifiers)
|
335
334
|
|
336
|
-
|
335
|
+
private
|
337
336
|
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
end
|
337
|
+
def extract_name(args, options)
|
338
|
+
value = args[0] || options.delete(:name)
|
339
|
+
case value
|
340
|
+
when String then value
|
341
|
+
when nil then raise ArgumentError, "missing required option :name"
|
342
|
+
else
|
343
|
+
msg = "expected :name to be a String, got #{value.class}"
|
344
|
+
raise ArgumentError, msg
|
347
345
|
end
|
348
|
-
|
349
|
-
class Collection < Aws::Resources::Collection; end
|
350
346
|
end
|
347
|
+
|
348
|
+
class Collection < Aws::Resources::Collection; end
|
351
349
|
end
|
352
350
|
end
|