aws-sdk-directconnect 1.54.0 → 1.56.0
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/CHANGELOG.md +13 -1
- data/VERSION +1 -1
- data/lib/aws-sdk-directconnect/client.rb +20 -3
- data/lib/aws-sdk-directconnect/endpoint_parameters.rb +66 -0
- data/lib/aws-sdk-directconnect/endpoint_provider.rb +51 -0
- data/lib/aws-sdk-directconnect/endpoints.rb +897 -0
- data/lib/aws-sdk-directconnect/plugins/endpoints.rb +194 -0
- data/lib/aws-sdk-directconnect/types.rb +0 -849
- data/lib/aws-sdk-directconnect.rb +5 -1
- metadata +8 -4
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
|
4
|
+
#
|
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
|
7
|
+
#
|
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
module Aws::DirectConnect
|
|
12
|
+
module Plugins
|
|
13
|
+
class Endpoints < Seahorse::Client::Plugin
|
|
14
|
+
option(
|
|
15
|
+
:endpoint_provider,
|
|
16
|
+
doc_type: 'Aws::DirectConnect::EndpointProvider',
|
|
17
|
+
docstring: 'The endpoint provider used to resolve endpoints. Any '\
|
|
18
|
+
'object that responds to `#resolve_endpoint(parameters)` '\
|
|
19
|
+
'where `parameters` is a Struct similar to '\
|
|
20
|
+
'`Aws::DirectConnect::EndpointParameters`'
|
|
21
|
+
) do |cfg|
|
|
22
|
+
Aws::DirectConnect::EndpointProvider.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# @api private
|
|
26
|
+
class Handler < Seahorse::Client::Handler
|
|
27
|
+
def call(context)
|
|
28
|
+
# If endpoint was discovered, do not resolve or apply the endpoint.
|
|
29
|
+
unless context[:discovered_endpoint]
|
|
30
|
+
params = parameters_for_operation(context)
|
|
31
|
+
endpoint = context.config.endpoint_provider.resolve_endpoint(params)
|
|
32
|
+
|
|
33
|
+
context.http_request.endpoint = endpoint.url
|
|
34
|
+
apply_endpoint_headers(context, endpoint.headers)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
context[:endpoint_params] = params
|
|
38
|
+
context[:auth_scheme] =
|
|
39
|
+
Aws::Endpoints.resolve_auth_scheme(context, endpoint)
|
|
40
|
+
|
|
41
|
+
@handler.call(context)
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
private
|
|
45
|
+
|
|
46
|
+
def apply_endpoint_headers(context, headers)
|
|
47
|
+
headers.each do |key, values|
|
|
48
|
+
value = values
|
|
49
|
+
.compact
|
|
50
|
+
.map { |s| Seahorse::Util.escape_header_list_string(s.to_s) }
|
|
51
|
+
.join(',')
|
|
52
|
+
|
|
53
|
+
context.http_request.headers[key] = value
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def parameters_for_operation(context)
|
|
58
|
+
case context.operation_name
|
|
59
|
+
when :accept_direct_connect_gateway_association_proposal
|
|
60
|
+
Aws::DirectConnect::Endpoints::AcceptDirectConnectGatewayAssociationProposal.build(context)
|
|
61
|
+
when :allocate_connection_on_interconnect
|
|
62
|
+
Aws::DirectConnect::Endpoints::AllocateConnectionOnInterconnect.build(context)
|
|
63
|
+
when :allocate_hosted_connection
|
|
64
|
+
Aws::DirectConnect::Endpoints::AllocateHostedConnection.build(context)
|
|
65
|
+
when :allocate_private_virtual_interface
|
|
66
|
+
Aws::DirectConnect::Endpoints::AllocatePrivateVirtualInterface.build(context)
|
|
67
|
+
when :allocate_public_virtual_interface
|
|
68
|
+
Aws::DirectConnect::Endpoints::AllocatePublicVirtualInterface.build(context)
|
|
69
|
+
when :allocate_transit_virtual_interface
|
|
70
|
+
Aws::DirectConnect::Endpoints::AllocateTransitVirtualInterface.build(context)
|
|
71
|
+
when :associate_connection_with_lag
|
|
72
|
+
Aws::DirectConnect::Endpoints::AssociateConnectionWithLag.build(context)
|
|
73
|
+
when :associate_hosted_connection
|
|
74
|
+
Aws::DirectConnect::Endpoints::AssociateHostedConnection.build(context)
|
|
75
|
+
when :associate_mac_sec_key
|
|
76
|
+
Aws::DirectConnect::Endpoints::AssociateMacSecKey.build(context)
|
|
77
|
+
when :associate_virtual_interface
|
|
78
|
+
Aws::DirectConnect::Endpoints::AssociateVirtualInterface.build(context)
|
|
79
|
+
when :confirm_connection
|
|
80
|
+
Aws::DirectConnect::Endpoints::ConfirmConnection.build(context)
|
|
81
|
+
when :confirm_customer_agreement
|
|
82
|
+
Aws::DirectConnect::Endpoints::ConfirmCustomerAgreement.build(context)
|
|
83
|
+
when :confirm_private_virtual_interface
|
|
84
|
+
Aws::DirectConnect::Endpoints::ConfirmPrivateVirtualInterface.build(context)
|
|
85
|
+
when :confirm_public_virtual_interface
|
|
86
|
+
Aws::DirectConnect::Endpoints::ConfirmPublicVirtualInterface.build(context)
|
|
87
|
+
when :confirm_transit_virtual_interface
|
|
88
|
+
Aws::DirectConnect::Endpoints::ConfirmTransitVirtualInterface.build(context)
|
|
89
|
+
when :create_bgp_peer
|
|
90
|
+
Aws::DirectConnect::Endpoints::CreateBGPPeer.build(context)
|
|
91
|
+
when :create_connection
|
|
92
|
+
Aws::DirectConnect::Endpoints::CreateConnection.build(context)
|
|
93
|
+
when :create_direct_connect_gateway
|
|
94
|
+
Aws::DirectConnect::Endpoints::CreateDirectConnectGateway.build(context)
|
|
95
|
+
when :create_direct_connect_gateway_association
|
|
96
|
+
Aws::DirectConnect::Endpoints::CreateDirectConnectGatewayAssociation.build(context)
|
|
97
|
+
when :create_direct_connect_gateway_association_proposal
|
|
98
|
+
Aws::DirectConnect::Endpoints::CreateDirectConnectGatewayAssociationProposal.build(context)
|
|
99
|
+
when :create_interconnect
|
|
100
|
+
Aws::DirectConnect::Endpoints::CreateInterconnect.build(context)
|
|
101
|
+
when :create_lag
|
|
102
|
+
Aws::DirectConnect::Endpoints::CreateLag.build(context)
|
|
103
|
+
when :create_private_virtual_interface
|
|
104
|
+
Aws::DirectConnect::Endpoints::CreatePrivateVirtualInterface.build(context)
|
|
105
|
+
when :create_public_virtual_interface
|
|
106
|
+
Aws::DirectConnect::Endpoints::CreatePublicVirtualInterface.build(context)
|
|
107
|
+
when :create_transit_virtual_interface
|
|
108
|
+
Aws::DirectConnect::Endpoints::CreateTransitVirtualInterface.build(context)
|
|
109
|
+
when :delete_bgp_peer
|
|
110
|
+
Aws::DirectConnect::Endpoints::DeleteBGPPeer.build(context)
|
|
111
|
+
when :delete_connection
|
|
112
|
+
Aws::DirectConnect::Endpoints::DeleteConnection.build(context)
|
|
113
|
+
when :delete_direct_connect_gateway
|
|
114
|
+
Aws::DirectConnect::Endpoints::DeleteDirectConnectGateway.build(context)
|
|
115
|
+
when :delete_direct_connect_gateway_association
|
|
116
|
+
Aws::DirectConnect::Endpoints::DeleteDirectConnectGatewayAssociation.build(context)
|
|
117
|
+
when :delete_direct_connect_gateway_association_proposal
|
|
118
|
+
Aws::DirectConnect::Endpoints::DeleteDirectConnectGatewayAssociationProposal.build(context)
|
|
119
|
+
when :delete_interconnect
|
|
120
|
+
Aws::DirectConnect::Endpoints::DeleteInterconnect.build(context)
|
|
121
|
+
when :delete_lag
|
|
122
|
+
Aws::DirectConnect::Endpoints::DeleteLag.build(context)
|
|
123
|
+
when :delete_virtual_interface
|
|
124
|
+
Aws::DirectConnect::Endpoints::DeleteVirtualInterface.build(context)
|
|
125
|
+
when :describe_connection_loa
|
|
126
|
+
Aws::DirectConnect::Endpoints::DescribeConnectionLoa.build(context)
|
|
127
|
+
when :describe_connections
|
|
128
|
+
Aws::DirectConnect::Endpoints::DescribeConnections.build(context)
|
|
129
|
+
when :describe_connections_on_interconnect
|
|
130
|
+
Aws::DirectConnect::Endpoints::DescribeConnectionsOnInterconnect.build(context)
|
|
131
|
+
when :describe_customer_metadata
|
|
132
|
+
Aws::DirectConnect::Endpoints::DescribeCustomerMetadata.build(context)
|
|
133
|
+
when :describe_direct_connect_gateway_association_proposals
|
|
134
|
+
Aws::DirectConnect::Endpoints::DescribeDirectConnectGatewayAssociationProposals.build(context)
|
|
135
|
+
when :describe_direct_connect_gateway_associations
|
|
136
|
+
Aws::DirectConnect::Endpoints::DescribeDirectConnectGatewayAssociations.build(context)
|
|
137
|
+
when :describe_direct_connect_gateway_attachments
|
|
138
|
+
Aws::DirectConnect::Endpoints::DescribeDirectConnectGatewayAttachments.build(context)
|
|
139
|
+
when :describe_direct_connect_gateways
|
|
140
|
+
Aws::DirectConnect::Endpoints::DescribeDirectConnectGateways.build(context)
|
|
141
|
+
when :describe_hosted_connections
|
|
142
|
+
Aws::DirectConnect::Endpoints::DescribeHostedConnections.build(context)
|
|
143
|
+
when :describe_interconnect_loa
|
|
144
|
+
Aws::DirectConnect::Endpoints::DescribeInterconnectLoa.build(context)
|
|
145
|
+
when :describe_interconnects
|
|
146
|
+
Aws::DirectConnect::Endpoints::DescribeInterconnects.build(context)
|
|
147
|
+
when :describe_lags
|
|
148
|
+
Aws::DirectConnect::Endpoints::DescribeLags.build(context)
|
|
149
|
+
when :describe_loa
|
|
150
|
+
Aws::DirectConnect::Endpoints::DescribeLoa.build(context)
|
|
151
|
+
when :describe_locations
|
|
152
|
+
Aws::DirectConnect::Endpoints::DescribeLocations.build(context)
|
|
153
|
+
when :describe_router_configuration
|
|
154
|
+
Aws::DirectConnect::Endpoints::DescribeRouterConfiguration.build(context)
|
|
155
|
+
when :describe_tags
|
|
156
|
+
Aws::DirectConnect::Endpoints::DescribeTags.build(context)
|
|
157
|
+
when :describe_virtual_gateways
|
|
158
|
+
Aws::DirectConnect::Endpoints::DescribeVirtualGateways.build(context)
|
|
159
|
+
when :describe_virtual_interfaces
|
|
160
|
+
Aws::DirectConnect::Endpoints::DescribeVirtualInterfaces.build(context)
|
|
161
|
+
when :disassociate_connection_from_lag
|
|
162
|
+
Aws::DirectConnect::Endpoints::DisassociateConnectionFromLag.build(context)
|
|
163
|
+
when :disassociate_mac_sec_key
|
|
164
|
+
Aws::DirectConnect::Endpoints::DisassociateMacSecKey.build(context)
|
|
165
|
+
when :list_virtual_interface_test_history
|
|
166
|
+
Aws::DirectConnect::Endpoints::ListVirtualInterfaceTestHistory.build(context)
|
|
167
|
+
when :start_bgp_failover_test
|
|
168
|
+
Aws::DirectConnect::Endpoints::StartBgpFailoverTest.build(context)
|
|
169
|
+
when :stop_bgp_failover_test
|
|
170
|
+
Aws::DirectConnect::Endpoints::StopBgpFailoverTest.build(context)
|
|
171
|
+
when :tag_resource
|
|
172
|
+
Aws::DirectConnect::Endpoints::TagResource.build(context)
|
|
173
|
+
when :untag_resource
|
|
174
|
+
Aws::DirectConnect::Endpoints::UntagResource.build(context)
|
|
175
|
+
when :update_connection
|
|
176
|
+
Aws::DirectConnect::Endpoints::UpdateConnection.build(context)
|
|
177
|
+
when :update_direct_connect_gateway
|
|
178
|
+
Aws::DirectConnect::Endpoints::UpdateDirectConnectGateway.build(context)
|
|
179
|
+
when :update_direct_connect_gateway_association
|
|
180
|
+
Aws::DirectConnect::Endpoints::UpdateDirectConnectGatewayAssociation.build(context)
|
|
181
|
+
when :update_lag
|
|
182
|
+
Aws::DirectConnect::Endpoints::UpdateLag.build(context)
|
|
183
|
+
when :update_virtual_interface_attributes
|
|
184
|
+
Aws::DirectConnect::Endpoints::UpdateVirtualInterfaceAttributes.build(context)
|
|
185
|
+
end
|
|
186
|
+
end
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
def add_handlers(handlers, _config)
|
|
190
|
+
handlers.add(Handler, step: :build, priority: 75)
|
|
191
|
+
end
|
|
192
|
+
end
|
|
193
|
+
end
|
|
194
|
+
end
|