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.
451 452 453 |
# File 'lib/aws-sdk-ec2instanceconnect/client.rb', line 451 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.
614 615 616 |
# File 'lib/aws-sdk-ec2instanceconnect/client.rb', line 614 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.
617 618 619 |
# File 'lib/aws-sdk-ec2instanceconnect/client.rb', line 617 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.
587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 |
# File 'lib/aws-sdk-ec2instanceconnect/client.rb', line 587 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.52.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
578 579 580 581 |
# File 'lib/aws-sdk-ec2instanceconnect/client.rb', line 578 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
522 523 524 525 |
# File 'lib/aws-sdk-ec2instanceconnect/client.rb', line 522 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.
607 608 609 |
# File 'lib/aws-sdk-ec2instanceconnect/client.rb', line 607 def waiter_names [] end |