aws-sdk-rds 1.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +7 -0
  2. data/lib/aws-sdk-rds.rb +73 -0
  3. data/lib/aws-sdk-rds/account_quota.rb +100 -0
  4. data/lib/aws-sdk-rds/certificate.rb +123 -0
  5. data/lib/aws-sdk-rds/client.rb +9214 -0
  6. data/lib/aws-sdk-rds/client_api.rb +3027 -0
  7. data/lib/aws-sdk-rds/customizations.rb +7 -0
  8. data/lib/aws-sdk-rds/db_cluster.rb +1074 -0
  9. data/lib/aws-sdk-rds/db_cluster_parameter_group.rb +230 -0
  10. data/lib/aws-sdk-rds/db_cluster_snapshot.rb +478 -0
  11. data/lib/aws-sdk-rds/db_engine.rb +241 -0
  12. data/lib/aws-sdk-rds/db_engine_version.rb +263 -0
  13. data/lib/aws-sdk-rds/db_instance.rb +2680 -0
  14. data/lib/aws-sdk-rds/db_log_file.rb +170 -0
  15. data/lib/aws-sdk-rds/db_parameter_group.rb +455 -0
  16. data/lib/aws-sdk-rds/db_parameter_group_family.rb +167 -0
  17. data/lib/aws-sdk-rds/db_security_group.rb +358 -0
  18. data/lib/aws-sdk-rds/db_snapshot.rb +714 -0
  19. data/lib/aws-sdk-rds/db_snapshot_attribute.rb +160 -0
  20. data/lib/aws-sdk-rds/db_subnet_group.rb +188 -0
  21. data/lib/aws-sdk-rds/errors.rb +23 -0
  22. data/lib/aws-sdk-rds/event.rb +134 -0
  23. data/lib/aws-sdk-rds/event_category_map.rb +98 -0
  24. data/lib/aws-sdk-rds/event_subscription.rb +352 -0
  25. data/lib/aws-sdk-rds/option_group.rb +283 -0
  26. data/lib/aws-sdk-rds/option_group_option.rb +166 -0
  27. data/lib/aws-sdk-rds/parameter.rb +144 -0
  28. data/lib/aws-sdk-rds/pending_maintenance_action.rb +211 -0
  29. data/lib/aws-sdk-rds/reserved_db_instance.rb +191 -0
  30. data/lib/aws-sdk-rds/reserved_db_instances_offering.rb +183 -0
  31. data/lib/aws-sdk-rds/resource.rb +2384 -0
  32. data/lib/aws-sdk-rds/resource_pending_maintenance_action_list.rb +111 -0
  33. data/lib/aws-sdk-rds/types.rb +10965 -0
  34. data/lib/aws-sdk-rds/waiters.rb +149 -0
  35. metadata +106 -0
