You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::Lightsail::Client

Inherits:
Seahorse::Client::Base show all
Includes:
ClientStubs
Defined in:
gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(*args) ⇒ Client

Returns a new instance of Client

Parameters:

  • options (Hash)

    a customizable set of options



152
153
154
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 152

def initialize(*args)
  super
end

Instance Method Details

#allocate_static_ip(params = {}) ⇒ Types::AllocateStaticIpResult

Allocates a static IP address.

Examples:

Request syntax with placeholder values


resp = client.allocate_static_ip({
  static_ip_name: "ResourceName", # required
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operations[0].created_at #=> Time
resp.operations[0].location.availability_zone #=> String
resp.operations[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> Boolean
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :static_ip_name (required, String)

    The name of the static IP address.

Returns:

See Also:



194
195
196
197
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 194

def allocate_static_ip(params = {}, options = {})
  req = build_request(:allocate_static_ip, params)
  req.send_request(options)
end

#attach_disk(params = {}) ⇒ Types::AttachDiskResult

Attaches a block storage disk to a running or stopped Lightsail instance and exposes it to the instance with the specified disk name.

Examples:

Request syntax with placeholder values


resp = client.attach_disk({
  disk_name: "ResourceName", # required
  instance_name: "ResourceName", # required
  disk_path: "NonEmptyString", # required
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operations[0].created_at #=> Time
resp.operations[0].location.availability_zone #=> String
resp.operations[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> Boolean
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :disk_name (required, String)

    The unique Lightsail disk name (e.g., my-disk).

  • :instance_name (required, String)

    The name of the Lightsail instance where you want to utilize the storage disk.

  • :disk_path (required, String)

    The disk path to expose to the instance (e.g., /dev/xvdf).

Returns:

See Also:



245
246
247
248
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 245

def attach_disk(params = {}, options = {})
  req = build_request(:attach_disk, params)
  req.send_request(options)
end

#attach_instances_to_load_balancer(params = {}) ⇒ Types::AttachInstancesToLoadBalancerResult

Attaches one or more Lightsail instances to a load balancer.

Examples:

Request syntax with placeholder values


resp = client.attach_instances_to_load_balancer({
  load_balancer_name: "ResourceName", # required
  instance_names: ["ResourceName"], # required
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operations[0].created_at #=> Time
resp.operations[0].location.availability_zone #=> String
resp.operations[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> Boolean
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :load_balancer_name (required, String)

    The name of the load balancer.

  • :instance_names (required, Array<String>)

    An array of strings representing the instance name(s) you want to attach to your load balancer.

Returns:

See Also:



291
292
293
294
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 291

def attach_instances_to_load_balancer(params = {}, options = {})
  req = build_request(:attach_instances_to_load_balancer, params)
  req.send_request(options)
end

#attach_load_balancer_tls_certificate(params = {}) ⇒ Types::AttachLoadBalancerTlsCertificateResult

Attaches a Transport Layer Security (TLS) certificate to your load balancer.

TLS is just an updated, more secure version of Secure Socket Layer (SSL).

Examples:

Request syntax with placeholder values


resp = client.attach_load_balancer_tls_certificate({
  load_balancer_name: "ResourceName", # required
  certificate_name: "ResourceName", # required
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operations[0].created_at #=> Time
resp.operations[0].location.availability_zone #=> String
resp.operations[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> Boolean
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :load_balancer_name (required, String)

    The name of the load balancer to which you want to associate the TLS/SSL certificate.

  • :certificate_name (required, String)

    The name of your TLS/SSL certificate.

Returns:

See Also:



341
342
343
344
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 341

def attach_load_balancer_tls_certificate(params = {}, options = {})
  req = build_request(:attach_load_balancer_tls_certificate, params)
  req.send_request(options)
end

#attach_static_ip(params = {}) ⇒ Types::AttachStaticIpResult

Attaches a static IP address to a specific Amazon Lightsail instance.

Examples:

Request syntax with placeholder values


resp = client.attach_static_ip({
  static_ip_name: "ResourceName", # required
  instance_name: "ResourceName", # required
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operations[0].created_at #=> Time
resp.operations[0].location.availability_zone #=> String
resp.operations[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> Boolean
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :static_ip_name (required, String)

    The name of the static IP.

  • :instance_name (required, String)

    The instance name to which you want to attach the static IP address.

Returns:

See Also:



386
387
388
389
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 386

def attach_static_ip(params = {}, options = {})
  req = build_request(:attach_static_ip, params)
  req.send_request(options)
end

#close_instance_public_ports(params = {}) ⇒ Types::CloseInstancePublicPortsResult

Closes the public ports on a specific Amazon Lightsail instance.

Examples:

Request syntax with placeholder values


resp = client.close_instance_public_ports({
  port_info: { # required
    from_port: 1,
    to_port: 1,
    protocol: "tcp", # accepts tcp, all, udp
  },
  instance_name: "ResourceName", # required
})

Response structure


resp.operation.id #=> String
resp.operation.resource_name #=> String
resp.operation.resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operation.created_at #=> Time
resp.operation.location.availability_zone #=> String
resp.operation.location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operation.is_terminal #=> Boolean
resp.operation.operation_details #=> String
resp.operation.operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operation.status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operation.status_changed_at #=> Time
resp.operation.error_code #=> String
resp.operation.error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :port_info (required, Types::PortInfo)

    Information about the public port you are trying to close.

  • :instance_name (required, String)

    The name of the instance on which you're attempting to close the public ports.

Returns:

See Also:



435
436
437
438
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 435

def close_instance_public_ports(params = {}, options = {})
  req = build_request(:close_instance_public_ports, params)
  req.send_request(options)
end

#create_disk(params = {}) ⇒ Types::CreateDiskResult

Creates a block storage disk that can be attached to a Lightsail instance in the same Availability Zone (e.g., us-east-2a). The disk is created in the regional endpoint that you send the HTTP request to. For more information, see Regions and Availability Zones in Lightsail.

Examples:

Request syntax with placeholder values


resp = client.create_disk({
  disk_name: "ResourceName", # required
  availability_zone: "NonEmptyString", # required
  size_in_gb: 1, # required
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operations[0].created_at #=> Time
resp.operations[0].location.availability_zone #=> String
resp.operations[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> Boolean
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :disk_name (required, String)

    The unique Lightsail disk name (e.g., my-disk).

  • :availability_zone (required, String)

    The Availability Zone where you want to create the disk (e.g., us-east-2a). Choose the same Availability Zone as the Lightsail instance where you want to create the disk.

    Use the GetRegions operation to list the Availability Zones where Lightsail is currently available.

  • :size_in_gb (required, Integer)

    The size of the disk in GB (e.g., 32).

Returns:

See Also:



497
498
499
500
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 497

def create_disk(params = {}, options = {})
  req = build_request(:create_disk, params)
  req.send_request(options)
end

#create_disk_from_snapshot(params = {}) ⇒ Types::CreateDiskFromSnapshotResult

Creates a block storage disk from a disk snapshot that can be attached to a Lightsail instance in the same Availability Zone (e.g., us-east-2a). The disk is created in the regional endpoint that you send the HTTP request to. For more information, see Regions and Availability Zones in Lightsail.

Examples:

Request syntax with placeholder values


resp = client.create_disk_from_snapshot({
  disk_name: "ResourceName", # required
  disk_snapshot_name: "ResourceName", # required
  availability_zone: "NonEmptyString", # required
  size_in_gb: 1, # required
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operations[0].created_at #=> Time
resp.operations[0].location.availability_zone #=> String
resp.operations[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> Boolean
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :disk_name (required, String)

    The unique Lightsail disk name (e.g., my-disk).

  • :disk_snapshot_name (required, String)

    The name of the disk snapshot (e.g., my-snapshot) from which to create the new storage disk.

  • :availability_zone (required, String)

    The Availability Zone where you want to create the disk (e.g., us-east-2a). Choose the same Availability Zone as the Lightsail instance where you want to create the disk.

    Use the GetRegions operation to list the Availability Zones where Lightsail is currently available.

  • :size_in_gb (required, Integer)

    The size of the disk in GB (e.g., 32).

Returns:

See Also:



564
565
566
567
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 564

def create_disk_from_snapshot(params = {}, options = {})
  req = build_request(:create_disk_from_snapshot, params)
  req.send_request(options)
end

#create_disk_snapshot(params = {}) ⇒ Types::CreateDiskSnapshotResult

Creates a snapshot of a block storage disk. You can use snapshots for backups, to make copies of disks, and to save data before shutting down a Lightsail instance.

You can take a snapshot of an attached disk that is in use; however, snapshots only capture data that has been written to your disk at the time the snapshot command is issued. This may exclude any data that has been cached by any applications or the operating system. If you can pause any file systems on the disk long enough to take a snapshot, your snapshot should be complete. Nevertheless, if you cannot pause all file writes to the disk, you should unmount the disk from within the Lightsail instance, issue the create disk snapshot command, and then remount the disk to ensure a consistent and complete snapshot. You may remount and use your disk while the snapshot status is pending.

Examples:

Request syntax with placeholder values


resp = client.create_disk_snapshot({
  disk_name: "ResourceName", # required
  disk_snapshot_name: "ResourceName", # required
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operations[0].created_at #=> Time
resp.operations[0].location.availability_zone #=> String
resp.operations[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> Boolean
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :disk_name (required, String)

    The unique name of the source disk (e.g., my-source-disk).

  • :disk_snapshot_name (required, String)

    The name of the destination disk snapshot (e.g., my-disk-snapshot) based on the source disk.

Returns:

See Also:



624
625
626
627
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 624

def create_disk_snapshot(params = {}, options = {})
  req = build_request(:create_disk_snapshot, params)
  req.send_request(options)
end

#create_domain(params = {}) ⇒ Types::CreateDomainResult

Creates a domain resource for the specified domain (e.g., example.com).

Examples:

Request syntax with placeholder values


resp = client.create_domain({
  domain_name: "DomainName", # required
})

Response structure


resp.operation.id #=> String
resp.operation.resource_name #=> String
resp.operation.resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operation.created_at #=> Time
resp.operation.location.availability_zone #=> String
resp.operation.location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operation.is_terminal #=> Boolean
resp.operation.operation_details #=> String
resp.operation.operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operation.status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operation.status_changed_at #=> Time
resp.operation.error_code #=> String
resp.operation.error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain_name (required, String)

    The domain name to manage (e.g., example.com).

    You cannot register a new domain name using Lightsail. You must register a domain name using Amazon Route 53 or another domain name registrar. If you have already registered your domain, you can enter its name in this parameter to manage the DNS records for that domain.

Returns:

See Also:



672
673
674
675
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 672

def create_domain(params = {}, options = {})
  req = build_request(:create_domain, params)
  req.send_request(options)
end

#create_domain_entry(params = {}) ⇒ Types::CreateDomainEntryResult

Creates one of the following entry records associated with the domain: A record, CNAME record, TXT record, or MX record.

Examples:

Request syntax with placeholder values


resp = client.create_domain_entry({
  domain_name: "DomainName", # required
  domain_entry: { # required
    id: "NonEmptyString",
    name: "DomainName",
    target: "string",
    is_alias: false,
    type: "DomainEntryType",
    options: {
      "DomainEntryOptionsKeys" => "string",
    },
  },
})

Response structure


resp.operation.id #=> String
resp.operation.resource_name #=> String
resp.operation.resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operation.created_at #=> Time
resp.operation.location.availability_zone #=> String
resp.operation.location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operation.is_terminal #=> Boolean
resp.operation.operation_details #=> String
resp.operation.operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operation.status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operation.status_changed_at #=> Time
resp.operation.error_code #=> String
resp.operation.error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain_name (required, String)

    The domain name (e.g., example.com) for which you want to create the domain entry.

  • :domain_entry (required, Types::DomainEntry)

    An array of key-value pairs containing information about the domain entry request.

Returns:

See Also:



728
729
730
731
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 728

def create_domain_entry(params = {}, options = {})
  req = build_request(:create_domain_entry, params)
  req.send_request(options)
end

#create_instance_snapshot(params = {}) ⇒ Types::CreateInstanceSnapshotResult

Creates a snapshot of a specific virtual private server, or instance. You can use a snapshot to create a new instance that is based on that snapshot.

Examples:

Request syntax with placeholder values


resp = client.create_instance_snapshot({
  instance_snapshot_name: "ResourceName", # required
  instance_name: "ResourceName", # required
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operations[0].created_at #=> Time
resp.operations[0].location.availability_zone #=> String
resp.operations[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> Boolean
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_snapshot_name (required, String)

    The name for your new snapshot.

  • :instance_name (required, String)

    The Lightsail instance on which to base your snapshot.

Returns:

See Also:



775
776
777
778
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 775

def create_instance_snapshot(params = {}, options = {})
  req = build_request(:create_instance_snapshot, params)
  req.send_request(options)
end

#create_instances(params = {}) ⇒ Types::CreateInstancesResult

Creates one or more Amazon Lightsail virtual private servers, or instances.

Examples:

Request syntax with placeholder values


resp = client.create_instances({
  instance_names: ["string"], # required
  availability_zone: "string", # required
  custom_image_name: "ResourceName",
  blueprint_id: "NonEmptyString", # required
  bundle_id: "NonEmptyString", # required
  user_data: "string",
  key_pair_name: "ResourceName",
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operations[0].created_at #=> Time
resp.operations[0].location.availability_zone #=> String
resp.operations[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> Boolean
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_names (required, Array<String>)

    The names to use for your new Lightsail instances. Separate multiple values using quotation marks and commas, for example: ["MyFirstInstance","MySecondInstance"]

  • :availability_zone (required, String)

    The Availability Zone in which to create your instance. Use the following format: us-east-2a (case sensitive). You can get a list of availability zones by using the get regions operation. Be sure to add the include availability zones parameter to your request.

  • :custom_image_name (String) — default: Deprecated

    The name for your custom image.

    In releases prior to June 12, 2017, this parameter was ignored by the API. It is now deprecated.

  • :blueprint_id (required, String)

    The ID for a virtual private server image (e.g., app_wordpress_4_4 or app_lamp_7_0). Use the get blueprints operation to return a list of available images (or blueprints).

  • :bundle_id (required, String)

    The bundle of specification information for your virtual private server (or instance), including the pricing plan (e.g., micro_1_0).

  • :user_data (String)

    A launch script you can create that configures a server with additional user data. For example, you might want to run apt-get -y update.

    Depending on the machine image you choose, the command to get software on your instance varies. Amazon Linux and CentOS use yum, Debian and Ubuntu use apt-get, and FreeBSD uses pkg. For a complete list, see the Dev Guide.

  • :key_pair_name (String)

    The name of your key pair.

Returns:

See Also:



872
873
874
875
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 872

def create_instances(params = {}, options = {})
  req = build_request(:create_instances, params)
  req.send_request(options)
end

#create_instances_from_snapshot(params = {}) ⇒ Types::CreateInstancesFromSnapshotResult

Uses a specific snapshot as a blueprint for creating one or more new instances that are based on that identical configuration.

Examples:

Request syntax with placeholder values


resp = client.create_instances_from_snapshot({
  instance_names: ["string"], # required
  attached_disk_mapping: {
    "ResourceName" => [
      {
        original_disk_path: "NonEmptyString",
        new_disk_name: "ResourceName",
      },
    ],
  },
  availability_zone: "string", # required
  instance_snapshot_name: "ResourceName", # required
  bundle_id: "NonEmptyString", # required
  user_data: "string",
  key_pair_name: "ResourceName",
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operations[0].created_at #=> Time
resp.operations[0].location.availability_zone #=> String
resp.operations[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> Boolean
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_names (required, Array<String>)

    The names for your new instances.

  • :attached_disk_mapping (Hash<String,Array>)

    An object containing information about one or more disk mappings.

  • :availability_zone (required, String)

    The Availability Zone where you want to create your instances. Use the following formatting: us-east-2a (case sensitive). You can get a list of availability zones by using the get regions operation. Be sure to add the include availability zones parameter to your request.

  • :instance_snapshot_name (required, String)

    The name of the instance snapshot on which you are basing your new instances. Use the get instance snapshots operation to return information about your existing snapshots.

  • :bundle_id (required, String)

    The bundle of specification information for your virtual private server (or instance), including the pricing plan (e.g., micro_1_0).

  • :user_data (String)

    You can create a launch script that configures a server with additional user data. For example, apt-get -y update.

    Depending on the machine image you choose, the command to get software on your instance varies. Amazon Linux and CentOS use yum, Debian and Ubuntu use apt-get, and FreeBSD uses pkg. For a complete list, see the Dev Guide.

  • :key_pair_name (String)

    The name for your key pair.

Returns:

See Also:



969
970
971
972
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 969

def create_instances_from_snapshot(params = {}, options = {})
  req = build_request(:create_instances_from_snapshot, params)
  req.send_request(options)
end

#create_key_pair(params = {}) ⇒ Types::CreateKeyPairResult

Creates sn SSH key pair.

Examples:

Request syntax with placeholder values


resp = client.create_key_pair({
  key_pair_name: "ResourceName", # required
})

Response structure


resp.key_pair.name #=> String
resp.key_pair.arn #=> String
resp.key_pair.support_code #=> String
resp.key_pair.created_at #=> Time
resp.key_pair.location.availability_zone #=> String
resp.key_pair.location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.key_pair.resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.key_pair.fingerprint #=> String
resp.public_key_base_64 #=> String
resp.private_key_base_64 #=> String
resp.operation.id #=> String
resp.operation.resource_name #=> String
resp.operation.resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operation.created_at #=> Time
resp.operation.location.availability_zone #=> String
resp.operation.location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operation.is_terminal #=> Boolean
resp.operation.operation_details #=> String
resp.operation.operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operation.status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operation.status_changed_at #=> Time
resp.operation.error_code #=> String
resp.operation.error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :key_pair_name (required, String)

    The name for your new key pair.

Returns:

See Also:



1022
1023
1024
1025
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 1022

def create_key_pair(params = {}, options = {})
  req = build_request(:create_key_pair, params)
  req.send_request(options)
end

#create_load_balancer(params = {}) ⇒ Types::CreateLoadBalancerResult

Creates a Lightsail load balancer.

When you create a load balancer, you can specify certificates and port settings. You can create up to 5 load balancers per AWS Region in your account.

Examples:

Request syntax with placeholder values


resp = client.create_load_balancer({
  load_balancer_name: "ResourceName", # required
  instance_port: 1, # required
  health_check_path: "string",
  certificate_name: "ResourceName",
  certificate_domain_name: "DomainName",
  certificate_alternative_names: ["DomainName"],
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operations[0].created_at #=> Time
resp.operations[0].location.availability_zone #=> String
resp.operations[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> Boolean
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :load_balancer_name (required, String)

    The name of your load balancer.

  • :instance_port (required, Integer)

    The instance port where you're creating your load balancer.

  • :health_check_path (String)

    The path you provided to perform the load balancer health check. If you didn't specify a health check path, Lightsail uses the root path of your website (e.g., "/").

  • :certificate_name (String)

    The name of the TLS/SSL certificate.

    If you specify certificateName, then certificateDomainName is required (and vice-versa).

  • :certificate_domain_name (String)

    The domain name with which your certificate is associated (e.g., example.com).

    If you specify certificateDomainName, then certificateName is required (and vice-versa).

  • :certificate_alternative_names (Array<String>)

    The alternative domain names to use with your TLS/SSL certificate (e.g., www.example.com, www.ejemplo.com, ejemplo.com).

Returns:

See Also:



1097
1098
1099
1100
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 1097

def create_load_balancer(params = {}, options = {})
  req = build_request(:create_load_balancer, params)
  req.send_request(options)
end

#create_load_balancer_tls_certificate(params = {}) ⇒ Types::CreateLoadBalancerTlsCertificateResult

Creates a Lightsail load balancer TLS certificate.

TLS is just an updated, more secure version of Secure Socket Layer (SSL).

Examples:

Request syntax with placeholder values


resp = client.create_load_balancer_tls_certificate({
  load_balancer_name: "ResourceName", # required
  certificate_name: "ResourceName", # required
  certificate_domain_name: "DomainName", # required
  certificate_alternative_names: ["DomainName"],
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operations[0].created_at #=> Time
resp.operations[0].location.availability_zone #=> String
resp.operations[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> Boolean
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :load_balancer_name (required, String)

    The load balancer name where you want to create the TLS/SSL certificate.

  • :certificate_name (required, String)

    The TLS/SSL certificate name.

  • :certificate_domain_name (required, String)

    The domain name (e.g., example.com) for your TLS/SSL certificate.

  • :certificate_alternative_names (Array<String>)

    An array of strings listing alternative domain names for your TLS/SSL certificate.

Returns:

See Also:



1155
1156
1157
1158
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 1155

def create_load_balancer_tls_certificate(params = {}, options = {})
  req = build_request(:create_load_balancer_tls_certificate, params)
  req.send_request(options)
end

#delete_disk(params = {}) ⇒ Types::DeleteDiskResult

Deletes the specified block storage disk. The disk must be in the available state (not attached to a Lightsail instance).

The disk may remain in the deleting state for several minutes.

Examples:

Request syntax with placeholder values


resp = client.delete_disk({
  disk_name: "ResourceName", # required
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operations[0].created_at #=> Time
resp.operations[0].location.availability_zone #=> String
resp.operations[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> Boolean
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :disk_name (required, String)

    The unique name of the disk you want to delete (e.g., my-disk).

Returns:

See Also:



1201
1202
1203
1204
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 1201

def delete_disk(params = {}, options = {})
  req = build_request(:delete_disk, params)
  req.send_request(options)
end

#delete_disk_snapshot(params = {}) ⇒ Types::DeleteDiskSnapshotResult

Deletes the specified disk snapshot.

When you make periodic snapshots of a disk, the snapshots are incremental, and only the blocks on the device that have changed since your last snapshot are saved in the new snapshot. When you delete a snapshot, only the data not needed for any other snapshot is removed. So regardless of which prior snapshots have been deleted, all active snapshots will have access to all the information needed to restore the disk.

Examples:

Request syntax with placeholder values


resp = client.delete_disk_snapshot({
  disk_snapshot_name: "ResourceName", # required
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operations[0].created_at #=> Time
resp.operations[0].location.availability_zone #=> String
resp.operations[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> Boolean
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :disk_snapshot_name (required, String)

    The name of the disk snapshot you want to delete (e.g., my-disk-snapshot).

Returns:

See Also:



1251
1252
1253
1254
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 1251

def delete_disk_snapshot(params = {}, options = {})
  req = build_request(:delete_disk_snapshot, params)
  req.send_request(options)
end

#delete_domain(params = {}) ⇒ Types::DeleteDomainResult

Deletes the specified domain recordset and all of its domain records.

Examples:

Request syntax with placeholder values


resp = client.delete_domain({
  domain_name: "DomainName", # required
})

Response structure


resp.operation.id #=> String
resp.operation.resource_name #=> String
resp.operation.resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operation.created_at #=> Time
resp.operation.location.availability_zone #=> String
resp.operation.location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operation.is_terminal #=> Boolean
resp.operation.operation_details #=> String
resp.operation.operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operation.status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operation.status_changed_at #=> Time
resp.operation.error_code #=> String
resp.operation.error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain_name (required, String)

    The specific domain name to delete.

Returns:

See Also:



1291
1292
1293
1294
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 1291

def delete_domain(params = {}, options = {})
  req = build_request(:delete_domain, params)
  req.send_request(options)
end

#delete_domain_entry(params = {}) ⇒ Types::DeleteDomainEntryResult

Deletes a specific domain entry.

Examples:

Request syntax with placeholder values


resp = client.delete_domain_entry({
  domain_name: "DomainName", # required
  domain_entry: { # required
    id: "NonEmptyString",
    name: "DomainName",
    target: "string",
    is_alias: false,
    type: "DomainEntryType",
    options: {
      "DomainEntryOptionsKeys" => "string",
    },
  },
})

Response structure


resp.operation.id #=> String
resp.operation.resource_name #=> String
resp.operation.resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operation.created_at #=> Time
resp.operation.location.availability_zone #=> String
resp.operation.location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operation.is_terminal #=> Boolean
resp.operation.operation_details #=> String
resp.operation.operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operation.status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operation.status_changed_at #=> Time
resp.operation.error_code #=> String
resp.operation.error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain_name (required, String)

    The name of the domain entry to delete.

  • :domain_entry (required, Types::DomainEntry)

    An array of key-value pairs containing information about your domain entries.

Returns:

See Also:



1345
1346
1347
1348
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 1345

def delete_domain_entry(params = {}, options = {})
  req = build_request(:delete_domain_entry, params)
  req.send_request(options)
end

#delete_instance(params = {}) ⇒ Types::DeleteInstanceResult

Deletes a specific Amazon Lightsail virtual private server, or instance.

Examples:

Request syntax with placeholder values


resp = client.delete_instance({
  instance_name: "ResourceName", # required
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operations[0].created_at #=> Time
resp.operations[0].location.availability_zone #=> String
resp.operations[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> Boolean
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_name (required, String)

    The name of the instance to delete.

Returns:

See Also:



1387
1388
1389
1390
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 1387

def delete_instance(params = {}, options = {})
  req = build_request(:delete_instance, params)
  req.send_request(options)
end

#delete_instance_snapshot(params = {}) ⇒ Types::DeleteInstanceSnapshotResult

Deletes a specific snapshot of a virtual private server (or instance).

Examples:

Request syntax with placeholder values


resp = client.delete_instance_snapshot({
  instance_snapshot_name: "ResourceName", # required
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operations[0].created_at #=> Time
resp.operations[0].location.availability_zone #=> String
resp.operations[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> Boolean
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_snapshot_name (required, String)

    The name of the snapshot to delete.

Returns:

See Also:



1429
1430
1431
1432
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 1429

def delete_instance_snapshot(params = {}, options = {})
  req = build_request(:delete_instance_snapshot, params)
  req.send_request(options)
end

#delete_key_pair(params = {}) ⇒ Types::DeleteKeyPairResult

Deletes a specific SSH key pair.

Examples:

Request syntax with placeholder values


resp = client.delete_key_pair({
  key_pair_name: "ResourceName", # required
})

Response structure


resp.operation.id #=> String
resp.operation.resource_name #=> String
resp.operation.resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operation.created_at #=> Time
resp.operation.location.availability_zone #=> String
resp.operation.location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operation.is_terminal #=> Boolean
resp.operation.operation_details #=> String
resp.operation.operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operation.status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operation.status_changed_at #=> Time
resp.operation.error_code #=> String
resp.operation.error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :key_pair_name (required, String)

    The name of the key pair to delete.

Returns:

See Also:



1469
1470
1471
1472
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 1469

def delete_key_pair(params = {}, options = {})
  req = build_request(:delete_key_pair, params)
  req.send_request(options)
end

#delete_load_balancer(params = {}) ⇒ Types::DeleteLoadBalancerResult

Deletes a Lightsail load balancer.

Examples:

Request syntax with placeholder values


resp = client.delete_load_balancer({
  load_balancer_name: "ResourceName", # required
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operations[0].created_at #=> Time
resp.operations[0].location.availability_zone #=> String
resp.operations[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> Boolean
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :load_balancer_name (required, String)

    The name of the load balancer you want to delete.

Returns:

See Also:



1510
1511
1512
1513
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 1510

def delete_load_balancer(params = {}, options = {})
  req = build_request(:delete_load_balancer, params)
  req.send_request(options)
end

#delete_load_balancer_tls_certificate(params = {}) ⇒ Types::DeleteLoadBalancerTlsCertificateResult

Deletes a TLS/SSL certificate associated with a Lightsail load balancer.

Examples:

Request syntax with placeholder values


resp = client.delete_load_balancer_tls_certificate({
  load_balancer_name: "ResourceName", # required
  certificate_name: "ResourceName", # required
  force: false,
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operations[0].created_at #=> Time
resp.operations[0].location.availability_zone #=> String
resp.operations[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> Boolean
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :load_balancer_name (required, String)

    The load balancer name.

  • :certificate_name (required, String)

    The TLS/SSL certificate name.

  • :force (Boolean)

    When true, forces the deletion of a TLS/SSL certificate.

Returns:

See Also:



1560
1561
1562
1563
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 1560

def delete_load_balancer_tls_certificate(params = {}, options = {})
  req = build_request(:delete_load_balancer_tls_certificate, params)
  req.send_request(options)
end

#detach_disk(params = {}) ⇒ Types::DetachDiskResult

Detaches a stopped block storage disk from a Lightsail instance. Make sure to unmount any file systems on the device within your operating system before stopping the instance and detaching the disk.

Examples:

Request syntax with placeholder values


resp = client.detach_disk({
  disk_name: "ResourceName", # required
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operations[0].created_at #=> Time
resp.operations[0].location.availability_zone #=> String
resp.operations[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> Boolean
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :disk_name (required, String)

    The unique name of the disk you want to detach from your instance (e.g., my-disk).

Returns:

See Also:



1604
1605
1606
1607
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 1604

def detach_disk(params = {}, options = {})
  req = build_request(:detach_disk, params)
  req.send_request(options)
end

#detach_instances_from_load_balancer(params = {}) ⇒ Types::DetachInstancesFromLoadBalancerResult

Detaches the specified instances from a Lightsail load balancer.

Examples:

Request syntax with placeholder values


resp = client.detach_instances_from_load_balancer({
  load_balancer_name: "ResourceName", # required
  instance_names: ["ResourceName"], # required
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operations[0].created_at #=> Time
resp.operations[0].location.availability_zone #=> String
resp.operations[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> Boolean
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :load_balancer_name (required, String)

    The name of the Lightsail load balancer.

  • :instance_names (required, Array<String>)

    An array of strings containing the names of the instances you want to detach from the load balancer.

Returns:

See Also:



1650
1651
1652
1653
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 1650

def detach_instances_from_load_balancer(params = {}, options = {})
  req = build_request(:detach_instances_from_load_balancer, params)
  req.send_request(options)
end

#detach_static_ip(params = {}) ⇒ Types::DetachStaticIpResult

Detaches a static IP from the Amazon Lightsail instance to which it is attached.

Examples:

Request syntax with placeholder values


resp = client.detach_static_ip({
  static_ip_name: "ResourceName", # required
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operations[0].created_at #=> Time
resp.operations[0].location.availability_zone #=> String
resp.operations[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> Boolean
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :static_ip_name (required, String)

    The name of the static IP to detach from the instance.

Returns:

See Also:



1692
1693
1694
1695
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 1692

def detach_static_ip(params = {}, options = {})
  req = build_request(:detach_static_ip, params)
  req.send_request(options)
end

#download_default_key_pair(params = {}) ⇒ Types::DownloadDefaultKeyPairResult

Downloads the default SSH key pair from the user's account.

Examples:

Response structure


resp.public_key_base_64 #=> String
resp.private_key_base_64 #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Returns:

See Also:



1713
1714
1715
1716
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 1713

def download_default_key_pair(params = {}, options = {})
  req = build_request(:download_default_key_pair, params)
  req.send_request(options)
end

#get_active_names(params = {}) ⇒ Types::GetActiveNamesResult

Returns the names of all active (not deleted) resources.

Examples:

Request syntax with placeholder values


resp = client.get_active_names({
  page_token: "string",
})

Response structure


resp.active_names #=> Array
resp.active_names[0] #=> String
resp.next_page_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :page_token (String)

    A token used for paginating results from your get active names request.

Returns:

See Also:



1745
1746
1747
1748
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 1745

def get_active_names(params = {}, options = {})
  req = build_request(:get_active_names, params)
  req.send_request(options)
end

#get_blueprints(params = {}) ⇒ Types::GetBlueprintsResult

Returns the list of available instance images, or blueprints. You can use a blueprint to create a new virtual private server already running a specific operating system, as well as a preinstalled app or development stack. The software each instance is running depends on the blueprint image you choose.

Examples:

Request syntax with placeholder values


resp = client.get_blueprints({
  include_inactive: false,
  page_token: "string",
})

Response structure


resp.blueprints #=> Array
resp.blueprints[0].blueprint_id #=> String
resp.blueprints[0].name #=> String
resp.blueprints[0].group #=> String
resp.blueprints[0].type #=> String, one of "os", "app"
resp.blueprints[0].description #=> String
resp.blueprints[0].is_active #=> Boolean
resp.blueprints[0].min_power #=> Integer
resp.blueprints[0].version #=> String
resp.blueprints[0].version_code #=> String
resp.blueprints[0].product_url #=> String
resp.blueprints[0].license_url #=> String
resp.blueprints[0].platform #=> String, one of "LINUX_UNIX", "WINDOWS"
resp.next_page_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :include_inactive (Boolean)

    A Boolean value indicating whether to include inactive results in your request.

  • :page_token (String)

    A token used for advancing to the next page of results from your get blueprints request.

Returns:

See Also:



1797
1798
1799
1800
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 1797

def get_blueprints(params = {}, options = {})
  req = build_request(:get_blueprints, params)
  req.send_request(options)
end

#get_bundles(params = {}) ⇒ Types::GetBundlesResult

Returns the list of bundles that are available for purchase. A bundle describes the specs for your virtual private server (or instance).

Examples:

Request syntax with placeholder values


resp = client.get_bundles({
  include_inactive: false,
  page_token: "string",
})

Response structure


resp.bundles #=> Array
resp.bundles[0].price #=> Float
resp.bundles[0].cpu_count #=> Integer
resp.bundles[0].disk_size_in_gb #=> Integer
resp.bundles[0].bundle_id #=> String
resp.bundles[0].instance_type #=> String
resp.bundles[0].is_active #=> Boolean
resp.bundles[0].name #=> String
resp.bundles[0].power #=> Integer
resp.bundles[0].ram_size_in_gb #=> Float
resp.bundles[0].transfer_per_month_in_gb #=> Integer
resp.bundles[0].supported_platforms #=> Array
resp.bundles[0].supported_platforms[0] #=> String, one of "LINUX_UNIX", "WINDOWS"
resp.next_page_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :include_inactive (Boolean)

    A Boolean value that indicates whether to include inactive bundle results in your request.

  • :page_token (String)

    A token used for advancing to the next page of results from your get bundles request.

Returns:

See Also:



1846
1847
1848
1849
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 1846

def get_bundles(params = {}, options = {})
  req = build_request(:get_bundles, params)
  req.send_request(options)
end

#get_disk(params = {}) ⇒ Types::GetDiskResult

Returns information about a specific block storage disk.

Examples:

Request syntax with placeholder values


resp = client.get_disk({
  disk_name: "ResourceName", # required
})

Response structure


resp.disk.name #=> String
resp.disk.arn #=> String
resp.disk.support_code #=> String
resp.disk.created_at #=> Time
resp.disk.location.availability_zone #=> String
resp.disk.location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.disk.resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.disk.size_in_gb #=> Integer
resp.disk.is_system_disk #=> Boolean
resp.disk.iops #=> Integer
resp.disk.path #=> String
resp.disk.state #=> String, one of "pending", "error", "available", "in-use", "unknown"
resp.disk.attached_to #=> String
resp.disk.is_attached #=> Boolean
resp.disk.attachment_state #=> String
resp.disk.gb_in_use #=> Integer

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :disk_name (required, String)

    The name of the disk (e.g., my-disk).

Returns:

See Also:



1889
1890
1891
1892
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 1889

def get_disk(params = {}, options = {})
  req = build_request(:get_disk, params)
  req.send_request(options)
end

#get_disk_snapshot(params = {}) ⇒ Types::GetDiskSnapshotResult

Returns information about a specific block storage disk snapshot.

Examples:

Request syntax with placeholder values


resp = client.get_disk_snapshot({
  disk_snapshot_name: "ResourceName", # required
})

Response structure


resp.disk_snapshot.name #=> String
resp.disk_snapshot.arn #=> String
resp.disk_snapshot.support_code #=> String
resp.disk_snapshot.created_at #=> Time
resp.disk_snapshot.location.availability_zone #=> String
resp.disk_snapshot.location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.disk_snapshot.resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.disk_snapshot.size_in_gb #=> Integer
resp.disk_snapshot.state #=> String, one of "pending", "completed", "error", "unknown"
resp.disk_snapshot.progress #=> String
resp.disk_snapshot.from_disk_name #=> String
resp.disk_snapshot.from_disk_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :disk_snapshot_name (required, String)

    The name of the disk snapshot (e.g., my-disk-snapshot).

Returns:

See Also:



1928
1929
1930
1931
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 1928

def get_disk_snapshot(params = {}, options = {})
  req = build_request(:get_disk_snapshot, params)
  req.send_request(options)
end

#get_disk_snapshots(params = {}) ⇒ Types::GetDiskSnapshotsResult

Returns information about all block storage disk snapshots in your AWS account and region.

If you are describing a long list of disk snapshots, you can paginate the output to make the list more manageable. You can use the pageToken and nextPageToken values to retrieve the next items in the list.

Examples:

Request syntax with placeholder values


resp = client.get_disk_snapshots({
  page_token: "string",
})

Response structure


resp.disk_snapshots #=> Array
resp.disk_snapshots[0].name #=> String
resp.disk_snapshots[0].arn #=> String
resp.disk_snapshots[0].support_code #=> String
resp.disk_snapshots[0].created_at #=> Time
resp.disk_snapshots[0].location.availability_zone #=> String
resp.disk_snapshots[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.disk_snapshots[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.disk_snapshots[0].size_in_gb #=> Integer
resp.disk_snapshots[0].state #=> String, one of "pending", "completed", "error", "unknown"
resp.disk_snapshots[0].progress #=> String
resp.disk_snapshots[0].from_disk_name #=> String
resp.disk_snapshots[0].from_disk_arn #=> String
resp.next_page_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :page_token (String)

    A token used for advancing to the next page of results from your GetDiskSnapshots request.

Returns:

See Also:



1976
1977
1978
1979
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 1976

def get_disk_snapshots(params = {}, options = {})
  req = build_request(:get_disk_snapshots, params)
  req.send_request(options)
end

#get_disks(params = {}) ⇒ Types::GetDisksResult

Returns information about all block storage disks in your AWS account and region.

If you are describing a long list of disks, you can paginate the output to make the list more manageable. You can use the pageToken and nextPageToken values to retrieve the next items in the list.

Examples:

Request syntax with placeholder values


resp = client.get_disks({
  page_token: "string",
})

Response structure


resp.disks #=> Array
resp.disks[0].name #=> String
resp.disks[0].arn #=> String
resp.disks[0].support_code #=> String
resp.disks[0].created_at #=> Time
resp.disks[0].location.availability_zone #=> String
resp.disks[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.disks[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.disks[0].size_in_gb #=> Integer
resp.disks[0].is_system_disk #=> Boolean
resp.disks[0].iops #=> Integer
resp.disks[0].path #=> String
resp.disks[0].state #=> String, one of "pending", "error", "available", "in-use", "unknown"
resp.disks[0].attached_to #=> String
resp.disks[0].is_attached #=> Boolean
resp.disks[0].attachment_state #=> String
resp.disks[0].gb_in_use #=> Integer
resp.next_page_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :page_token (String)

    A token used for advancing to the next page of results from your GetDisks request.

Returns:

See Also:



2028
2029
2030
2031
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 2028

def get_disks(params = {}, options = {})
  req = build_request(:get_disks, params)
  req.send_request(options)
end

#get_domain(params = {}) ⇒ Types::GetDomainResult

Returns information about a specific domain recordset.

Examples:

Request syntax with placeholder values


resp = client.get_domain({
  domain_name: "DomainName", # required
})

Response structure


resp.domain.name #=> String
resp.domain.arn #=> String
resp.domain.support_code #=> String
resp.domain.created_at #=> Time
resp.domain.location.availability_zone #=> String
resp.domain.location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.domain.resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.domain.domain_entries #=> Array
resp.domain.domain_entries[0].id #=> String
resp.domain.domain_entries[0].name #=> String
resp.domain.domain_entries[0].target #=> String
resp.domain.domain_entries[0].is_alias #=> Boolean
resp.domain.domain_entries[0].type #=> String
resp.domain.domain_entries[0].options #=> Hash
resp.domain.domain_entries[0].options["DomainEntryOptionsKeys"] #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain_name (required, String)

    The domain name for which your want to return information about.

Returns:

See Also:



2070
2071
2072
2073
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 2070

def get_domain(params = {}, options = {})
  req = build_request(:get_domain, params)
  req.send_request(options)
end

#get_domains(params = {}) ⇒ Types::GetDomainsResult

Returns a list of all domains in the user's account.

Examples:

Request syntax with placeholder values


resp = client.get_domains({
  page_token: "string",
})

Response structure


resp.domains #=> Array
resp.domains[0].name #=> String
resp.domains[0].arn #=> String
resp.domains[0].support_code #=> String
resp.domains[0].created_at #=> Time
resp.domains[0].location.availability_zone #=> String
resp.domains[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.domains[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.domains[0].domain_entries #=> Array
resp.domains[0].domain_entries[0].id #=> String
resp.domains[0].domain_entries[0].name #=> String
resp.domains[0].domain_entries[0].target #=> String
resp.domains[0].domain_entries[0].is_alias #=> Boolean
resp.domains[0].domain_entries[0].type #=> String
resp.domains[0].domain_entries[0].options #=> Hash
resp.domains[0].domain_entries[0].options["DomainEntryOptionsKeys"] #=> String
resp.next_page_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :page_token (String)

    A token used for advancing to the next page of results from your get domains request.

Returns:

See Also:



2116
2117
2118
2119
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 2116

def get_domains(params = {}, options = {})
  req = build_request(:get_domains, params)
  req.send_request(options)
end

#get_instance(params = {}) ⇒ Types::GetInstanceResult

Returns information about a specific Amazon Lightsail instance, which is a virtual private server.

Examples:

Request syntax with placeholder values


resp = client.get_instance({
  instance_name: "ResourceName", # required
})

Response structure


resp.instance.name #=> String
resp.instance.arn #=> String
resp.instance.support_code #=> String
resp.instance.created_at #=> Time
resp.instance.location.availability_zone #=> String
resp.instance.location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.instance.resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.instance.blueprint_id #=> String
resp.instance.blueprint_name #=> String
resp.instance.bundle_id #=> String
resp.instance.is_static_ip #=> Boolean
resp.instance.private_ip_address #=> String
resp.instance.public_ip_address #=> String
resp.instance.ipv6_address #=> String
resp.instance.hardware.cpu_count #=> Integer
resp.instance.hardware.disks #=> Array
resp.instance.hardware.disks[0].name #=> String
resp.instance.hardware.disks[0].arn #=> String
resp.instance.hardware.disks[0].support_code #=> String
resp.instance.hardware.disks[0].created_at #=> Time
resp.instance.hardware.disks[0].location.availability_zone #=> String
resp.instance.hardware.disks[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.instance.hardware.disks[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.instance.hardware.disks[0].size_in_gb #=> Integer
resp.instance.hardware.disks[0].is_system_disk #=> Boolean
resp.instance.hardware.disks[0].iops #=> Integer
resp.instance.hardware.disks[0].path #=> String
resp.instance.hardware.disks[0].state #=> String, one of "pending", "error", "available", "in-use", "unknown"
resp.instance.hardware.disks[0].attached_to #=> String
resp.instance.hardware.disks[0].is_attached #=> Boolean
resp.instance.hardware.disks[0].attachment_state #=> String
resp.instance.hardware.disks[0].gb_in_use #=> Integer
resp.instance.hardware.ram_size_in_gb #=> Float
resp.instance.networking.monthly_transfer.gb_per_month_allocated #=> Integer
resp.instance.networking.ports #=> Array
resp.instance.networking.ports[0].from_port #=> Integer
resp.instance.networking.ports[0].to_port #=> Integer
resp.instance.networking.ports[0].protocol #=> String, one of "tcp", "all", "udp"
resp.instance.networking.ports[0].access_from #=> String
resp.instance.networking.ports[0].access_type #=> String, one of "Public", "Private"
resp.instance.networking.ports[0].common_name #=> String
resp.instance.networking.ports[0].access_direction #=> String, one of "inbound", "outbound"
resp.instance.state.code #=> Integer
resp.instance.state.name #=> String
resp.instance.username #=> String
resp.instance.ssh_key_name #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_name (required, String)

    The name of the instance.

Returns:

See Also:



2190
2191
2192
2193
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 2190

def get_instance(params = {}, options = {})
  req = build_request(:get_instance, params)
  req.send_request(options)
end

#get_instance_access_details(params = {}) ⇒ Types::GetInstanceAccessDetailsResult

Returns temporary SSH keys you can use to connect to a specific virtual private server, or instance.

Examples:

Request syntax with placeholder values


resp = client.get_instance_access_details({
  instance_name: "ResourceName", # required
  protocol: "ssh", # accepts ssh, rdp
})

Response structure


resp.access_details.cert_key #=> String
resp.access_details.expires_at #=> Time
resp.access_details.ip_address #=> String
resp.access_details.password #=> String
resp.access_details.password_data.ciphertext #=> String
resp.access_details.password_data.key_pair_name #=> String
resp.access_details.private_key #=> String
resp.access_details.protocol #=> String, one of "ssh", "rdp"
resp.access_details.instance_name #=> String
resp.access_details.username #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_name (required, String)

    The name of the instance to access.

  • :protocol (String)

    The protocol to use to connect to your instance. Defaults to ssh.

Returns:

See Also:



2232
2233
2234
2235
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 2232

def get_instance_access_details(params = {}, options = {})
  req = build_request(:get_instance_access_details, params)
  req.send_request(options)
end

#get_instance_metric_data(params = {}) ⇒ Types::GetInstanceMetricDataResult

Returns the data points for the specified Amazon Lightsail instance metric, given an instance name.

Examples:

Request syntax with placeholder values


resp = client.get_instance_metric_data({
  instance_name: "ResourceName", # required
  metric_name: "CPUUtilization", # required, accepts CPUUtilization, NetworkIn, NetworkOut, StatusCheckFailed, StatusCheckFailed_Instance, StatusCheckFailed_System
  period: 1, # required
  start_time: Time.now, # required
  end_time: Time.now, # required
  unit: "Seconds", # required, accepts Seconds, Microseconds, Milliseconds, Bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Bits, Kilobits, Megabits, Gigabits, Terabits, Percent, Count, Bytes/Second, Kilobytes/Second, Megabytes/Second, Gigabytes/Second, Terabytes/Second, Bits/Second, Kilobits/Second, Megabits/Second, Gigabits/Second, Terabits/Second, Count/Second, None
  statistics: ["Minimum"], # required, accepts Minimum, Maximum, Sum, Average, SampleCount
})

Response structure


resp.metric_name #=> String, one of "CPUUtilization", "NetworkIn", "NetworkOut", "StatusCheckFailed", "StatusCheckFailed_Instance", "StatusCheckFailed_System"
resp.metric_data #=> Array
resp.metric_data[0].average #=> Float
resp.metric_data[0].maximum #=> Float
resp.metric_data[0].minimum #=> Float
resp.metric_data[0].sample_count #=> Float
resp.metric_data[0].sum #=> Float
resp.metric_data[0].timestamp #=> Time
resp.metric_data[0].unit #=> String, one of "Seconds", "Microseconds", "Milliseconds", "Bytes", "Kilobytes", "Megabytes", "Gigabytes", "Terabytes", "Bits", "Kilobits", "Megabits", "Gigabits", "Terabits", "Percent", "Count", "Bytes/Second", "Kilobytes/Second", "Megabytes/Second", "Gigabytes/Second", "Terabytes/Second", "Bits/Second", "Kilobits/Second", "Megabits/Second", "Gigabits/Second", "Terabits/Second", "Count/Second", "None"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_name (required, String)

    The name of the instance for which you want to get metrics data.

  • :metric_name (required, String)

    The metric name to get data about.

  • :period (required, Integer)

    The time period for which you are requesting data.

  • :start_time (required, Time, DateTime, Date, Integer, String)

    The start time of the time period.

  • :end_time (required, Time, DateTime, Date, Integer, String)

    The end time of the time period.

  • :unit (required, String)

    The unit. The list of valid values is below.

  • :statistics (required, Array<String>)

    The instance statistics.

Returns:

See Also:



2294
2295
2296
2297
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 2294

def get_instance_metric_data(params = {}, options = {})
  req = build_request(:get_instance_metric_data, params)
  req.send_request(options)
end

#get_instance_port_states(params = {}) ⇒ Types::GetInstancePortStatesResult

Returns the port states for a specific virtual private server, or instance.

Examples:

Request syntax with placeholder values


resp = client.get_instance_port_states({
  instance_name: "ResourceName", # required
})

Response structure


resp.port_states #=> Array
resp.port_states[0].from_port #=> Integer
resp.port_states[0].to_port #=> Integer
resp.port_states[0].protocol #=> String, one of "tcp", "all", "udp"
resp.port_states[0].state #=> String, one of "open", "closed"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_name (required, String)

    The name of the instance.

Returns:

See Also:



2327
2328
2329
2330
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 2327

def get_instance_port_states(params = {}, options = {})
  req = build_request(:get_instance_port_states, params)
  req.send_request(options)
end

#get_instance_snapshot(params = {}) ⇒ Types::GetInstanceSnapshotResult

Returns information about a specific instance snapshot.

Examples:

Request syntax with placeholder values


resp = client.get_instance_snapshot({
  instance_snapshot_name: "ResourceName", # required
})

Response structure


resp.instance_snapshot.name #=> String
resp.instance_snapshot.arn #=> String
resp.instance_snapshot.support_code #=> String
resp.instance_snapshot.created_at #=> Time
resp.instance_snapshot.location.availability_zone #=> String
resp.instance_snapshot.location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.instance_snapshot.resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.instance_snapshot.state #=> String, one of "pending", "error", "available"
resp.instance_snapshot.progress #=> String
resp.instance_snapshot.from_attached_disks #=> Array
resp.instance_snapshot.from_attached_disks[0].name #=> String
resp.instance_snapshot.from_attached_disks[0].arn #=> String
resp.instance_snapshot.from_attached_disks[0].support_code #=> String
resp.instance_snapshot.from_attached_disks[0].created_at #=> Time
resp.instance_snapshot.from_attached_disks[0].location.availability_zone #=> String
resp.instance_snapshot.from_attached_disks[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.instance_snapshot.from_attached_disks[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.instance_snapshot.from_attached_disks[0].size_in_gb #=> Integer
resp.instance_snapshot.from_attached_disks[0].is_system_disk #=> Boolean
resp.instance_snapshot.from_attached_disks[0].iops #=> Integer
resp.instance_snapshot.from_attached_disks[0].path #=> String
resp.instance_snapshot.from_attached_disks[0].state #=> String, one of "pending", "error", "available", "in-use", "unknown"
resp.instance_snapshot.from_attached_disks[0].attached_to #=> String
resp.instance_snapshot.from_attached_disks[0].is_attached #=> Boolean
resp.instance_snapshot.from_attached_disks[0].attachment_state #=> String
resp.instance_snapshot.from_attached_disks[0].gb_in_use #=> Integer
resp.instance_snapshot.from_instance_name #=> String
resp.instance_snapshot.from_instance_arn #=> String
resp.instance_snapshot.from_blueprint_id #=> String
resp.instance_snapshot.from_bundle_id #=> String
resp.instance_snapshot.size_in_gb #=> Integer

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_snapshot_name (required, String)

    The name of the snapshot for which you are requesting information.

Returns:

See Also:



2385
2386
2387
2388
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 2385

def get_instance_snapshot(params = {}, options = {})
  req = build_request(:get_instance_snapshot, params)
  req.send_request(options)
end

#get_instance_snapshots(params = {}) ⇒ Types::GetInstanceSnapshotsResult

Returns all instance snapshots for the user's account.

Examples:

Request syntax with placeholder values


resp = client.get_instance_snapshots({
  page_token: "string",
})

Response structure


resp.instance_snapshots #=> Array
resp.instance_snapshots[0].name #=> String
resp.instance_snapshots[0].arn #=> String
resp.instance_snapshots[0].support_code #=> String
resp.instance_snapshots[0].created_at #=> Time
resp.instance_snapshots[0].location.availability_zone #=> String
resp.instance_snapshots[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.instance_snapshots[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.instance_snapshots[0].state #=> String, one of "pending", "error", "available"
resp.instance_snapshots[0].progress #=> String
resp.instance_snapshots[0].from_attached_disks #=> Array
resp.instance_snapshots[0].from_attached_disks[0].name #=> String
resp.instance_snapshots[0].from_attached_disks[0].arn #=> String
resp.instance_snapshots[0].from_attached_disks[0].support_code #=> String
resp.instance_snapshots[0].from_attached_disks[0].created_at #=> Time
resp.instance_snapshots[0].from_attached_disks[0].location.availability_zone #=> String
resp.instance_snapshots[0].from_attached_disks[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.instance_snapshots[0].from_attached_disks[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.instance_snapshots[0].from_attached_disks[0].size_in_gb #=> Integer
resp.instance_snapshots[0].from_attached_disks[0].is_system_disk #=> Boolean
resp.instance_snapshots[0].from_attached_disks[0].iops #=> Integer
resp.instance_snapshots[0].from_attached_disks[0].path #=> String
resp.instance_snapshots[0].from_attached_disks[0].state #=> String, one of "pending", "error", "available", "in-use", "unknown"
resp.instance_snapshots[0].from_attached_disks[0].attached_to #=> String
resp.instance_snapshots[0].from_attached_disks[0].is_attached #=> Boolean
resp.instance_snapshots[0].from_attached_disks[0].attachment_state #=> String
resp.instance_snapshots[0].from_attached_disks[0].gb_in_use #=> Integer
resp.instance_snapshots[0].from_instance_name #=> String
resp.instance_snapshots[0].from_instance_arn #=> String
resp.instance_snapshots[0].from_blueprint_id #=> String
resp.instance_snapshots[0].from_bundle_id #=> String
resp.instance_snapshots[0].size_in_gb #=> Integer
resp.next_page_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :page_token (String)

    A token used for advancing to the next page of results from your get instance snapshots request.

Returns:

See Also:



2447
2448
2449
2450
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 2447

def get_instance_snapshots(params = {}, options = {})
  req = build_request(:get_instance_snapshots, params)
  req.send_request(options)
end

#get_instance_state(params = {}) ⇒ Types::GetInstanceStateResult

Returns the state of a specific instance. Works on one instance at a time.

Examples:

Request syntax with placeholder values


resp = client.get_instance_state({
  instance_name: "ResourceName", # required
})

Response structure


resp.state.code #=> Integer
resp.state.name #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_name (required, String)

    The name of the instance to get state information about.

Returns:

See Also:



2477
2478
2479
2480
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 2477

def get_instance_state(params = {}, options = {})
  req = build_request(:get_instance_state, params)
  req.send_request(options)
end

#get_instances(params = {}) ⇒ Types::GetInstancesResult

Returns information about all Amazon Lightsail virtual private servers, or instances.

Examples:

Request syntax with placeholder values


resp = client.get_instances({
  page_token: "string",
})

Response structure


resp.instances #=> Array
resp.instances[0].name #=> String
resp.instances[0].arn #=> String
resp.instances[0].support_code #=> String
resp.instances[0].created_at #=> Time
resp.instances[0].location.availability_zone #=> String
resp.instances[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.instances[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.instances[0].blueprint_id #=> String
resp.instances[0].blueprint_name #=> String
resp.instances[0].bundle_id #=> String
resp.instances[0].is_static_ip #=> Boolean
resp.instances[0].private_ip_address #=> String
resp.instances[0].public_ip_address #=> String
resp.instances[0].ipv6_address #=> String
resp.instances[0].hardware.cpu_count #=> Integer
resp.instances[0].hardware.disks #=> Array
resp.instances[0].hardware.disks[0].name #=> String
resp.instances[0].hardware.disks[0].arn #=> String
resp.instances[0].hardware.disks[0].support_code #=> String
resp.instances[0].hardware.disks[0].created_at #=> Time
resp.instances[0].hardware.disks[0].location.availability_zone #=> String
resp.instances[0].hardware.disks[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.instances[0].hardware.disks[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.instances[0].hardware.disks[0].size_in_gb #=> Integer
resp.instances[0].hardware.disks[0].is_system_disk #=> Boolean
resp.instances[0].hardware.disks[0].iops #=> Integer
resp.instances[0].hardware.disks[0].path #=> String
resp.instances[0].hardware.disks[0].state #=> String, one of "pending", "error", "available", "in-use", "unknown"
resp.instances[0].hardware.disks[0].attached_to #=> String
resp.instances[0].hardware.disks[0].is_attached #=> Boolean
resp.instances[0].hardware.disks[0].attachment_state #=> String
resp.instances[0].hardware.disks[0].gb_in_use #=> Integer
resp.instances[0].hardware.ram_size_in_gb #=> Float
resp.instances[0].networking.monthly_transfer.gb_per_month_allocated #=> Integer
resp.instances[0].networking.ports #=> Array
resp.instances[0].networking.ports[0].from_port #=> Integer
resp.instances[0].networking.ports[0].to_port #=> Integer
resp.instances[0].networking.ports[0].protocol #=> String, one of "tcp", "all", "udp"
resp.instances[0].networking.ports[0].access_from #=> String
resp.instances[0].networking.ports[0].access_type #=> String, one of "Public", "Private"
resp.instances[0].networking.ports[0].common_name #=> String
resp.instances[0].networking.ports[0].access_direction #=> String, one of "inbound", "outbound"
resp.instances[0].state.code #=> Integer
resp.instances[0].state.name #=> String
resp.instances[0].username #=> String
resp.instances[0].ssh_key_name #=> String
resp.next_page_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :page_token (String)

    A token used for advancing to the next page of results from your get instances request.

Returns:

See Also:



2555
2556
2557
2558
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 2555

def get_instances(params = {}, options = {})
  req = build_request(:get_instances, params)
  req.send_request(options)
end

#get_key_pair(params = {}) ⇒ Types::GetKeyPairResult

Returns information about a specific key pair.

Examples:

Request syntax with placeholder values


resp = client.get_key_pair({
  key_pair_name: "ResourceName", # required
})

Response structure


resp.key_pair.name #=> String
resp.key_pair.arn #=> String
resp.key_pair.support_code #=> String
resp.key_pair.created_at #=> Time
resp.key_pair.location.availability_zone #=> String
resp.key_pair.location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.key_pair.resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.key_pair.fingerprint #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :key_pair_name (required, String)

    The name of the key pair for which you are requesting information.

Returns:

See Also:



2590
2591
2592
2593
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 2590

def get_key_pair(params = {}, options = {})
  req = build_request(:get_key_pair, params)
  req.send_request(options)
end

#get_key_pairs(params = {}) ⇒ Types::GetKeyPairsResult

Returns information about all key pairs in the user's account.

Examples:

Request syntax with placeholder values


resp = client.get_key_pairs({
  page_token: "string",
})

Response structure


resp.key_pairs #=> Array
resp.key_pairs[0].name #=> String
resp.key_pairs[0].arn #=> String
resp.key_pairs[0].support_code #=> String
resp.key_pairs[0].created_at #=> Time
resp.key_pairs[0].location.availability_zone #=> String
resp.key_pairs[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.key_pairs[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.key_pairs[0].fingerprint #=> String
resp.next_page_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :page_token (String)

    A token used for advancing to the next page of results from your get key pairs request.

Returns:

See Also:



2629
2630
2631
2632
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 2629

def get_key_pairs(params = {}, options = {})
  req = build_request(:get_key_pairs, params)
  req.send_request(options)
end

#get_load_balancer(params = {}) ⇒ Types::GetLoadBalancerResult

Returns information about the specified Lightsail load balancer.

Examples:

Request syntax with placeholder values


resp = client.get_load_balancer({
  load_balancer_name: "ResourceName", # required
})

Response structure


resp.load_balancer.name #=> String
resp.load_balancer.arn #=> String
resp.load_balancer.support_code #=> String
resp.load_balancer.created_at #=> Time
resp.load_balancer.location.availability_zone #=> String
resp.load_balancer.location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.load_balancer.resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.load_balancer.dns_name #=> String
resp.load_balancer.state #=> String, one of "active", "provisioning", "active_impaired", "failed", "unknown"
resp.load_balancer.protocol #=> String, one of "HTTP_HTTPS", "HTTP"
resp.load_balancer.public_ports #=> Array
resp.load_balancer.public_ports[0] #=> Integer
resp.load_balancer.health_check_path #=> String
resp.load_balancer.instance_port #=> Integer
resp.load_balancer.instance_health_summary #=> Array
resp.load_balancer.instance_health_summary[0].instance_name #=> String
resp.load_balancer.instance_health_summary[0].instance_health #=> String, one of "initial", "healthy", "unhealthy", "unused", "draining", "unavailable"
resp.load_balancer.instance_health_summary[0].instance_health_reason #=> String, one of "Lb.RegistrationInProgress", "Lb.InitialHealthChecking", "Lb.InternalError", "Instance.ResponseCodeMismatch", "Instance.Timeout", "Instance.FailedHealthChecks", "Instance.NotRegistered", "Instance.NotInUse", "Instance.DeregistrationInProgress", "Instance.InvalidState", "Instance.IpUnusable"
resp.load_balancer.tls_certificate_summaries #=> Array
resp.load_balancer.tls_certificate_summaries[0].name #=> String
resp.load_balancer.tls_certificate_summaries[0].is_attached #=> Boolean
resp.load_balancer.configuration_options #=> Hash
resp.load_balancer.configuration_options["LoadBalancerAttributeName"] #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :load_balancer_name (required, String)

    The name of the load balancer.

Returns:

See Also:



2679
2680
2681
2682
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 2679

def get_load_balancer(params = {}, options = {})
  req = build_request(:get_load_balancer, params)
  req.send_request(options)
end

#get_load_balancer_metric_data(params = {}) ⇒ Types::GetLoadBalancerMetricDataResult

Returns information about health metrics for your Lightsail load balancer.

Examples:

Request syntax with placeholder values


resp = client.get_load_balancer_metric_data({
  load_balancer_name: "ResourceName", # required
  metric_name: "ClientTLSNegotiationErrorCount", # required, accepts ClientTLSNegotiationErrorCount, HealthyHostCount, UnhealthyHostCount, HTTPCode_LB_4XX_Count, HTTPCode_LB_5XX_Count, HTTPCode_Instance_2XX_Count, HTTPCode_Instance_3XX_Count, HTTPCode_Instance_4XX_Count, HTTPCode_Instance_5XX_Count, InstanceResponseTime, RejectedConnectionCount, RequestCount
  period: 1, # required
  start_time: Time.now, # required
  end_time: Time.now, # required
  unit: "Seconds", # required, accepts Seconds, Microseconds, Milliseconds, Bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Bits, Kilobits, Megabits, Gigabits, Terabits, Percent, Count, Bytes/Second, Kilobytes/Second, Megabytes/Second, Gigabytes/Second, Terabytes/Second, Bits/Second, Kilobits/Second, Megabits/Second, Gigabits/Second, Terabits/Second, Count/Second, None
  statistics: ["Minimum"], # required, accepts Minimum, Maximum, Sum, Average, SampleCount
})

Response structure


resp.metric_name #=> String, one of "ClientTLSNegotiationErrorCount", "HealthyHostCount", "UnhealthyHostCount", "HTTPCode_LB_4XX_Count", "HTTPCode_LB_5XX_Count", "HTTPCode_Instance_2XX_Count", "HTTPCode_Instance_3XX_Count", "HTTPCode_Instance_4XX_Count", "HTTPCode_Instance_5XX_Count", "InstanceResponseTime", "RejectedConnectionCount", "RequestCount"
resp.metric_data #=> Array
resp.metric_data[0].average #=> Float
resp.metric_data[0].maximum #=> Float
resp.metric_data[0].minimum #=> Float
resp.metric_data[0].sample_count #=> Float
resp.metric_data[0].sum #=> Float
resp.metric_data[0].timestamp #=> Time
resp.metric_data[0].unit #=> String, one of "Seconds", "Microseconds", "Milliseconds", "Bytes", "Kilobytes", "Megabytes", "Gigabytes", "Terabytes", "Bits", "Kilobits", "Megabits", "Gigabits", "Terabits", "Percent", "Count", "Bytes/Second", "Kilobytes/Second", "Megabytes/Second", "Gigabytes/Second", "Terabytes/Second", "Bits/Second", "Kilobits/Second", "Megabits/Second", "Gigabits/Second", "Terabits/Second", "Count/Second", "None"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :load_balancer_name (required, String)

    The name of the load balancer.

  • :metric_name (required, String)

    The metric about which you want to return information. Valid values are listed below, along with the most useful statistics to include in your request.

    • ClientTLSNegotiationErrorCount - The number of TLS connections initiated by the client that did not establish a session with the load balancer. Possible causes include a mismatch of ciphers or protocols.

      Statistics: The most useful statistic is Sum.

    • HealthyHostCount - The number of target instances that are considered healthy.

      Statistics: The most useful statistic are Average, Minimum, and Maximum.

    • UnhealthyHostCount - The number of target instances that are considered unhealthy.

      Statistics: The most useful statistic are Average, Minimum, and Maximum.

    • HTTPCode_LB_4XX_Count - The number of HTTP 4XX client error codes that originate from the load balancer. Client errors are generated when requests are malformed or incomplete. These requests have not been received by the target instance. This count does not include any response codes generated by the target instances.

      Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, and Average all return 1.

    • HTTPCode_LB_5XX_Count - The number of HTTP 5XX server error codes that originate from the load balancer. This count does not include any response codes generated by the target instances.

      Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, and Average all return 1. Note that Minimum, Maximum, and Average all return 1.

    • HTTPCode_Instance_2XX_Count - The number of HTTP response codes generated by the target instances. This does not include any response codes generated by the load balancer.

      Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, and Average all return 1.

    • HTTPCode_Instance_3XX_Count - The number of HTTP response codes generated by the target instances. This does not include any response codes generated by the load balancer.

      Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, and Average all return 1.

    • HTTPCode_Instance_4XX_Count - The number of HTTP response codes generated by the target instances. This does not include any response codes generated by the load balancer.

      Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, and Average all return 1.

    • HTTPCode_Instance_5XX_Count - The number of HTTP response codes generated by the target instances. This does not include any response codes generated by the load balancer.

      Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, and Average all return 1.

    • InstanceResponseTime - The time elapsed, in seconds, after the request leaves the load balancer until a response from the target instance is received.

      Statistics: The most useful statistic is Average.

    • RejectedConnectionCount - The number of connections that were rejected because the load balancer had reached its maximum number of connections.

      Statistics: The most useful statistic is Sum.

    • RequestCount - The number of requests processed over IPv4. This count includes only the requests with a response generated by a target instance of the load balancer.

      Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, and Average all return 1.

  • :period (required, Integer)

    The time period duration for your health data request.

  • :start_time (required, Time, DateTime, Date, Integer, String)

    The start time of the period.

  • :end_time (required, Time, DateTime, Date, Integer, String)

    The end time of the period.

  • :unit (required, String)

    The unit for the time period request. Valid values are listed below.

  • :statistics (required, Array<String>)

    An array of statistics that you want to request metrics for. Valid values are listed below.

Returns:

See Also:



2829
2830
2831
2832
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 2829

def get_load_balancer_metric_data(params = {}, options = {})
  req = build_request(:get_load_balancer_metric_data, params)
  req.send_request(options)
end

#get_load_balancer_tls_certificates(params = {}) ⇒ Types::GetLoadBalancerTlsCertificatesResult

Returns information about the TLS certificates that are associated with the specified Lightsail load balancer.

TLS is just an updated, more secure version of Secure Socket Layer (SSL).

Examples:

Request syntax with placeholder values


resp = client.get_load_balancer_tls_certificates({
  load_balancer_name: "ResourceName", # required
})

Response structure


resp.tls_certificates #=> Array
resp.tls_certificates[0].name #=> String
resp.tls_certificates[0].arn #=> String
resp.tls_certificates[0].support_code #=> String
resp.tls_certificates[0].created_at #=> Time
resp.tls_certificates[0].location.availability_zone #=> String
resp.tls_certificates[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.tls_certificates[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.tls_certificates[0].load_balancer_name #=> String
resp.tls_certificates[0].is_attached #=> Boolean
resp.tls_certificates[0].status #=> String, one of "PENDING_VALIDATION", "ISSUED", "INACTIVE", "EXPIRED", "VALIDATION_TIMED_OUT", "REVOKED", "FAILED", "UNKNOWN"
resp.tls_certificates[0].domain_name #=> String
resp.tls_certificates[0].domain_validation_records #=> Array
resp.tls_certificates[0].domain_validation_records[0].name #=> String
resp.tls_certificates[0].domain_validation_records[0].type #=> String
resp.tls_certificates[0].domain_validation_records[0].value #=> String
resp.tls_certificates[0].domain_validation_records[0].validation_status #=> String, one of "PENDING_VALIDATION", "FAILED", "SUCCESS"
resp.tls_certificates[0].domain_validation_records[0].domain_name #=> String
resp.tls_certificates[0].failure_reason #=> String, one of "NO_AVAILABLE_CONTACTS", "ADDITIONAL_VERIFICATION_REQUIRED", "DOMAIN_NOT_ALLOWED", "INVALID_PUBLIC_DOMAIN", "OTHER"
resp.tls_certificates[0].issued_at #=> Time
resp.tls_certificates[0].issuer #=> String
resp.tls_certificates[0].key_algorithm #=> String
resp.tls_certificates[0].not_after #=> Time
resp.tls_certificates[0].not_before #=> Time
resp.tls_certificates[0].renewal_summary.renewal_status #=> String, one of "PENDING_AUTO_RENEWAL", "PENDING_VALIDATION", "SUCCESS", "FAILED"
resp.tls_certificates[0].renewal_summary.domain_validation_options #=> Array
resp.tls_certificates[0].renewal_summary.domain_validation_options[0].domain_name #=> String
resp.tls_certificates[0].renewal_summary.domain_validation_options[0].validation_status #=> String, one of "PENDING_VALIDATION", "FAILED", "SUCCESS"
resp.tls_certificates[0].revocation_reason #=> String, one of "UNSPECIFIED", "KEY_COMPROMISE", "CA_COMPROMISE", "AFFILIATION_CHANGED", "SUPERCEDED", "CESSATION_OF_OPERATION", "CERTIFICATE_HOLD", "REMOVE_FROM_CRL", "PRIVILEGE_WITHDRAWN", "A_A_COMPROMISE"
resp.tls_certificates[0].revoked_at #=> Time
resp.tls_certificates[0].serial #=> String
resp.tls_certificates[0].signature_algorithm #=> String
resp.tls_certificates[0].subject #=> String
resp.tls_certificates[0].subject_alternative_names #=> Array
resp.tls_certificates[0].subject_alternative_names[0] #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :load_balancer_name (required, String)

    The name of the load balancer where you stored your TLS/SSL certificate.

Returns:

See Also:



2896
2897
2898
2899
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 2896

def get_load_balancer_tls_certificates(params = {}, options = {})
  req = build_request(:get_load_balancer_tls_certificates, params)
  req.send_request(options)
end

#get_load_balancers(params = {}) ⇒ Types::GetLoadBalancersResult

Returns information about all load balancers in an account.

If you are describing a long list of load balancers, you can paginate the output to make the list more manageable. You can use the pageToken and nextPageToken values to retrieve the next items in the list.

Examples:

Request syntax with placeholder values


resp = client.get_load_balancers({
  page_token: "string",
})

Response structure


resp.load_balancers #=> Array
resp.load_balancers[0].name #=> String
resp.load_balancers[0].arn #=> String
resp.load_balancers[0].support_code #=> String
resp.load_balancers[0].created_at #=> Time
resp.load_balancers[0].location.availability_zone #=> String
resp.load_balancers[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.load_balancers[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.load_balancers[0].dns_name #=> String
resp.load_balancers[0].state #=> String, one of "active", "provisioning", "active_impaired", "failed", "unknown"
resp.load_balancers[0].protocol #=> String, one of "HTTP_HTTPS", "HTTP"
resp.load_balancers[0].public_ports #=> Array
resp.load_balancers[0].public_ports[0] #=> Integer
resp.load_balancers[0].health_check_path #=> String
resp.load_balancers[0].instance_port #=> Integer
resp.load_balancers[0].instance_health_summary #=> Array
resp.load_balancers[0].instance_health_summary[0].instance_name #=> String
resp.load_balancers[0].instance_health_summary[0].instance_health #=> String, one of "initial", "healthy", "unhealthy", "unused", "draining", "unavailable"
resp.load_balancers[0].instance_health_summary[0].instance_health_reason #=> String, one of "Lb.RegistrationInProgress", "Lb.InitialHealthChecking", "Lb.InternalError", "Instance.ResponseCodeMismatch", "Instance.Timeout", "Instance.FailedHealthChecks", "Instance.NotRegistered", "Instance.NotInUse", "Instance.DeregistrationInProgress", "Instance.InvalidState", "Instance.IpUnusable"
resp.load_balancers[0].tls_certificate_summaries #=> Array
resp.load_balancers[0].tls_certificate_summaries[0].name #=> String
resp.load_balancers[0].tls_certificate_summaries[0].is_attached #=> Boolean
resp.load_balancers[0].configuration_options #=> Hash
resp.load_balancers[0].configuration_options["LoadBalancerAttributeName"] #=> String
resp.next_page_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :page_token (String)

    A token used for paginating the results from your GetLoadBalancers request.

Returns:

See Also:



2954
2955
2956
2957
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 2954

def get_load_balancers(params = {}, options = {})
  req = build_request(:get_load_balancers, params)
  req.send_request(options)
end

#get_operation(params = {}) ⇒ Types::GetOperationResult

Returns information about a specific operation. Operations include events such as when you create an instance, allocate a static IP, attach a static IP, and so on.

Examples:

Request syntax with placeholder values


resp = client.get_operation({
  operation_id: "NonEmptyString", # required
})

Response structure


resp.operation.id #=> String
resp.operation.resource_name #=> String
resp.operation.resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operation.created_at #=> Time
resp.operation.location.availability_zone #=> String
resp.operation.location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operation.is_terminal #=> Boolean
resp.operation.operation_details #=> String
resp.operation.operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operation.status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operation.status_changed_at #=> Time
resp.operation.error_code #=> String
resp.operation.error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :operation_id (required, String)

    A GUID used to identify the operation.

Returns:

See Also:



2996
2997
2998
2999
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 2996

def get_operation(params = {}, options = {})
  req = build_request(:get_operation, params)
  req.send_request(options)
end

#get_operations(params = {}) ⇒ Types::GetOperationsResult

Returns information about all operations.

Results are returned from oldest to newest, up to a maximum of 200. Results can be paged by making each subsequent call to GetOperations use the maximum (last) statusChangedAt value from the previous request.

Examples:

Request syntax with placeholder values


resp = client.get_operations({
  page_token: "string",
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operations[0].created_at #=> Time
resp.operations[0].location.availability_zone #=> String
resp.operations[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> Boolean
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String
resp.next_page_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :page_token (String)

    A token used for advancing to the next page of results from your get operations request.

Returns:

See Also:



3045
3046
3047
3048
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 3045

def get_operations(params = {}, options = {})
  req = build_request(:get_operations, params)
  req.send_request(options)
end

#get_operations_for_resource(params = {}) ⇒ Types::GetOperationsForResourceResult

Gets operations for a specific resource (e.g., an instance or a static IP).

Examples:

Request syntax with placeholder values


resp = client.get_operations_for_resource({
  resource_name: "ResourceName", # required
  page_token: "string",
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operations[0].created_at #=> Time
resp.operations[0].location.availability_zone #=> String
resp.operations[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> Boolean
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String
resp.next_page_count #=> String
resp.next_page_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_name (required, String)

    The name of the resource for which you are requesting information.

  • :page_token (String)

    A token used for advancing to the next page of results from your get operations for resource request.

Returns:

See Also:



3096
3097
3098
3099
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 3096

def get_operations_for_resource(params = {}, options = {})
  req = build_request(:get_operations_for_resource, params)
  req.send_request(options)
end

#get_regions(params = {}) ⇒ Types::GetRegionsResult

Returns a list of all valid regions for Amazon Lightsail. Use the include availability zones parameter to also return the availability zones in a region.

Examples:

Request syntax with placeholder values


resp = client.get_regions({
  include_availability_zones: false,
})

Response structure


resp.regions #=> Array
resp.regions[0].continent_code #=> String
resp.regions[0].description #=> String
resp.regions[0].display_name #=> String
resp.regions[0].name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.regions[0].availability_zones #=> Array
resp.regions[0].availability_zones[0].zone_name #=> String
resp.regions[0].availability_zones[0].state #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :include_availability_zones (Boolean)

    A Boolean value indicating whether to also include Availability Zones in your get regions request. Availability Zones are indicated with a letter: e.g., us-east-2a.

Returns:

See Also:



3135
3136
3137
3138
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 3135

def get_regions(params = {}, options = {})
  req = build_request(:get_regions, params)
  req.send_request(options)
end

#get_static_ip(params = {}) ⇒ Types::GetStaticIpResult

Returns information about a specific static IP.

Examples:

Request syntax with placeholder values


resp = client.get_static_ip({
  static_ip_name: "ResourceName", # required
})

Response structure


resp.static_ip.name #=> String
resp.static_ip.arn #=> String
resp.static_ip.support_code #=> String
resp.static_ip.created_at #=> Time
resp.static_ip.location.availability_zone #=> String
resp.static_ip.location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.static_ip.resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.static_ip.ip_address #=> String
resp.static_ip.attached_to #=> String
resp.static_ip.is_attached #=> Boolean

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :static_ip_name (required, String)

    The name of the static IP in Lightsail.

Returns:

See Also:



3172
3173
3174
3175
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 3172

def get_static_ip(params = {}, options = {})
  req = build_request(:get_static_ip, params)
  req.send_request(options)
end

#get_static_ips(params = {}) ⇒ Types::GetStaticIpsResult

Returns information about all static IPs in the user's account.

Examples:

Request syntax with placeholder values


resp = client.get_static_ips({
  page_token: "string",
})

Response structure


resp.static_ips #=> Array
resp.static_ips[0].name #=> String
resp.static_ips[0].arn #=> String
resp.static_ips[0].support_code #=> String
resp.static_ips[0].created_at #=> Time
resp.static_ips[0].location.availability_zone #=> String
resp.static_ips[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.static_ips[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.static_ips[0].ip_address #=> String
resp.static_ips[0].attached_to #=> String
resp.static_ips[0].is_attached #=> Boolean
resp.next_page_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :page_token (String)

    A token used for advancing to the next page of results from your get static IPs request.

Returns:

See Also:



3213
3214
3215
3216
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 3213

def get_static_ips(params = {}, options = {})
  req = build_request(:get_static_ips, params)
  req.send_request(options)
end

#import_key_pair(params = {}) ⇒ Types::ImportKeyPairResult

Imports a public SSH key from a specific key pair.

Examples:

Request syntax with placeholder values


resp = client.import_key_pair({
  key_pair_name: "ResourceName", # required
  public_key_base_64: "Base64", # required
})

Response structure


resp.operation.id #=> String
resp.operation.resource_name #=> String
resp.operation.resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operation.created_at #=> Time
resp.operation.location.availability_zone #=> String
resp.operation.location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operation.is_terminal #=> Boolean
resp.operation.operation_details #=> String
resp.operation.operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operation.status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operation.status_changed_at #=> Time
resp.operation.error_code #=> String
resp.operation.error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :key_pair_name (required, String)

    The name of the key pair for which you want to import the public key.

  • :public_key_base_64 (required, String)

    A base64-encoded public key of the ssh-rsa type.

Returns:

See Also:



3257
3258
3259
3260
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 3257

def import_key_pair(params = {}, options = {})
  req = build_request(:import_key_pair, params)
  req.send_request(options)
end

#is_vpc_peered(params = {}) ⇒ Types::IsVpcPeeredResult

Returns a Boolean value indicating whether your Lightsail VPC is peered.

Examples:

Response structure


resp.is_peered #=> Boolean

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Returns:

See Also:



3277
3278
3279
3280
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 3277

def is_vpc_peered(params = {}, options = {})
  req = build_request(:is_vpc_peered, params)
  req.send_request(options)
end

#open_instance_public_ports(params = {}) ⇒ Types::OpenInstancePublicPortsResult

Adds public ports to an Amazon Lightsail instance.

Examples:

Request syntax with placeholder values


resp = client.open_instance_public_ports({
  port_info: { # required
    from_port: 1,
    to_port: 1,
    protocol: "tcp", # accepts tcp, all, udp
  },
  instance_name: "ResourceName", # required
})

Response structure


resp.operation.id #=> String
resp.operation.resource_name #=> String
resp.operation.resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operation.created_at #=> Time
resp.operation.location.availability_zone #=> String
resp.operation.location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operation.is_terminal #=> Boolean
resp.operation.operation_details #=> String
resp.operation.operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operation.status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operation.status_changed_at #=> Time
resp.operation.error_code #=> String
resp.operation.error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :port_info (required, Types::PortInfo)

    An array of key-value pairs containing information about the port mappings.

  • :instance_name (required, String)

    The name of the instance for which you want to open the public ports.

Returns:

See Also:



3326
3327
3328
3329
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 3326

def open_instance_public_ports(params = {}, options = {})
  req = build_request(:open_instance_public_ports, params)
  req.send_request(options)
end

#peer_vpc(params = {}) ⇒ Types::PeerVpcResult

Tries to peer the Lightsail VPC with the user's default VPC.

Examples:

Response structure


resp.operation.id #=> String
resp.operation.resource_name #=> String
resp.operation.resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operation.created_at #=> Time
resp.operation.location.availability_zone #=> String
resp.operation.location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operation.is_terminal #=> Boolean
resp.operation.operation_details #=> String
resp.operation.operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operation.status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operation.status_changed_at #=> Time
resp.operation.error_code #=> String
resp.operation.error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Returns:

See Also:



3357
3358
3359
3360
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 3357

def peer_vpc(params = {}, options = {})
  req = build_request(:peer_vpc, params)
  req.send_request(options)
end

#put_instance_public_ports(params = {}) ⇒ Types::PutInstancePublicPortsResult

Sets the specified open ports for an Amazon Lightsail instance, and closes all ports for every protocol not included in the current request.

Examples:

Request syntax with placeholder values


resp = client.put_instance_public_ports({
  port_infos: [ # required
    {
      from_port: 1,
      to_port: 1,
      protocol: "tcp", # accepts tcp, all, udp
    },
  ],
  instance_name: "ResourceName", # required
})

Response structure


resp.operation.id #=> String
resp.operation.resource_name #=> String
resp.operation.resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operation.created_at #=> Time
resp.operation.location.availability_zone #=> String
resp.operation.location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operation.is_terminal #=> Boolean
resp.operation.operation_details #=> String
resp.operation.operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operation.status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operation.status_changed_at #=> Time
resp.operation.error_code #=> String
resp.operation.error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :port_infos (required, Array<Types::PortInfo>)

    Specifies information about the public port(s).

  • :instance_name (required, String)

    The Lightsail instance name of the public port(s) you are setting.

Returns:

See Also:



3409
3410
3411
3412
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 3409

def put_instance_public_ports(params = {}, options = {})
  req = build_request(:put_instance_public_ports, params)
  req.send_request(options)
end

#reboot_instance(params = {}) ⇒ Types::RebootInstanceResult

Restarts a specific instance. When your Amazon Lightsail instance is finished rebooting, Lightsail assigns a new public IP address. To use the same IP address after restarting, create a static IP address and attach it to the instance.

Examples:

Request syntax with placeholder values


resp = client.reboot_instance({
  instance_name: "ResourceName", # required
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operations[0].created_at #=> Time
resp.operations[0].location.availability_zone #=> String
resp.operations[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> Boolean
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_name (required, String)

    The name of the instance to reboot.

Returns:

See Also:



3453
3454
3455
3456
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 3453

def reboot_instance(params = {}, options = {})
  req = build_request(:reboot_instance, params)
  req.send_request(options)
end

#release_static_ip(params = {}) ⇒ Types::ReleaseStaticIpResult

Deletes a specific static IP from your account.

Examples:

Request syntax with placeholder values


resp = client.release_static_ip({
  static_ip_name: "ResourceName", # required
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operations[0].created_at #=> Time
resp.operations[0].location.availability_zone #=> String
resp.operations[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> Boolean
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :static_ip_name (required, String)

    The name of the static IP to delete.

Returns:

See Also:



3494
3495
3496
3497
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 3494

def release_static_ip(params = {}, options = {})
  req = build_request(:release_static_ip, params)
  req.send_request(options)
end

#start_instance(params = {}) ⇒ Types::StartInstanceResult

Starts a specific Amazon Lightsail instance from a stopped state. To restart an instance, use the reboot instance operation.

Examples:

Request syntax with placeholder values


resp = client.start_instance({
  instance_name: "ResourceName", # required
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operations[0].created_at #=> Time
resp.operations[0].location.availability_zone #=> String
resp.operations[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> Boolean
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_name (required, String)

    The name of the instance (a virtual private server) to start.

Returns:

See Also:



3536
3537
3538
3539
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 3536

def start_instance(params = {}, options = {})
  req = build_request(:start_instance, params)
  req.send_request(options)
end

#stop_instance(params = {}) ⇒ Types::StopInstanceResult

Stops a specific Amazon Lightsail instance that is currently running.

Examples:

Request syntax with placeholder values


resp = client.stop_instance({
  instance_name: "ResourceName", # required
  force: false,
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operations[0].created_at #=> Time
resp.operations[0].location.availability_zone #=> String
resp.operations[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> Boolean
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_name (required, String)

    The name of the instance (a virtual private server) to stop.

  • :force (Boolean)

    When set to True, forces a Lightsail instance that is stuck in a stopping state to stop.

    Only use the force parameter if your instance is stuck in the stopping state. In any other state, your instance should stop normally without adding this parameter to your API request.

Returns:

See Also:



3586
3587
3588
3589
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 3586

def stop_instance(params = {}, options = {})
  req = build_request(:stop_instance, params)
  req.send_request(options)
end

#unpeer_vpc(params = {}) ⇒ Types::UnpeerVpcResult

Attempts to unpeer the Lightsail VPC from the user's default VPC.

Examples:

Response structure


resp.operation.id #=> String
resp.operation.resource_name #=> String
resp.operation.resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operation.created_at #=> Time
resp.operation.location.availability_zone #=> String
resp.operation.location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operation.is_terminal #=> Boolean
resp.operation.operation_details #=> String
resp.operation.operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operation.status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operation.status_changed_at #=> Time
resp.operation.error_code #=> String
resp.operation.error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Returns:

See Also:



3617
3618
3619
3620
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 3617

def unpeer_vpc(params = {}, options = {})
  req = build_request(:unpeer_vpc, params)
  req.send_request(options)
end

#update_domain_entry(params = {}) ⇒ Types::UpdateDomainEntryResult

Updates a domain recordset after it is created.

Examples:

Request syntax with placeholder values


resp = client.update_domain_entry({
  domain_name: "DomainName", # required
  domain_entry: { # required
    id: "NonEmptyString",
    name: "DomainName",
    target: "string",
    is_alias: false,
    type: "DomainEntryType",
    options: {
      "DomainEntryOptionsKeys" => "string",
    },
  },
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operations[0].created_at #=> Time
resp.operations[0].location.availability_zone #=> String
resp.operations[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> Boolean
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain_name (required, String)

    The name of the domain recordset to update.

  • :domain_entry (required, Types::DomainEntry)

    An array of key-value pairs containing information about the domain entry.

Returns:

See Also:



3672
3673
3674
3675
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 3672

def update_domain_entry(params = {}, options = {})
  req = build_request(:update_domain_entry, params)
  req.send_request(options)
end

#update_load_balancer_attribute(params = {}) ⇒ Types::UpdateLoadBalancerAttributeResult

Updates the specified attribute for a load balancer.

Examples:

Request syntax with placeholder values


resp = client.update_load_balancer_attribute({
  load_balancer_name: "ResourceName", # required
  attribute_name: "HealthCheckPath", # required, accepts HealthCheckPath, SessionStickinessEnabled, SessionStickiness_LB_CookieDurationSeconds
  attribute_value: "StringMax256", # required
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot"
resp.operations[0].created_at #=> Time
resp.operations[0].location.availability_zone #=> String
resp.operations[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> Boolean
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteInstance", "CreateInstance", "StopInstance", "StartInstance", "RebootInstance", "OpenInstancePublicPorts", "PutInstancePublicPorts", "CloseInstancePublicPorts", "AllocateStaticIp", "ReleaseStaticIp", "AttachStaticIp", "DetachStaticIp", "UpdateDomainEntry", "DeleteDomainEntry", "CreateDomain", "DeleteDomain", "CreateInstanceSnapshot", "DeleteInstanceSnapshot", "CreateInstancesFromSnapshot", "CreateLoadBalancer", "DeleteLoadBalancer", "AttachInstancesToLoadBalancer", "DetachInstancesFromLoadBalancer", "UpdateLoadBalancerAttribute", "CreateLoadBalancerTlsCertificate", "DeleteLoadBalancerTlsCertificate", "AttachLoadBalancerTlsCertificate", "CreateDisk", "DeleteDisk", "AttachDisk", "DetachDisk", "CreateDiskSnapshot", "DeleteDiskSnapshot", "CreateDiskFromSnapshot"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :load_balancer_name (required, String)

    The name of the load balancer that you want to modify.

  • :attribute_name (required, String)

    The name of the attribute you want to update. Valid values are below.

  • :attribute_value (required, String)

    The value that you want to specify for the attribute name.

Returns:

See Also:



3721
3722
3723
3724
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/client.rb', line 3721

def update_load_balancer_attribute(params = {}, options = {})
  req = build_request(:update_load_balancer_attribute, params)
  req.send_request(options)
end