aws-sdk-ec2instanceconnect 1.0.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ed51da99ab33525ada8af175933f5e63eb206dc4
4
+ data.tar.gz: df6345b92514903a7f04bc1dc7c159b4e3348a2d
5
+ SHA512:
6
+ metadata.gz: d601a351d6a8b94b692a6571acd1004542fc68755800b78ed4c66f8e0c885d39375530ed317d10149f65c41828dbc3db79058e31b666279270ac93d7e8e94775
7
+ data.tar.gz: 44d446fac01f57e07d8c3553d5d47d49c59e90b66784b623c8f10fe1b91bb9999a99a6a1b90563a7780fcd852809532f1986c49d0f55620b66fb3e4aaf2b0730
@@ -0,0 +1,47 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'aws-sdk-core'
9
+ require 'aws-sigv4'
10
+
11
+ require_relative 'aws-sdk-ec2instanceconnect/types'
12
+ require_relative 'aws-sdk-ec2instanceconnect/client_api'
13
+ require_relative 'aws-sdk-ec2instanceconnect/client'
14
+ require_relative 'aws-sdk-ec2instanceconnect/errors'
15
+ require_relative 'aws-sdk-ec2instanceconnect/resource'
16
+ require_relative 'aws-sdk-ec2instanceconnect/customizations'
17
+
18
+ # This module provides support for AWS EC2 Instance Connect. This module is available in the
19
+ # `aws-sdk-ec2instanceconnect` gem.
20
+ #
21
+ # # Client
22
+ #
23
+ # The {Client} class provides one method for each API operation. Operation
24
+ # methods each accept a hash of request parameters and return a response
25
+ # structure.
26
+ #
27
+ # See {Client} for more information.
28
+ #
29
+ # # Errors
30
+ #
31
+ # Errors returned from AWS EC2 Instance Connect all
32
+ # extend {Errors::ServiceError}.
33
+ #
34
+ # begin
35
+ # # do stuff
36
+ # rescue Aws::EC2InstanceConnect::Errors::ServiceError
37
+ # # rescues all service API errors
38
+ # end
39
+ #
40
+ # See {Errors} for more information.
41
+ #
42
+ # @service
43
+ module Aws::EC2InstanceConnect
44
+
45
+ GEM_VERSION = '1.0.0'
46
+
47
+ end
@@ -0,0 +1,366 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'seahorse/client/plugins/content_length.rb'
9
+ require 'aws-sdk-core/plugins/credentials_configuration.rb'
10
+ require 'aws-sdk-core/plugins/logging.rb'
11
+ require 'aws-sdk-core/plugins/param_converter.rb'
12
+ require 'aws-sdk-core/plugins/param_validator.rb'
13
+ require 'aws-sdk-core/plugins/user_agent.rb'
14
+ require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
15
+ require 'aws-sdk-core/plugins/retry_errors.rb'
16
+ require 'aws-sdk-core/plugins/global_configuration.rb'
17
+ require 'aws-sdk-core/plugins/regional_endpoint.rb'
18
+ require 'aws-sdk-core/plugins/endpoint_discovery.rb'
19
+ require 'aws-sdk-core/plugins/endpoint_pattern.rb'
20
+ require 'aws-sdk-core/plugins/response_paging.rb'
21
+ require 'aws-sdk-core/plugins/stub_responses.rb'
22
+ require 'aws-sdk-core/plugins/idempotency_token.rb'
23
+ require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
24
+ require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
25
+ require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
26
+ require 'aws-sdk-core/plugins/transfer_encoding.rb'
27
+ require 'aws-sdk-core/plugins/signature_v4.rb'
28
+ require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
29
+
30
+ Aws::Plugins::GlobalConfiguration.add_identifier(:ec2instanceconnect)
31
+
32
+ module Aws::EC2InstanceConnect
33
+ class Client < Seahorse::Client::Base
34
+
35
+ include Aws::ClientStubs
36
+
37
+ @identifier = :ec2instanceconnect
38
+
39
+ set_api(ClientApi::API)
40
+
41
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
42
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
43
+ add_plugin(Aws::Plugins::Logging)
44
+ add_plugin(Aws::Plugins::ParamConverter)
45
+ add_plugin(Aws::Plugins::ParamValidator)
46
+ add_plugin(Aws::Plugins::UserAgent)
47
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
48
+ add_plugin(Aws::Plugins::RetryErrors)
49
+ add_plugin(Aws::Plugins::GlobalConfiguration)
50
+ add_plugin(Aws::Plugins::RegionalEndpoint)
51
+ add_plugin(Aws::Plugins::EndpointDiscovery)
52
+ add_plugin(Aws::Plugins::EndpointPattern)
53
+ add_plugin(Aws::Plugins::ResponsePaging)
54
+ add_plugin(Aws::Plugins::StubResponses)
55
+ add_plugin(Aws::Plugins::IdempotencyToken)
56
+ add_plugin(Aws::Plugins::JsonvalueConverter)
57
+ add_plugin(Aws::Plugins::ClientMetricsPlugin)
58
+ add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
59
+ add_plugin(Aws::Plugins::TransferEncoding)
60
+ add_plugin(Aws::Plugins::SignatureV4)
61
+ add_plugin(Aws::Plugins::Protocols::JsonRpc)
62
+
63
+ # @overload initialize(options)
64
+ # @param [Hash] options
65
+ # @option options [required, Aws::CredentialProvider] :credentials
66
+ # Your AWS credentials. This can be an instance of any one of the
67
+ # following classes:
68
+ #
69
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
70
+ # credentials.
71
+ #
72
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
73
+ # from an EC2 IMDS on an EC2 instance.
74
+ #
75
+ # * `Aws::SharedCredentials` - Used for loading credentials from a
76
+ # shared file, such as `~/.aws/config`.
77
+ #
78
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
79
+ #
80
+ # When `:credentials` are not configured directly, the following
81
+ # locations will be searched for credentials:
82
+ #
83
+ # * `Aws.config[:credentials]`
84
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
85
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
86
+ # * `~/.aws/credentials`
87
+ # * `~/.aws/config`
88
+ # * EC2 IMDS instance profile - When used by default, the timeouts are
89
+ # very aggressive. Construct and pass an instance of
90
+ # `Aws::InstanceProfileCredentails` to enable retries and extended
91
+ # timeouts.
92
+ #
93
+ # @option options [required, String] :region
94
+ # The AWS region to connect to. The configured `:region` is
95
+ # used to determine the service `:endpoint`. When not passed,
96
+ # a default `:region` is search for in the following locations:
97
+ #
98
+ # * `Aws.config[:region]`
99
+ # * `ENV['AWS_REGION']`
100
+ # * `ENV['AMAZON_REGION']`
101
+ # * `ENV['AWS_DEFAULT_REGION']`
102
+ # * `~/.aws/credentials`
103
+ # * `~/.aws/config`
104
+ #
105
+ # @option options [String] :access_key_id
106
+ #
107
+ # @option options [Boolean] :active_endpoint_cache (false)
108
+ # When set to `true`, a thread polling for endpoints will be running in
109
+ # the background every 60 secs (default). Defaults to `false`.
110
+ #
111
+ # @option options [Boolean] :client_side_monitoring (false)
112
+ # When `true`, client-side metrics will be collected for all API requests from
113
+ # this client.
114
+ #
115
+ # @option options [String] :client_side_monitoring_client_id ("")
116
+ # Allows you to provide an identifier for this client which will be attached to
117
+ # all generated client side metrics. Defaults to an empty string.
118
+ #
119
+ # @option options [String] :client_side_monitoring_host ("127.0.0.1")
120
+ # Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client
121
+ # side monitoring agent is running on, where client metrics will be published via UDP.
122
+ #
123
+ # @option options [Integer] :client_side_monitoring_port (31000)
124
+ # Required for publishing client metrics. The port that the client side monitoring
125
+ # agent is running on, where client metrics will be published via UDP.
126
+ #
127
+ # @option options [Aws::ClientSideMonitoring::Publisher] :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher)
128
+ # Allows you to provide a custom client-side monitoring publisher class. By default,
129
+ # will use the Client Side Monitoring Agent Publisher.
130
+ #
131
+ # @option options [Boolean] :convert_params (true)
132
+ # When `true`, an attempt is made to coerce request parameters into
133
+ # the required types.
134
+ #
135
+ # @option options [Boolean] :disable_host_prefix_injection (false)
136
+ # Set to true to disable SDK automatically adding host prefix
137
+ # to default service endpoint when available.
138
+ #
139
+ # @option options [String] :endpoint
140
+ # The client endpoint is normally constructed from the `:region`
141
+ # option. You should only configure an `:endpoint` when connecting
142
+ # to test endpoints. This should be avalid HTTP(S) URI.
143
+ #
144
+ # @option options [Integer] :endpoint_cache_max_entries (1000)
145
+ # Used for the maximum size limit of the LRU cache storing endpoints data
146
+ # for endpoint discovery enabled operations. Defaults to 1000.
147
+ #
148
+ # @option options [Integer] :endpoint_cache_max_threads (10)
149
+ # Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.
150
+ #
151
+ # @option options [Integer] :endpoint_cache_poll_interval (60)
152
+ # When :endpoint_discovery and :active_endpoint_cache is enabled,
153
+ # Use this option to config the time interval in seconds for making
154
+ # requests fetching endpoints information. Defaults to 60 sec.
155
+ #
156
+ # @option options [Boolean] :endpoint_discovery (false)
157
+ # When set to `true`, endpoint discovery will be enabled for operations when available. Defaults to `false`.
158
+ #
159
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
160
+ # The log formatter.
161
+ #
162
+ # @option options [Symbol] :log_level (:info)
163
+ # The log level to send messages to the `:logger` at.
164
+ #
165
+ # @option options [Logger] :logger
166
+ # The Logger instance to send log messages to. If this option
167
+ # is not set, logging will be disabled.
168
+ #
169
+ # @option options [String] :profile ("default")
170
+ # Used when loading credentials from the shared credentials file
171
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
172
+ #
173
+ # @option options [Float] :retry_base_delay (0.3)
174
+ # The base delay in seconds used by the default backoff function.
175
+ #
176
+ # @option options [Symbol] :retry_jitter (:none)
177
+ # A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number.
178
+ #
179
+ # @see https://www.awsarchitectureblog.com/2015/03/backoff.html
180
+ #
181
+ # @option options [Integer] :retry_limit (3)
182
+ # The maximum number of times to retry failed requests. Only
183
+ # ~ 500 level server errors and certain ~ 400 level client errors
184
+ # are retried. Generally, these are throttling errors, data
185
+ # checksum errors, networking errors, timeout errors and auth
186
+ # errors from expired credentials.
187
+ #
188
+ # @option options [Integer] :retry_max_delay (0)
189
+ # The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function.
190
+ #
191
+ # @option options [String] :secret_access_key
192
+ #
193
+ # @option options [String] :session_token
194
+ #
195
+ # @option options [Boolean] :simple_json (false)
196
+ # Disables request parameter conversion, validation, and formatting.
197
+ # Also disable response data type conversions. This option is useful
198
+ # when you want to ensure the highest level of performance by
199
+ # avoiding overhead of walking request parameters and response data
200
+ # structures.
201
+ #
202
+ # When `:simple_json` is enabled, the request parameters hash must
203
+ # be formatted exactly as the DynamoDB API expects.
204
+ #
205
+ # @option options [Boolean] :stub_responses (false)
206
+ # Causes the client to return stubbed responses. By default
207
+ # fake responses are generated and returned. You can specify
208
+ # the response data to return or errors to raise by calling
209
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
210
+ #
211
+ # ** Please note ** When response stubbing is enabled, no HTTP
212
+ # requests are made, and retries are disabled.
213
+ #
214
+ # @option options [Boolean] :validate_params (true)
215
+ # When `true`, request parameters are validated before
216
+ # sending the request.
217
+ #
218
+ # @option options [URI::HTTP,String] :http_proxy A proxy to send
219
+ # requests through. Formatted like 'http://proxy.com:123'.
220
+ #
221
+ # @option options [Float] :http_open_timeout (15) The number of
222
+ # seconds to wait when opening a HTTP session before rasing a
223
+ # `Timeout::Error`.
224
+ #
225
+ # @option options [Integer] :http_read_timeout (60) The default
226
+ # number of seconds to wait for response data. This value can
227
+ # safely be set
228
+ # per-request on the session yeidled by {#session_for}.
229
+ #
230
+ # @option options [Float] :http_idle_timeout (5) The number of
231
+ # seconds a connection is allowed to sit idble before it is
232
+ # considered stale. Stale connections are closed and removed
233
+ # from the pool before making a request.
234
+ #
235
+ # @option options [Float] :http_continue_timeout (1) The number of
236
+ # seconds to wait for a 100-continue response before sending the
237
+ # request body. This option has no effect unless the request has
238
+ # "Expect" header set to "100-continue". Defaults to `nil` which
239
+ # disables this behaviour. This value can safely be set per
240
+ # request on the session yeidled by {#session_for}.
241
+ #
242
+ # @option options [Boolean] :http_wire_trace (false) When `true`,
243
+ # HTTP debug output will be sent to the `:logger`.
244
+ #
245
+ # @option options [Boolean] :ssl_verify_peer (true) When `true`,
246
+ # SSL peer certificates are verified when establishing a
247
+ # connection.
248
+ #
249
+ # @option options [String] :ssl_ca_bundle Full path to the SSL
250
+ # certificate authority bundle file that should be used when
251
+ # verifying peer certificates. If you do not pass
252
+ # `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
253
+ # will be used if available.
254
+ #
255
+ # @option options [String] :ssl_ca_directory Full path of the
256
+ # directory that contains the unbundled SSL certificate
257
+ # authority files for verifying peer certificates. If you do
258
+ # not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
259
+ # system default will be used if available.
260
+ #
261
+ def initialize(*args)
262
+ super
263
+ end
264
+
265
+ # @!group API Operations
266
+
267
+ # Pushes an SSH public key to a particular OS user on a given EC2
268
+ # instance for 60 seconds.
269
+ #
270
+ # @option params [required, String] :instance_id
271
+ # The EC2 instance you wish to publish the SSH key to.
272
+ #
273
+ # @option params [required, String] :instance_os_user
274
+ # The OS user on the EC2 instance whom the key may be used to
275
+ # authenticate as.
276
+ #
277
+ # @option params [required, String] :ssh_public_key
278
+ # The public key to be published to the instance. To use it after
279
+ # publication you must have the matching private key.
280
+ #
281
+ # @option params [required, String] :availability_zone
282
+ # The availability zone the EC2 instance was launched in.
283
+ #
284
+ # @return [Types::SendSSHPublicKeyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
285
+ #
286
+ # * {Types::SendSSHPublicKeyResponse#request_id #request_id} => String
287
+ # * {Types::SendSSHPublicKeyResponse#success #success} => Boolean
288
+ #
289
+ #
290
+ # @example Example: To push an SSH key to an EC2 instance
291
+ #
292
+ # # The following example pushes a sample SSH public key to the EC2 instance i-abcd1234 in AZ us-west-2b for use by the
293
+ # # instance OS user ec2-user.
294
+ #
295
+ # resp = client.send_ssh_public_key({
296
+ # availability_zone: "us-west-2a", # The zone where the instance was launched
297
+ # instance_id: "i-abcd1234", # The instance ID to publish the key to.
298
+ # instance_os_user: "ec2-user", # This should be the user you wish to be when ssh-ing to the instance (eg, ec2-user@[instance IP])
299
+ # ssh_public_key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC3FlHqj2eqCdrGHuA6dRjfZXQ4HX5lXEIRHaNbxEwE5Te7xNF7StwhrDtiV7IdT5fDqbRyGw/szPj3xGkNTVoElCZ2dDFb2qYZ1WLIpZwj/UhO9l2mgfjR56UojjQut5Jvn2KZ1OcyrNO0J83kCaJCV7JoVbXY79FBMUccYNY45zmv9+1FMCfY6i2jdIhwR6+yLk8oubL8lIPyq7X+6b9S0yKCkB7Peml1DvghlybpAIUrC9vofHt6XP4V1i0bImw1IlljQS+DUmULRFSccATDscCX9ajnj7Crhm0HAZC0tBPXpFdHkPwL3yzYo546SCS9LKEwz62ymxxbL9k7h09t", # This should be in standard OpenSSH format (ssh-rsa [key body])
300
+ # })
301
+ #
302
+ # resp.to_h outputs the following:
303
+ # {
304
+ # request_id: "abcd1234-abcd-1234-abcd-1234abcd1234", # This request ID should be provided when contacting AWS Support.
305
+ # success: true, # Should be true if the service does not return an error response.
306
+ # }
307
+ #
308
+ # @example Request syntax with placeholder values
309
+ #
310
+ # resp = client.send_ssh_public_key({
311
+ # instance_id: "InstanceId", # required
312
+ # instance_os_user: "InstanceOSUser", # required
313
+ # ssh_public_key: "SSHPublicKey", # required
314
+ # availability_zone: "AvailabilityZone", # required
315
+ # })
316
+ #
317
+ # @example Response structure
318
+ #
319
+ # resp.request_id #=> String
320
+ # resp.success #=> Boolean
321
+ #
322
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ec2-instance-connect-2018-04-02/SendSSHPublicKey AWS API Documentation
323
+ #
324
+ # @overload send_ssh_public_key(params = {})
325
+ # @param [Hash] params ({})
326
+ def send_ssh_public_key(params = {}, options = {})
327
+ req = build_request(:send_ssh_public_key, params)
328
+ req.send_request(options)
329
+ end
330
+
331
+ # @!endgroup
332
+
333
+ # @param params ({})
334
+ # @api private
335
+ def build_request(operation_name, params = {})
336
+ handlers = @handlers.for(operation_name)
337
+ context = Seahorse::Client::RequestContext.new(
338
+ operation_name: operation_name,
339
+ operation: config.api.operation(operation_name),
340
+ client: self,
341
+ params: params,
342
+ config: config)
343
+ context[:gem_name] = 'aws-sdk-ec2instanceconnect'
344
+ context[:gem_version] = '1.0.0'
345
+ Seahorse::Client::Request.new(handlers, context)
346
+ end
347
+
348
+ # @api private
349
+ # @deprecated
350
+ def waiter_names
351
+ []
352
+ end
353
+
354
+ class << self
355
+
356
+ # @api private
357
+ attr_reader :identifier
358
+
359
+ # @api private
360
+ def errors_module
361
+ Errors
362
+ end
363
+
364
+ end
365
+ end
366
+ end
@@ -0,0 +1,88 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws::EC2InstanceConnect
9
+ # @api private
10
+ module ClientApi
11
+
12
+ include Seahorse::Model
13
+
14
+ AuthException = Shapes::StructureShape.new(name: 'AuthException')
15
+ AvailabilityZone = Shapes::StringShape.new(name: 'AvailabilityZone')
16
+ EC2InstanceNotFoundException = Shapes::StructureShape.new(name: 'EC2InstanceNotFoundException')
17
+ InstanceId = Shapes::StringShape.new(name: 'InstanceId')
18
+ InstanceOSUser = Shapes::StringShape.new(name: 'InstanceOSUser')
19
+ InvalidArgsException = Shapes::StructureShape.new(name: 'InvalidArgsException')
20
+ RequestId = Shapes::StringShape.new(name: 'RequestId')
21
+ SSHPublicKey = Shapes::StringShape.new(name: 'SSHPublicKey')
22
+ SendSSHPublicKeyRequest = Shapes::StructureShape.new(name: 'SendSSHPublicKeyRequest')
23
+ SendSSHPublicKeyResponse = Shapes::StructureShape.new(name: 'SendSSHPublicKeyResponse')
24
+ ServiceException = Shapes::StructureShape.new(name: 'ServiceException')
25
+ String = Shapes::StringShape.new(name: 'String')
26
+ Success = Shapes::BooleanShape.new(name: 'Success')
27
+ ThrottlingException = Shapes::StructureShape.new(name: 'ThrottlingException')
28
+
29
+ AuthException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
30
+ AuthException.struct_class = Types::AuthException
31
+
32
+ EC2InstanceNotFoundException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
33
+ EC2InstanceNotFoundException.struct_class = Types::EC2InstanceNotFoundException
34
+
35
+ InvalidArgsException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
36
+ InvalidArgsException.struct_class = Types::InvalidArgsException
37
+
38
+ SendSSHPublicKeyRequest.add_member(:instance_id, Shapes::ShapeRef.new(shape: InstanceId, required: true, location_name: "InstanceId"))
39
+ SendSSHPublicKeyRequest.add_member(:instance_os_user, Shapes::ShapeRef.new(shape: InstanceOSUser, required: true, location_name: "InstanceOSUser"))
40
+ SendSSHPublicKeyRequest.add_member(:ssh_public_key, Shapes::ShapeRef.new(shape: SSHPublicKey, required: true, location_name: "SSHPublicKey"))
41
+ SendSSHPublicKeyRequest.add_member(:availability_zone, Shapes::ShapeRef.new(shape: AvailabilityZone, required: true, location_name: "AvailabilityZone"))
42
+ SendSSHPublicKeyRequest.struct_class = Types::SendSSHPublicKeyRequest
43
+
44
+ SendSSHPublicKeyResponse.add_member(:request_id, Shapes::ShapeRef.new(shape: RequestId, location_name: "RequestId"))
45
+ SendSSHPublicKeyResponse.add_member(:success, Shapes::ShapeRef.new(shape: Success, location_name: "Success"))
46
+ SendSSHPublicKeyResponse.struct_class = Types::SendSSHPublicKeyResponse
47
+
48
+ ServiceException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
49
+ ServiceException.struct_class = Types::ServiceException
50
+
51
+ ThrottlingException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
52
+ ThrottlingException.struct_class = Types::ThrottlingException
53
+
54
+
55
+ # @api private
56
+ API = Seahorse::Model::Api.new.tap do |api|
57
+
58
+ api.version = "2018-04-02"
59
+
60
+ api.metadata = {
61
+ "apiVersion" => "2018-04-02",
62
+ "endpointPrefix" => "ec2-instance-connect",
63
+ "jsonVersion" => "1.1",
64
+ "protocol" => "json",
65
+ "serviceAbbreviation" => "EC2 Instance Connect",
66
+ "serviceFullName" => "AWS EC2 Instance Connect",
67
+ "serviceId" => "EC2 Instance Connect",
68
+ "signatureVersion" => "v4",
69
+ "targetPrefix" => "AWSEC2InstanceConnectService",
70
+ "uid" => "ec2-instance-connect-2018-04-02",
71
+ }
72
+
73
+ api.add_operation(:send_ssh_public_key, Seahorse::Model::Operation.new.tap do |o|
74
+ o.name = "SendSSHPublicKey"
75
+ o.http_method = "POST"
76
+ o.http_request_uri = "/"
77
+ o.input = Shapes::ShapeRef.new(shape: SendSSHPublicKeyRequest)
78
+ o.output = Shapes::ShapeRef.new(shape: SendSSHPublicKeyResponse)
79
+ o.errors << Shapes::ShapeRef.new(shape: AuthException)
80
+ o.errors << Shapes::ShapeRef.new(shape: InvalidArgsException)
81
+ o.errors << Shapes::ShapeRef.new(shape: ServiceException)
82
+ o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
83
+ o.errors << Shapes::ShapeRef.new(shape: EC2InstanceNotFoundException)
84
+ end)
85
+ end
86
+
87
+ end
88
+ end
File without changes
@@ -0,0 +1,94 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws::EC2InstanceConnect
9
+ module Errors
10
+
11
+ extend Aws::Errors::DynamicErrors
12
+
13
+ class AuthException < ServiceError
14
+
15
+ # @param [Seahorse::Client::RequestContext] context
16
+ # @param [String] message
17
+ # @param [Aws::EC2InstanceConnect::Types::AuthException] data
18
+ def initialize(context, message, data = Aws::EmptyStructure.new)
19
+ super(context, message, data)
20
+ end
21
+
22
+ # @return [String]
23
+ def message
24
+ @message || @data[:message]
25
+ end
26
+
27
+ end
28
+
29
+ class EC2InstanceNotFoundException < ServiceError
30
+
31
+ # @param [Seahorse::Client::RequestContext] context
32
+ # @param [String] message
33
+ # @param [Aws::EC2InstanceConnect::Types::EC2InstanceNotFoundException] data
34
+ def initialize(context, message, data = Aws::EmptyStructure.new)
35
+ super(context, message, data)
36
+ end
37
+
38
+ # @return [String]
39
+ def message
40
+ @message || @data[:message]
41
+ end
42
+
43
+ end
44
+
45
+ class InvalidArgsException < ServiceError
46
+
47
+ # @param [Seahorse::Client::RequestContext] context
48
+ # @param [String] message
49
+ # @param [Aws::EC2InstanceConnect::Types::InvalidArgsException] data
50
+ def initialize(context, message, data = Aws::EmptyStructure.new)
51
+ super(context, message, data)
52
+ end
53
+
54
+ # @return [String]
55
+ def message
56
+ @message || @data[:message]
57
+ end
58
+
59
+ end
60
+
61
+ class ServiceException < ServiceError
62
+
63
+ # @param [Seahorse::Client::RequestContext] context
64
+ # @param [String] message
65
+ # @param [Aws::EC2InstanceConnect::Types::ServiceException] data
66
+ def initialize(context, message, data = Aws::EmptyStructure.new)
67
+ super(context, message, data)
68
+ end
69
+
70
+ # @return [String]
71
+ def message
72
+ @message || @data[:message]
73
+ end
74
+
75
+ end
76
+
77
+ class ThrottlingException < ServiceError
78
+
79
+ # @param [Seahorse::Client::RequestContext] context
80
+ # @param [String] message
81
+ # @param [Aws::EC2InstanceConnect::Types::ThrottlingException] data
82
+ def initialize(context, message, data = Aws::EmptyStructure.new)
83
+ super(context, message, data)
84
+ end
85
+
86
+ # @return [String]
87
+ def message
88
+ @message || @data[:message]
89
+ end
90
+
91
+ end
92
+
93
+ end
94
+ end
@@ -0,0 +1,23 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws::EC2InstanceConnect
9
+ class Resource
10
+
11
+ # @param options ({})
12
+ # @option options [Client] :client
13
+ def initialize(options = {})
14
+ @client = options[:client] || Client.new(options)
15
+ end
16
+
17
+ # @return [Client]
18
+ def client
19
+ @client
20
+ end
21
+
22
+ end
23
+ end
@@ -0,0 +1,133 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws::EC2InstanceConnect
9
+ module Types
10
+
11
+ # Indicates that either your AWS credentials are invalid or you do not
12
+ # have access to the EC2 instance.
13
+ #
14
+ # @!attribute [rw] message
15
+ # @return [String]
16
+ #
17
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ec2-instance-connect-2018-04-02/AuthException AWS API Documentation
18
+ #
19
+ class AuthException < Struct.new(
20
+ :message)
21
+ include Aws::Structure
22
+ end
23
+
24
+ # Indicates that the instance requested was not found in the given zone.
25
+ # Check that you have provided a valid instance ID and the correct zone.
26
+ #
27
+ # @!attribute [rw] message
28
+ # @return [String]
29
+ #
30
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ec2-instance-connect-2018-04-02/EC2InstanceNotFoundException AWS API Documentation
31
+ #
32
+ class EC2InstanceNotFoundException < Struct.new(
33
+ :message)
34
+ include Aws::Structure
35
+ end
36
+
37
+ # Indicates that you provided bad input. Ensure you have a valid
38
+ # instance ID, the correct zone, and a valid SSH public key.
39
+ #
40
+ # @!attribute [rw] message
41
+ # @return [String]
42
+ #
43
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ec2-instance-connect-2018-04-02/InvalidArgsException AWS API Documentation
44
+ #
45
+ class InvalidArgsException < Struct.new(
46
+ :message)
47
+ include Aws::Structure
48
+ end
49
+
50
+ # @note When making an API call, you may pass SendSSHPublicKeyRequest
51
+ # data as a hash:
52
+ #
53
+ # {
54
+ # instance_id: "InstanceId", # required
55
+ # instance_os_user: "InstanceOSUser", # required
56
+ # ssh_public_key: "SSHPublicKey", # required
57
+ # availability_zone: "AvailabilityZone", # required
58
+ # }
59
+ #
60
+ # @!attribute [rw] instance_id
61
+ # The EC2 instance you wish to publish the SSH key to.
62
+ # @return [String]
63
+ #
64
+ # @!attribute [rw] instance_os_user
65
+ # The OS user on the EC2 instance whom the key may be used to
66
+ # authenticate as.
67
+ # @return [String]
68
+ #
69
+ # @!attribute [rw] ssh_public_key
70
+ # The public key to be published to the instance. To use it after
71
+ # publication you must have the matching private key.
72
+ # @return [String]
73
+ #
74
+ # @!attribute [rw] availability_zone
75
+ # The availability zone the EC2 instance was launched in.
76
+ # @return [String]
77
+ #
78
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ec2-instance-connect-2018-04-02/SendSSHPublicKeyRequest AWS API Documentation
79
+ #
80
+ class SendSSHPublicKeyRequest < Struct.new(
81
+ :instance_id,
82
+ :instance_os_user,
83
+ :ssh_public_key,
84
+ :availability_zone)
85
+ include Aws::Structure
86
+ end
87
+
88
+ # @!attribute [rw] request_id
89
+ # The request ID as logged by EC2 Connect. Please provide this when
90
+ # contacting AWS Support.
91
+ # @return [String]
92
+ #
93
+ # @!attribute [rw] success
94
+ # Indicates request success.
95
+ # @return [Boolean]
96
+ #
97
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ec2-instance-connect-2018-04-02/SendSSHPublicKeyResponse AWS API Documentation
98
+ #
99
+ class SendSSHPublicKeyResponse < Struct.new(
100
+ :request_id,
101
+ :success)
102
+ include Aws::Structure
103
+ end
104
+
105
+ # Indicates that the service encountered an error. Follow the message's
106
+ # instructions and try again.
107
+ #
108
+ # @!attribute [rw] message
109
+ # @return [String]
110
+ #
111
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ec2-instance-connect-2018-04-02/ServiceException AWS API Documentation
112
+ #
113
+ class ServiceException < Struct.new(
114
+ :message)
115
+ include Aws::Structure
116
+ end
117
+
118
+ # Indicates you have been making requests too frequently and have been
119
+ # throttled. Wait for a while and try again. If higher call volume is
120
+ # warranted contact AWS Support.
121
+ #
122
+ # @!attribute [rw] message
123
+ # @return [String]
124
+ #
125
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ec2-instance-connect-2018-04-02/ThrottlingException AWS API Documentation
126
+ #
127
+ class ThrottlingException < Struct.new(
128
+ :message)
129
+ include Aws::Structure
130
+ end
131
+
132
+ end
133
+ end
metadata ADDED
@@ -0,0 +1,88 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: aws-sdk-ec2instanceconnect
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Amazon Web Services
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-06-27 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: aws-sdk-core
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 3.56.0
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '3'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 3.56.0
33
+ - !ruby/object:Gem::Dependency
34
+ name: aws-sigv4
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '1.1'
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '1.1'
47
+ description: Official AWS Ruby gem for AWS EC2 Instance Connect (EC2 Instance Connect).
48
+ This gem is part of the AWS SDK for Ruby.
49
+ email:
50
+ - trevrowe@amazon.com
51
+ executables: []
52
+ extensions: []
53
+ extra_rdoc_files: []
54
+ files:
55
+ - lib/aws-sdk-ec2instanceconnect.rb
56
+ - lib/aws-sdk-ec2instanceconnect/client.rb
57
+ - lib/aws-sdk-ec2instanceconnect/client_api.rb
58
+ - lib/aws-sdk-ec2instanceconnect/customizations.rb
59
+ - lib/aws-sdk-ec2instanceconnect/errors.rb
60
+ - lib/aws-sdk-ec2instanceconnect/resource.rb
61
+ - lib/aws-sdk-ec2instanceconnect/types.rb
62
+ homepage: https://github.com/aws/aws-sdk-ruby
63
+ licenses:
64
+ - Apache-2.0
65
+ metadata:
66
+ source_code_uri: https://github.com/aws/aws-sdk-ruby/tree/master/gems/aws-sdk-ec2instanceconnect
67
+ changelog_uri: https://github.com/aws/aws-sdk-ruby/tree/master/gems/aws-sdk-ec2instanceconnect/CHANGELOG.md
68
+ post_install_message:
69
+ rdoc_options: []
70
+ require_paths:
71
+ - lib
72
+ required_ruby_version: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ required_rubygems_version: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
82
+ requirements: []
83
+ rubyforge_project:
84
+ rubygems_version: 2.5.2.3
85
+ signing_key:
86
+ specification_version: 4
87
+ summary: AWS SDK for Ruby - EC2 Instance Connect
88
+ test_files: []