@@ -0,0 +1,160 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing for info on making contributions:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws
9
+ module RDS
10
+ class DBSnapshotAttribute
11
+
12
+ extend Aws::Deprecations
13
+
14
+ # @overload def initialize(snapshot_id, name, options = {})
15
+ # @param [String] snapshot_id
16
+ # @param [String] name
17
+ # @option options [Client] :client
18
+ # @overload def initialize(options = {})
19
+ # @option options [required, String] :snapshot_id
20
+ # @option options [required, String] :name
21
+ # @option options [Client] :client
22
+ def initialize(*args)
23
+ options = Hash === args.last ? args.pop.dup : {}
24
+ @snapshot_id = extract_snapshot_id(args, options)
25
+ @name = extract_name(args, options)
26
+ @data = options.delete(:data)
27
+ @client = options.delete(:client) || Client.new(options)
28
+ end
29
+
30
+ # @!group Read-Only Attributes
31
+
32
+ # @return [String]
33
+ def snapshot_id
34
+ @snapshot_id
35
+ end
36
+
37
+ # @return [String]
38
+ def name
39
+ @name
40
+ end
41
+ alias :attribute_name :name
42
+
43
+ # The value or values for the manual DB snapshot attribute.
44
+ #
45
+ # If the `AttributeName` field is set to `restore`, then this element
46
+ # returns a list of IDs of the AWS accounts that are authorized to copy
47
+ # or restore the manual DB snapshot. If a value of `all` is in the list,
48
+ # then the manual DB snapshot is public and available for any AWS
49
+ # account to copy or restore.
50
+ # @return [Array<String>]
51
+ def attribute_values
52
+ data.attribute_values
53
+ end
54
+
55
+ # @!endgroup
56
+
57
+ # @return [Client]
58
+ def client
59
+ @client
60
+ end
61
+
62
+ # @raise [Errors::ResourceNotLoadable]
63
+ # @api private
64
+ def load
65
+ msg = "#load is not implemented, data only available via enumeration"
66
+ raise Errors::ResourceNotLoadable, msg
67
+ end
68
+ alias :reload :load
69
+
70
+ # @raise [Errors::ResourceNotLoadableError] Raises when {#data_loaded?} is `false`.
71
+ # @return [Types::DBSnapshotAttribute]
72
+ # Returns the data for this {DBSnapshotAttribute}.
73
+ def data
74
+ load unless @data
75
+ @data
76
+ end
77
+
78
+ # @return [Boolean]
79
+ # Returns `true` if this resource is loaded. Accessing attributes or
80
+ # {#data} on an unloaded resource will trigger a call to {#load}.
81
+ def data_loaded?
82
+ !!@data
83
+ end
84
+
85
+ # @!group Actions
86
+
87
+ # @example Request syntax with placeholder values
88
+ #
89
+ # db_snapshot_attribute.modify({
90
+ # values_to_add: ["String"],
91
+ # values_to_remove: ["String"],
92
+ # })
93
+ # @param [Hash] options ({})
94
+ # @option options [Array<String>] :values_to_add
95
+ # A list of DB snapshot attributes to add to the attribute specified by
96
+ # `AttributeName`.
97
+ #
98
+ # To authorize other AWS accounts to copy or restore a manual snapshot,
99
+ # set this list to include one or more AWS account IDs, or `all` to make
100
+ # the manual DB snapshot restorable by any AWS account. Do not add the
101
+ # `all` value for any manual DB snapshots that contain private
102
+ # information that you don't want available to all AWS accounts.
103
+ # @option options [Array<String>] :values_to_remove
104
+ # A list of DB snapshot attributes to remove from the attribute
105
+ # specified by `AttributeName`.
106
+ #
107
+ # To remove authorization for other AWS accounts to copy or restore a
108
+ # manual snapshot, set this list to include one or more AWS account
109
+ # identifiers, or `all` to remove authorization for any AWS account to
110
+ # copy or restore the DB snapshot. If you specify `all`, an AWS account
111
+ # whose account ID is explicitly added to the `restore` attribute can
112
+ # still copy or restore the manual DB snapshot.
113
+ # @return [Types::ModifyDBSnapshotAttributeResult]
114
+ def modify(options = {})
115
+ options = options.merge(
116
+ attribute_name: @name,
117
+ db_snapshot_identifier: @snapshot_id
118
+ )
119
+ resp = @client.modify_db_snapshot_attribute(options)
120
+ resp.data
121
+ end
122
+
123
+ # @deprecated
124
+ # @api private
125
+ def identifiers
126
+ {
127
+ snapshot_id: @snapshot_id,
128
+ name: @name
129
+ }
130
+ end
131
+ deprecated(:identifiers)
132
+
133
+ private
134
+
135
+ def extract_snapshot_id(args, options)
136
+ value = args[0] || options.delete(:snapshot_id)
137
+ case value
138
+ when String then value
139
+ when nil then raise ArgumentError, "missing required option :snapshot_id"
140
+ else
141
+ msg = "expected :snapshot_id to be a String, got #{value.class}"
142
+ raise ArgumentError, msg
143
+ end
144
+ end
145
+
146
+ def extract_name(args, options)
147
+ value = args[1] || options.delete(:name)
148
+ case value
149
+ when String then value
150
+ when nil then raise ArgumentError, "missing required option :name"
151
+ else
152
+ msg = "expected :name to be a String, got #{value.class}"
153
+ raise ArgumentError, msg
154
+ end
155
+ end
156
+
157
+ class Collection < Aws::Resources::Collection; end
158
+ end
159
+ end
160
+ end
@@ -0,0 +1,188 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing for info on making contributions:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws
9
+ module RDS
10
+ class DBSubnetGroup
11
+
12
+ extend Aws::Deprecations
13
+
14
+ # @overload def initialize(name, options = {})
15
+ # @param [String] name
16
+ # @option options [Client] :client
17
+ # @overload def initialize(options = {})
18
+ # @option options [required, String] :name
19
+ # @option options [Client] :client
20
+ def initialize(*args)
21
+ options = Hash === args.last ? args.pop.dup : {}
22
+ @name = extract_name(args, options)
23
+ @data = options.delete(:data)
24
+ @client = options.delete(:client) || Client.new(options)
25
+ end
26
+
27
+ # @!group Read-Only Attributes
28
+
29
+ # @return [String]
30
+ def name
31
+ @name
32
+ end
33
+ alias :db_subnet_group_name :name
34
+
35
+ # Provides the description of the DB subnet group.
36
+ # @return [String]
37
+ def db_subnet_group_description
38
+ data.db_subnet_group_description
39
+ end
40
+
41
+ # Provides the VpcId of the DB subnet group.
42
+ # @return [String]
43
+ def vpc_id
44
+ data.vpc_id
45
+ end
46
+
47
+ # Provides the status of the DB subnet group.
48
+ # @return [String]
49
+ def subnet_group_status
50
+ data.subnet_group_status
51
+ end
52
+
53
+ # Contains a list of Subnet elements.
54
+ # @return [Array<Types::Subnet>]
55
+ def subnets
56
+ data.subnets
57
+ end
58
+
59
+ # The Amazon Resource Name (ARN) for the DB subnet group.
60
+ # @return [String]
61
+ def db_subnet_group_arn
62
+ data.db_subnet_group_arn
63
+ end
64
+
65
+ # @!endgroup
66
+
67
+ # @return [Client]
68
+ def client
69
+ @client
70
+ end
71
+
72
+ # Loads, or reloads {#data} for the current {DBSubnetGroup}.
73
+ # Returns `self` making it possible to chain methods.
74
+ #
75
+ # db_subnet_group.reload.data
76
+ #
77
+ # @return [self]
78
+ def load
79
+ resp = @client.describe_db_subnet_groups(db_subnet_group_name: @name)
80
+ @data = resp.dbsubnetgroups[0]
81
+ self
82
+ end
83
+ alias :reload :load
84
+
85
+ # @return [Types::DBSubnetGroup]
86
+ # Returns the data for this {DBSubnetGroup}. Calls
87
+ # {Client#describe_db_subnet_groups} if {#data_loaded?} is `false`.
88
+ def data
89
+ load unless @data
90
+ @data
91
+ end
92
+
93
+ # @return [Boolean]
94
+ # Returns `true` if this resource is loaded. Accessing attributes or
95
+ # {#data} on an unloaded resource will trigger a call to {#load}.
96
+ def data_loaded?
97
+ !!@data
98
+ end
99
+
100
+ # @!group Actions
101
+
102
+ # @example Request syntax with placeholder values
103
+ #
104
+ # dbsubnetgroup = db_subnet_group.create({
105
+ # db_subnet_group_description: "String", # required
106
+ # subnet_ids: ["String"], # required
107
+ # tags: [
108
+ # {
109
+ # key: "String",
110
+ # value: "String",
111
+ # },
112
+ # ],
113
+ # })
114
+ # @param [Hash] options ({})
115
+ # @option options [required, String] :db_subnet_group_description
116
+ # The description for the DB subnet group.
117
+ # @option options [required, Array<String>] :subnet_ids
118
+ # The EC2 Subnet IDs for the DB subnet group.
119
+ # @option options [Array<Types::Tag>] :tags
120
+ # A list of tags.
121
+ # @return [DBSubnetGroup]
122
+ def create(options = {})
123
+ options = options.merge(db_subnet_group_name: @name)
124
+ resp = @client.create_db_subnet_group(options)
125
+ DBSubnetGroup.new(
126
+ name: resp.data.db_subnet_group.db_subnet_group_name,
127
+ data: resp.data.db_subnet_group,
128
+ client: @client
129
+ )
130
+ end
131
+
132
+ # @example Request syntax with placeholder values
133
+ #
134
+ # db_subnet_group.delete()
135
+ # @param [Hash] options ({})
136
+ # @return [EmptyStructure]
137
+ def delete(options = {})
138
+ options = options.merge(db_subnet_group_name: @name)
139
+ resp = @client.delete_db_subnet_group(options)
140
+ resp.data
141
+ end
142
+
143
+ # @example Request syntax with placeholder values
144
+ #
145
+ # dbsubnetgroup = db_subnet_group.modify({
146
+ # db_subnet_group_description: "String",
147
+ # subnet_ids: ["String"], # required
148
+ # })
149
+ # @param [Hash] options ({})
150
+ # @option options [String] :db_subnet_group_description
151
+ # The description for the DB subnet group.
152
+ # @option options [required, Array<String>] :subnet_ids
153
+ # The EC2 subnet IDs for the DB subnet group.
154
+ # @return [DBSubnetGroup]
155
+ def modify(options = {})
156
+ options = options.merge(db_subnet_group_name: @name)
157
+ resp = @client.modify_db_subnet_group(options)
158
+ DBSubnetGroup.new(
159
+ name: resp.data.db_subnet_group.db_subnet_group_name,
160
+ data: resp.data.db_subnet_group,
161
+ client: @client
162
+ )
163
+ end
164
+
165
+ # @deprecated
166
+ # @api private
167
+ def identifiers
168
+ { name: @name }
169
+ end
170
+ deprecated(:identifiers)
171
+
172
+ private
173
+
174
+ def extract_name(args, options)
175
+ value = args[0] || options.delete(:name)
176
+ case value
177
+ when String then value
178
+ when nil then raise ArgumentError, "missing required option :name"
179
+ else
180
+ msg = "expected :name to be a String, got #{value.class}"
181
+ raise ArgumentError, msg
182
+ end
183
+ end
184
+
185
+ class Collection < Aws::Resources::Collection; end
186
+ end
187
+ end
188
+ end
@@ -0,0 +1,23 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing for info on making contributions:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws
9
+ module RDS
10
+ module Errors
11
+
12
+ extend Aws::Errors::DynamicErrors
13
+
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
+ end
23
+ end
@@ -0,0 +1,134 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing for info on making contributions:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws
9
+ module RDS
10
+ class Event
11
+
12
+ extend Aws::Deprecations
13
+
14
+ # @overload def initialize(source_id, date, options = {})
15
+ # @param [String] source_id
16
+ # @param [String] date
17
+ # @option options [Client] :client
18
+ # @overload def initialize(options = {})
19
+ # @option options [required, String] :source_id
20
+ # @option options [required, String] :date
21
+ # @option options [Client] :client
22
+ def initialize(*args)
23
+ options = Hash === args.last ? args.pop.dup : {}
24
+ @source_id = extract_source_id(args, options)
25
+ @date = extract_date(args, options)
26
+ @data = options.delete(:data)
27
+ @client = options.delete(:client) || Client.new(options)
28
+ end
29
+
30
+ # @!group Read-Only Attributes
31
+
32
+ # @return [String]
33
+ def source_id
34
+ @source_id
35
+ end
36
+ alias :source_identifier :source_id
37
+
38
+ # @return [String]
39
+ def date
40
+ @date
41
+ end
42
+
43
+ # Specifies the source type for this event.
44
+ # @return [String]
45
+ def source_type
46
+ data.source_type
47
+ end
48
+
49
+ # Provides the text of this event.
50
+ # @return [String]
51
+ def message
52
+ data.message
53
+ end
54
+
55
+ # Specifies the category for the event.
56
+ # @return [Array<String>]
57
+ def event_categories
58
+ data.event_categories
59
+ end
60
+
61
+ # The Amazon Resource Name (ARN) for the event.
62
+ # @return [String]
63
+ def source_arn
64
+ data.source_arn
65
+ end
66
+
67
+ # @!endgroup
68
+
69
+ # @return [Client]
70
+ def client
71
+ @client
72
+ end
73
+
74
+ # @raise [Errors::ResourceNotLoadable]
75
+ # @api private
76
+ def load
77
+ msg = "#load is not implemented, data only available via enumeration"
78
+ raise Errors::ResourceNotLoadable, msg
79
+ end
80
+ alias :reload :load
81
+
82
+ # @raise [Errors::ResourceNotLoadableError] Raises when {#data_loaded?} is `false`.
83
+ # @return [Types::Event]
84
+ # Returns the data for this {Event}.
85
+ def data
86
+ load unless @data
87
+ @data
88
+ end
89
+
90
+ # @return [Boolean]
91
+ # Returns `true` if this resource is loaded. Accessing attributes or
92
+ # {#data} on an unloaded resource will trigger a call to {#load}.
93
+ def data_loaded?
94
+ !!@data
95
+ end
96
+
97
+ # @deprecated
98
+ # @api private
99
+ def identifiers
100
+ {
101
+ source_id: @source_id,
102
+ date: @date
103
+ }
104
+ end
105
+ deprecated(:identifiers)
106
+
107
+ private
108
+
109
+ def extract_source_id(args, options)
110
+ value = args[0] || options.delete(:source_id)
111
+ case value
112
+ when String then value
113
+ when nil then raise ArgumentError, "missing required option :source_id"
114
+ else
115
+ msg = "expected :source_id to be a String, got #{value.class}"
116
+ raise ArgumentError, msg
117
+ end
118
+ end
119
+
120
+ def extract_date(args, options)
121
+ value = args[1] || options.delete(:date)
122
+ case value
123
+ when String then value
124
+ when nil then raise ArgumentError, "missing required option :date"
125
+ else
126
+ msg = "expected :date to be a String, got #{value.class}"
127
+ raise ArgumentError, msg
128
+ end
129
+ end
130
+
131
+ class Collection < Aws::Resources::Collection; end
132
+ end
133
+ end
134
+ end