Class: Aws::EC2InstanceConnect::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::EC2InstanceConnect::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-ec2instanceconnect/client.rb
Overview
An API client for EC2InstanceConnect. To construct a client, you need to configure a ‘:region` and `:credentials`.
client = Aws::EC2InstanceConnect::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
See #initialize for a full list of supported configuration options.
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#send_serial_console_ssh_public_key(params = {}) ⇒ Types::SendSerialConsoleSSHPublicKeyResponse
Pushes an SSH public key to the specified EC2 instance.
-
#send_ssh_public_key(params = {}) ⇒ Types::SendSSHPublicKeyResponse
Pushes an SSH public key to the specified EC2 instance for use by the specified user.
Class Method Summary collapse
- .errors_module ⇒ Object private
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
391 392 393 |
# File 'lib/aws-sdk-ec2instanceconnect/client.rb', line 391 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
549 550 551 |
# File 'lib/aws-sdk-ec2instanceconnect/client.rb', line 549 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
552 553 554 |
# File 'lib/aws-sdk-ec2instanceconnect/client.rb', line 552 def errors_module Errors end |
Instance Method Details
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
527 528 529 530 531 532 533 534 535 536 537 538 |
# File 'lib/aws-sdk-ec2instanceconnect/client.rb', line 527 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config) context[:gem_name] = 'aws-sdk-ec2instanceconnect' context[:gem_version] = '1.31.0' Seahorse::Client::Request.new(handlers, context) end |
#send_serial_console_ssh_public_key(params = {}) ⇒ Types::SendSerialConsoleSSHPublicKeyResponse
Pushes an SSH public key to the specified EC2 instance. The key remains for 60 seconds, which gives you 60 seconds to establish a serial console connection to the instance using SSH. For more information, see [EC2 Serial Console] in the *Amazon EC2 User Guide*.
[1]: docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-serial-console.html
518 519 520 521 |
# File 'lib/aws-sdk-ec2instanceconnect/client.rb', line 518 def send_serial_console_ssh_public_key(params = {}, = {}) req = build_request(:send_serial_console_ssh_public_key, params) req.send_request() end |
#send_ssh_public_key(params = {}) ⇒ Types::SendSSHPublicKeyResponse
Pushes an SSH public key to the specified EC2 instance for use by the specified user. The key remains for 60 seconds. For more information, see [Connect to your Linux instance using EC2 Instance Connect] in the *Amazon EC2 User Guide*.
[1]: docs.aws.amazon.com/AWSEC2/latest/UserGuide/Connect-using-EC2-Instance-Connect.html
462 463 464 465 |
# File 'lib/aws-sdk-ec2instanceconnect/client.rb', line 462 def send_ssh_public_key(params = {}, = {}) req = build_request(:send_ssh_public_key, params) req.send_request() end |
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
542 543 544 |
# File 'lib/aws-sdk-ec2instanceconnect/client.rb', line 542 def waiter_names [] end |