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.
474 475 476 |
# File 'lib/aws-sdk-ec2instanceconnect/client.rb', line 474 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.
637 638 639 |
# File 'lib/aws-sdk-ec2instanceconnect/client.rb', line 637 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.
640 641 642 |
# File 'lib/aws-sdk-ec2instanceconnect/client.rb', line 640 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.
610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 |
# File 'lib/aws-sdk-ec2instanceconnect/client.rb', line 610 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) tracer = config.telemetry_provider.tracer_provider.tracer( Aws::Telemetry.module_to_tracer_name('Aws::EC2InstanceConnect') ) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config, tracer: tracer ) context[:gem_name] = 'aws-sdk-ec2instanceconnect' context[:gem_version] = '1.55.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
601 602 603 604 |
# File 'lib/aws-sdk-ec2instanceconnect/client.rb', line 601 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
545 546 547 548 |
# File 'lib/aws-sdk-ec2instanceconnect/client.rb', line 545 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.
630 631 632 |
# File 'lib/aws-sdk-ec2instanceconnect/client.rb', line 630 def waiter_names [] end |