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,219 +1,217 @@
|
|
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 VpcAddress
|
10
|
+
|
11
|
+
extend Aws::Deprecations
|
12
|
+
|
13
|
+
# @overload def initialize(allocation_id, options = {})
|
14
|
+
# @param [String] allocation_id
|
15
|
+
# @option options [Client] :client
|
16
|
+
# @overload def initialize(options = {})
|
17
|
+
# @option options [required, String] :allocation_id
|
18
|
+
# @option options [Client] :client
|
19
|
+
def initialize(*args)
|
20
|
+
options = Hash === args.last ? args.pop.dup : {}
|
21
|
+
@allocation_id = extract_allocation_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
|
-
|
28
|
+
# @return [String]
|
29
|
+
def allocation_id
|
30
|
+
@allocation_id
|
31
|
+
end
|
33
32
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
33
|
+
# The ID of the instance that the address is associated with (if any).
|
34
|
+
# @return [String]
|
35
|
+
def instance_id
|
36
|
+
data.instance_id
|
37
|
+
end
|
39
38
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
39
|
+
# The Elastic IP address.
|
40
|
+
# @return [String]
|
41
|
+
def public_ip
|
42
|
+
data.public_ip
|
43
|
+
end
|
45
44
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
45
|
+
# The ID representing the association of the address with an instance in
|
46
|
+
# a VPC.
|
47
|
+
# @return [String]
|
48
|
+
def association_id
|
49
|
+
data.association_id
|
50
|
+
end
|
52
51
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
52
|
+
# Indicates whether this Elastic IP address is for use with instances in
|
53
|
+
# EC2-Classic (`standard`) or instances in a VPC (`vpc`).
|
54
|
+
# @return [String]
|
55
|
+
def domain
|
56
|
+
data.domain
|
57
|
+
end
|
59
58
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
59
|
+
# The ID of the network interface.
|
60
|
+
# @return [String]
|
61
|
+
def network_interface_id
|
62
|
+
data.network_interface_id
|
63
|
+
end
|
65
64
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
65
|
+
# The ID of the AWS account that owns the network interface.
|
66
|
+
# @return [String]
|
67
|
+
def network_interface_owner_id
|
68
|
+
data.network_interface_owner_id
|
69
|
+
end
|
71
70
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
71
|
+
# The private IP address associated with the Elastic IP address.
|
72
|
+
# @return [String]
|
73
|
+
def private_ip_address
|
74
|
+
data.private_ip_address
|
75
|
+
end
|
77
76
|
|
78
|
-
|
77
|
+
# @!endgroup
|
79
78
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
79
|
+
# @return [Client]
|
80
|
+
def client
|
81
|
+
@client
|
82
|
+
end
|
84
83
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
84
|
+
# Loads, or reloads {#data} for the current {VpcAddress}.
|
85
|
+
# Returns `self` making it possible to chain methods.
|
86
|
+
#
|
87
|
+
# vpc_address.reload.data
|
88
|
+
#
|
89
|
+
# @return [self]
|
90
|
+
def load
|
91
|
+
resp = @client.describe_addresses(allocation_ids: [@allocation_id])
|
92
|
+
@data = resp.addresses[0]
|
93
|
+
self
|
94
|
+
end
|
95
|
+
alias :reload :load
|
96
|
+
|
97
|
+
# @return [Types::Address]
|
98
|
+
# Returns the data for this {VpcAddress}. Calls
|
99
|
+
# {Client#describe_addresses} if {#data_loaded?} is `false`.
|
100
|
+
def data
|
101
|
+
load unless @data
|
102
|
+
@data
|
103
|
+
end
|
105
104
|
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
105
|
+
# @return [Boolean]
|
106
|
+
# Returns `true` if this resource is loaded. Accessing attributes or
|
107
|
+
# {#data} on an unloaded resource will trigger a call to {#load}.
|
108
|
+
def data_loaded?
|
109
|
+
!!@data
|
110
|
+
end
|
112
111
|
|
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
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
112
|
+
# @!group Actions
|
113
|
+
|
114
|
+
# @example Request syntax with placeholder values
|
115
|
+
#
|
116
|
+
# vpc_address.associate({
|
117
|
+
# dry_run: false,
|
118
|
+
# instance_id: "String",
|
119
|
+
# public_ip: "String",
|
120
|
+
# network_interface_id: "String",
|
121
|
+
# private_ip_address: "String",
|
122
|
+
# allow_reassociation: false,
|
123
|
+
# })
|
124
|
+
# @param [Hash] options ({})
|
125
|
+
# @option options [Boolean] :dry_run
|
126
|
+
# Checks whether you have the required permissions for the action,
|
127
|
+
# without actually making the request, and provides an error response.
|
128
|
+
# If you have the required permissions, the error response is
|
129
|
+
# `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
|
130
|
+
# @option options [String] :instance_id
|
131
|
+
# The ID of the instance. This is required for EC2-Classic. For EC2-VPC,
|
132
|
+
# you can specify either the instance ID or the network interface ID,
|
133
|
+
# but not both. The operation fails if you specify an instance ID unless
|
134
|
+
# exactly one network interface is attached.
|
135
|
+
# @option options [String] :public_ip
|
136
|
+
# The Elastic IP address. This is required for EC2-Classic.
|
137
|
+
# @option options [String] :network_interface_id
|
138
|
+
# \[EC2-VPC\] The ID of the network interface. If the instance has more
|
139
|
+
# than one network interface, you must specify a network interface ID.
|
140
|
+
# @option options [String] :private_ip_address
|
141
|
+
# \[EC2-VPC\] The primary or secondary private IP address to associate
|
142
|
+
# with the Elastic IP address. If no private IP address is specified,
|
143
|
+
# the Elastic IP address is associated with the primary private IP
|
144
|
+
# address.
|
145
|
+
# @option options [Boolean] :allow_reassociation
|
146
|
+
# \[EC2-VPC\] For a VPC in an EC2-Classic account, specify true to allow
|
147
|
+
# an Elastic IP address that is already associated with an instance or
|
148
|
+
# network interface to be reassociated with the specified instance or
|
149
|
+
# network interface. Otherwise, the operation fails. In a VPC in an
|
150
|
+
# EC2-VPC-only account, reassociation is automatic, therefore you can
|
151
|
+
# specify false to ensure the operation fails if the Elastic IP address
|
152
|
+
# is already associated with another resource.
|
153
|
+
# @return [Types::AssociateAddressResult]
|
154
|
+
def associate(options = {})
|
155
|
+
options = options.merge(allocation_id: @allocation_id)
|
156
|
+
resp = @client.associate_address(options)
|
157
|
+
resp.data
|
158
|
+
end
|
160
159
|
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
160
|
+
# @example Request syntax with placeholder values
|
161
|
+
#
|
162
|
+
# vpc_address.release({
|
163
|
+
# dry_run: false,
|
164
|
+
# public_ip: "String",
|
165
|
+
# })
|
166
|
+
# @param [Hash] options ({})
|
167
|
+
# @option options [Boolean] :dry_run
|
168
|
+
# Checks whether you have the required permissions for the action,
|
169
|
+
# without actually making the request, and provides an error response.
|
170
|
+
# If you have the required permissions, the error response is
|
171
|
+
# `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
|
172
|
+
# @option options [String] :public_ip
|
173
|
+
# \[EC2-Classic\] The Elastic IP address. Required for EC2-Classic.
|
174
|
+
# @return [EmptyStructure]
|
175
|
+
def release(options = {})
|
176
|
+
options = options.merge(allocation_id: data.allocation_id)
|
177
|
+
resp = @client.release_address(options)
|
178
|
+
resp.data
|
179
|
+
end
|
181
180
|
|
182
|
-
|
183
|
-
|
184
|
-
# @return [NetworkInterfaceAssociation, nil]
|
185
|
-
def association
|
186
|
-
if data.association_id
|
187
|
-
NetworkInterfaceAssociation.new(
|
188
|
-
id: data.association_id,
|
189
|
-
client: @client
|
190
|
-
)
|
191
|
-
else
|
192
|
-
nil
|
193
|
-
end
|
194
|
-
end
|
181
|
+
# @!group Associations
|
195
182
|
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
def extract_allocation_id(args, options)
|
206
|
-
value = args[0] || options.delete(:allocation_id)
|
207
|
-
case value
|
208
|
-
when String then value
|
209
|
-
when nil then raise ArgumentError, "missing required option :allocation_id"
|
210
|
-
else
|
211
|
-
msg = "expected :allocation_id to be a String, got #{value.class}"
|
212
|
-
raise ArgumentError, msg
|
213
|
-
end
|
183
|
+
# @return [NetworkInterfaceAssociation, nil]
|
184
|
+
def association
|
185
|
+
if data.association_id
|
186
|
+
NetworkInterfaceAssociation.new(
|
187
|
+
id: data.association_id,
|
188
|
+
client: @client
|
189
|
+
)
|
190
|
+
else
|
191
|
+
nil
|
214
192
|
end
|
193
|
+
end
|
215
194
|
|
216
|
-
|
195
|
+
# @deprecated
|
196
|
+
# @api private
|
197
|
+
def identifiers
|
198
|
+
{ allocation_id: @allocation_id }
|
217
199
|
end
|
200
|
+
deprecated(:identifiers)
|
201
|
+
|
202
|
+
private
|
203
|
+
|
204
|
+
def extract_allocation_id(args, options)
|
205
|
+
value = args[0] || options.delete(:allocation_id)
|
206
|
+
case value
|
207
|
+
when String then value
|
208
|
+
when nil then raise ArgumentError, "missing required option :allocation_id"
|
209
|
+
else
|
210
|
+
msg = "expected :allocation_id to be a String, got #{value.class}"
|
211
|
+
raise ArgumentError, msg
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
215
|
+
class Collection < Aws::Resources::Collection; end
|
218
216
|
end
|
219
217
|
end
|
@@ -1,265 +1,263 @@
|
|
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 VpcPeeringConnection
|
8
|
+
module Aws::EC2
|
9
|
+
class VpcPeeringConnection
|
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(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 :vpc_peering_connection_id :id
|
34
33
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
34
|
+
# Information about the accepter VPC. CIDR block information is not
|
35
|
+
# returned when creating a VPC peering connection, or when describing a
|
36
|
+
# VPC peering connection that's in the `initiating-request` or
|
37
|
+
# `pending-acceptance` state.
|
38
|
+
# @return [Types::VpcPeeringConnectionVpcInfo]
|
39
|
+
def accepter_vpc_info
|
40
|
+
data.accepter_vpc_info
|
41
|
+
end
|
43
42
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
43
|
+
# The time that an unaccepted VPC peering connection will expire.
|
44
|
+
# @return [Time]
|
45
|
+
def expiration_time
|
46
|
+
data.expiration_time
|
47
|
+
end
|
49
48
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
49
|
+
# Information about the requester VPC.
|
50
|
+
# @return [Types::VpcPeeringConnectionVpcInfo]
|
51
|
+
def requester_vpc_info
|
52
|
+
data.requester_vpc_info
|
53
|
+
end
|
55
54
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
55
|
+
# The status of the VPC peering connection.
|
56
|
+
# @return [Types::VpcPeeringConnectionStateReason]
|
57
|
+
def status
|
58
|
+
data.status
|
59
|
+
end
|
61
60
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
61
|
+
# Any tags assigned to the resource.
|
62
|
+
# @return [Array<Types::Tag>]
|
63
|
+
def tags
|
64
|
+
data.tags
|
65
|
+
end
|
67
66
|
|
68
|
-
|
67
|
+
# @!endgroup
|
69
68
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
69
|
+
# @return [Client]
|
70
|
+
def client
|
71
|
+
@client
|
72
|
+
end
|
74
73
|
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
74
|
+
# Loads, or reloads {#data} for the current {VpcPeeringConnection}.
|
75
|
+
# Returns `self` making it possible to chain methods.
|
76
|
+
#
|
77
|
+
# vpc_peering_connection.reload.data
|
78
|
+
#
|
79
|
+
# @return [self]
|
80
|
+
def load
|
81
|
+
resp = @client.describe_vpc_peering_connections(vpc_peering_connection_ids: [@id])
|
82
|
+
@data = resp.vpcpeeringconnections[0]
|
83
|
+
self
|
84
|
+
end
|
85
|
+
alias :reload :load
|
87
86
|
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
87
|
+
# @return [Types::VpcPeeringConnection]
|
88
|
+
# Returns the data for this {VpcPeeringConnection}. Calls
|
89
|
+
# {Client#describe_vpc_peering_connections} if {#data_loaded?} is `false`.
|
90
|
+
def data
|
91
|
+
load unless @data
|
92
|
+
@data
|
93
|
+
end
|
95
94
|
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
95
|
+
# @return [Boolean]
|
96
|
+
# Returns `true` if this resource is loaded. Accessing attributes or
|
97
|
+
# {#data} on an unloaded resource will trigger a call to {#load}.
|
98
|
+
def data_loaded?
|
99
|
+
!!@data
|
100
|
+
end
|
102
101
|
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
end
|
102
|
+
# @param [Hash] options ({})
|
103
|
+
# @return [Boolean]
|
104
|
+
# Returns `true` if the VpcPeeringConnection exists.
|
105
|
+
def exists?(options = {})
|
106
|
+
begin
|
107
|
+
wait_until_exists(options.merge(max_attempts: 1))
|
108
|
+
true
|
109
|
+
rescue Aws::Waiters::Errors::UnexpectedError => e
|
110
|
+
raise e.error
|
111
|
+
rescue Aws::Waiters::Errors::WaiterFailed
|
112
|
+
false
|
115
113
|
end
|
114
|
+
end
|
116
115
|
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
116
|
+
# @param [Hash] options ({})
|
117
|
+
# @option options [Integer] :max_attempts (40)
|
118
|
+
# @option options [Float] :delay (15)
|
119
|
+
# @option options [Proc] :before_attempt
|
120
|
+
# @option options [Proc] :before_wait
|
121
|
+
# @return [VpcPeeringConnection]
|
122
|
+
def wait_until_exists(options = {})
|
123
|
+
options, params = separate_params_and_options(options)
|
124
|
+
waiter = Waiters::VpcPeeringConnectionExists.new(options)
|
125
|
+
yield_waiter_and_warn(waiter, &Proc.new) if block_given?
|
126
|
+
resp = waiter.wait(params.merge(vpc_peering_connection_ids: [@id]))
|
127
|
+
VpcPeeringConnection.new({
|
128
|
+
id: @id,
|
129
|
+
data: resp.data.vpc_peering_connections[0],
|
130
|
+
client: @client
|
131
|
+
})
|
132
|
+
end
|
134
133
|
|
135
|
-
|
134
|
+
# @!group Actions
|
136
135
|
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
136
|
+
# @example Request syntax with placeholder values
|
137
|
+
#
|
138
|
+
# vpc_peering_connection.accept({
|
139
|
+
# dry_run: false,
|
140
|
+
# })
|
141
|
+
# @param [Hash] options ({})
|
142
|
+
# @option options [Boolean] :dry_run
|
143
|
+
# Checks whether you have the required permissions for the action,
|
144
|
+
# without actually making the request, and provides an error response.
|
145
|
+
# If you have the required permissions, the error response is
|
146
|
+
# `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
|
147
|
+
# @return [Types::AcceptVpcPeeringConnectionResult]
|
148
|
+
def accept(options = {})
|
149
|
+
options = options.merge(vpc_peering_connection_id: @id)
|
150
|
+
resp = @client.accept_vpc_peering_connection(options)
|
151
|
+
resp.data
|
152
|
+
end
|
154
153
|
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
154
|
+
# @example Request syntax with placeholder values
|
155
|
+
#
|
156
|
+
# vpc_peering_connection.delete({
|
157
|
+
# dry_run: false,
|
158
|
+
# })
|
159
|
+
# @param [Hash] options ({})
|
160
|
+
# @option options [Boolean] :dry_run
|
161
|
+
# Checks whether you have the required permissions for the action,
|
162
|
+
# without actually making the request, and provides an error response.
|
163
|
+
# If you have the required permissions, the error response is
|
164
|
+
# `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
|
165
|
+
# @return [Types::DeleteVpcPeeringConnectionResult]
|
166
|
+
def delete(options = {})
|
167
|
+
options = options.merge(vpc_peering_connection_id: @id)
|
168
|
+
resp = @client.delete_vpc_peering_connection(options)
|
169
|
+
resp.data
|
170
|
+
end
|
172
171
|
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
172
|
+
# @example Request syntax with placeholder values
|
173
|
+
#
|
174
|
+
# vpc_peering_connection.reject({
|
175
|
+
# dry_run: false,
|
176
|
+
# })
|
177
|
+
# @param [Hash] options ({})
|
178
|
+
# @option options [Boolean] :dry_run
|
179
|
+
# Checks whether you have the required permissions for the action,
|
180
|
+
# without actually making the request, and provides an error response.
|
181
|
+
# If you have the required permissions, the error response is
|
182
|
+
# `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
|
183
|
+
# @return [Types::RejectVpcPeeringConnectionResult]
|
184
|
+
def reject(options = {})
|
185
|
+
options = options.merge(vpc_peering_connection_id: @id)
|
186
|
+
resp = @client.reject_vpc_peering_connection(options)
|
187
|
+
resp.data
|
188
|
+
end
|
190
189
|
|
191
|
-
|
190
|
+
# @!group Associations
|
192
191
|
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
end
|
192
|
+
# @return [Vpc, nil]
|
193
|
+
def accepter_vpc
|
194
|
+
if data.accepter_vpc_info.vpc_id
|
195
|
+
Vpc.new(
|
196
|
+
id: data.accepter_vpc_info.vpc_id,
|
197
|
+
client: @client
|
198
|
+
)
|
199
|
+
else
|
200
|
+
nil
|
203
201
|
end
|
202
|
+
end
|
204
203
|
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
end
|
204
|
+
# @return [Vpc, nil]
|
205
|
+
def requester_vpc
|
206
|
+
if data.requester_vpc_info.vpc_id
|
207
|
+
Vpc.new(
|
208
|
+
id: data.requester_vpc_info.vpc_id,
|
209
|
+
client: @client
|
210
|
+
)
|
211
|
+
else
|
212
|
+
nil
|
215
213
|
end
|
214
|
+
end
|
216
215
|
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
216
|
+
# @deprecated
|
217
|
+
# @api private
|
218
|
+
def identifiers
|
219
|
+
{ id: @id }
|
220
|
+
end
|
221
|
+
deprecated(:identifiers)
|
223
222
|
|
224
|
-
|
223
|
+
private
|
225
224
|
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
end
|
225
|
+
def extract_id(args, options)
|
226
|
+
value = args[0] || options.delete(:id)
|
227
|
+
case value
|
228
|
+
when String then value
|
229
|
+
when nil then raise ArgumentError, "missing required option :id"
|
230
|
+
else
|
231
|
+
msg = "expected :id to be a String, got #{value.class}"
|
232
|
+
raise ArgumentError, msg
|
235
233
|
end
|
234
|
+
end
|
236
235
|
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
end
|
244
|
-
yield(waiter.waiter)
|
236
|
+
def yield_waiter_and_warn(waiter, &block)
|
237
|
+
if !@waiter_block_warned
|
238
|
+
msg = "pass options to configure the waiter; "
|
239
|
+
msg << "yielding the waiter is deprecated"
|
240
|
+
warn(msg)
|
241
|
+
@waiter_block_warned = true
|
245
242
|
end
|
243
|
+
yield(waiter.waiter)
|
244
|
+
end
|
246
245
|
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
end
|
246
|
+
def separate_params_and_options(options)
|
247
|
+
opts = Set.new([:client, :max_attempts, :delay, :before_attempt, :before_wait])
|
248
|
+
waiter_opts = {}
|
249
|
+
waiter_params = {}
|
250
|
+
options.each_pair do |key, value|
|
251
|
+
if opts.include?(key)
|
252
|
+
waiter_opts[key] = value
|
253
|
+
else
|
254
|
+
waiter_params[key] = value
|
257
255
|
end
|
258
|
-
waiter_opts[:client] ||= @client
|
259
|
-
[waiter_opts, waiter_params]
|
260
256
|
end
|
261
|
-
|
262
|
-
|
257
|
+
waiter_opts[:client] ||= @client
|
258
|
+
[waiter_opts, waiter_params]
|
263
259
|
end
|
260
|
+
|
261
|
+
class Collection < Aws::Resources::Collection; end
|
264
262
|
end
|
265
263
|
end
|