aws-sdk-ec2 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-ec2.rb +2 -2
- data/lib/aws-sdk-ec2/classic_address.rb +198 -200
- data/lib/aws-sdk-ec2/client.rb +17169 -14563
- data/lib/aws-sdk-ec2/client_api.rb +6458 -6301
- data/lib/aws-sdk-ec2/dhcp_options.rb +158 -160
- data/lib/aws-sdk-ec2/errors.rb +4 -13
- data/lib/aws-sdk-ec2/image.rb +404 -406
- data/lib/aws-sdk-ec2/instance.rb +1423 -1422
- data/lib/aws-sdk-ec2/internet_gateway.rb +178 -180
- data/lib/aws-sdk-ec2/key_pair.rb +98 -100
- data/lib/aws-sdk-ec2/key_pair_info.rb +102 -104
- data/lib/aws-sdk-ec2/network_acl.rb +326 -328
- data/lib/aws-sdk-ec2/network_interface.rb +428 -430
- data/lib/aws-sdk-ec2/network_interface_association.rb +126 -128
- data/lib/aws-sdk-ec2/placement_group.rb +400 -399
- data/lib/aws-sdk-ec2/resource.rb +2696 -2659
- data/lib/aws-sdk-ec2/route.rb +229 -231
- data/lib/aws-sdk-ec2/route_table.rb +243 -245
- data/lib/aws-sdk-ec2/route_table_association.rb +148 -150
- data/lib/aws-sdk-ec2/security_group.rb +515 -517
- data/lib/aws-sdk-ec2/snapshot.rb +431 -433
- data/lib/aws-sdk-ec2/subnet.rb +981 -977
- data/lib/aws-sdk-ec2/tag.rb +185 -187
- data/lib/aws-sdk-ec2/types.rb +24081 -20965
- data/lib/aws-sdk-ec2/volume.rb +513 -512
- data/lib/aws-sdk-ec2/vpc.rb +1671 -1649
- data/lib/aws-sdk-ec2/vpc_address.rb +189 -191
- data/lib/aws-sdk-ec2/vpc_peering_connection.rb +219 -221
- data/lib/aws-sdk-ec2/waiters.rb +1252 -1210
- metadata +2 -2
@@ -1,204 +1,202 @@
|
|
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
|
-
end
|
8
|
+
module Aws::EC2
|
9
|
+
class InternetGateway
|
10
|
+
|
11
|
+
extend Aws::Deprecations
|
12
|
+
|
13
|
+
# @overload def initialize(id, options = {})
|
14
|
+
# @param [String] id
|
15
|
+
# @option options [Client] :client
|
16
|
+
# @overload def initialize(options = {})
|
17
|
+
# @option options [required, String] :id
|
18
|
+
# @option options [Client] :client
|
19
|
+
def initialize(*args)
|
20
|
+
options = Hash === args.last ? args.pop.dup : {}
|
21
|
+
@id = extract_id(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 id
|
30
|
+
@id
|
31
|
+
end
|
32
|
+
alias :internet_gateway_id :id
|
34
33
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
34
|
+
# Any VPCs attached to the Internet gateway.
|
35
|
+
# @return [Array<Types::InternetGatewayAttachment>]
|
36
|
+
def attachments
|
37
|
+
data.attachments
|
38
|
+
end
|
40
39
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
40
|
+
# Any tags assigned to the Internet gateway.
|
41
|
+
# @return [Array<Types::Tag>]
|
42
|
+
def tags
|
43
|
+
data.tags
|
44
|
+
end
|
46
45
|
|
47
|
-
|
46
|
+
# @!endgroup
|
48
47
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
48
|
+
# @return [Client]
|
49
|
+
def client
|
50
|
+
@client
|
51
|
+
end
|
53
52
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
53
|
+
# Loads, or reloads {#data} for the current {InternetGateway}.
|
54
|
+
# Returns `self` making it possible to chain methods.
|
55
|
+
#
|
56
|
+
# internet_gateway.reload.data
|
57
|
+
#
|
58
|
+
# @return [self]
|
59
|
+
def load
|
60
|
+
resp = @client.describe_internet_gateways(internet_gateway_ids: [@id])
|
61
|
+
@data = resp.internetgateways[0]
|
62
|
+
self
|
63
|
+
end
|
64
|
+
alias :reload :load
|
65
|
+
|
66
|
+
# @return [Types::InternetGateway]
|
67
|
+
# Returns the data for this {InternetGateway}. Calls
|
68
|
+
# {Client#describe_internet_gateways} if {#data_loaded?} is `false`.
|
69
|
+
def data
|
70
|
+
load unless @data
|
71
|
+
@data
|
72
|
+
end
|
74
73
|
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
74
|
+
# @return [Boolean]
|
75
|
+
# Returns `true` if this resource is loaded. Accessing attributes or
|
76
|
+
# {#data} on an unloaded resource will trigger a call to {#load}.
|
77
|
+
def data_loaded?
|
78
|
+
!!@data
|
79
|
+
end
|
81
80
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
81
|
+
# @!group Actions
|
82
|
+
|
83
|
+
# @example Request syntax with placeholder values
|
84
|
+
#
|
85
|
+
# internet_gateway.attach_to_vpc({
|
86
|
+
# dry_run: false,
|
87
|
+
# vpc_id: "String", # required
|
88
|
+
# })
|
89
|
+
# @param [Hash] options ({})
|
90
|
+
# @option options [Boolean] :dry_run
|
91
|
+
# Checks whether you have the required permissions for the action,
|
92
|
+
# without actually making the request, and provides an error response.
|
93
|
+
# If you have the required permissions, the error response is
|
94
|
+
# `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
|
95
|
+
# @option options [required, String] :vpc_id
|
96
|
+
# The ID of the VPC.
|
97
|
+
# @return [EmptyStructure]
|
98
|
+
def attach_to_vpc(options = {})
|
99
|
+
options = options.merge(internet_gateway_id: @id)
|
100
|
+
resp = @client.attach_internet_gateway(options)
|
101
|
+
resp.data
|
102
|
+
end
|
104
103
|
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
end
|
139
|
-
Tag::Collection.new([batch], size: batch.size)
|
104
|
+
# @example Request syntax with placeholder values
|
105
|
+
#
|
106
|
+
# tag = internet_gateway.create_tags({
|
107
|
+
# dry_run: false,
|
108
|
+
# tags: [ # required
|
109
|
+
# {
|
110
|
+
# key: "String",
|
111
|
+
# value: "String",
|
112
|
+
# },
|
113
|
+
# ],
|
114
|
+
# })
|
115
|
+
# @param [Hash] options ({})
|
116
|
+
# @option options [Boolean] :dry_run
|
117
|
+
# Checks whether you have the required permissions for the action,
|
118
|
+
# without actually making the request, and provides an error response.
|
119
|
+
# If you have the required permissions, the error response is
|
120
|
+
# `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
|
121
|
+
# @option options [required, Array<Types::Tag>] :tags
|
122
|
+
# One or more tags. The `value` parameter is required, but if you don't
|
123
|
+
# want the tag to have a value, specify the parameter with no value, and
|
124
|
+
# we set the value to an empty string.
|
125
|
+
# @return [Tag::Collection]
|
126
|
+
def create_tags(options = {})
|
127
|
+
batch = []
|
128
|
+
options = Aws::Util.deep_merge(options, resources: [@id])
|
129
|
+
resp = @client.create_tags(options)
|
130
|
+
options[:tags].each do |t|
|
131
|
+
batch << Tag.new(
|
132
|
+
resource_id: @id,
|
133
|
+
key: t[:key],
|
134
|
+
value: t[:value],
|
135
|
+
client: @client
|
136
|
+
)
|
140
137
|
end
|
138
|
+
Tag::Collection.new([batch], size: batch.size)
|
139
|
+
end
|
141
140
|
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
141
|
+
# @example Request syntax with placeholder values
|
142
|
+
#
|
143
|
+
# internet_gateway.delete({
|
144
|
+
# dry_run: false,
|
145
|
+
# })
|
146
|
+
# @param [Hash] options ({})
|
147
|
+
# @option options [Boolean] :dry_run
|
148
|
+
# Checks whether you have the required permissions for the action,
|
149
|
+
# without actually making the request, and provides an error response.
|
150
|
+
# If you have the required permissions, the error response is
|
151
|
+
# `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
|
152
|
+
# @return [EmptyStructure]
|
153
|
+
def delete(options = {})
|
154
|
+
options = options.merge(internet_gateway_id: @id)
|
155
|
+
resp = @client.delete_internet_gateway(options)
|
156
|
+
resp.data
|
157
|
+
end
|
159
158
|
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
159
|
+
# @example Request syntax with placeholder values
|
160
|
+
#
|
161
|
+
# internet_gateway.detach_from_vpc({
|
162
|
+
# dry_run: false,
|
163
|
+
# vpc_id: "String", # required
|
164
|
+
# })
|
165
|
+
# @param [Hash] options ({})
|
166
|
+
# @option options [Boolean] :dry_run
|
167
|
+
# Checks whether you have the required permissions for the action,
|
168
|
+
# without actually making the request, and provides an error response.
|
169
|
+
# If you have the required permissions, the error response is
|
170
|
+
# `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
|
171
|
+
# @option options [required, String] :vpc_id
|
172
|
+
# The ID of the VPC.
|
173
|
+
# @return [EmptyStructure]
|
174
|
+
def detach_from_vpc(options = {})
|
175
|
+
options = options.merge(internet_gateway_id: @id)
|
176
|
+
resp = @client.detach_internet_gateway(options)
|
177
|
+
resp.data
|
178
|
+
end
|
180
179
|
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
end
|
180
|
+
# @deprecated
|
181
|
+
# @api private
|
182
|
+
def identifiers
|
183
|
+
{ id: @id }
|
184
|
+
end
|
185
|
+
deprecated(:identifiers)
|
186
|
+
|
187
|
+
private
|
188
|
+
|
189
|
+
def extract_id(args, options)
|
190
|
+
value = args[0] || options.delete(:id)
|
191
|
+
case value
|
192
|
+
when String then value
|
193
|
+
when nil then raise ArgumentError, "missing required option :id"
|
194
|
+
else
|
195
|
+
msg = "expected :id to be a String, got #{value.class}"
|
196
|
+
raise ArgumentError, msg
|
199
197
|
end
|
200
|
-
|
201
|
-
class Collection < Aws::Resources::Collection; end
|
202
198
|
end
|
199
|
+
|
200
|
+
class Collection < Aws::Resources::Collection; end
|
203
201
|
end
|
204
202
|
end
|
data/lib/aws-sdk-ec2/key_pair.rb
CHANGED
@@ -1,120 +1,118 @@
|
|
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
|
-
end
|
8
|
+
module Aws::EC2
|
9
|
+
class KeyPair
|
10
|
+
|
11
|
+
extend Aws::Deprecations
|
12
|
+
|
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 :key_name :name
|
34
33
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
34
|
+
# The SHA-1 digest of the DER encoded private key.
|
35
|
+
# @return [String]
|
36
|
+
def key_fingerprint
|
37
|
+
data.key_fingerprint
|
38
|
+
end
|
40
39
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
40
|
+
# An unencrypted PEM encoded RSA private key.
|
41
|
+
# @return [String]
|
42
|
+
def key_material
|
43
|
+
data.key_material
|
44
|
+
end
|
46
45
|
|
47
|
-
|
46
|
+
# @!endgroup
|
48
47
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
48
|
+
# @return [Client]
|
49
|
+
def client
|
50
|
+
@client
|
51
|
+
end
|
53
52
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
53
|
+
# @raise [NotImplementedError]
|
54
|
+
# @api private
|
55
|
+
def load
|
56
|
+
msg = "#load is not implemented, data only available via enumeration"
|
57
|
+
raise NotImplementedError, msg
|
58
|
+
end
|
59
|
+
alias :reload :load
|
60
|
+
|
61
|
+
# @raise [NotImplementedError] Raises when {#data_loaded?} is `false`.
|
62
|
+
# @return [Types::KeyPair]
|
63
|
+
# Returns the data for this {KeyPair}.
|
64
|
+
def data
|
65
|
+
load unless @data
|
66
|
+
@data
|
67
|
+
end
|
69
68
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
69
|
+
# @return [Boolean]
|
70
|
+
# Returns `true` if this resource is loaded. Accessing attributes or
|
71
|
+
# {#data} on an unloaded resource will trigger a call to {#load}.
|
72
|
+
def data_loaded?
|
73
|
+
!!@data
|
74
|
+
end
|
76
75
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
76
|
+
# @!group Actions
|
77
|
+
|
78
|
+
# @example Request syntax with placeholder values
|
79
|
+
#
|
80
|
+
# key_pair.delete({
|
81
|
+
# dry_run: false,
|
82
|
+
# })
|
83
|
+
# @param [Hash] options ({})
|
84
|
+
# @option options [Boolean] :dry_run
|
85
|
+
# Checks whether you have the required permissions for the action,
|
86
|
+
# without actually making the request, and provides an error response.
|
87
|
+
# If you have the required permissions, the error response is
|
88
|
+
# `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
|
89
|
+
# @return [EmptyStructure]
|
90
|
+
def delete(options = {})
|
91
|
+
options = options.merge(key_name: @name)
|
92
|
+
resp = @client.delete_key_pair(options)
|
93
|
+
resp.data
|
94
|
+
end
|
96
95
|
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
end
|
96
|
+
# @deprecated
|
97
|
+
# @api private
|
98
|
+
def identifiers
|
99
|
+
{ name: @name }
|
100
|
+
end
|
101
|
+
deprecated(:identifiers)
|
102
|
+
|
103
|
+
private
|
104
|
+
|
105
|
+
def extract_name(args, options)
|
106
|
+
value = args[0] || options.delete(:name)
|
107
|
+
case value
|
108
|
+
when String then value
|
109
|
+
when nil then raise ArgumentError, "missing required option :name"
|
110
|
+
else
|
111
|
+
msg = "expected :name to be a String, got #{value.class}"
|
112
|
+
raise ArgumentError, msg
|
115
113
|
end
|
116
|
-
|
117
|
-
class Collection < Aws::Resources::Collection; end
|
118
114
|
end
|
115
|
+
|
116
|
+
class Collection < Aws::Resources::Collection; end
|
119
117
|
end
|
120
118
|
end
|