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

Class: Aws::Lightsail::Client

Inherits:
Seahorse::Client::Base show all
Defined in:
(unknown)

Overview

An API client for Amazon Lightsail. To construct a client, you need to configure a :region and :credentials.

lightsail = Aws::Lightsail::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)

See #initialize for a full list of supported configuration options.

Region

You can configure a default region in the following locations:

  • ENV['AWS_REGION']
  • Aws.config[:region]

Go here for a list of supported regions.

Credentials

Default credentials are loaded automatically from the following locations:

  • ENV['AWS_ACCESS_KEY_ID'] and ENV['AWS_SECRET_ACCESS_KEY']
  • Aws.config[:credentials]
  • The shared credentials ini file at ~/.aws/credentials (more information)
  • From an instance profile when running on EC2

You can also construct a credentials object from one of the following classes:

Alternatively, you configure credentials with :access_key_id and :secret_access_key:

# load credentials from disk
creds = YAML.load(File.read('/path/to/secrets'))

Aws::Lightsail::Client.new(
  access_key_id: creds['access_key_id'],
  secret_access_key: creds['secret_access_key']
)

Always load your credentials from outside your application. Avoid configuring credentials statically and never commit them to source control.

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

Constructor collapse

API Operations collapse

Instance Method Summary collapse

Methods inherited from Seahorse::Client::Base

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

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options = {}) ⇒ Aws::Lightsail::Client

Constructs an API client.

Options Hash (options):

  • :access_key_id (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :active_endpoint_cache (Boolean)

    When set to true, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to false. See Plugins::EndpointDiscovery for more details.

  • :convert_params (Boolean) — default: true

    When true, an attempt is made to coerce request parameters into the required types. See Plugins::ParamConverter for more details.

  • :credentials (required, Credentials)

    Your AWS credentials. The following locations will be searched in order for credentials:

    • :access_key_id, :secret_access_key, and :session_token options
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
    • HOME/.aws/credentials shared credentials file
    • EC2 instance profile credentials See Plugins::RequestSigner for more details.
  • :disable_host_prefix_injection (Boolean)

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available. See Plugins::EndpointPattern for more details.

  • :endpoint (String)

    A default endpoint is constructed from the :region. See Plugins::RegionalEndpoint for more details.

  • :endpoint_cache_max_entries (Integer)

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000. See Plugins::EndpointDiscovery for more details.

  • :endpoint_cache_max_threads (Integer)

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10. See Plugins::EndpointDiscovery for more details.

  • :endpoint_cache_poll_interval (Integer)

    When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec. See Plugins::EndpointDiscovery for more details.

  • :endpoint_discovery (Boolean)

    When set to true, endpoint discovery will be enabled for operations when available. Defaults to false. See Plugins::EndpointDiscovery for more details.

  • :http_continue_timeout (Float) — default: 1

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_idle_timeout (Integer) — default: 5

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_open_timeout (Integer) — default: 15

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_proxy (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_read_timeout (Integer) — default: 60

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_wire_trace (Boolean) — default: false

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the logger at. See Plugins::Logging for more details.

  • :log_formatter (Logging::LogFormatter)

    The log formatter. Defaults to Seahorse::Client::Logging::Formatter.default. See Plugins::Logging for more details.

  • :logger (Logger) — default: nil

    The Logger instance to send log messages to. If this option is not set, logging will be disabled. See Plugins::Logging for more details.

  • :profile (String)

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used. See Plugins::RequestSigner for more details.

  • :raise_response_errors (Boolean) — default: true

    When true, response errors are raised. See Seahorse::Client::Plugins::RaiseResponseErrors for more details.

  • :region (required, String)

    The AWS region to connect to. The region is used to construct the client endpoint. Defaults to ENV['AWS_REGION']. Also checks AMAZON_REGION and AWS_DEFAULT_REGION. See Plugins::RegionalEndpoint for more details.

  • :retry_limit (Integer) — default: 3

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors and auth errors from expired credentials. See Plugins::RetryErrors for more details.

  • :secret_access_key (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :session_token (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :simple_json (Boolean) — default: false

    Disables request parameter conversion, validation, and formatting. Also disable response data type conversions. This option is useful when you want to ensure the highest level of performance by avoiding overhead of walking request parameters and response data structures.

    When :simple_json is enabled, the request parameters hash must be formatted exactly as the DynamoDB API expects. See Plugins::Protocols::JsonRpc for more details.

  • :ssl_ca_bundle (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_ca_directory (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_ca_store (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_verify_peer (Boolean) — default: true

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :stub_responses (Boolean) — default: false

    Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling ClientStubs#stub_responses. See ClientStubs for more information.

    Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled. See Plugins::StubResponses for more details.

  • :validate_params (Boolean) — default: true

    When true, request parameters are validated before sending the request. See Plugins::ParamValidator for more details.

Instance Method Details

#allocate_static_ip(options = {}) ⇒ 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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :static_ip_name (required, String)

    The name of the static IP address.

Returns:

See Also:

#attach_certificate_to_distribution(options = {}) ⇒ Types::AttachCertificateToDistributionResult

Attaches an SSL/TLS certificate to your Amazon Lightsail content delivery network (CDN) distribution.

After the certificate is attached, your distribution accepts HTTPS traffic for all of the domains that are associated with the certificate.

Use the CreateCertificate action to create a certificate that you can attach to your distribution.

Only certificates created in the us-east-1 AWS Region can be attached to Lightsail distributions. Lightsail distributions are global resources that can reference an origin in any AWS Region, and distribute its content globally. However, all distributions are located in the us-east-1 Region.

Examples:

Request syntax with placeholder values


resp = client.attach_certificate_to_distribution({
  distribution_name: "ResourceName", # required
  certificate_name: "ResourceName", # required
})

Response structure


resp.operation.id #=> String
resp.operation.resource_name #=> String
resp.operation.resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operation.is_terminal #=> true/false
resp.operation.operation_details #=> String
resp.operation.operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operation.status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operation.status_changed_at #=> Time
resp.operation.error_code #=> String
resp.operation.error_details #=> String

Options Hash (options):

  • :distribution_name (required, String)

    The name of the distribution that the certificate will be attached to.

    Use the GetDistributions action to get a list of distribution names that you can specify.

  • :certificate_name (required, String)

    The name of the certificate to attach to a distribution.

    Only certificates with a status of ISSUED can be attached to a distribution.

    Use the GetCertificates action to get a list of certificate names that you can specify.

    This is the name of the certificate resource type and is used only to reference the certificate in other API actions. It can be different than the domain name of the certificate. For example, your certificate name might be WordPress-Blog-Certificate and the domain name of the certificate might be example.com.

Returns:

See Also:

#attach_disk(options = {}) ⇒ 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.

The attach disk operation supports tag-based access control via resource tags applied to the resource identified by disk name. For more information, see the Lightsail Dev Guide.

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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :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:

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

Attaches one or more Lightsail instances to a load balancer.

After some time, the instances are attached to the load balancer and the health check status is available.

The attach instances to load balancer operation supports tag-based access control via resource tags applied to the resource identified by load balancer name. For more information, see the Lightsail Dev Guide.

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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :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.

    An instance must be running before you can attach it to your load balancer.

    There are no additional limits on the number of instances you can attach to your load balancer, aside from the limit of Lightsail instances you can create in your account (20).

Returns:

See Also:

#attach_load_balancer_tls_certificate(options = {}) ⇒ 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).

Once you create and validate your certificate, you can attach it to your load balancer. You can also use this API to rotate the certificates on your account. Use the AttachLoadBalancerTlsCertificate action with the non-attached certificate, and it will replace the existing one and become the attached certificate.

The AttachLoadBalancerTlsCertificate operation supports tag-based access control via resource tags applied to the resource identified by load balancer name. For more information, see the Lightsail Dev Guide.

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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :load_balancer_name (required, String)

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

  • :certificate_name (required, String)

    The name of your SSL/TLS certificate.

Returns:

See Also:

#attach_static_ip(options = {}) ⇒ 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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :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:

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

Closes ports for a specific Amazon Lightsail instance.

The CloseInstancePublicPorts action supports tag-based access control via resource tags applied to the resource identified by instanceName. For more information, see the Lightsail Dev Guide.

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, icmp
    cidrs: ["string"],
    cidr_list_aliases: ["string"],
  },
  instance_name: "ResourceName", # required
})

Response structure


resp.operation.id #=> String
resp.operation.resource_name #=> String
resp.operation.resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operation.is_terminal #=> true/false
resp.operation.operation_details #=> String
resp.operation.operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operation.status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operation.status_changed_at #=> Time
resp.operation.error_code #=> String
resp.operation.error_details #=> String

Options Hash (options):

  • :port_info (required, Types::PortInfo)

    An object to describe the ports to close for the specified instance.

  • :instance_name (required, String)

    The name of the instance for which to close ports.

Returns:

See Also:

#copy_snapshot(options = {}) ⇒ Types::CopySnapshotResult

Copies a manual snapshot of an instance or disk as another manual snapshot, or copies an automatic snapshot of an instance or disk as a manual snapshot. This operation can also be used to copy a manual or automatic snapshot of an instance or a disk from one AWS Region to another in Amazon Lightsail.

When copying a manual snapshot, be sure to define the source region, source snapshot name, and target snapshot name parameters.

When copying an automatic snapshot, be sure to define the source region, source resource name, target snapshot name, and either the restore date or the use latest restorable auto snapshot parameters.

Examples:

Request syntax with placeholder values


resp = client.copy_snapshot({
  source_snapshot_name: "ResourceName",
  source_resource_name: "string",
  restore_date: "string",
  use_latest_restorable_auto_snapshot: false,
  target_snapshot_name: "ResourceName", # required
  source_region: "us-east-1", # required, accepts us-east-1, us-east-2, us-west-1, us-west-2, eu-west-1, eu-west-2, eu-west-3, eu-central-1, ca-central-1, ap-south-1, ap-southeast-1, ap-southeast-2, ap-northeast-1, ap-northeast-2
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :source_snapshot_name (String)

    The name of the source manual snapshot to copy.

    Constraint:

    • Define this parameter only when copying a manual snapshot as another manual snapshot.

    ^

  • :source_resource_name (String)

    The name of the source instance or disk from which the source automatic snapshot was created.

    Constraint:

    • Define this parameter only when copying an automatic snapshot as a manual snapshot. For more information, see the Lightsail Dev Guide.

    ^

  • :restore_date (String)

    The date of the source automatic snapshot to copy. Use the get auto snapshots operation to identify the dates of the available automatic snapshots.

    Constraints:

    • Must be specified in YYYY-MM-DD format.

    • This parameter cannot be defined together with the use latest restorable auto snapshot parameter. The restore date and use latest restorable auto snapshot parameters are mutually exclusive.

    • Define this parameter only when copying an automatic snapshot as a manual snapshot. For more information, see the Lightsail Dev Guide.

  • :use_latest_restorable_auto_snapshot (Boolean)

    A Boolean value to indicate whether to use the latest available automatic snapshot of the specified source instance or disk.

    Constraints:

    • This parameter cannot be defined together with the restore date parameter. The use latest restorable auto snapshot and restore date parameters are mutually exclusive.

    • Define this parameter only when copying an automatic snapshot as a manual snapshot. For more information, see the Lightsail Dev Guide.

  • :target_snapshot_name (required, String)

    The name of the new manual snapshot to be created as a copy.

  • :source_region (required, String)

    The AWS Region where the source manual or automatic snapshot is located.

Returns:

See Also:

#create_certificate(options = {}) ⇒ Types::CreateCertificateResult

Creates an SSL/TLS certificate for a Amazon Lightsail content delivery network (CDN) distribution.

After the certificate is created, use the AttachCertificateToDistribution action to attach the certificate to your distribution.

Only certificates created in the us-east-1 AWS Region can be attached to Lightsail distributions. Lightsail distributions are global resources that can reference an origin in any AWS Region, and distribute its content globally. However, all distributions are located in the us-east-1 Region.

Examples:

Request syntax with placeholder values


resp = client.create_certificate({
  certificate_name: "CertificateName", # required
  domain_name: "DomainName", # required
  subject_alternative_names: ["DomainName"],
  tags: [
    {
      key: "TagKey",
      value: "TagValue",
    },
  ],
})

Response structure


resp.certificate.certificate_arn #=> String
resp.certificate.certificate_name #=> String
resp.certificate.domain_name #=> String
resp.certificate.certificate_detail.arn #=> String
resp.certificate.certificate_detail.name #=> String
resp.certificate.certificate_detail.domain_name #=> String
resp.certificate.certificate_detail.status #=> String, one of "PENDING_VALIDATION", "ISSUED", "INACTIVE", "EXPIRED", "VALIDATION_TIMED_OUT", "REVOKED", "FAILED"
resp.certificate.certificate_detail.serial_number #=> String
resp.certificate.certificate_detail.subject_alternative_names #=> Array
resp.certificate.certificate_detail.subject_alternative_names[0] #=> String
resp.certificate.certificate_detail.domain_validation_records #=> Array
resp.certificate.certificate_detail.domain_validation_records[0].domain_name #=> String
resp.certificate.certificate_detail.domain_validation_records[0].resource_record.name #=> String
resp.certificate.certificate_detail.domain_validation_records[0].resource_record.type #=> String
resp.certificate.certificate_detail.domain_validation_records[0].resource_record.value #=> String
resp.certificate.certificate_detail.request_failure_reason #=> String
resp.certificate.certificate_detail.in_use_resource_count #=> Integer
resp.certificate.certificate_detail.key_algorithm #=> String
resp.certificate.certificate_detail.created_at #=> Time
resp.certificate.certificate_detail.issued_at #=> Time
resp.certificate.certificate_detail.issuer_ca #=> String
resp.certificate.certificate_detail.not_before #=> Time
resp.certificate.certificate_detail.not_after #=> Time
resp.certificate.certificate_detail.eligible_to_renew #=> String
resp.certificate.certificate_detail.renewal_summary.domain_validation_records #=> Array
resp.certificate.certificate_detail.renewal_summary.domain_validation_records[0].domain_name #=> String
resp.certificate.certificate_detail.renewal_summary.domain_validation_records[0].resource_record.name #=> String
resp.certificate.certificate_detail.renewal_summary.domain_validation_records[0].resource_record.type #=> String
resp.certificate.certificate_detail.renewal_summary.domain_validation_records[0].resource_record.value #=> String
resp.certificate.certificate_detail.renewal_summary.renewal_status #=> String, one of "PendingAutoRenewal", "PendingValidation", "Success", "Failed"
resp.certificate.certificate_detail.renewal_summary.renewal_status_reason #=> String
resp.certificate.certificate_detail.renewal_summary.updated_at #=> Time
resp.certificate.certificate_detail.revoked_at #=> Time
resp.certificate.certificate_detail.revocation_reason #=> String
resp.certificate.certificate_detail.tags #=> Array
resp.certificate.certificate_detail.tags[0].key #=> String
resp.certificate.certificate_detail.tags[0].value #=> String
resp.certificate.certificate_detail.support_code #=> String
resp.certificate.tags #=> Array
resp.certificate.tags[0].key #=> String
resp.certificate.tags[0].value #=> String
resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :certificate_name (required, String)

    The name for the certificate.

  • :domain_name (required, String)

    The domain name (e.g., example.com) for the certificate.

  • :subject_alternative_names (Array<String>)

    An array of strings that specify the alternate domains (e.g., example2.com) and subdomains (e.g., blog.example.com) for the certificate.

    You can specify a maximum of nine alternate domains (in addition to the primary domain name).

    Wildcard domain entries (e.g., *.example.com) are not supported.

  • :tags (Array<Types::Tag>)

    The tag keys and optional values to add to the certificate during create.

    Use the TagResource action to tag a resource after it\'s created.

Returns:

See Also:

#create_cloud_formation_stack(options = {}) ⇒ Types::CreateCloudFormationStackResult

Creates an AWS CloudFormation stack, which creates a new Amazon EC2 instance from an exported Amazon Lightsail snapshot. This operation results in a CloudFormation stack record that can be used to track the AWS CloudFormation stack created. Use the get cloud formation stack records operation to get a list of the CloudFormation stacks created.

Wait until after your new Amazon EC2 instance is created before running the create cloud formation stack operation again with the same export snapshot record.

Examples:

Request syntax with placeholder values


resp = client.create_cloud_formation_stack({
  instances: [ # required
    {
      source_name: "ResourceName", # required
      instance_type: "NonEmptyString", # required
      port_info_source: "DEFAULT", # required, accepts DEFAULT, INSTANCE, NONE, CLOSED
      user_data: "string",
      availability_zone: "string", # 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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :instances (required, Array<Types::InstanceEntry>)

    An array of parameters that will be used to create the new Amazon EC2 instance. You can only pass one instance entry at a time in this array. You will get an invalid parameter error if you pass more than one instance entry in this array.

Returns:

See Also:

#create_contact_method(options = {}) ⇒ Types::CreateContactMethodResult

Creates an email or SMS text message contact method.

A contact method is used to send you notifications about your Amazon Lightsail resources. You can add one email address and one mobile phone number contact method in each AWS Region. However, SMS text messaging is not supported in some AWS Regions, and SMS text messages cannot be sent to some countries/regions. For more information, see Notifications in Amazon Lightsail.

Examples:

Request syntax with placeholder values


resp = client.create_contact_method({
  protocol: "Email", # required, accepts Email, SMS
  contact_endpoint: "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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :protocol (required, String)

    The protocol of the contact method, such as Email or SMS (text messaging).

    The SMS protocol is supported only in the following AWS Regions.

    • US East (N. Virginia) (us-east-1)

    • US West (Oregon) (us-west-2)

    • Europe (Ireland) (eu-west-1)

    • Asia Pacific (Tokyo) (ap-northeast-1)

    • Asia Pacific (Singapore) (ap-southeast-1)

    • Asia Pacific (Sydney) (ap-southeast-2)

    For a list of countries/regions where SMS text messages can be sent, and the latest AWS Regions where SMS text messaging is supported, see Supported Regions and Countries in the Amazon SNS Developer Guide.

    For more information about notifications in Amazon Lightsail, see Notifications in Amazon Lightsail.

  • :contact_endpoint (required, String)

    The destination of the contact method, such as an email address or a mobile phone number.

    Use the E.164 format when specifying a mobile phone number. E.164 is a standard for the phone number structure used for international telecommunication. Phone numbers that follow this format can have a maximum of 15 digits, and they are prefixed with the plus character (+) and the country code. For example, a U.S. phone number in E.164 format would be specified as +1XXX5550100. For more information, see E.164 on Wikipedia.

Returns:

See Also:

#create_container_service(options = {}) ⇒ Types::CreateContainerServiceResult

Creates an Amazon Lightsail container service.

A Lightsail container service is a compute resource to which you can deploy containers. For more information, see Container services in Amazon Lightsail in the Lightsail Dev Guide.

Examples:

Request syntax with placeholder values


resp = client.create_container_service({
  service_name: "ContainerServiceName", # required
  power: "nano", # required, accepts nano, micro, small, medium, large, xlarge
  scale: 1, # required
  tags: [
    {
      key: "TagKey",
      value: "TagValue",
    },
  ],
  public_domain_names: {
    "string" => ["string"],
  },
  deployment: {
    containers: {
      "ContainerName" => {
        image: "string",
        command: ["string"],
        environment: {
          "string" => "string",
        },
        ports: {
          "string" => "HTTP", # accepts HTTP, HTTPS, TCP, UDP
        },
      },
    },
    public_endpoint: {
      container_name: "string", # required
      container_port: 1, # required
      health_check: {
        healthy_threshold: 1,
        unhealthy_threshold: 1,
        timeout_seconds: 1,
        interval_seconds: 1,
        path: "string",
        success_codes: "string",
      },
    },
  },
})

Response structure


resp.container_service.container_service_name #=> String
resp.container_service.arn #=> String
resp.container_service.created_at #=> Time
resp.container_service.location.availability_zone #=> String
resp.container_service.location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.container_service.resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.container_service.tags #=> Array
resp.container_service.tags[0].key #=> String
resp.container_service.tags[0].value #=> String
resp.container_service.power #=> String, one of "nano", "micro", "small", "medium", "large", "xlarge"
resp.container_service.power_id #=> String
resp.container_service.state #=> String, one of "PENDING", "READY", "RUNNING", "UPDATING", "DELETING", "DISABLED"
resp.container_service.scale #=> Integer
resp.container_service.current_deployment.version #=> Integer
resp.container_service.current_deployment.state #=> String, one of "ACTIVATING", "ACTIVE", "INACTIVE", "FAILED"
resp.container_service.current_deployment.containers #=> Hash
resp.container_service.current_deployment.containers["ContainerName"].image #=> String
resp.container_service.current_deployment.containers["ContainerName"].command #=> Array
resp.container_service.current_deployment.containers["ContainerName"].command[0] #=> String
resp.container_service.current_deployment.containers["ContainerName"].environment #=> Hash
resp.container_service.current_deployment.containers["ContainerName"].environment["string"] #=> String
resp.container_service.current_deployment.containers["ContainerName"].ports #=> Hash
resp.container_service.current_deployment.containers["ContainerName"].ports["string"] #=> String, one of "HTTP", "HTTPS", "TCP", "UDP"
resp.container_service.current_deployment.public_endpoint.container_name #=> String
resp.container_service.current_deployment.public_endpoint.container_port #=> Integer
resp.container_service.current_deployment.public_endpoint.health_check.healthy_threshold #=> Integer
resp.container_service.current_deployment.public_endpoint.health_check.unhealthy_threshold #=> Integer
resp.container_service.current_deployment.public_endpoint.health_check.timeout_seconds #=> Integer
resp.container_service.current_deployment.public_endpoint.health_check.interval_seconds #=> Integer
resp.container_service.current_deployment.public_endpoint.health_check.path #=> String
resp.container_service.current_deployment.public_endpoint.health_check.success_codes #=> String
resp.container_service.current_deployment.created_at #=> Time
resp.container_service.next_deployment.version #=> Integer
resp.container_service.next_deployment.state #=> String, one of "ACTIVATING", "ACTIVE", "INACTIVE", "FAILED"
resp.container_service.next_deployment.containers #=> Hash
resp.container_service.next_deployment.containers["ContainerName"].image #=> String
resp.container_service.next_deployment.containers["ContainerName"].command #=> Array
resp.container_service.next_deployment.containers["ContainerName"].command[0] #=> String
resp.container_service.next_deployment.containers["ContainerName"].environment #=> Hash
resp.container_service.next_deployment.containers["ContainerName"].environment["string"] #=> String
resp.container_service.next_deployment.containers["ContainerName"].ports #=> Hash
resp.container_service.next_deployment.containers["ContainerName"].ports["string"] #=> String, one of "HTTP", "HTTPS", "TCP", "UDP"
resp.container_service.next_deployment.public_endpoint.container_name #=> String
resp.container_service.next_deployment.public_endpoint.container_port #=> Integer
resp.container_service.next_deployment.public_endpoint.health_check.healthy_threshold #=> Integer
resp.container_service.next_deployment.public_endpoint.health_check.unhealthy_threshold #=> Integer
resp.container_service.next_deployment.public_endpoint.health_check.timeout_seconds #=> Integer
resp.container_service.next_deployment.public_endpoint.health_check.interval_seconds #=> Integer
resp.container_service.next_deployment.public_endpoint.health_check.path #=> String
resp.container_service.next_deployment.public_endpoint.health_check.success_codes #=> String
resp.container_service.next_deployment.created_at #=> Time
resp.container_service.is_disabled #=> true/false
resp.container_service.principal_arn #=> String
resp.container_service.private_domain_name #=> String
resp.container_service.public_domain_names #=> Hash
resp.container_service.public_domain_names["string"] #=> Array
resp.container_service.public_domain_names["string"][0] #=> String
resp.container_service.url #=> String

Options Hash (options):

  • :service_name (required, String)

    The name for the container service.

    The name that you specify for your container service will make up part of its default domain. The default domain of a container service is typically https://<ServiceName>.<RandomGUID>.<AWSRegion>.cs.amazonlightsail.com. If the name of your container service is container-service-1, and it\'s located in the US East (Ohio) AWS region (us-east-2), then the domain for your container service will be like the following example: https://container-service-1.ur4EXAMPLE2uq.us-east-2.cs.amazonlightsail.com

    The following are the requirements for container service names:

    • Must be unique within each AWS Region in your Lightsail account.

    • Must contain 1 to 63 characters.

    • Must contain only alphanumeric characters and hyphens.

    • A hyphen (-) can separate words but cannot be at the start or end of the name.

  • :power (required, String)

    The power specification for the container service.

    The power specifies the amount of memory, vCPUs, and base monthly cost of each node of the container service. The power and scale of a container service makes up its configured capacity. To determine the monthly price of your container service, multiply the base price of the power with the scale (the number of nodes) of the service.

    Use the GetContainerServicePowers action to get a list of power options that you can specify using this parameter, and their base monthly cost.

  • :scale (required, Integer)

    The scale specification for the container service.

    The scale specifies the allocated compute nodes of the container service. The power and scale of a container service makes up its configured capacity. To determine the monthly price of your container service, multiply the base price of the power with the scale (the number of nodes) of the service.

  • :tags (Array<Types::Tag>)

    The tag keys and optional values for the container service.

    For more information about tags in Lightsail, see the Lightsail Dev Guide.

  • :public_domain_names (Hash<String,Array<String>>)

    The public domain names to use with the container service, such as example.com and www.example.com.

    You can specify up to four public domain names for a container service. The domain names that you specify are used when you create a deployment with a container configured as the public endpoint of your container service.

    If you don\'t specify public domain names, then you can use the default domain of the container service.

    You must create and validate an SSL/TLS certificate before you can use public domain names with your container service. Use the CreateCertificate action to create a certificate for the public domain names you want to use with your container service.

    You can specify public domain names using a string to array map as shown in the example later on this page.

  • :deployment (Types::ContainerServiceDeploymentRequest)

    An object that describes a deployment for the container service.

    A deployment specifies the containers that will be launched on the container service and their settings, such as the ports to open, the environment variables to apply, and the launch command to run. It also specifies the container that will serve as the public endpoint of the deployment and its settings, such as the HTTP or HTTPS port to use, and the health check configuration.

Returns:

See Also:

#create_container_service_deployment(options = {}) ⇒ Types::CreateContainerServiceDeploymentResult

Creates a deployment for your Amazon Lightsail container service.

A deployment specifies the containers that will be launched on the container service and their settings, such as the ports to open, the environment variables to apply, and the launch command to run. It also specifies the container that will serve as the public endpoint of the deployment and its settings, such as the HTTP or HTTPS port to use, and the health check configuration.

You can deploy containers to your container service using container images from a public registry like Docker Hub, or from your local machine. For more information, see Creating container images for your Amazon Lightsail container services in the Lightsail Dev Guide.

Examples:

Request syntax with placeholder values


resp = client.create_container_service_deployment({
  service_name: "ContainerServiceName", # required
  containers: {
    "ContainerName" => {
      image: "string",
      command: ["string"],
      environment: {
        "string" => "string",
      },
      ports: {
        "string" => "HTTP", # accepts HTTP, HTTPS, TCP, UDP
      },
    },
  },
  public_endpoint: {
    container_name: "string", # required
    container_port: 1, # required
    health_check: {
      healthy_threshold: 1,
      unhealthy_threshold: 1,
      timeout_seconds: 1,
      interval_seconds: 1,
      path: "string",
      success_codes: "string",
    },
  },
})

Response structure


resp.container_service.container_service_name #=> String
resp.container_service.arn #=> String
resp.container_service.created_at #=> Time
resp.container_service.location.availability_zone #=> String
resp.container_service.location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.container_service.resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.container_service.tags #=> Array
resp.container_service.tags[0].key #=> String
resp.container_service.tags[0].value #=> String
resp.container_service.power #=> String, one of "nano", "micro", "small", "medium", "large", "xlarge"
resp.container_service.power_id #=> String
resp.container_service.state #=> String, one of "PENDING", "READY", "RUNNING", "UPDATING", "DELETING", "DISABLED"
resp.container_service.scale #=> Integer
resp.container_service.current_deployment.version #=> Integer
resp.container_service.current_deployment.state #=> String, one of "ACTIVATING", "ACTIVE", "INACTIVE", "FAILED"
resp.container_service.current_deployment.containers #=> Hash
resp.container_service.current_deployment.containers["ContainerName"].image #=> String
resp.container_service.current_deployment.containers["ContainerName"].command #=> Array
resp.container_service.current_deployment.containers["ContainerName"].command[0] #=> String
resp.container_service.current_deployment.containers["ContainerName"].environment #=> Hash
resp.container_service.current_deployment.containers["ContainerName"].environment["string"] #=> String
resp.container_service.current_deployment.containers["ContainerName"].ports #=> Hash
resp.container_service.current_deployment.containers["ContainerName"].ports["string"] #=> String, one of "HTTP", "HTTPS", "TCP", "UDP"
resp.container_service.current_deployment.public_endpoint.container_name #=> String
resp.container_service.current_deployment.public_endpoint.container_port #=> Integer
resp.container_service.current_deployment.public_endpoint.health_check.healthy_threshold #=> Integer
resp.container_service.current_deployment.public_endpoint.health_check.unhealthy_threshold #=> Integer
resp.container_service.current_deployment.public_endpoint.health_check.timeout_seconds #=> Integer
resp.container_service.current_deployment.public_endpoint.health_check.interval_seconds #=> Integer
resp.container_service.current_deployment.public_endpoint.health_check.path #=> String
resp.container_service.current_deployment.public_endpoint.health_check.success_codes #=> String
resp.container_service.current_deployment.created_at #=> Time
resp.container_service.next_deployment.version #=> Integer
resp.container_service.next_deployment.state #=> String, one of "ACTIVATING", "ACTIVE", "INACTIVE", "FAILED"
resp.container_service.next_deployment.containers #=> Hash
resp.container_service.next_deployment.containers["ContainerName"].image #=> String
resp.container_service.next_deployment.containers["ContainerName"].command #=> Array
resp.container_service.next_deployment.containers["ContainerName"].command[0] #=> String
resp.container_service.next_deployment.containers["ContainerName"].environment #=> Hash
resp.container_service.next_deployment.containers["ContainerName"].environment["string"] #=> String
resp.container_service.next_deployment.containers["ContainerName"].ports #=> Hash
resp.container_service.next_deployment.containers["ContainerName"].ports["string"] #=> String, one of "HTTP", "HTTPS", "TCP", "UDP"
resp.container_service.next_deployment.public_endpoint.container_name #=> String
resp.container_service.next_deployment.public_endpoint.container_port #=> Integer
resp.container_service.next_deployment.public_endpoint.health_check.healthy_threshold #=> Integer
resp.container_service.next_deployment.public_endpoint.health_check.unhealthy_threshold #=> Integer
resp.container_service.next_deployment.public_endpoint.health_check.timeout_seconds #=> Integer
resp.container_service.next_deployment.public_endpoint.health_check.interval_seconds #=> Integer
resp.container_service.next_deployment.public_endpoint.health_check.path #=> String
resp.container_service.next_deployment.public_endpoint.health_check.success_codes #=> String
resp.container_service.next_deployment.created_at #=> Time
resp.container_service.is_disabled #=> true/false
resp.container_service.principal_arn #=> String
resp.container_service.private_domain_name #=> String
resp.container_service.public_domain_names #=> Hash
resp.container_service.public_domain_names["string"] #=> Array
resp.container_service.public_domain_names["string"][0] #=> String
resp.container_service.url #=> String

Options Hash (options):

  • :service_name (required, String)

    The name of the container service for which to create the deployment.

  • :containers (Hash<String,Types::Container>)

    An object that describes the settings of the containers that will be launched on the container service.

  • :public_endpoint (Types::EndpointRequest)

    An object that describes the settings of the public endpoint for the container service.

Returns:

See Also:

#create_container_service_registry_login(options = {}) ⇒ Types::CreateContainerServiceRegistryLoginResult

Creates a temporary set of log in credentials that you can use to log in to the Docker process on your local machine. After you're logged in, you can use the native Docker commands to push your local container images to the container image registry of your Amazon Lightsail account so that you can use them with your Lightsail container service. The log in credentials expire 12 hours after they are created, at which point you will need to create a new set of log in credentials.

You can only push container images to the container service registry of your Lightsail account. You cannot pull container images perform any other container image management actions on the container service registry of your Lightsail account.

After you push your container images to the container image registry of your Lightsail account, use the RegisterContainerImage action to register the pushed images to a specific Lightsail container service.

This action is not required if you install and use the Lightsail Control (lightsailctl) plugin to push container images to your Lightsail container service. For more information, see Pushing and managing container images on your Amazon Lightsail container services in the Lightsail Dev Guide.

Examples:

Request syntax with placeholder values


resp = client.()

Response structure


resp..username #=> String
resp..password #=> String
resp..expires_at #=> Time
resp..registry #=> String

Returns:

See Also:

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

Creates a block storage disk that can be attached to an Amazon Lightsail instance in the same Availability Zone (e.g., us-east-2a).

The create disk operation supports tag-based access control via request tags. For more information, see the Lightsail Dev Guide.

Examples:

Request syntax with placeholder values


resp = client.create_disk({
  disk_name: "ResourceName", # required
  availability_zone: "NonEmptyString", # required
  size_in_gb: 1, # required
  tags: [
    {
      key: "TagKey",
      value: "TagValue",
    },
  ],
  add_ons: [
    {
      add_on_type: "AutoSnapshot", # required, accepts AutoSnapshot
      auto_snapshot_add_on_request: {
        snapshot_time_of_day: "TimeOfDay",
      },
    },
  ],
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :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). Use the same Availability Zone as the Lightsail instance to which you want to attach the disk.

    Use the get regions 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).

  • :tags (Array<Types::Tag>)

    The tag keys and optional values to add to the resource during create.

    Use the TagResource action to tag a resource after it\'s created.

  • :add_ons (Array<Types::AddOnRequest>)

    An array of objects that represent the add-ons to enable for the new disk.

Returns:

See Also:

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

Creates a block storage disk from a manual or automatic snapshot of a disk. The resulting disk can be attached to an Amazon Lightsail instance in the same Availability Zone (e.g., us-east-2a).

The create disk from snapshot operation supports tag-based access control via request tags and resource tags applied to the resource identified by disk snapshot name. For more information, see the Lightsail Dev Guide.

Examples:

Request syntax with placeholder values


resp = client.create_disk_from_snapshot({
  disk_name: "ResourceName", # required
  disk_snapshot_name: "ResourceName",
  availability_zone: "NonEmptyString", # required
  size_in_gb: 1, # required
  tags: [
    {
      key: "TagKey",
      value: "TagValue",
    },
  ],
  add_ons: [
    {
      add_on_type: "AutoSnapshot", # required, accepts AutoSnapshot
      auto_snapshot_add_on_request: {
        snapshot_time_of_day: "TimeOfDay",
      },
    },
  ],
  source_disk_name: "string",
  restore_date: "string",
  use_latest_restorable_auto_snapshot: 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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :disk_name (required, String)

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

  • :disk_snapshot_name (String)

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

    Constraint:

    • This parameter cannot be defined together with the source disk name parameter. The disk snapshot name and source disk name parameters are mutually exclusive.

    ^

  • :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).

  • :tags (Array<Types::Tag>)

    The tag keys and optional values to add to the resource during create.

    Use the TagResource action to tag a resource after it\'s created.

  • :add_ons (Array<Types::AddOnRequest>)

    An array of objects that represent the add-ons to enable for the new disk.

  • :source_disk_name (String)

    The name of the source disk from which the source automatic snapshot was created.

    Constraints:

    • This parameter cannot be defined together with the disk snapshot name parameter. The source disk name and disk snapshot name parameters are mutually exclusive.

    • Define this parameter only when creating a new disk from an automatic snapshot. For more information, see the Lightsail Dev Guide.

  • :restore_date (String)

    The date of the automatic snapshot to use for the new disk. Use the get auto snapshots operation to identify the dates of the available automatic snapshots.

    Constraints:

    • Must be specified in YYYY-MM-DD format.

    • This parameter cannot be defined together with the use latest restorable auto snapshot parameter. The restore date and use latest restorable auto snapshot parameters are mutually exclusive.

    • Define this parameter only when creating a new disk from an automatic snapshot. For more information, see the Lightsail Dev Guide.

  • :use_latest_restorable_auto_snapshot (Boolean)

    A Boolean value to indicate whether to use the latest available automatic snapshot.

    Constraints:

    • This parameter cannot be defined together with the restore date parameter. The use latest restorable auto snapshot and restore date parameters are mutually exclusive.

    • Define this parameter only when creating a new disk from an automatic snapshot. For more information, see the Lightsail Dev Guide.

Returns:

See Also:

#create_disk_snapshot(options = {}) ⇒ 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.

You can also use this operation to create a snapshot of an instance's system volume. You might want to do this, for example, to recover data from the system volume of a botched instance or to create a backup of the system volume like you would for a block storage disk. To create a snapshot of a system volume, just define the instance name parameter when issuing the snapshot command, and a snapshot of the defined instance's system volume will be created. After the snapshot is available, you can create a block storage disk from the snapshot and attach it to a running instance to access the data on the disk.

The create disk snapshot operation supports tag-based access control via request tags. For more information, see the Lightsail Dev Guide.

Examples:

Request syntax with placeholder values


resp = client.create_disk_snapshot({
  disk_name: "ResourceName",
  disk_snapshot_name: "ResourceName", # required
  instance_name: "ResourceName",
  tags: [
    {
      key: "TagKey",
      value: "TagValue",
    },
  ],
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :disk_name (String)

    The unique name of the source disk (e.g., Disk-Virginia-1).

    This parameter cannot be defined together with the instance name parameter. The disk name and instance name parameters are mutually exclusive.

  • :disk_snapshot_name (required, String)

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

  • :instance_name (String)

    The unique name of the source instance (e.g., Amazon_Linux-512MB-Virginia-1). When this is defined, a snapshot of the instance\'s system volume is created.

    This parameter cannot be defined together with the disk name parameter. The instance name and disk name parameters are mutually exclusive.

  • :tags (Array<Types::Tag>)

    The tag keys and optional values to add to the resource during create.

    Use the TagResource action to tag a resource after it\'s created.

Returns:

See Also:

#create_distribution(options = {}) ⇒ Types::CreateDistributionResult

Creates an Amazon Lightsail content delivery network (CDN) distribution.

A distribution is a globally distributed network of caching servers that improve the performance of your website or web application hosted on a Lightsail instance. For more information, see Content delivery networks in Amazon Lightsail.

Examples:

Request syntax with placeholder values


resp = client.create_distribution({
  distribution_name: "ResourceName", # required
  origin: { # required
    name: "ResourceName",
    region_name: "us-east-1", # accepts us-east-1, us-east-2, us-west-1, us-west-2, eu-west-1, eu-west-2, eu-west-3, eu-central-1, ca-central-1, ap-south-1, ap-southeast-1, ap-southeast-2, ap-northeast-1, ap-northeast-2
    protocol_policy: "http-only", # accepts http-only, https-only
  },
  default_cache_behavior: { # required
    behavior: "dont-cache", # accepts dont-cache, cache
  },
  cache_behavior_settings: {
    default_ttl: 1,
    minimum_ttl: 1,
    maximum_ttl: 1,
    allowed_http_methods: "NonEmptyString",
    cached_http_methods: "NonEmptyString",
    forwarded_cookies: {
      option: "none", # accepts none, allow-list, all
      cookies_allow_list: ["string"],
    },
    forwarded_headers: {
      option: "none", # accepts none, allow-list, all
      headers_allow_list: ["Accept"], # accepts Accept, Accept-Charset, Accept-Datetime, Accept-Encoding, Accept-Language, Authorization, CloudFront-Forwarded-Proto, CloudFront-Is-Desktop-Viewer, CloudFront-Is-Mobile-Viewer, CloudFront-Is-SmartTV-Viewer, CloudFront-Is-Tablet-Viewer, CloudFront-Viewer-Country, Host, Origin, Referer
    },
    forwarded_query_strings: {
      option: false,
      query_strings_allow_list: ["string"],
    },
  },
  cache_behaviors: [
    {
      path: "string",
      behavior: "dont-cache", # accepts dont-cache, cache
    },
  ],
  bundle_id: "string", # required
  tags: [
    {
      key: "TagKey",
      value: "TagValue",
    },
  ],
})

Response structure


resp.distribution.name #=> String
resp.distribution.arn #=> String
resp.distribution.support_code #=> String
resp.distribution.created_at #=> Time
resp.distribution.location.availability_zone #=> String
resp.distribution.location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.distribution.resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.distribution.alternative_domain_names #=> Array
resp.distribution.alternative_domain_names[0] #=> String
resp.distribution.status #=> String
resp.distribution.is_enabled #=> true/false
resp.distribution.domain_name #=> String
resp.distribution.bundle_id #=> String
resp.distribution.certificate_name #=> String
resp.distribution.origin.name #=> String
resp.distribution.origin.resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.distribution.origin.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.distribution.origin.protocol_policy #=> String, one of "http-only", "https-only"
resp.distribution.origin_public_dns #=> String
resp.distribution.default_cache_behavior.behavior #=> String, one of "dont-cache", "cache"
resp.distribution.cache_behavior_settings.default_ttl #=> Integer
resp.distribution.cache_behavior_settings.minimum_ttl #=> Integer
resp.distribution.cache_behavior_settings.maximum_ttl #=> Integer
resp.distribution.cache_behavior_settings.allowed_http_methods #=> String
resp.distribution.cache_behavior_settings.cached_http_methods #=> String
resp.distribution.cache_behavior_settings.forwarded_cookies.option #=> String, one of "none", "allow-list", "all"
resp.distribution.cache_behavior_settings.forwarded_cookies.cookies_allow_list #=> Array
resp.distribution.cache_behavior_settings.forwarded_cookies.cookies_allow_list[0] #=> String
resp.distribution.cache_behavior_settings.forwarded_headers.option #=> String, one of "none", "allow-list", "all"
resp.distribution.cache_behavior_settings.forwarded_headers.headers_allow_list #=> Array
resp.distribution.cache_behavior_settings.forwarded_headers.headers_allow_list[0] #=> String, one of "Accept", "Accept-Charset", "Accept-Datetime", "Accept-Encoding", "Accept-Language", "Authorization", "CloudFront-Forwarded-Proto", "CloudFront-Is-Desktop-Viewer", "CloudFront-Is-Mobile-Viewer", "CloudFront-Is-SmartTV-Viewer", "CloudFront-Is-Tablet-Viewer", "CloudFront-Viewer-Country", "Host", "Origin", "Referer"
resp.distribution.cache_behavior_settings.forwarded_query_strings.option #=> true/false
resp.distribution.cache_behavior_settings.forwarded_query_strings.query_strings_allow_list #=> Array
resp.distribution.cache_behavior_settings.forwarded_query_strings.query_strings_allow_list[0] #=> String
resp.distribution.cache_behaviors #=> Array
resp.distribution.cache_behaviors[0].path #=> String
resp.distribution.cache_behaviors[0].behavior #=> String, one of "dont-cache", "cache"
resp.distribution.able_to_update_bundle #=> true/false
resp.distribution.tags #=> Array
resp.distribution.tags[0].key #=> String
resp.distribution.tags[0].value #=> String
resp.operation.id #=> String
resp.operation.resource_name #=> String
resp.operation.resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operation.is_terminal #=> true/false
resp.operation.operation_details #=> String
resp.operation.operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operation.status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operation.status_changed_at #=> Time
resp.operation.error_code #=> String
resp.operation.error_details #=> String

Options Hash (options):

  • :distribution_name (required, String)

    The name for the distribution.

  • :origin (required, Types::InputOrigin)

    An object that describes the origin resource for the distribution, such as a Lightsail instance or load balancer.

    The distribution pulls, caches, and serves content from the origin.

  • :default_cache_behavior (required, Types::CacheBehavior)

    An object that describes the default cache behavior for the distribution.

  • :cache_behavior_settings (Types::CacheSettings)

    An object that describes the cache behavior settings for the distribution.

  • :cache_behaviors (Array<Types::CacheBehaviorPerPath>)

    An array of objects that describe the per-path cache behavior for the distribution.

  • :bundle_id (required, String)

    The bundle ID to use for the distribution.

    A distribution bundle describes the specifications of your distribution, such as the monthly cost and monthly network transfer quota.

    Use the GetDistributionBundles action to get a list of distribution bundle IDs that you can specify.

  • :tags (Array<Types::Tag>)

    The tag keys and optional values to add to the distribution during create.

    Use the TagResource action to tag a resource after it\'s created.

Returns:

See Also:

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

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

The create domain operation supports tag-based access control via request tags. For more information, see the Lightsail Dev Guide.

Examples:

Request syntax with placeholder values


resp = client.create_domain({
  domain_name: "DomainName", # required
  tags: [
    {
      key: "TagKey",
      value: "TagValue",
    },
  ],
})

Response structure


resp.operation.id #=> String
resp.operation.resource_name #=> String
resp.operation.resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operation.is_terminal #=> true/false
resp.operation.operation_details #=> String
resp.operation.operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operation.status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operation.status_changed_at #=> Time
resp.operation.error_code #=> String
resp.operation.error_details #=> String

Options Hash (options):

  • :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.

  • :tags (Array<Types::Tag>)

    The tag keys and optional values to add to the resource during create.

    Use the TagResource action to tag a resource after it\'s created.

Returns:

See Also:

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

Creates one of the following domain name system (DNS) records in a domain DNS zone: Address (A), canonical name (CNAME), mail exchanger (MX), name server (NS), start of authority (SOA), service locator (SRV), or text (TXT).

The create domain entry operation supports tag-based access control via resource tags applied to the resource identified by domain name. For more information, see the Lightsail Dev Guide.

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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operation.is_terminal #=> true/false
resp.operation.operation_details #=> String
resp.operation.operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operation.status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operation.status_changed_at #=> Time
resp.operation.error_code #=> String
resp.operation.error_details #=> String

Options Hash (options):

  • :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:

#create_instance_snapshot(options = {}) ⇒ 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.

The create instance snapshot operation supports tag-based access control via request tags. For more information, see the Lightsail Dev Guide.

Examples:

Request syntax with placeholder values


resp = client.create_instance_snapshot({
  instance_snapshot_name: "ResourceName", # required
  instance_name: "ResourceName", # required
  tags: [
    {
      key: "TagKey",
      value: "TagValue",
    },
  ],
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :instance_snapshot_name (required, String)

    The name for your new snapshot.

  • :instance_name (required, String)

    The Lightsail instance on which to base your snapshot.

  • :tags (Array<Types::Tag>)

    The tag keys and optional values to add to the resource during create.

    Use the TagResource action to tag a resource after it\'s created.

Returns:

See Also:

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

Creates one or more Amazon Lightsail instances.

The create instances operation supports tag-based access control via request tags. For more information, see the Lightsail Dev Guide.

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",
  tags: [
    {
      key: "TagKey",
      value: "TagValue",
    },
  ],
  add_ons: [
    {
      add_on_type: "AutoSnapshot", # required, accepts AutoSnapshot
      auto_snapshot_add_on_request: {
        snapshot_time_of_day: "TimeOfDay",
      },
    },
  ],
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :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).

    Use active blueprints when creating new instances. Inactive blueprints are listed to support customers with existing instances and are not necessarily available to create new instances. Blueprints are marked inactive when they become outdated due to operating system updates or new application releases.

  • :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.

  • :tags (Array<Types::Tag>)

    The tag keys and optional values to add to the resource during create.

    Use the TagResource action to tag a resource after it\'s created.

  • :add_ons (Array<Types::AddOnRequest>)

    An array of objects representing the add-ons to enable for the new instance.

Returns:

See Also:

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

Creates one or more new instances from a manual or automatic snapshot of an instance.

The create instances from snapshot operation supports tag-based access control via request tags and resource tags applied to the resource identified by instance snapshot name. For more information, see the Lightsail Dev Guide.

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",
  bundle_id: "NonEmptyString", # required
  user_data: "string",
  key_pair_name: "ResourceName",
  tags: [
    {
      key: "TagKey",
      value: "TagValue",
    },
  ],
  add_ons: [
    {
      add_on_type: "AutoSnapshot", # required, accepts AutoSnapshot
      auto_snapshot_add_on_request: {
        snapshot_time_of_day: "TimeOfDay",
      },
    },
  ],
  source_instance_name: "string",
  restore_date: "string",
  use_latest_restorable_auto_snapshot: 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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :instance_names (required, Array<String>)

    The names for your new instances.

  • :attached_disk_mapping (Hash<String,Array<Types::DiskMap>>)

    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 (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.

    Constraint:

    • This parameter cannot be defined together with the source instance name parameter. The instance snapshot name and source instance name parameters are mutually exclusive.

    ^

  • :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.

  • :tags (Array<Types::Tag>)

    The tag keys and optional values to add to the resource during create.

    Use the TagResource action to tag a resource after it\'s created.

  • :add_ons (Array<Types::AddOnRequest>)

    An array of objects representing the add-ons to enable for the new instance.

  • :source_instance_name (String)

    The name of the source instance from which the source automatic snapshot was created.

    Constraints:

    • This parameter cannot be defined together with the instance snapshot name parameter. The source instance name and instance snapshot name parameters are mutually exclusive.

    • Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the Lightsail Dev Guide.

  • :restore_date (String)

    The date of the automatic snapshot to use for the new instance. Use the get auto snapshots operation to identify the dates of the available automatic snapshots.

    Constraints:

    • Must be specified in YYYY-MM-DD format.

    • This parameter cannot be defined together with the use latest restorable auto snapshot parameter. The restore date and use latest restorable auto snapshot parameters are mutually exclusive.

    • Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the Lightsail Dev Guide.

  • :use_latest_restorable_auto_snapshot (Boolean)

    A Boolean value to indicate whether to use the latest available automatic snapshot.

    Constraints:

    • This parameter cannot be defined together with the restore date parameter. The use latest restorable auto snapshot and restore date parameters are mutually exclusive.

    • Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the Lightsail Dev Guide.

Returns:

See Also:

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

Creates an SSH key pair.

The create key pair operation supports tag-based access control via request tags. For more information, see the Lightsail Dev Guide.

Examples:

Request syntax with placeholder values


resp = client.create_key_pair({
  key_pair_name: "ResourceName", # required
  tags: [
    {
      key: "TagKey",
      value: "TagValue",
    },
  ],
})

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-west-2", "eu-west-3", "eu-central-1", "ca-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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.key_pair.tags #=> Array
resp.key_pair.tags[0].key #=> String
resp.key_pair.tags[0].value #=> String
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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operation.is_terminal #=> true/false
resp.operation.operation_details #=> String
resp.operation.operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operation.status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operation.status_changed_at #=> Time
resp.operation.error_code #=> String
resp.operation.error_details #=> String

Options Hash (options):

  • :key_pair_name (required, String)

    The name for your new key pair.

  • :tags (Array<Types::Tag>)

    The tag keys and optional values to add to the resource during create.

    Use the TagResource action to tag a resource after it\'s created.

Returns:

See Also:

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

Creates a Lightsail load balancer. To learn more about deciding whether to load balance your application, see Configure your Lightsail instances for load balancing. You can create up to 5 load balancers per AWS Region in your account.

When you create a load balancer, you can specify a unique name and port settings. To change additional load balancer settings, use the UpdateLoadBalancerAttribute operation.

The create load balancer operation supports tag-based access control via request tags. For more information, see the Lightsail Dev Guide.

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"],
  tags: [
    {
      key: "TagKey",
      value: "TagValue",
    },
  ],
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :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., "/").

    You may want to specify a custom health check path other than the root of your application if your home page loads slowly or has a lot of media or scripting on it.

  • :certificate_name (String)

    The name of the SSL/TLS 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 optional alternative domains and subdomains to use with your SSL/TLS certificate (e.g., www.example.com, example.com, m.example.com, blog.example.com).

  • :tags (Array<Types::Tag>)

    The tag keys and optional values to add to the resource during create.

    Use the TagResource action to tag a resource after it\'s created.

Returns:

See Also:

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

Creates a Lightsail load balancer TLS certificate.

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

The CreateLoadBalancerTlsCertificate operation supports tag-based access control via resource tags applied to the resource identified by load balancer name. For more information, see the Lightsail Dev Guide.

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"],
  tags: [
    {
      key: "TagKey",
      value: "TagValue",
    },
  ],
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :load_balancer_name (required, String)

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

  • :certificate_name (required, String)

    The SSL/TLS certificate name.

    You can have up to 10 certificates in your account at one time. Each Lightsail load balancer can have up to 2 certificates associated with it at one time. There is also an overall limit to the number of certificates that can be issue in a 365-day period. For more information, see Limits.

  • :certificate_domain_name (required, String)

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

  • :certificate_alternative_names (Array<String>)

    An array of strings listing alternative domains and subdomains for your SSL/TLS certificate. Lightsail will de-dupe the names for you. You can have a maximum of 9 alternative names (in addition to the 1 primary domain). We do not support wildcards (e.g., *.example.com).

  • :tags (Array<Types::Tag>)

    The tag keys and optional values to add to the resource during create.

    Use the TagResource action to tag a resource after it\'s created.

Returns:

See Also:

#create_relational_database(options = {}) ⇒ Types::CreateRelationalDatabaseResult

Creates a new database in Amazon Lightsail.

The create relational database operation supports tag-based access control via request tags. For more information, see the Lightsail Dev Guide.

Examples:

Request syntax with placeholder values


resp = client.create_relational_database({
  relational_database_name: "ResourceName", # required
  availability_zone: "string",
  relational_database_blueprint_id: "string", # required
  relational_database_bundle_id: "string", # required
  master_database_name: "string", # required
  master_username: "string", # required
  master_user_password: "SensitiveString",
  preferred_backup_window: "string",
  preferred_maintenance_window: "string",
  publicly_accessible: false,
  tags: [
    {
      key: "TagKey",
      value: "TagValue",
    },
  ],
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :relational_database_name (required, String)

    The name to use for your new database.

    Constraints:

    • Must contain from 2 to 255 alphanumeric characters, or hyphens.

    • The first and last character must be a letter or number.

  • :availability_zone (String)

    The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.

    You can get a list of Availability Zones by using the get regions operation. Be sure to add the include relational database Availability Zones parameter to your request.

  • :relational_database_blueprint_id (required, String)

    The blueprint ID for your new database. A blueprint describes the major engine version of a database.

    You can get a list of database blueprints IDs by using the get relational database blueprints operation.

  • :relational_database_bundle_id (required, String)

    The bundle ID for your new database. A bundle describes the performance specifications for your database.

    You can get a list of database bundle IDs by using the get relational database bundles operation.

  • :master_database_name (required, String)

    The name of the master database created when the Lightsail database resource is created.

    Constraints:

    • Must contain from 1 to 64 alphanumeric characters.

    • Cannot be a word reserved by the specified database engine

  • :master_username (required, String)

    The master user name for your new database.

    Constraints:

    • Master user name is required.

    • Must contain from 1 to 16 alphanumeric characters.

    • The first character must be a letter.

    • Cannot be a reserved word for the database engine you choose.

      For more information about reserved words in MySQL 5.6 or 5.7, see the Keywords and Reserved Words articles for MySQL 5.6 or MySQL 5.7 respectively.

  • :master_user_password (String)

    The password for the master user of your new database. The password can include any printable ASCII character except \"/\", \"\"\", or \"@\".

    Constraints: Must contain 8 to 41 characters.

  • :preferred_backup_window (String)

    The daily time range during which automated backups are created for your new database if automated backups are enabled.

    The default is a 30-minute window selected at random from an 8-hour block of time for each AWS Region. For more information about the preferred backup window time blocks for each region, see the Working With Backups guide in the Amazon Relational Database Service (Amazon RDS) documentation.

    Constraints:

    • Must be in the hh24:mi-hh24:mi format.

      Example: 16:00-16:30

    • Specified in Coordinated Universal Time (UTC).

    • Must not conflict with the preferred maintenance window.

    • Must be at least 30 minutes.

  • :preferred_maintenance_window (String)

    The weekly time range during which system maintenance can occur on your new database.

    The default is a 30-minute window selected at random from an 8-hour block of time for each AWS Region, occurring on a random day of the week.

    Constraints:

    • Must be in the ddd:hh24:mi-ddd:hh24:mi format.

    • Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun.

    • Must be at least 30 minutes.

    • Specified in Coordinated Universal Time (UTC).

    • Example: Tue:17:00-Tue:17:30

  • :publicly_accessible (Boolean)

    Specifies the accessibility options for your new database. A value of true specifies a database that is available to resources outside of your Lightsail account. A value of false specifies a database that is available only to your Lightsail resources in the same region as your database.

  • :tags (Array<Types::Tag>)

    The tag keys and optional values to add to the resource during create.

    Use the TagResource action to tag a resource after it\'s created.

Returns:

See Also:

#create_relational_database_from_snapshot(options = {}) ⇒ Types::CreateRelationalDatabaseFromSnapshotResult

Creates a new database from an existing database snapshot in Amazon Lightsail.

You can create a new database from a snapshot in if something goes wrong with your original database, or to change it to a different plan, such as a high availability or standard plan.

The create relational database from snapshot operation supports tag-based access control via request tags and resource tags applied to the resource identified by relationalDatabaseSnapshotName. For more information, see the Lightsail Dev Guide.

Examples:

Request syntax with placeholder values


resp = client.create_relational_database_from_snapshot({
  relational_database_name: "ResourceName", # required
  availability_zone: "string",
  publicly_accessible: false,
  relational_database_snapshot_name: "ResourceName",
  relational_database_bundle_id: "string",
  source_relational_database_name: "ResourceName",
  restore_time: Time.now,
  use_latest_restorable_time: false,
  tags: [
    {
      key: "TagKey",
      value: "TagValue",
    },
  ],
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :relational_database_name (required, String)

    The name to use for your new database.

    Constraints:

    • Must contain from 2 to 255 alphanumeric characters, or hyphens.

    • The first and last character must be a letter or number.

  • :availability_zone (String)

    The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.

    You can get a list of Availability Zones by using the get regions operation. Be sure to add the include relational database Availability Zones parameter to your request.

  • :publicly_accessible (Boolean)

    Specifies the accessibility options for your new database. A value of true specifies a database that is available to resources outside of your Lightsail account. A value of false specifies a database that is available only to your Lightsail resources in the same region as your database.

  • :relational_database_snapshot_name (String)

    The name of the database snapshot from which to create your new database.

  • :relational_database_bundle_id (String)

    The bundle ID for your new database. A bundle describes the performance specifications for your database.

    You can get a list of database bundle IDs by using the get relational database bundles operation.

    When creating a new database from a snapshot, you cannot choose a bundle that is smaller than the bundle of the source database.

  • :source_relational_database_name (String)

    The name of the source database.

  • :restore_time (Time)

    The date and time to restore your database from.

    Constraints:

    • Must be before the latest restorable time for the database.

    • Cannot be specified if the use latest restorable time parameter is true.

    • Specified in Coordinated Universal Time (UTC).

    • Specified in the Unix time format.

      For example, if you wish to use a restore time of October 1, 2018, at 8 PM UTC, then you input 1538424000 as the restore time.

  • :use_latest_restorable_time (Boolean)

    Specifies whether your database is restored from the latest backup time. A value of true restores from the latest backup time.

    Default: false

    Constraints: Cannot be specified if the restore time parameter is provided.

  • :tags (Array<Types::Tag>)

    The tag keys and optional values to add to the resource during create.

    Use the TagResource action to tag a resource after it\'s created.

Returns:

See Also:

#create_relational_database_snapshot(options = {}) ⇒ Types::CreateRelationalDatabaseSnapshotResult

Creates a snapshot of your database in Amazon Lightsail. You can use snapshots for backups, to make copies of a database, and to save data before deleting a database.

The create relational database snapshot operation supports tag-based access control via request tags. For more information, see the Lightsail Dev Guide.

Examples:

Request syntax with placeholder values


resp = client.create_relational_database_snapshot({
  relational_database_name: "ResourceName", # required
  relational_database_snapshot_name: "ResourceName", # required
  tags: [
    {
      key: "TagKey",
      value: "TagValue",
    },
  ],
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :relational_database_name (required, String)

    The name of the database on which to base your new snapshot.

  • :relational_database_snapshot_name (required, String)

    The name for your new database snapshot.

    Constraints:

    • Must contain from 2 to 255 alphanumeric characters, or hyphens.

    • The first and last character must be a letter or number.

  • :tags (Array<Types::Tag>)

    The tag keys and optional values to add to the resource during create.

    Use the TagResource action to tag a resource after it\'s created.

Returns:

See Also:

#delete_alarm(options = {}) ⇒ Types::DeleteAlarmResult

Deletes an alarm.

An alarm is used to monitor a single metric for one of your resources. When a metric condition is met, the alarm can notify you by email, SMS text message, and a banner displayed on the Amazon Lightsail console. For more information, see Alarms in Amazon Lightsail.

Examples:

Request syntax with placeholder values


resp = client.delete_alarm({
  alarm_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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :alarm_name (required, String)

    The name of the alarm to delete.

Returns:

See Also:

#delete_auto_snapshot(options = {}) ⇒ Types::DeleteAutoSnapshotResult

Deletes an automatic snapshot of an instance or disk. For more information, see the Lightsail Dev Guide.

Examples:

Request syntax with placeholder values


resp = client.delete_auto_snapshot({
  resource_name: "ResourceName", # required
  date: "AutoSnapshotDate", # 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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :resource_name (required, String)

    The name of the source instance or disk from which to delete the automatic snapshot.

  • :date (required, String)

    The date of the automatic snapshot to delete in YYYY-MM-DD format. Use the get auto snapshots operation to get the available automatic snapshots for a resource.

Returns:

See Also:

#delete_certificate(options = {}) ⇒ Types::DeleteCertificateResult

Deletes an SSL/TLS certificate for your Amazon Lightsail content delivery network (CDN) distribution.

Certificates that are currently attached to a distribution cannot be deleted. Use the DetachCertificateFromDistribution action to detach a certificate from a distribution.

Examples:

Request syntax with placeholder values


resp = client.delete_certificate({
  certificate_name: "CertificateName", # 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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :certificate_name (required, String)

    The name of the certificate to delete.

    Use the GetCertificates action to get a list of certificate names that you can specify.

Returns:

See Also:

#delete_contact_method(options = {}) ⇒ Types::DeleteContactMethodResult

Deletes a contact method.

A contact method is used to send you notifications about your Amazon Lightsail resources. You can add one email address and one mobile phone number contact method in each AWS Region. However, SMS text messaging is not supported in some AWS Regions, and SMS text messages cannot be sent to some countries/regions. For more information, see Notifications in Amazon Lightsail.

Examples:

Request syntax with placeholder values


resp = client.delete_contact_method({
  protocol: "Email", # required, accepts Email, SMS
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :protocol (required, String)

    The protocol that will be deleted, such as Email or SMS (text messaging).

    To delete an Email and an SMS contact method if you added both, you must run separate DeleteContactMethod actions to delete each protocol.

Returns:

See Also:

#delete_container_image(options = {}) ⇒ Struct

Deletes a container image that is registered to your Amazon Lightsail container service.

Examples:

Request syntax with placeholder values


resp = client.delete_container_image({
  service_name: "ContainerServiceName", # required
  image: "string", # required
})

Options Hash (options):

  • :service_name (required, String)

    The name of the container service for which to delete a registered container image.

  • :image (required, String)

    The name of the container image to delete from the container service.

    Use the GetContainerImages action to get the name of the container images that are registered to a container service.

    Container images sourced from your Lightsail container service, that are registered and stored on your service, start with a colon (:). For example, :container-service-1.mystaticwebsite.1. Container images sourced from a public registry like Docker Hub don\'t start with a colon. For example, nginx:latest or nginx.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_container_service(options = {}) ⇒ Struct

Deletes your Amazon Lightsail container service.

Examples:

Request syntax with placeholder values


resp = client.delete_container_service({
  service_name: "ContainerServiceName", # required
})

Options Hash (options):

  • :service_name (required, String)

    The name of the container service to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_disk(options = {}) ⇒ 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.

The delete disk operation supports tag-based access control via resource tags applied to the resource identified by disk name. For more information, see the Lightsail Dev Guide.

Examples:

Request syntax with placeholder values


resp = client.delete_disk({
  disk_name: "ResourceName", # required
  force_delete_add_ons: 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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :disk_name (required, String)

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

  • :force_delete_add_ons (Boolean)

    A Boolean value to indicate whether to delete the enabled add-ons for the disk.

Returns:

See Also:

#delete_disk_snapshot(options = {}) ⇒ 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.

The delete disk snapshot operation supports tag-based access control via resource tags applied to the resource identified by disk snapshot name. For more information, see the Lightsail Dev Guide.

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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :disk_snapshot_name (required, String)

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

Returns:

See Also:

#delete_distribution(options = {}) ⇒ Types::DeleteDistributionResult

Deletes your Amazon Lightsail content delivery network (CDN) distribution.

Examples:

Request syntax with placeholder values


resp = client.delete_distribution({
  distribution_name: "ResourceName",
})

Response structure


resp.operation.id #=> String
resp.operation.resource_name #=> String
resp.operation.resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operation.is_terminal #=> true/false
resp.operation.operation_details #=> String
resp.operation.operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operation.status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operation.status_changed_at #=> Time
resp.operation.error_code #=> String
resp.operation.error_details #=> String

Options Hash (options):

  • :distribution_name (String)

    The name of the distribution to delete.

    Use the GetDistributions action to get a list of distribution names that you can specify.

Returns:

See Also:

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

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

The delete domain operation supports tag-based access control via resource tags applied to the resource identified by domain name. For more information, see the Lightsail Dev Guide.

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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operation.is_terminal #=> true/false
resp.operation.operation_details #=> String
resp.operation.operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operation.status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operation.status_changed_at #=> Time
resp.operation.error_code #=> String
resp.operation.error_details #=> String

Options Hash (options):

  • :domain_name (required, String)

    The specific domain name to delete.

Returns:

See Also:

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

Deletes a specific domain entry.

The delete domain entry operation supports tag-based access control via resource tags applied to the resource identified by domain name. For more information, see the Lightsail Dev Guide.

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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operation.is_terminal #=> true/false
resp.operation.operation_details #=> String
resp.operation.operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operation.status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operation.status_changed_at #=> Time
resp.operation.error_code #=> String
resp.operation.error_details #=> String

Options Hash (options):

  • :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:

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

Deletes an Amazon Lightsail instance.

The delete instance operation supports tag-based access control via resource tags applied to the resource identified by instance name. For more information, see the Lightsail Dev Guide.

Examples:

Request syntax with placeholder values


resp = client.delete_instance({
  instance_name: "ResourceName", # required
  force_delete_add_ons: 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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :instance_name (required, String)

    The name of the instance to delete.

  • :force_delete_add_ons (Boolean)

    A Boolean value to indicate whether to delete the enabled add-ons for the disk.

Returns:

See Also:

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

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

The delete instance snapshot operation supports tag-based access control via resource tags applied to the resource identified by instance snapshot name. For more information, see the Lightsail Dev Guide.

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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :instance_snapshot_name (required, String)

    The name of the snapshot to delete.

Returns:

See Also:

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

Deletes a specific SSH key pair.

The delete key pair operation supports tag-based access control via resource tags applied to the resource identified by key pair name. For more information, see the Lightsail Dev Guide.

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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operation.is_terminal #=> true/false
resp.operation.operation_details #=> String
resp.operation.operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operation.status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operation.status_changed_at #=> Time
resp.operation.error_code #=> String
resp.operation.error_details #=> String

Options Hash (options):

  • :key_pair_name (required, String)

    The name of the key pair to delete.

Returns:

See Also:

#delete_known_host_keys(options = {}) ⇒ Types::DeleteKnownHostKeysResult

Deletes the known host key or certificate used by the Amazon Lightsail browser-based SSH or RDP clients to authenticate an instance. This operation enables the Lightsail browser-based SSH or RDP clients to connect to the instance after a host key mismatch.

Perform this operation only if you were expecting the host key or certificate mismatch or if you are familiar with the new host key or certificate on the instance. For more information, see Troubleshooting connection issues when using the Amazon Lightsail browser-based SSH or RDP client.

Examples:

Request syntax with placeholder values


resp = client.delete_known_host_keys({
  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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :instance_name (required, String)

    The name of the instance for which you want to reset the host key or certificate.

Returns:

See Also:

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

Deletes a Lightsail load balancer and all its associated SSL/TLS certificates. Once the load balancer is deleted, you will need to create a new load balancer, create a new certificate, and verify domain ownership again.

The delete load balancer operation supports tag-based access control via resource tags applied to the resource identified by load balancer name. For more information, see the Lightsail Dev Guide.

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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :load_balancer_name (required, String)

    The name of the load balancer you want to delete.

Returns:

See Also:

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

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

The DeleteLoadBalancerTlsCertificate operation supports tag-based access control via resource tags applied to the resource identified by load balancer name. For more information, see the Lightsail Dev Guide.

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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :load_balancer_name (required, String)

    The load balancer name.

  • :certificate_name (required, String)

    The SSL/TLS certificate name.

  • :force (Boolean)

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

    There can be two certificates associated with a Lightsail load balancer: the primary and the backup. The force parameter is required when the primary SSL/TLS certificate is in use by an instance attached to the load balancer.

Returns:

See Also:

#delete_relational_database(options = {}) ⇒ Types::DeleteRelationalDatabaseResult

Deletes a database in Amazon Lightsail.

The delete relational database operation supports tag-based access control via resource tags applied to the resource identified by relationalDatabaseName. For more information, see the Lightsail Dev Guide.

Examples:

Request syntax with placeholder values


resp = client.delete_relational_database({
  relational_database_name: "ResourceName", # required
  skip_final_snapshot: false,
  final_relational_database_snapshot_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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :relational_database_name (required, String)

    The name of the database that you are deleting.

  • :skip_final_snapshot (Boolean)

    Determines whether a final database snapshot is created before your database is deleted. If true is specified, no database snapshot is created. If false is specified, a database snapshot is created before your database is deleted.

    You must specify the final relational database snapshot name parameter if the skip final snapshot parameter is false.

    Default: false

  • :final_relational_database_snapshot_name (String)

    The name of the database snapshot created if skip final snapshot is false, which is the default value for that parameter.

    Specifying this parameter and also specifying the skip final snapshot parameter to true results in an error.

    Constraints:

    • Must contain from 2 to 255 alphanumeric characters, or hyphens.

    • The first and last character must be a letter or number.

Returns:

See Also:

#delete_relational_database_snapshot(options = {}) ⇒ Types::DeleteRelationalDatabaseSnapshotResult

Deletes a database snapshot in Amazon Lightsail.

The delete relational database snapshot operation supports tag-based access control via resource tags applied to the resource identified by relationalDatabaseName. For more information, see the Lightsail Dev Guide.

Examples:

Request syntax with placeholder values


resp = client.delete_relational_database_snapshot({
  relational_database_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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :relational_database_snapshot_name (required, String)

    The name of the database snapshot that you are deleting.

Returns:

See Also:

#detach_certificate_from_distribution(options = {}) ⇒ Types::DetachCertificateFromDistributionResult

Detaches an SSL/TLS certificate from your Amazon Lightsail content delivery network (CDN) distribution.

After the certificate is detached, your distribution stops accepting traffic for all of the domains that are associated with the certificate.

Examples:

Request syntax with placeholder values


resp = client.detach_certificate_from_distribution({
  distribution_name: "ResourceName", # required
})

Response structure


resp.operation.id #=> String
resp.operation.resource_name #=> String
resp.operation.resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operation.is_terminal #=> true/false
resp.operation.operation_details #=> String
resp.operation.operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operation.status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operation.status_changed_at #=> Time
resp.operation.error_code #=> String
resp.operation.error_details #=> String

Options Hash (options):

  • :distribution_name (required, String)

    The name of the distribution from which to detach the certificate.

    Use the GetDistributions action to get a list of distribution names that you can specify.

Returns:

See Also:

#detach_disk(options = {}) ⇒ 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.

The detach disk operation supports tag-based access control via resource tags applied to the resource identified by disk name. For more information, see the Lightsail Dev Guide.

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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :disk_name (required, String)

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

Returns:

See Also:

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

Detaches the specified instances from a Lightsail load balancer.

This operation waits until the instances are no longer needed before they are detached from the load balancer.

The detach instances from load balancer operation supports tag-based access control via resource tags applied to the resource identified by load balancer name. For more information, see the Lightsail Dev Guide.

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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :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:

#detach_static_ip(options = {}) ⇒ 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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :static_ip_name (required, String)

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

Returns:

See Also:

#disable_add_on(options = {}) ⇒ Types::DisableAddOnResult

Disables an add-on for an Amazon Lightsail resource. For more information, see the Lightsail Dev Guide.

Examples:

Request syntax with placeholder values


resp = client.disable_add_on({
  add_on_type: "AutoSnapshot", # required, accepts AutoSnapshot
  resource_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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :add_on_type (required, String)

    The add-on type to disable.

  • :resource_name (required, String)

    The name of the source resource for which to disable the add-on.

Returns:

See Also:

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

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

Examples:

Request syntax with placeholder values


resp = client.download_default_key_pair()

Response structure


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

Returns:

See Also:

#enable_add_on(options = {}) ⇒ Types::EnableAddOnResult

Enables or modifies an add-on for an Amazon Lightsail resource. For more information, see the Lightsail Dev Guide.

Examples:

Request syntax with placeholder values


resp = client.enable_add_on({
  resource_name: "ResourceName", # required
  add_on_request: { # required
    add_on_type: "AutoSnapshot", # required, accepts AutoSnapshot
    auto_snapshot_add_on_request: {
      snapshot_time_of_day: "TimeOfDay",
    },
  },
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :resource_name (required, String)

    The name of the source resource for which to enable or modify the add-on.

  • :add_on_request (required, Types::AddOnRequest)

    An array of strings representing the add-on to enable or modify.

Returns:

See Also:

#export_snapshot(options = {}) ⇒ Types::ExportSnapshotResult

Exports an Amazon Lightsail instance or block storage disk snapshot to Amazon Elastic Compute Cloud (Amazon EC2). This operation results in an export snapshot record that can be used with the create cloud formation stack operation to create new Amazon EC2 instances.

Exported instance snapshots appear in Amazon EC2 as Amazon Machine Images (AMIs), and the instance system disk appears as an Amazon Elastic Block Store (Amazon EBS) volume. Exported disk snapshots appear in Amazon EC2 as Amazon EBS volumes. Snapshots are exported to the same Amazon Web Services Region in Amazon EC2 as the source Lightsail snapshot.

The export snapshot operation supports tag-based access control via resource tags applied to the resource identified by source snapshot name. For more information, see the Lightsail Dev Guide.

Use the get instance snapshots or get disk snapshots operations to get a list of snapshots that you can export to Amazon EC2.

Examples:

Request syntax with placeholder values


resp = client.export_snapshot({
  source_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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :source_snapshot_name (required, String)

    The name of the instance or disk snapshot to be exported to Amazon EC2.

Returns:

See Also:

#get_active_names(options = {}) ⇒ 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

Options Hash (options):

  • :page_token (String)

    The token to advance to the next page of results from your request.

    To get a page token, perform an initial GetActiveNames request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.

Returns:

See Also:

#get_alarms(options = {}) ⇒ Types::GetAlarmsResult

Returns information about the configured alarms. Specify an alarm name in your request to return information about a specific alarm, or specify a monitored resource name to return information about all alarms for a specific resource.

An alarm is used to monitor a single metric for one of your resources. When a metric condition is met, the alarm can notify you by email, SMS text message, and a banner displayed on the Amazon Lightsail console. For more information, see Alarms in Amazon Lightsail.

Examples:

Request syntax with placeholder values


resp = client.get_alarms({
  alarm_name: "ResourceName",
  page_token: "string",
  monitored_resource_name: "ResourceName",
})

Response structure


resp.alarms #=> Array
resp.alarms[0].name #=> String
resp.alarms[0].arn #=> String
resp.alarms[0].created_at #=> Time
resp.alarms[0].location.availability_zone #=> String
resp.alarms[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.alarms[0].resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.alarms[0].support_code #=> String
resp.alarms[0].monitored_resource_info.arn #=> String
resp.alarms[0].monitored_resource_info.name #=> String
resp.alarms[0].monitored_resource_info.resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.alarms[0].comparison_operator #=> String, one of "GreaterThanOrEqualToThreshold", "GreaterThanThreshold", "LessThanThreshold", "LessThanOrEqualToThreshold"
resp.alarms[0].evaluation_periods #=> Integer
resp.alarms[0].period #=> Integer
resp.alarms[0].threshold #=> Float
resp.alarms[0].datapoints_to_alarm #=> Integer
resp.alarms[0].treat_missing_data #=> String, one of "breaching", "notBreaching", "ignore", "missing"
resp.alarms[0].statistic #=> String, one of "Minimum", "Maximum", "Sum", "Average", "SampleCount"
resp.alarms[0].metric_name #=> String, one of "CPUUtilization", "NetworkIn", "NetworkOut", "StatusCheckFailed", "StatusCheckFailed_Instance", "StatusCheckFailed_System", "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", "DatabaseConnections", "DiskQueueDepth", "FreeStorageSpace", "NetworkReceiveThroughput", "NetworkTransmitThroughput", "BurstCapacityTime", "BurstCapacityPercentage"
resp.alarms[0].state #=> String, one of "OK", "ALARM", "INSUFFICIENT_DATA"
resp.alarms[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"
resp.alarms[0].contact_protocols #=> Array
resp.alarms[0].contact_protocols[0] #=> String, one of "Email", "SMS"
resp.alarms[0].notification_triggers #=> Array
resp.alarms[0].notification_triggers[0] #=> String, one of "OK", "ALARM", "INSUFFICIENT_DATA"
resp.alarms[0].notification_enabled #=> true/false
resp.next_page_token #=> String

Options Hash (options):

  • :alarm_name (String)

    The name of the alarm.

    Specify an alarm name to return information about a specific alarm.

  • :page_token (String)

    The token to advance to the next page of results from your request.

    To get a page token, perform an initial GetAlarms request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.

  • :monitored_resource_name (String)

    The name of the Lightsail resource being monitored by the alarm.

    Specify a monitored resource name to return information about all alarms for a specific resource.

Returns:

See Also:

#get_auto_snapshots(options = {}) ⇒ Types::GetAutoSnapshotsResult

Returns the available automatic snapshots for an instance or disk. For more information, see the Lightsail Dev Guide.

Examples:

Request syntax with placeholder values


resp = client.get_auto_snapshots({
  resource_name: "ResourceName", # required
})

Response structure


resp.resource_name #=> String
resp.resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.auto_snapshots #=> Array
resp.auto_snapshots[0].date #=> String
resp.auto_snapshots[0].created_at #=> Time
resp.auto_snapshots[0].status #=> String, one of "Success", "Failed", "InProgress", "NotFound"
resp.auto_snapshots[0].from_attached_disks #=> Array
resp.auto_snapshots[0].from_attached_disks[0].path #=> String
resp.auto_snapshots[0].from_attached_disks[0].size_in_gb #=> Integer

Options Hash (options):

  • :resource_name (required, String)

    The name of the source instance or disk from which to get automatic snapshot information.

Returns:

See Also:

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

Returns the list of available instance images, or blueprints. You can use a blueprint to create a new instance 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.

Use active blueprints when creating new instances. Inactive blueprints are listed to support customers with existing instances and are not necessarily available to create new instances. Blueprints are marked inactive when they become outdated due to operating system updates or new application releases.

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 #=> true/false
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

Options Hash (options):

  • :include_inactive (Boolean)

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

  • :page_token (String)

    The token to advance to the next page of results from your request.

    To get a page token, perform an initial GetBlueprints request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.

Returns:

See Also:

#get_bundles(options = {}) ⇒ 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 #=> true/false
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

Options Hash (options):

  • :include_inactive (Boolean)

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

  • :page_token (String)

    The token to advance to the next page of results from your request.

    To get a page token, perform an initial GetBundles request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.

Returns:

See Also:

#get_certificates(options = {}) ⇒ Types::GetCertificatesResult

Returns information about one or more Amazon Lightsail SSL/TLS certificates.

To get a summary of a certificate, ommit includeCertificateDetails from your request. The response will include only the certificate Amazon Resource Name (ARN), certificate name, domain name, and tags.

Examples:

Request syntax with placeholder values


resp = client.get_certificates({
  certificate_statuses: ["PENDING_VALIDATION"], # accepts PENDING_VALIDATION, ISSUED, INACTIVE, EXPIRED, VALIDATION_TIMED_OUT, REVOKED, FAILED
  include_certificate_details: false,
  certificate_name: "CertificateName",
})

Response structure


resp.certificates #=> Array
resp.certificates[0].certificate_arn #=> String
resp.certificates[0].certificate_name #=> String
resp.certificates[0].domain_name #=> String
resp.certificates[0].certificate_detail.arn #=> String
resp.certificates[0].certificate_detail.name #=> String
resp.certificates[0].certificate_detail.domain_name #=> String
resp.certificates[0].certificate_detail.status #=> String, one of "PENDING_VALIDATION", "ISSUED", "INACTIVE", "EXPIRED", "VALIDATION_TIMED_OUT", "REVOKED", "FAILED"
resp.certificates[0].certificate_detail.serial_number #=> String
resp.certificates[0].certificate_detail.subject_alternative_names #=> Array
resp.certificates[0].certificate_detail.subject_alternative_names[0] #=> String
resp.certificates[0].certificate_detail.domain_validation_records #=> Array
resp.certificates[0].certificate_detail.domain_validation_records[0].domain_name #=> String
resp.certificates[0].certificate_detail.domain_validation_records[0].resource_record.name #=> String
resp.certificates[0].certificate_detail.domain_validation_records[0].resource_record.type #=> String
resp.certificates[0].certificate_detail.domain_validation_records[0].resource_record.value #=> String
resp.certificates[0].certificate_detail.request_failure_reason #=> String
resp.certificates[0].certificate_detail.in_use_resource_count #=> Integer
resp.certificates[0].certificate_detail.key_algorithm #=> String
resp.certificates[0].certificate_detail.created_at #=> Time
resp.certificates[0].certificate_detail.issued_at #=> Time
resp.certificates[0].certificate_detail.issuer_ca #=> String
resp.certificates[0].certificate_detail.not_before #=> Time
resp.certificates[0].certificate_detail.not_after #=> Time
resp.certificates[0].certificate_detail.eligible_to_renew #=> String
resp.certificates[0].certificate_detail.renewal_summary.domain_validation_records #=> Array
resp.certificates[0].certificate_detail.renewal_summary.domain_validation_records[0].domain_name #=> String
resp.certificates[0].certificate_detail.renewal_summary.domain_validation_records[0].resource_record.name #=> String
resp.certificates[0].certificate_detail.renewal_summary.domain_validation_records[0].resource_record.type #=> String
resp.certificates[0].certificate_detail.renewal_summary.domain_validation_records[0].resource_record.value #=> String
resp.certificates[0].certificate_detail.renewal_summary.renewal_status #=> String, one of "PendingAutoRenewal", "PendingValidation", "Success", "Failed"
resp.certificates[0].certificate_detail.renewal_summary.renewal_status_reason #=> String
resp.certificates[0].certificate_detail.renewal_summary.updated_at #=> Time
resp.certificates[0].certificate_detail.revoked_at #=> Time
resp.certificates[0].certificate_detail.revocation_reason #=> String
resp.certificates[0].certificate_detail.tags #=> Array
resp.certificates[0].certificate_detail.tags[0].key #=> String
resp.certificates[0].certificate_detail.tags[0].value #=> String
resp.certificates[0].certificate_detail.support_code #=> String
resp.certificates[0].tags #=> Array
resp.certificates[0].tags[0].key #=> String
resp.certificates[0].tags[0].value #=> String

Options Hash (options):

  • :certificate_statuses (Array<String>)

    The status of the certificates for which to return information.

    For example, specify ISSUED to return only certificates with an ISSUED status.

    When omitted, the response includes all of your certificates in the AWS Region where the request is made, regardless of their current status.

  • :include_certificate_details (Boolean)

    Indicates whether to include detailed information about the certificates in the response.

    When omitted, the response includes only the certificate names, Amazon Resource Names (ARNs), domain names, and tags.

  • :certificate_name (String)

    The name for the certificate for which to return information.

    When omitted, the response includes all of your certificates in the AWS Region where the request is made.

Returns:

See Also:

#get_cloud_formation_stack_records(options = {}) ⇒ Types::GetCloudFormationStackRecordsResult

Returns the CloudFormation stack record created as a result of the create cloud formation stack operation.

An AWS CloudFormation stack is used to create a new Amazon EC2 instance from an exported Lightsail snapshot.

Examples:

Request syntax with placeholder values


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

Response structure


resp.cloud_formation_stack_records #=> Array
resp.cloud_formation_stack_records[0].name #=> String
resp.cloud_formation_stack_records[0].arn #=> String
resp.cloud_formation_stack_records[0].created_at #=> Time
resp.cloud_formation_stack_records[0].location.availability_zone #=> String
resp.cloud_formation_stack_records[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.cloud_formation_stack_records[0].resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.cloud_formation_stack_records[0].state #=> String, one of "Started", "Succeeded", "Failed"
resp.cloud_formation_stack_records[0].source_info #=> Array
resp.cloud_formation_stack_records[0].source_info[0].resource_type #=> String, one of "ExportSnapshotRecord"
resp.cloud_formation_stack_records[0].source_info[0].name #=> String
resp.cloud_formation_stack_records[0].source_info[0].arn #=> String
resp.cloud_formation_stack_records[0].destination_info.id #=> String
resp.cloud_formation_stack_records[0].destination_info.service #=> String
resp.next_page_token #=> String

Options Hash (options):

  • :page_token (String)

    The token to advance to the next page of results from your request.

    To get a page token, perform an initial GetClouFormationStackRecords request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.

Returns:

See Also:

#get_contact_methods(options = {}) ⇒ Types::GetContactMethodsResult

Returns information about the configured contact methods. Specify a protocol in your request to return information about a specific contact method.

A contact method is used to send you notifications about your Amazon Lightsail resources. You can add one email address and one mobile phone number contact method in each AWS Region. However, SMS text messaging is not supported in some AWS Regions, and SMS text messages cannot be sent to some countries/regions. For more information, see Notifications in Amazon Lightsail.

Examples:

Request syntax with placeholder values


resp = client.get_contact_methods({
  protocols: ["Email"], # accepts Email, SMS
})

Response structure


resp.contact_methods #=> Array
resp.contact_methods[0].contact_endpoint #=> String
resp.contact_methods[0].status #=> String, one of "PendingVerification", "Valid", "Invalid"
resp.contact_methods[0].protocol #=> String, one of "Email", "SMS"
resp.contact_methods[0].name #=> String
resp.contact_methods[0].arn #=> String
resp.contact_methods[0].created_at #=> Time
resp.contact_methods[0].location.availability_zone #=> String
resp.contact_methods[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.contact_methods[0].resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.contact_methods[0].support_code #=> String

Options Hash (options):

  • :protocols (Array<String>)

    The protocols used to send notifications, such as Email, or SMS (text messaging).

    Specify a protocol in your request to return information about a specific contact method protocol.

Returns:

See Also:

#get_container_api_metadata(options = {}) ⇒ Types::GetContainerAPIMetadataResult

Returns information about Amazon Lightsail containers, such as the current version of the Lightsail Control (lightsailctl) plugin.

Examples:

Request syntax with placeholder values


resp = client.()

Response structure


resp. #=> Array
resp.[0] #=> Hash
resp.[0]["string"] #=> String

Returns:

See Also:

#get_container_images(options = {}) ⇒ Types::GetContainerImagesResult

Returns the container images that are registered to your Amazon Lightsail container service.

If you created a deployment on your Lightsail container service that uses container images from a public registry like Docker Hub, those images are not returned as part of this action. Those images are not registered to your Lightsail container service.

Examples:

Request syntax with placeholder values


resp = client.get_container_images({
  service_name: "ContainerServiceName", # required
})

Response structure


resp.container_images #=> Array
resp.container_images[0].image #=> String
resp.container_images[0].digest #=> String
resp.container_images[0].created_at #=> Time

Options Hash (options):

  • :service_name (required, String)

    The name of the container service for which to return registered container images.

Returns:

See Also:

#get_container_log(options = {}) ⇒ Types::GetContainerLogResult

Returns the log events of a container of your Amazon Lightsail container service.

If your container service has more than one node (i.e., a scale greater than 1), then the log events that are returned for the specified container are merged from all nodes on your container service.

Container logs are retained for a certain amount of time. For more information, see Amazon Lightsail endpoints and quotas in the AWS General Reference.

Examples:

Request syntax with placeholder values


resp = client.get_container_log({
  service_name: "ContainerServiceName", # required
  container_name: "string", # required
  start_time: Time.now,
  end_time: Time.now,
  filter_pattern: "string",
  page_token: "string",
})

Response structure


resp.log_events #=> Array
resp.log_events[0].created_at #=> Time
resp.log_events[0].message #=> String
resp.next_page_token #=> String

Options Hash (options):

  • :service_name (required, String)

    The name of the container service for which to get a container log.

  • :container_name (required, String)

    The name of the container that is either running or previously ran on the container service for which to return a log.

  • :start_time (Time)

    The start of the time interval for which to get log data.

    Constraints:

    • Specified in Coordinated Universal Time (UTC).

    • Specified in the Unix time format.

      For example, if you wish to use a start time of October 1, 2018, at 8 PM UTC, specify 1538424000 as the start time.

    You can convert a human-friendly time to Unix time format using a converter like Epoch converter.

  • :end_time (Time)

    The end of the time interval for which to get log data.

    Constraints:

    • Specified in Coordinated Universal Time (UTC).

    • Specified in the Unix time format.

      For example, if you wish to use an end time of October 1, 2018, at 9 PM UTC, specify 1538427600 as the end time.

    You can convert a human-friendly time to Unix time format using a converter like Epoch converter.

  • :filter_pattern (String)

    The pattern to use to filter the returned log events to a specific term.

    The following are a few examples of filter patterns that you can specify:

    • To return all log events, specify a filter pattern of "".

    • To exclude log events that contain the ERROR term, and return all other log events, specify a filter pattern of "-ERROR".

    • To return log events that contain the ERROR term, specify a filter pattern of "ERROR".

    • To return log events that contain both the ERROR and Exception terms, specify a filter pattern of "ERROR Exception".

    • To return log events that contain the ERROR or the Exception term, specify a filter pattern of "?ERROR ?Exception".

  • :page_token (String)

    The token to advance to the next page of results from your request.

    To get a page token, perform an initial GetContainerLog request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.

Returns:

See Also:

#get_container_service_deployments(options = {}) ⇒ Types::GetContainerServiceDeploymentsResult

Returns the deployments for your Amazon Lightsail container service

A deployment specifies the settings, such as the ports and launch command, of containers that are deployed to your container service.

The deployments are ordered by version in ascending order. The newest version is listed at the top of the response.

A set number of deployments are kept before the oldest one is replaced with the newest one. For more information, see Amazon Lightsail endpoints and quotas in the AWS General Reference.

Examples:

Request syntax with placeholder values


resp = client.get_container_service_deployments({
  service_name: "ContainerServiceName", # required
})

Response structure


resp.deployments #=> Array
resp.deployments[0].version #=> Integer
resp.deployments[0].state #=> String, one of "ACTIVATING", "ACTIVE", "INACTIVE", "FAILED"
resp.deployments[0].containers #=> Hash
resp.deployments[0].containers["ContainerName"].image #=> String
resp.deployments[0].containers["ContainerName"].command #=> Array
resp.deployments[0].containers["ContainerName"].command[0] #=> String
resp.deployments[0].containers["ContainerName"].environment #=> Hash
resp.deployments[0].containers["ContainerName"].environment["string"] #=> String
resp.deployments[0].containers["ContainerName"].ports #=> Hash
resp.deployments[0].containers["ContainerName"].ports["string"] #=> String, one of "HTTP", "HTTPS", "TCP", "UDP"
resp.deployments[0].public_endpoint.container_name #=> String
resp.deployments[0].public_endpoint.container_port #=> Integer
resp.deployments[0].public_endpoint.health_check.healthy_threshold #=> Integer
resp.deployments[0].public_endpoint.health_check.unhealthy_threshold #=> Integer
resp.deployments[0].public_endpoint.health_check.timeout_seconds #=> Integer
resp.deployments[0].public_endpoint.health_check.interval_seconds #=> Integer
resp.deployments[0].public_endpoint.health_check.path #=> String
resp.deployments[0].public_endpoint.health_check.success_codes #=> String
resp.deployments[0].created_at #=> Time

Options Hash (options):

  • :service_name (required, String)

    The name of the container service for which to return deployments.

Returns:

See Also:

#get_container_service_metric_data(options = {}) ⇒ Types::GetContainerServiceMetricDataResult

Returns the data points of a specific metric of your Amazon Lightsail container service.

Metrics report the utilization of your resources. Monitor and collect metric data regularly to maintain the reliability, availability, and performance of your resources.

Examples:

Request syntax with placeholder values


resp = client.get_container_service_metric_data({
  service_name: "ContainerServiceName", # required
  metric_name: "CPUUtilization", # required, accepts CPUUtilization, MemoryUtilization
  start_time: Time.now, # required
  end_time: Time.now, # required
  period: 1, # required
  statistics: ["Minimum"], # required, accepts Minimum, Maximum, Sum, Average, SampleCount
})

Response structure


resp.metric_name #=> String, one of "CPUUtilization", "MemoryUtilization"
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"

Options Hash (options):

  • :service_name (required, String)

    The name of the container service for which to get metric data.

  • :metric_name (required, String)

    The metric for which you want to return information.

    Valid container service metric names are listed below, along with the most useful statistics to include in your request, and the published unit value.

    • CPUUtilization - The average percentage of compute units that are currently in use across all nodes of the container service. This metric identifies the processing power required to run containers on each node of the container service.

      Statistics: The most useful statistics are Maximum and Average.

      Unit: The published unit is Percent.

    • MemoryUtilization - The average percentage of available memory that is currently in use across all nodes of the container service. This metric identifies the memory required to run containers on each node of the container service.

      Statistics: The most useful statistics are Maximum and Average.

      Unit: The published unit is Percent.

  • :start_time (required, Time)

    The start time of the time period.

  • :end_time (required, Time)

    The end time of the time period.

  • :period (required, Integer)

    The granularity, in seconds, of the returned data points.

    All container service metric data is available in 5-minute (300 seconds) granularity.

  • :statistics (required, Array<String>)

    The statistic for the metric.

    The following statistics are available:

    • Minimum - The lowest value observed during the specified period. Use this value to determine low volumes of activity for your application.

    • Maximum - The highest value observed during the specified period. Use this value to determine high volumes of activity for your application.

    • Sum - All values submitted for the matching metric added together. You can use this statistic to determine the total volume of a metric.

    • Average - The value of Sum / SampleCount during the specified period. By comparing this statistic with the Minimum and Maximum values, you can determine the full scope of a metric and how close the average use is to the Minimum and Maximum values. This comparison helps you to know when to increase or decrease your resources.

    • SampleCount - The count, or number, of data points used for the statistical calculation.

Returns:

See Also:

#get_container_service_powers(options = {}) ⇒ Types::GetContainerServicePowersResult

Returns the list of powers that can be specified for your Amazon Lightsail container services.

The power specifies the amount of memory, the number of vCPUs, and the base price of the container service.

Examples:

Request syntax with placeholder values


resp = client.get_container_service_powers()

Response structure


resp.powers #=> Array
resp.powers[0].power_id #=> String
resp.powers[0].price #=> Float
resp.powers[0].cpu_count #=> Float
resp.powers[0].ram_size_in_gb #=> Float
resp.powers[0].name #=> String
resp.powers[0].is_active #=> true/false

Returns:

See Also:

#get_container_services(options = {}) ⇒ Types::ContainerServicesListResult

Returns information about one or more of your Amazon Lightsail container services.

Examples:

Request syntax with placeholder values


resp = client.get_container_services({
  service_name: "ContainerServiceName",
})

Response structure


resp.container_services #=> Array
resp.container_services[0].container_service_name #=> String
resp.container_services[0].arn #=> String
resp.container_services[0].created_at #=> Time
resp.container_services[0].location.availability_zone #=> String
resp.container_services[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.container_services[0].resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.container_services[0].tags #=> Array
resp.container_services[0].tags[0].key #=> String
resp.container_services[0].tags[0].value #=> String
resp.container_services[0].power #=> String, one of "nano", "micro", "small", "medium", "large", "xlarge"
resp.container_services[0].power_id #=> String
resp.container_services[0].state #=> String, one of "PENDING", "READY", "RUNNING", "UPDATING", "DELETING", "DISABLED"
resp.container_services[0].scale #=> Integer
resp.container_services[0].current_deployment.version #=> Integer
resp.container_services[0].current_deployment.state #=> String, one of "ACTIVATING", "ACTIVE", "INACTIVE", "FAILED"
resp.container_services[0].current_deployment.containers #=> Hash
resp.container_services[0].current_deployment.containers["ContainerName"].image #=> String
resp.container_services[0].current_deployment.containers["ContainerName"].command #=> Array
resp.container_services[0].current_deployment.containers["ContainerName"].command[0] #=> String
resp.container_services[0].current_deployment.containers["ContainerName"].environment #=> Hash
resp.container_services[0].current_deployment.containers["ContainerName"].environment["string"] #=> String
resp.container_services[0].current_deployment.containers["ContainerName"].ports #=> Hash
resp.container_services[0].current_deployment.containers["ContainerName"].ports["string"] #=> String, one of "HTTP", "HTTPS", "TCP", "UDP"
resp.container_services[0].current_deployment.public_endpoint.container_name #=> String
resp.container_services[0].current_deployment.public_endpoint.container_port #=> Integer
resp.container_services[0].current_deployment.public_endpoint.health_check.healthy_threshold #=> Integer
resp.container_services[0].current_deployment.public_endpoint.health_check.unhealthy_threshold #=> Integer
resp.container_services[0].current_deployment.public_endpoint.health_check.timeout_seconds #=> Integer
resp.container_services[0].current_deployment.public_endpoint.health_check.interval_seconds #=> Integer
resp.container_services[0].current_deployment.public_endpoint.health_check.path #=> String
resp.container_services[0].current_deployment.public_endpoint.health_check.success_codes #=> String
resp.container_services[0].current_deployment.created_at #=> Time
resp.container_services[0].next_deployment.version #=> Integer
resp.container_services[0].next_deployment.state #=> String, one of "ACTIVATING", "ACTIVE", "INACTIVE", "FAILED"
resp.container_services[0].next_deployment.containers #=> Hash
resp.container_services[0].next_deployment.containers["ContainerName"].image #=> String
resp.container_services[0].next_deployment.containers["ContainerName"].command #=> Array
resp.container_services[0].next_deployment.containers["ContainerName"].command[0] #=> String
resp.container_services[0].next_deployment.containers["ContainerName"].environment #=> Hash
resp.container_services[0].next_deployment.containers["ContainerName"].environment["string"] #=> String
resp.container_services[0].next_deployment.containers["ContainerName"].ports #=> Hash
resp.container_services[0].next_deployment.containers["ContainerName"].ports["string"] #=> String, one of "HTTP", "HTTPS", "TCP", "UDP"
resp.container_services[0].next_deployment.public_endpoint.container_name #=> String
resp.container_services[0].next_deployment.public_endpoint.container_port #=> Integer
resp.container_services[0].next_deployment.public_endpoint.health_check.healthy_threshold #=> Integer
resp.container_services[0].next_deployment.public_endpoint.health_check.unhealthy_threshold #=> Integer
resp.container_services[0].next_deployment.public_endpoint.health_check.timeout_seconds #=> Integer
resp.container_services[0].next_deployment.public_endpoint.health_check.interval_seconds #=> Integer
resp.container_services[0].next_deployment.public_endpoint.health_check.path #=> String
resp.container_services[0].next_deployment.public_endpoint.health_check.success_codes #=> String
resp.container_services[0].next_deployment.created_at #=> Time
resp.container_services[0].is_disabled #=> true/false
resp.container_services[0].principal_arn #=> String
resp.container_services[0].private_domain_name #=> String
resp.container_services[0].public_domain_names #=> Hash
resp.container_services[0].public_domain_names["string"] #=> Array
resp.container_services[0].public_domain_names["string"][0] #=> String
resp.container_services[0].url #=> String

Options Hash (options):

  • :service_name (String)

    The name of the container service for which to return information.

    When omitted, the response includes all of your container services in the AWS Region where the request is made.

Returns:

See Also:

#get_disk(options = {}) ⇒ 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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.disk.resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.disk.tags #=> Array
resp.disk.tags[0].key #=> String
resp.disk.tags[0].value #=> String
resp.disk.add_ons #=> Array
resp.disk.add_ons[0].name #=> String
resp.disk.add_ons[0].status #=> String
resp.disk.add_ons[0].snapshot_time_of_day #=> String
resp.disk.add_ons[0].next_snapshot_time_of_day #=> String
resp.disk.size_in_gb #=> Integer
resp.disk.is_system_disk #=> true/false
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 #=> true/false
resp.disk.attachment_state #=> String
resp.disk.gb_in_use #=> Integer

Options Hash (options):

  • :disk_name (required, String)

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

Returns:

See Also:

#get_disk_snapshot(options = {}) ⇒ 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-west-2", "eu-west-3", "eu-central-1", "ca-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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.disk_snapshot.tags #=> Array
resp.disk_snapshot.tags[0].key #=> String
resp.disk_snapshot.tags[0].value #=> String
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
resp.disk_snapshot.from_instance_name #=> String
resp.disk_snapshot.from_instance_arn #=> String
resp.disk_snapshot.is_from_auto_snapshot #=> true/false

Options Hash (options):

  • :disk_snapshot_name (required, String)

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

Returns:

See Also:

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

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

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-west-2", "eu-west-3", "eu-central-1", "ca-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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.disk_snapshots[0].tags #=> Array
resp.disk_snapshots[0].tags[0].key #=> String
resp.disk_snapshots[0].tags[0].value #=> String
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.disk_snapshots[0].from_instance_name #=> String
resp.disk_snapshots[0].from_instance_arn #=> String
resp.disk_snapshots[0].is_from_auto_snapshot #=> true/false
resp.next_page_token #=> String

Options Hash (options):

  • :page_token (String)

    The token to advance to the next page of results from your request.

    To get a page token, perform an initial GetDiskSnapshots request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.

Returns:

See Also:

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

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

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-west-2", "eu-west-3", "eu-central-1", "ca-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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.disks[0].tags #=> Array
resp.disks[0].tags[0].key #=> String
resp.disks[0].tags[0].value #=> String
resp.disks[0].add_ons #=> Array
resp.disks[0].add_ons[0].name #=> String
resp.disks[0].add_ons[0].status #=> String
resp.disks[0].add_ons[0].snapshot_time_of_day #=> String
resp.disks[0].add_ons[0].next_snapshot_time_of_day #=> String
resp.disks[0].size_in_gb #=> Integer
resp.disks[0].is_system_disk #=> true/false
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 #=> true/false
resp.disks[0].attachment_state #=> String
resp.disks[0].gb_in_use #=> Integer
resp.next_page_token #=> String

Options Hash (options):

  • :page_token (String)

    The token to advance to the next page of results from your request.

    To get a page token, perform an initial GetDisks request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.

Returns:

See Also:

#get_distribution_bundles(options = {}) ⇒ Types::GetDistributionBundlesResult

Returns the list bundles that can be applied to you Amazon Lightsail content delivery network (CDN) distributions.

A distribution bundle specifies the monthly network transfer quota and monthly cost of your dsitribution.

Examples:

Request syntax with placeholder values


resp = client.get_distribution_bundles()

Response structure


resp.bundles #=> Array
resp.bundles[0].bundle_id #=> String
resp.bundles[0].name #=> String
resp.bundles[0].price #=> Float
resp.bundles[0].transfer_per_month_in_gb #=> Integer
resp.bundles[0].is_active #=> true/false

Returns:

See Also:

#get_distribution_latest_cache_reset(options = {}) ⇒ Types::GetDistributionLatestCacheResetResult

Returns the timestamp and status of the last cache reset of a specific Amazon Lightsail content delivery network (CDN) distribution.

Examples:

Request syntax with placeholder values


resp = client.get_distribution_latest_cache_reset({
  distribution_name: "ResourceName",
})

Response structure


resp.status #=> String
resp.create_time #=> Time

Options Hash (options):

  • :distribution_name (String)

    The name of the distribution for which to return the timestamp of the last cache reset.

    Use the GetDistributions action to get a list of distribution names that you can specify.

    When omitted, the response includes the latest cache reset timestamp of all your distributions.

Returns:

See Also:

#get_distribution_metric_data(options = {}) ⇒ Types::GetDistributionMetricDataResult

Returns the data points of a specific metric for an Amazon Lightsail content delivery network (CDN) distribution.

Metrics report the utilization of your resources, and the error counts generated by them. Monitor and collect metric data regularly to maintain the reliability, availability, and performance of your resources.

Examples:

Request syntax with placeholder values


resp = client.get_distribution_metric_data({
  distribution_name: "ResourceName", # required
  metric_name: "Requests", # required, accepts Requests, BytesDownloaded, BytesUploaded, TotalErrorRate, Http4xxErrorRate, Http5xxErrorRate
  start_time: Time.now, # required
  end_time: Time.now, # required
  period: 1, # 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 "Requests", "BytesDownloaded", "BytesUploaded", "TotalErrorRate", "Http4xxErrorRate", "Http5xxErrorRate"
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"

Options Hash (options):

  • :distribution_name (required, String)

    The name of the distribution for which to get metric data.

    Use the GetDistributions action to get a list of distribution names that you can specify.

  • :metric_name (required, String)

    The metric for which you want to return information.

    Valid distribution metric names are listed below, along with the most useful statistics to include in your request, and the published unit value.

    • Requests - The total number of viewer requests received by your Lightsail distribution, for all HTTP methods, and for both HTTP and HTTPS requests.

      Statistics: The most useful statistic is Sum.

      Unit: The published unit is None.

    • BytesDownloaded - The number of bytes downloaded by viewers for GET, HEAD, and OPTIONS requests.

      Statistics: The most useful statistic is Sum.

      Unit: The published unit is None.

    • BytesUploaded - The number of bytes uploaded to your origin by your Lightsail distribution, using POST and PUT requests.

      Statistics: The most useful statistic is Sum.

      Unit: The published unit is None.

    • TotalErrorRate - The percentage of all viewer requests for which the response\'s HTTP status code was 4xx or 5xx.

      Statistics: The most useful statistic is Average.

      Unit: The published unit is Percent.

    • 4xxErrorRate - The percentage of all viewer requests for which the response\'s HTTP status cod was 4xx. In these cases, the client or client viewer may have made an error. For example, a status code of 404 (Not Found) means that the client requested an object that could not be found.

      Statistics: The most useful statistic is Average.

      Unit: The published unit is Percent.

    • 5xxErrorRate - The percentage of all viewer requests for which the response\'s HTTP status code was 5xx. In these cases, the origin server did not satisfy the requests. For example, a status code of 503 (Service Unavailable) means that the origin server is currently unavailable.

      Statistics: The most useful statistic is Average.

      Unit: The published unit is Percent.

  • :start_time (required, Time)

    The start of the time interval for which to get metric data.

    Constraints:

    • Specified in Coordinated Universal Time (UTC).

    • Specified in the Unix time format.

      For example, if you wish to use a start time of October 1, 2018, at 8 PM UTC, specify 1538424000 as the start time.

    You can convert a human-friendly time to Unix time format using a converter like Epoch converter.

  • :end_time (required, Time)

    The end of the time interval for which to get metric data.

    Constraints:

    • Specified in Coordinated Universal Time (UTC).

    • Specified in the Unix time format.

      For example, if you wish to use an end time of October 1, 2018, at 9 PM UTC, specify 1538427600 as the end time.

    You can convert a human-friendly time to Unix time format using a converter like Epoch converter.

  • :period (required, Integer)

    The granularity, in seconds, for the metric data points that will be returned.

  • :unit (required, String)

    The unit for the metric data request.

    Valid units depend on the metric data being requested. For the valid units with each available metric, see the metricName parameter.

  • :statistics (required, Array<String>)

    The statistic for the metric.

    The following statistics are available:

    • Minimum - The lowest value observed during the specified period. Use this value to determine low volumes of activity for your application.

    • Maximum - The highest value observed during the specified period. Use this value to determine high volumes of activity for your application.

    • Sum - All values submitted for the matching metric added together. You can use this statistic to determine the total volume of a metric.

    • Average - The value of Sum / SampleCount during the specified period. By comparing this statistic with the Minimum and Maximum values, you can determine the full scope of a metric and how close the average use is to the Minimum and Maximum values. This comparison helps you to know when to increase or decrease your resources.

    • SampleCount - The count, or number, of data points used for the statistical calculation.

Returns:

See Also:

#get_distributions(options = {}) ⇒ Types::GetDistributionsResult

Returns information about one or more of your Amazon Lightsail content delivery network (CDN) distributions.

Examples:

Request syntax with placeholder values


resp = client.get_distributions({
  distribution_name: "ResourceName",
  page_token: "string",
})

Response structure


resp.distributions #=> Array
resp.distributions[0].name #=> String
resp.distributions[0].arn #=> String
resp.distributions[0].support_code #=> String
resp.distributions[0].created_at #=> Time
resp.distributions[0].location.availability_zone #=> String
resp.distributions[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.distributions[0].resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.distributions[0].alternative_domain_names #=> Array
resp.distributions[0].alternative_domain_names[0] #=> String
resp.distributions[0].status #=> String
resp.distributions[0].is_enabled #=> true/false
resp.distributions[0].domain_name #=> String
resp.distributions[0].bundle_id #=> String
resp.distributions[0].certificate_name #=> String
resp.distributions[0].origin.name #=> String
resp.distributions[0].origin.resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.distributions[0].origin.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.distributions[0].origin.protocol_policy #=> String, one of "http-only", "https-only"
resp.distributions[0].origin_public_dns #=> String
resp.distributions[0].default_cache_behavior.behavior #=> String, one of "dont-cache", "cache"
resp.distributions[0].cache_behavior_settings.default_ttl #=> Integer
resp.distributions[0].cache_behavior_settings.minimum_ttl #=> Integer
resp.distributions[0].cache_behavior_settings.maximum_ttl #=> Integer
resp.distributions[0].cache_behavior_settings.allowed_http_methods #=> String
resp.distributions[0].cache_behavior_settings.cached_http_methods #=> String
resp.distributions[0].cache_behavior_settings.forwarded_cookies.option #=> String, one of "none", "allow-list", "all"
resp.distributions[0].cache_behavior_settings.forwarded_cookies.cookies_allow_list #=> Array
resp.distributions[0].cache_behavior_settings.forwarded_cookies.cookies_allow_list[0] #=> String
resp.distributions[0].cache_behavior_settings.forwarded_headers.option #=> String, one of "none", "allow-list", "all"
resp.distributions[0].cache_behavior_settings.forwarded_headers.headers_allow_list #=> Array
resp.distributions[0].cache_behavior_settings.forwarded_headers.headers_allow_list[0] #=> String, one of "Accept", "Accept-Charset", "Accept-Datetime", "Accept-Encoding", "Accept-Language", "Authorization", "CloudFront-Forwarded-Proto", "CloudFront-Is-Desktop-Viewer", "CloudFront-Is-Mobile-Viewer", "CloudFront-Is-SmartTV-Viewer", "CloudFront-Is-Tablet-Viewer", "CloudFront-Viewer-Country", "Host", "Origin", "Referer"
resp.distributions[0].cache_behavior_settings.forwarded_query_strings.option #=> true/false
resp.distributions[0].cache_behavior_settings.forwarded_query_strings.query_strings_allow_list #=> Array
resp.distributions[0].cache_behavior_settings.forwarded_query_strings.query_strings_allow_list[0] #=> String
resp.distributions[0].cache_behaviors #=> Array
resp.distributions[0].cache_behaviors[0].path #=> String
resp.distributions[0].cache_behaviors[0].behavior #=> String, one of "dont-cache", "cache"
resp.distributions[0].able_to_update_bundle #=> true/false
resp.distributions[0].tags #=> Array
resp.distributions[0].tags[0].key #=> String
resp.distributions[0].tags[0].value #=> String
resp.next_page_token #=> String

Options Hash (options):

  • :distribution_name (String)

    The name of the distribution for which to return information.

    Use the GetDistributions action to get a list of distribution names that you can specify.

    When omitted, the response includes all of your distributions in the AWS Region where the request is made.

  • :page_token (String)

    The token to advance to the next page of results from your request.

    To get a page token, perform an initial GetDistributions request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.

Returns:

See Also:

#get_domain(options = {}) ⇒ 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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.domain.resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.domain.tags #=> Array
resp.domain.tags[0].key #=> String
resp.domain.tags[0].value #=> String
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 #=> true/false
resp.domain.domain_entries[0].type #=> String
resp.domain.domain_entries[0].options #=> Hash
resp.domain.domain_entries[0].options["DomainEntryOptionsKeys"] #=> String

Options Hash (options):

  • :domain_name (required, String)

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

Returns:

See Also:

#get_domains(options = {}) ⇒ 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-west-2", "eu-west-3", "eu-central-1", "ca-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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.domains[0].tags #=> Array
resp.domains[0].tags[0].key #=> String
resp.domains[0].tags[0].value #=> String
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 #=> true/false
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

Options Hash (options):

  • :page_token (String)

    The token to advance to the next page of results from your request.

    To get a page token, perform an initial GetDomains request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.

Returns:

See Also:

#get_export_snapshot_records(options = {}) ⇒ Types::GetExportSnapshotRecordsResult

Returns the export snapshot record created as a result of the export snapshot operation.

An export snapshot record can be used to create a new Amazon EC2 instance and its related resources with the create cloud formation stack operation.

Examples:

Request syntax with placeholder values


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

Response structure


resp.export_snapshot_records #=> Array
resp.export_snapshot_records[0].name #=> String
resp.export_snapshot_records[0].arn #=> String
resp.export_snapshot_records[0].created_at #=> Time
resp.export_snapshot_records[0].location.availability_zone #=> String
resp.export_snapshot_records[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.export_snapshot_records[0].resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.export_snapshot_records[0].state #=> String, one of "Started", "Succeeded", "Failed"
resp.export_snapshot_records[0].source_info.resource_type #=> String, one of "InstanceSnapshot", "DiskSnapshot"
resp.export_snapshot_records[0].source_info.created_at #=> Time
resp.export_snapshot_records[0].source_info.name #=> String
resp.export_snapshot_records[0].source_info.arn #=> String
resp.export_snapshot_records[0].source_info.from_resource_name #=> String
resp.export_snapshot_records[0].source_info.from_resource_arn #=> String
resp.export_snapshot_records[0].source_info.instance_snapshot_info.from_bundle_id #=> String
resp.export_snapshot_records[0].source_info.instance_snapshot_info.from_blueprint_id #=> String
resp.export_snapshot_records[0].source_info.instance_snapshot_info.from_disk_info #=> Array
resp.export_snapshot_records[0].source_info.instance_snapshot_info.from_disk_info[0].name #=> String
resp.export_snapshot_records[0].source_info.instance_snapshot_info.from_disk_info[0].path #=> String
resp.export_snapshot_records[0].source_info.instance_snapshot_info.from_disk_info[0].size_in_gb #=> Integer
resp.export_snapshot_records[0].source_info.instance_snapshot_info.from_disk_info[0].is_system_disk #=> true/false
resp.export_snapshot_records[0].source_info.disk_snapshot_info.size_in_gb #=> Integer
resp.export_snapshot_records[0].destination_info.id #=> String
resp.export_snapshot_records[0].destination_info.service #=> String
resp.next_page_token #=> String

Options Hash (options):

  • :page_token (String)

    The token to advance to the next page of results from your request.

    To get a page token, perform an initial GetExportSnapshotRecords request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.

Returns:

See Also:

#get_instance(options = {}) ⇒ 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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.instance.resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.instance.tags #=> Array
resp.instance.tags[0].key #=> String
resp.instance.tags[0].value #=> String
resp.instance.blueprint_id #=> String
resp.instance.blueprint_name #=> String
resp.instance.bundle_id #=> String
resp.instance.add_ons #=> Array
resp.instance.add_ons[0].name #=> String
resp.instance.add_ons[0].status #=> String
resp.instance.add_ons[0].snapshot_time_of_day #=> String
resp.instance.add_ons[0].next_snapshot_time_of_day #=> String
resp.instance.is_static_ip #=> true/false
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-west-2", "eu-west-3", "eu-central-1", "ca-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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.instance.hardware.disks[0].tags #=> Array
resp.instance.hardware.disks[0].tags[0].key #=> String
resp.instance.hardware.disks[0].tags[0].value #=> String
resp.instance.hardware.disks[0].add_ons #=> Array
resp.instance.hardware.disks[0].add_ons[0].name #=> String
resp.instance.hardware.disks[0].add_ons[0].status #=> String
resp.instance.hardware.disks[0].add_ons[0].snapshot_time_of_day #=> String
resp.instance.hardware.disks[0].add_ons[0].next_snapshot_time_of_day #=> String
resp.instance.hardware.disks[0].size_in_gb #=> Integer
resp.instance.hardware.disks[0].is_system_disk #=> true/false
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 #=> true/false
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", "icmp"
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.networking.ports[0].cidrs #=> Array
resp.instance.networking.ports[0].cidrs[0] #=> String
resp.instance.networking.ports[0].cidr_list_aliases #=> Array
resp.instance.networking.ports[0].cidr_list_aliases[0] #=> String
resp.instance.state.code #=> Integer
resp.instance.state.name #=> String
resp.instance.username #=> String
resp.instance.ssh_key_name #=> String

Options Hash (options):

  • :instance_name (required, String)

    The name of the instance.

Returns:

See Also:

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

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

The get instance access details operation supports tag-based access control via resource tags applied to the resource identified by instance name. For more information, see the Lightsail Dev Guide.

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
resp.access_details.host_keys #=> Array
resp.access_details.host_keys[0].algorithm #=> String
resp.access_details.host_keys[0].public_key #=> String
resp.access_details.host_keys[0].witnessed_at #=> Time
resp.access_details.host_keys[0].fingerprint_sha1 #=> String
resp.access_details.host_keys[0].fingerprint_sha256 #=> String
resp.access_details.host_keys[0].not_valid_before #=> Time
resp.access_details.host_keys[0].not_valid_after #=> Time

Options Hash (options):

  • :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:

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

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

Metrics report the utilization of your resources, and the error counts generated by them. Monitor and collect metric data regularly to maintain the reliability, availability, and performance of your resources.

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, BurstCapacityTime, BurstCapacityPercentage
  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", "BurstCapacityTime", "BurstCapacityPercentage"
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"

Options Hash (options):

  • :instance_name (required, String)

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

  • :metric_name (required, String)

    The metric for which you want to return information.

    Valid instance metric names are listed below, along with the most useful statistics to include in your request, and the published unit value.

    • BurstCapacityPercentage - The percentage of CPU performance available for your instance to burst above its baseline. Your instance continuously accrues and consumes burst capacity. Burst capacity stops accruing when your instance\'s BurstCapacityPercentage reaches 100%. For more information, see Viewing instance burst capacity in Amazon Lightsail.

      Statistics: The most useful statistics are Maximum and Average.

      Unit: The published unit is Percent.

    • BurstCapacityTime - The available amount of time for your instance to burst at 100% CPU utilization. Your instance continuously accrues and consumes burst capacity. Burst capacity time stops accruing when your instance\'s BurstCapacityPercentage metric reaches 100%.

      Burst capacity time is consumed at the full rate only when your instance operates at 100% CPU utilization. For example, if your instance operates at 50% CPU utilization in the burstable zone for a 5-minute period, then it consumes CPU burst capacity minutes at a 50% rate in that period. Your instance consumed 2 minutes and 30 seconds of CPU burst capacity minutes in the 5-minute period. For more information, see Viewing instance burst capacity in Amazon Lightsail.

      Statistics: The most useful statistics are Maximum and Average.

      Unit: The published unit is Seconds.

    • CPUUtilization - The percentage of allocated compute units that are currently in use on the instance. This metric identifies the processing power to run the applications on the instance. Tools in your operating system can show a lower percentage than Lightsail when the instance is not allocated a full processor core.

      Statistics: The most useful statistics are Maximum and Average.

      Unit: The published unit is Percent.

    • NetworkIn - The number of bytes received on all network interfaces by the instance. This metric identifies the volume of incoming network traffic to the instance. The number reported is the number of bytes received during the period. Because this metric is reported in 5-minute intervals, divide the reported number by 300 to find Bytes/second.

      Statistics: The most useful statistic is Sum.

      Unit: The published unit is Bytes.

    • NetworkOut - The number of bytes sent out on all network interfaces by the instance. This metric identifies the volume of outgoing network traffic from the instance. The number reported is the number of bytes sent during the period. Because this metric is reported in 5-minute intervals, divide the reported number by 300 to find Bytes/second.

      Statistics: The most useful statistic is Sum.

      Unit: The published unit is Bytes.

    • StatusCheckFailed - Reports whether the instance passed or failed both the instance status check and the system status check. This metric can be either 0 (passed) or 1 (failed). This metric data is available in 1-minute (60 seconds) granularity.

      Statistics: The most useful statistic is Sum.

      Unit: The published unit is Count.

    • StatusCheckFailed_Instance - Reports whether the instance passed or failed the instance status check. This metric can be either 0 (passed) or 1 (failed). This metric data is available in 1-minute (60 seconds) granularity.

      Statistics: The most useful statistic is Sum.

      Unit: The published unit is Count.

    • StatusCheckFailed_System - Reports whether the instance passed or failed the system status check. This metric can be either 0 (passed) or 1 (failed). This metric data is available in 1-minute (60 seconds) granularity.

      Statistics: The most useful statistic is Sum.

      Unit: The published unit is Count.

  • :period (required, Integer)

    The granularity, in seconds, of the returned data points.

    The StatusCheckFailed, StatusCheckFailed_Instance, and StatusCheckFailed_System instance metric data is available in 1-minute (60 seconds) granularity. All other instance metric data is available in 5-minute (300 seconds) granularity.

  • :start_time (required, Time)

    The start time of the time period.

  • :end_time (required, Time)

    The end time of the time period.

  • :unit (required, String)

    The unit for the metric data request. Valid units depend on the metric data being requested. For the valid units to specify with each available metric, see the metricName parameter.

  • :statistics (required, Array<String>)

    The statistic for the metric.

    The following statistics are available:

    • Minimum - The lowest value observed during the specified period. Use this value to determine low volumes of activity for your application.

    • Maximum - The highest value observed during the specified period. Use this value to determine high volumes of activity for your application.

    • Sum - All values submitted for the matching metric added together. You can use this statistic to determine the total volume of a metric.

    • Average - The value of Sum / SampleCount during the specified period. By comparing this statistic with the Minimum and Maximum values, you can determine the full scope of a metric and how close the average use is to the Minimum and Maximum values. This comparison helps you to know when to increase or decrease your resources.

    • SampleCount - The count, or number, of data points used for the statistical calculation.

Returns:

See Also:

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

Returns the firewall port states for a specific Amazon Lightsail instance, the IP addresses allowed to connect to the instance through the ports, and the protocol.

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", "icmp"
resp.port_states[0].state #=> String, one of "open", "closed"
resp.port_states[0].cidrs #=> Array
resp.port_states[0].cidrs[0] #=> String
resp.port_states[0].cidr_list_aliases #=> Array
resp.port_states[0].cidr_list_aliases[0] #=> String

Options Hash (options):

  • :instance_name (required, String)

    The name of the instance for which to return firewall port states.

Returns:

See Also:

#get_instance_snapshot(options = {}) ⇒ 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-west-2", "eu-west-3", "eu-central-1", "ca-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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.instance_snapshot.tags #=> Array
resp.instance_snapshot.tags[0].key #=> String
resp.instance_snapshot.tags[0].value #=> String
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-west-2", "eu-west-3", "eu-central-1", "ca-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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.instance_snapshot.from_attached_disks[0].tags #=> Array
resp.instance_snapshot.from_attached_disks[0].tags[0].key #=> String
resp.instance_snapshot.from_attached_disks[0].tags[0].value #=> String
resp.instance_snapshot.from_attached_disks[0].add_ons #=> Array
resp.instance_snapshot.from_attached_disks[0].add_ons[0].name #=> String
resp.instance_snapshot.from_attached_disks[0].add_ons[0].status #=> String
resp.instance_snapshot.from_attached_disks[0].add_ons[0].snapshot_time_of_day #=> String
resp.instance_snapshot.from_attached_disks[0].add_ons[0].next_snapshot_time_of_day #=> String
resp.instance_snapshot.from_attached_disks[0].size_in_gb #=> Integer
resp.instance_snapshot.from_attached_disks[0].is_system_disk #=> true/false
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 #=> true/false
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.is_from_auto_snapshot #=> true/false
resp.instance_snapshot.size_in_gb #=> Integer

Options Hash (options):

  • :instance_snapshot_name (required, String)

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

Returns:

See Also:

#get_instance_snapshots(options = {}) ⇒ 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-west-2", "eu-west-3", "eu-central-1", "ca-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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.instance_snapshots[0].tags #=> Array
resp.instance_snapshots[0].tags[0].key #=> String
resp.instance_snapshots[0].tags[0].value #=> String
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-west-2", "eu-west-3", "eu-central-1", "ca-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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.instance_snapshots[0].from_attached_disks[0].tags #=> Array
resp.instance_snapshots[0].from_attached_disks[0].tags[0].key #=> String
resp.instance_snapshots[0].from_attached_disks[0].tags[0].value #=> String
resp.instance_snapshots[0].from_attached_disks[0].add_ons #=> Array
resp.instance_snapshots[0].from_attached_disks[0].add_ons[0].name #=> String
resp.instance_snapshots[0].from_attached_disks[0].add_ons[0].status #=> String
resp.instance_snapshots[0].from_attached_disks[0].add_ons[0].snapshot_time_of_day #=> String
resp.instance_snapshots[0].from_attached_disks[0].add_ons[0].next_snapshot_time_of_day #=> String
resp.instance_snapshots[0].from_attached_disks[0].size_in_gb #=> Integer
resp.instance_snapshots[0].from_attached_disks[0].is_system_disk #=> true/false
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 #=> true/false
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].is_from_auto_snapshot #=> true/false
resp.instance_snapshots[0].size_in_gb #=> Integer
resp.next_page_token #=> String

Options Hash (options):

  • :page_token (String)

    The token to advance to the next page of results from your request.

    To get a page token, perform an initial GetInstanceSnapshots request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.

Returns:

See Also:

#get_instance_state(options = {}) ⇒ 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

Options Hash (options):

  • :instance_name (required, String)

    The name of the instance to get state information about.

Returns:

See Also:

#get_instances(options = {}) ⇒ 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-west-2", "eu-west-3", "eu-central-1", "ca-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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.instances[0].tags #=> Array
resp.instances[0].tags[0].key #=> String
resp.instances[0].tags[0].value #=> String
resp.instances[0].blueprint_id #=> String
resp.instances[0].blueprint_name #=> String
resp.instances[0].bundle_id #=> String
resp.instances[0].add_ons #=> Array
resp.instances[0].add_ons[0].name #=> String
resp.instances[0].add_ons[0].status #=> String
resp.instances[0].add_ons[0].snapshot_time_of_day #=> String
resp.instances[0].add_ons[0].next_snapshot_time_of_day #=> String
resp.instances[0].is_static_ip #=> true/false
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-west-2", "eu-west-3", "eu-central-1", "ca-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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.instances[0].hardware.disks[0].tags #=> Array
resp.instances[0].hardware.disks[0].tags[0].key #=> String
resp.instances[0].hardware.disks[0].tags[0].value #=> String
resp.instances[0].hardware.disks[0].add_ons #=> Array
resp.instances[0].hardware.disks[0].add_ons[0].name #=> String
resp.instances[0].hardware.disks[0].add_ons[0].status #=> String
resp.instances[0].hardware.disks[0].add_ons[0].snapshot_time_of_day #=> String
resp.instances[0].hardware.disks[0].add_ons[0].next_snapshot_time_of_day #=> String
resp.instances[0].hardware.disks[0].size_in_gb #=> Integer
resp.instances[0].hardware.disks[0].is_system_disk #=> true/false
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 #=> true/false
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", "icmp"
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].networking.ports[0].cidrs #=> Array
resp.instances[0].networking.ports[0].cidrs[0] #=> String
resp.instances[0].networking.ports[0].cidr_list_aliases #=> Array
resp.instances[0].networking.ports[0].cidr_list_aliases[0] #=> String
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

Options Hash (options):

  • :page_token (String)

    The token to advance to the next page of results from your request.

    To get a page token, perform an initial GetInstances request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.

Returns:

See Also:

#get_key_pair(options = {}) ⇒ 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-west-2", "eu-west-3", "eu-central-1", "ca-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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.key_pair.tags #=> Array
resp.key_pair.tags[0].key #=> String
resp.key_pair.tags[0].value #=> String
resp.key_pair.fingerprint #=> String

Options Hash (options):

  • :key_pair_name (required, String)

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

Returns:

See Also:

#get_key_pairs(options = {}) ⇒ 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-west-2", "eu-west-3", "eu-central-1", "ca-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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.key_pairs[0].tags #=> Array
resp.key_pairs[0].tags[0].key #=> String
resp.key_pairs[0].tags[0].value #=> String
resp.key_pairs[0].fingerprint #=> String
resp.next_page_token #=> String

Options Hash (options):

  • :page_token (String)

    The token to advance to the next page of results from your request.

    To get a page token, perform an initial GetKeyPairs request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.

Returns:

See Also:

#get_load_balancer(options = {}) ⇒ 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-west-2", "eu-west-3", "eu-central-1", "ca-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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.load_balancer.tags #=> Array
resp.load_balancer.tags[0].key #=> String
resp.load_balancer.tags[0].value #=> String
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 #=> true/false
resp.load_balancer.configuration_options #=> Hash
resp.load_balancer.configuration_options["LoadBalancerAttributeName"] #=> String

Options Hash (options):

  • :load_balancer_name (required, String)

    The name of the load balancer.

Returns:

See Also:

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

Returns information about health metrics for your Lightsail load balancer.

Metrics report the utilization of your resources, and the error counts generated by them. Monitor and collect metric data regularly to maintain the reliability, availability, and performance of your resources.

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"

Options Hash (options):

  • :load_balancer_name (required, String)

    The name of the load balancer.

  • :metric_name (required, String)

    The metric for which you want to return information.

    Valid load balancer metric names are listed below, along with the most useful statistics to include in your request, and the published unit value.

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

      Statistics: The most useful statistic is Sum.

      Unit: The published unit is Count.

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

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

      Unit: The published unit is Count.

    • HTTPCode_Instance_2XX_Count - The number of HTTP 2XX 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.

      Unit: The published unit is Count.

    • HTTPCode_Instance_3XX_Count - The number of HTTP 3XX 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.

      Unit: The published unit is Count.

    • HTTPCode_Instance_4XX_Count - The number of HTTP 4XX 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.

      Unit: The published unit is Count.

    • HTTPCode_Instance_5XX_Count - The number of HTTP 5XX 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.

      Unit: The published unit is Count.

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

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

      Unit: The published unit is Count.

    • HTTPCode_LB_5XX_Count - The number of HTTP 5XX server error codes that originated from the load balancer. This does not include any response codes generated by the target instance. This metric is reported if there are no healthy instances attached to the load balancer, or if the request rate exceeds the capacity of the instances (spillover) or the load balancer.

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

      Unit: The published unit is Count.

    • 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.

      Unit: The published unit is Seconds.

    • 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.

      Unit: The published unit is Count.

    • 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.

      Unit: The published unit is Count.

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

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

      Unit: The published unit is Count.

  • :period (required, Integer)

    The granularity, in seconds, of the returned data points.

  • :start_time (required, Time)

    The start time of the period.

  • :end_time (required, Time)

    The end time of the period.

  • :unit (required, String)

    The unit for the metric data request. Valid units depend on the metric data being requested. For the valid units with each available metric, see the metricName parameter.

  • :statistics (required, Array<String>)

    The statistic for the metric.

    The following statistics are available:

    • Minimum - The lowest value observed during the specified period. Use this value to determine low volumes of activity for your application.

    • Maximum - The highest value observed during the specified period. Use this value to determine high volumes of activity for your application.

    • Sum - All values submitted for the matching metric added together. You can use this statistic to determine the total volume of a metric.

    • Average - The value of Sum / SampleCount during the specified period. By comparing this statistic with the Minimum and Maximum values, you can determine the full scope of a metric and how close the average use is to the Minimum and Maximum values. This comparison helps you to know when to increase or decrease your resources.

    • SampleCount - The count, or number, of data points used for the statistical calculation.

Returns:

See Also:

#get_load_balancer_tls_certificates(options = {}) ⇒ 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).

You can have a maximum of 2 certificates associated with a Lightsail load balancer. One is active and the other is inactive.

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-west-2", "eu-west-3", "eu-central-1", "ca-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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.tls_certificates[0].tags #=> Array
resp.tls_certificates[0].tags[0].key #=> String
resp.tls_certificates[0].tags[0].value #=> String
resp.tls_certificates[0].load_balancer_name #=> String
resp.tls_certificates[0].is_attached #=> true/false
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

Options Hash (options):

  • :load_balancer_name (required, String)

    The name of the load balancer you associated with your SSL/TLS certificate.

Returns:

See Also:

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

Returns information about all load balancers in an account.

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-west-2", "eu-west-3", "eu-central-1", "ca-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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.load_balancers[0].tags #=> Array
resp.load_balancers[0].tags[0].key #=> String
resp.load_balancers[0].tags[0].value #=> String
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 #=> true/false
resp.load_balancers[0].configuration_options #=> Hash
resp.load_balancers[0].configuration_options["LoadBalancerAttributeName"] #=> String
resp.next_page_token #=> String

Options Hash (options):

  • :page_token (String)

    The token to advance to the next page of results from your request.

    To get a page token, perform an initial GetLoadBalancers request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.

Returns:

See Also:

#get_operation(options = {}) ⇒ 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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operation.is_terminal #=> true/false
resp.operation.operation_details #=> String
resp.operation.operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operation.status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operation.status_changed_at #=> Time
resp.operation.error_code #=> String
resp.operation.error_details #=> String

Options Hash (options):

  • :operation_id (required, String)

    A GUID used to identify the operation.

Returns:

See Also:

#get_operations(options = {}) ⇒ 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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String
resp.next_page_token #=> String

Options Hash (options):

  • :page_token (String)

    The token to advance to the next page of results from your request.

    To get a page token, perform an initial GetOperations request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.

Returns:

See Also:

#get_operations_for_resource(options = {}) ⇒ 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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
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

Options Hash (options):

  • :resource_name (required, String)

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

  • :page_token (String)

    The token to advance to the next page of results from your request.

    To get a page token, perform an initial GetOperationsForResource request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.

Returns:

See Also:

#get_regions(options = {}) ⇒ 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,
  include_relational_database_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-west-2", "eu-west-3", "eu-central-1", "ca-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
resp.regions[0].relational_database_availability_zones #=> Array
resp.regions[0].relational_database_availability_zones[0].zone_name #=> String
resp.regions[0].relational_database_availability_zones[0].state #=> String

Options Hash (options):

  • :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.

  • :include_relational_database_availability_zones (Boolean)

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

Returns:

See Also:

#get_relational_database(options = {}) ⇒ Types::GetRelationalDatabaseResult

Returns information about a specific database in Amazon Lightsail.

Examples:

Request syntax with placeholder values


resp = client.get_relational_database({
  relational_database_name: "ResourceName", # required
})

Response structure


resp.relational_database.name #=> String
resp.relational_database.arn #=> String
resp.relational_database.support_code #=> String
resp.relational_database.created_at #=> Time
resp.relational_database.location.availability_zone #=> String
resp.relational_database.location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.relational_database.resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.relational_database.tags #=> Array
resp.relational_database.tags[0].key #=> String
resp.relational_database.tags[0].value #=> String
resp.relational_database.relational_database_blueprint_id #=> String
resp.relational_database.relational_database_bundle_id #=> String
resp.relational_database.master_database_name #=> String
resp.relational_database.hardware.cpu_count #=> Integer
resp.relational_database.hardware.disk_size_in_gb #=> Integer
resp.relational_database.hardware.ram_size_in_gb #=> Float
resp.relational_database.state #=> String
resp.relational_database.secondary_availability_zone #=> String
resp.relational_database.backup_retention_enabled #=> true/false
resp.relational_database.pending_modified_values.master_user_password #=> String
resp.relational_database.pending_modified_values.engine_version #=> String
resp.relational_database.pending_modified_values.backup_retention_enabled #=> true/false
resp.relational_database.engine #=> String
resp.relational_database.engine_version #=> String
resp.relational_database.latest_restorable_time #=> Time
resp.relational_database.master_username #=> String
resp.relational_database.parameter_apply_status #=> String
resp.relational_database.preferred_backup_window #=> String
resp.relational_database.preferred_maintenance_window #=> String
resp.relational_database.publicly_accessible #=> true/false
resp.relational_database.master_endpoint.port #=> Integer
resp.relational_database.master_endpoint.address #=> String
resp.relational_database.pending_maintenance_actions #=> Array
resp.relational_database.pending_maintenance_actions[0].action #=> String
resp.relational_database.pending_maintenance_actions[0].description #=> String
resp.relational_database.pending_maintenance_actions[0].current_apply_date #=> Time
resp.relational_database.ca_certificate_identifier #=> String

Options Hash (options):

  • :relational_database_name (required, String)

    The name of the database that you are looking up.

Returns:

See Also:

#get_relational_database_blueprints(options = {}) ⇒ Types::GetRelationalDatabaseBlueprintsResult

Returns a list of available database blueprints in Amazon Lightsail. A blueprint describes the major engine version of a database.

You can use a blueprint ID to create a new database that runs a specific database engine.

Examples:

Request syntax with placeholder values


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

Response structure


resp.blueprints #=> Array
resp.blueprints[0].blueprint_id #=> String
resp.blueprints[0].engine #=> String, one of "mysql"
resp.blueprints[0].engine_version #=> String
resp.blueprints[0].engine_description #=> String
resp.blueprints[0].engine_version_description #=> String
resp.blueprints[0].is_engine_default #=> true/false
resp.next_page_token #=> String

Options Hash (options):

  • :page_token (String)

    The token to advance to the next page of results from your request.

    To get a page token, perform an initial GetRelationalDatabaseBlueprints request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.

Returns:

See Also:

#get_relational_database_bundles(options = {}) ⇒ Types::GetRelationalDatabaseBundlesResult

Returns the list of bundles that are available in Amazon Lightsail. A bundle describes the performance specifications for a database.

You can use a bundle ID to create a new database with explicit performance specifications.

Examples:

Request syntax with placeholder values


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

Response structure


resp.bundles #=> Array
resp.bundles[0].bundle_id #=> String
resp.bundles[0].name #=> String
resp.bundles[0].price #=> Float
resp.bundles[0].ram_size_in_gb #=> Float
resp.bundles[0].disk_size_in_gb #=> Integer
resp.bundles[0].transfer_per_month_in_gb #=> Integer
resp.bundles[0].cpu_count #=> Integer
resp.bundles[0].is_encrypted #=> true/false
resp.bundles[0].is_active #=> true/false
resp.next_page_token #=> String

Options Hash (options):

  • :page_token (String)

    The token to advance to the next page of results from your request.

    To get a page token, perform an initial GetRelationalDatabaseBundles request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.

Returns:

See Also:

#get_relational_database_events(options = {}) ⇒ Types::GetRelationalDatabaseEventsResult

Returns a list of events for a specific database in Amazon Lightsail.

Examples:

Request syntax with placeholder values


resp = client.get_relational_database_events({
  relational_database_name: "ResourceName", # required
  duration_in_minutes: 1,
  page_token: "string",
})

Response structure


resp.relational_database_events #=> Array
resp.relational_database_events[0].resource #=> String
resp.relational_database_events[0].created_at #=> Time
resp.relational_database_events[0].message #=> String
resp.relational_database_events[0].event_categories #=> Array
resp.relational_database_events[0].event_categories[0] #=> String
resp.next_page_token #=> String

Options Hash (options):

  • :relational_database_name (required, String)

    The name of the database from which to get events.

  • :duration_in_minutes (Integer)

    The number of minutes in the past from which to retrieve events. For example, to get all events from the past 2 hours, enter 120.

    Default: 60

    The minimum is 1 and the maximum is 14 days (20160 minutes).

  • :page_token (String)

    The token to advance to the next page of results from your request.

    To get a page token, perform an initial GetRelationalDatabaseEvents request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.

Returns:

See Also:

#get_relational_database_log_events(options = {}) ⇒ Types::GetRelationalDatabaseLogEventsResult

Returns a list of log events for a database in Amazon Lightsail.

Examples:

Request syntax with placeholder values


resp = client.get_relational_database_log_events({
  relational_database_name: "ResourceName", # required
  log_stream_name: "string", # required
  start_time: Time.now,
  end_time: Time.now,
  start_from_head: false,
  page_token: "string",
})

Response structure


resp.resource_log_events #=> Array
resp.resource_log_events[0].created_at #=> Time
resp.resource_log_events[0].message #=> String
resp.next_backward_token #=> String
resp.next_forward_token #=> String

Options Hash (options):

  • :relational_database_name (required, String)

    The name of your database for which to get log events.

  • :log_stream_name (required, String)

    The name of the log stream.

    Use the get relational database log streams operation to get a list of available log streams.

  • :start_time (Time)

    The start of the time interval from which to get log events.

    Constraints:

    • Specified in Coordinated Universal Time (UTC).

    • Specified in the Unix time format.

      For example, if you wish to use a start time of October 1, 2018, at 8 PM UTC, then you input 1538424000 as the start time.

  • :end_time (Time)

    The end of the time interval from which to get log events.

    Constraints:

    • Specified in Coordinated Universal Time (UTC).

    • Specified in the Unix time format.

      For example, if you wish to use an end time of October 1, 2018, at 8 PM UTC, then you input 1538424000 as the end time.

  • :start_from_head (Boolean)

    Parameter to specify if the log should start from head or tail. If true is specified, the log event starts from the head of the log. If false is specified, the log event starts from the tail of the log.

    For PostgreSQL, the default value of false is the only option available.

  • :page_token (String)

    The token to advance to the next or previous page of results from your request.

    To get a page token, perform an initial GetRelationalDatabaseLogEvents request. If your results are paginated, the response will return a next forward token and/or next backward token that you can specify as the page token in a subsequent request.

Returns:

See Also:

#get_relational_database_log_streams(options = {}) ⇒ Types::GetRelationalDatabaseLogStreamsResult

Returns a list of available log streams for a specific database in Amazon Lightsail.

Examples:

Request syntax with placeholder values


resp = client.get_relational_database_log_streams({
  relational_database_name: "ResourceName", # required
})

Response structure


resp.log_streams #=> Array
resp.log_streams[0] #=> String

Options Hash (options):

  • :relational_database_name (required, String)

    The name of your database for which to get log streams.

Returns:

See Also:

#get_relational_database_master_user_password(options = {}) ⇒ Types::GetRelationalDatabaseMasterUserPasswordResult

Returns the current, previous, or pending versions of the master user password for a Lightsail database.

The GetRelationalDatabaseMasterUserPassword operation supports tag-based access control via resource tags applied to the resource identified by relationalDatabaseName.

Examples:

Request syntax with placeholder values


resp = client.get_relational_database_master_user_password({
  relational_database_name: "ResourceName", # required
  password_version: "CURRENT", # accepts CURRENT, PREVIOUS, PENDING
})

Response structure


resp.master_user_password #=> String
resp.created_at #=> Time

Options Hash (options):

  • :relational_database_name (required, String)

    The name of your database for which to get the master user password.

  • :password_version (String)

    The password version to return.

    Specifying CURRENT or PREVIOUS returns the current or previous passwords respectively. Specifying PENDING returns the newest version of the password that will rotate to CURRENT. After the PENDING password rotates to CURRENT, the PENDING password is no longer available.

    Default: CURRENT

Returns:

See Also:

#get_relational_database_metric_data(options = {}) ⇒ Types::GetRelationalDatabaseMetricDataResult

Returns the data points of the specified metric for a database in Amazon Lightsail.

Metrics report the utilization of your resources, and the error counts generated by them. Monitor and collect metric data regularly to maintain the reliability, availability, and performance of your resources.

Examples:

Request syntax with placeholder values


resp = client.get_relational_database_metric_data({
  relational_database_name: "ResourceName", # required
  metric_name: "CPUUtilization", # required, accepts CPUUtilization, DatabaseConnections, DiskQueueDepth, FreeStorageSpace, NetworkReceiveThroughput, NetworkTransmitThroughput
  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", "DatabaseConnections", "DiskQueueDepth", "FreeStorageSpace", "NetworkReceiveThroughput", "NetworkTransmitThroughput"
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"

Options Hash (options):

  • :relational_database_name (required, String)

    The name of your database from which to get metric data.

  • :metric_name (required, String)

    The metric for which you want to return information.

    Valid relational database metric names are listed below, along with the most useful statistics to include in your request, and the published unit value. All relational database metric data is available in 1-minute (60 seconds) granularity.

    • CPUUtilization - The percentage of CPU utilization currently in use on the database.

      Statistics: The most useful statistics are Maximum and Average.

      Unit: The published unit is Percent.

    • DatabaseConnections - The number of database connections in use.

      Statistics: The most useful statistics are Maximum and Sum.

      Unit: The published unit is Count.

    • DiskQueueDepth - The number of outstanding IOs (read/write requests) that are waiting to access the disk.

      Statistics: The most useful statistic is Sum.

      Unit: The published unit is Count.

    • FreeStorageSpace - The amount of available storage space.

      Statistics: The most useful statistic is Sum.

      Unit: The published unit is Bytes.

    • NetworkReceiveThroughput - The incoming (Receive) network traffic on the database, including both customer database traffic and AWS traffic used for monitoring and replication.

      Statistics: The most useful statistic is Average.

      Unit: The published unit is Bytes/Second.

    • NetworkTransmitThroughput - The outgoing (Transmit) network traffic on the database, including both customer database traffic and AWS traffic used for monitoring and replication.

      Statistics: The most useful statistic is Average.

      Unit: The published unit is Bytes/Second.

  • :period (required, Integer)

    The granularity, in seconds, of the returned data points.

    All relational database metric data is available in 1-minute (60 seconds) granularity.

  • :start_time (required, Time)

    The start of the time interval from which to get metric data.

    Constraints:

    • Specified in Coordinated Universal Time (UTC).

    • Specified in the Unix time format.

      For example, if you wish to use a start time of October 1, 2018, at 8 PM UTC, then you input 1538424000 as the start time.

  • :end_time (required, Time)

    The end of the time interval from which to get metric data.

    Constraints:

    • Specified in Coordinated Universal Time (UTC).

    • Specified in the Unix time format.

      For example, if you wish to use an end time of October 1, 2018, at 8 PM UTC, then you input 1538424000 as the end time.

  • :unit (required, String)

    The unit for the metric data request. Valid units depend on the metric data being requested. For the valid units with each available metric, see the metricName parameter.

  • :statistics (required, Array<String>)

    The statistic for the metric.

    The following statistics are available:

    • Minimum - The lowest value observed during the specified period. Use this value to determine low volumes of activity for your application.

    • Maximum - The highest value observed during the specified period. Use this value to determine high volumes of activity for your application.

    • Sum - All values submitted for the matching metric added together. You can use this statistic to determine the total volume of a metric.

    • Average - The value of Sum / SampleCount during the specified period. By comparing this statistic with the Minimum and Maximum values, you can determine the full scope of a metric and how close the average use is to the Minimum and Maximum values. This comparison helps you to know when to increase or decrease your resources.

    • SampleCount - The count, or number, of data points used for the statistical calculation.

Returns:

See Also:

#get_relational_database_parameters(options = {}) ⇒ Types::GetRelationalDatabaseParametersResult

Returns all of the runtime parameters offered by the underlying database software, or engine, for a specific database in Amazon Lightsail.

In addition to the parameter names and values, this operation returns other information about each parameter. This information includes whether changes require a reboot, whether the parameter is modifiable, the allowed values, and the data types.

Examples:

Request syntax with placeholder values


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

Response structure


resp.parameters #=> Array
resp.parameters[0].allowed_values #=> String
resp.parameters[0].apply_method #=> String
resp.parameters[0].apply_type #=> String
resp.parameters[0].data_type #=> String
resp.parameters[0].description #=> String
resp.parameters[0].is_modifiable #=> true/false
resp.parameters[0].parameter_name #=> String
resp.parameters[0].parameter_value #=> String
resp.next_page_token #=> String

Options Hash (options):

  • :relational_database_name (required, String)

    The name of your database for which to get parameters.

  • :page_token (String)

    The token to advance to the next page of results from your request.

    To get a page token, perform an initial GetRelationalDatabaseParameters request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.

Returns:

See Also:

#get_relational_database_snapshot(options = {}) ⇒ Types::GetRelationalDatabaseSnapshotResult

Returns information about a specific database snapshot in Amazon Lightsail.

Examples:

Request syntax with placeholder values


resp = client.get_relational_database_snapshot({
  relational_database_snapshot_name: "ResourceName", # required
})

Response structure


resp.relational_database_snapshot.name #=> String
resp.relational_database_snapshot.arn #=> String
resp.relational_database_snapshot.support_code #=> String
resp.relational_database_snapshot.created_at #=> Time
resp.relational_database_snapshot.location.availability_zone #=> String
resp.relational_database_snapshot.location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.relational_database_snapshot.resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.relational_database_snapshot.tags #=> Array
resp.relational_database_snapshot.tags[0].key #=> String
resp.relational_database_snapshot.tags[0].value #=> String
resp.relational_database_snapshot.engine #=> String
resp.relational_database_snapshot.engine_version #=> String
resp.relational_database_snapshot.size_in_gb #=> Integer
resp.relational_database_snapshot.state #=> String
resp.relational_database_snapshot.from_relational_database_name #=> String
resp.relational_database_snapshot.from_relational_database_arn #=> String
resp.relational_database_snapshot.from_relational_database_bundle_id #=> String
resp.relational_database_snapshot.from_relational_database_blueprint_id #=> String

Options Hash (options):

  • :relational_database_snapshot_name (required, String)

    The name of the database snapshot for which to get information.

Returns:

See Also:

#get_relational_database_snapshots(options = {}) ⇒ Types::GetRelationalDatabaseSnapshotsResult

Returns information about all of your database snapshots in Amazon Lightsail.

Examples:

Request syntax with placeholder values


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

Response structure


resp.relational_database_snapshots #=> Array
resp.relational_database_snapshots[0].name #=> String
resp.relational_database_snapshots[0].arn #=> String
resp.relational_database_snapshots[0].support_code #=> String
resp.relational_database_snapshots[0].created_at #=> Time
resp.relational_database_snapshots[0].location.availability_zone #=> String
resp.relational_database_snapshots[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.relational_database_snapshots[0].resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.relational_database_snapshots[0].tags #=> Array
resp.relational_database_snapshots[0].tags[0].key #=> String
resp.relational_database_snapshots[0].tags[0].value #=> String
resp.relational_database_snapshots[0].engine #=> String
resp.relational_database_snapshots[0].engine_version #=> String
resp.relational_database_snapshots[0].size_in_gb #=> Integer
resp.relational_database_snapshots[0].state #=> String
resp.relational_database_snapshots[0].from_relational_database_name #=> String
resp.relational_database_snapshots[0].from_relational_database_arn #=> String
resp.relational_database_snapshots[0].from_relational_database_bundle_id #=> String
resp.relational_database_snapshots[0].from_relational_database_blueprint_id #=> String
resp.next_page_token #=> String

Options Hash (options):

  • :page_token (String)

    The token to advance to the next page of results from your request.

    To get a page token, perform an initial GetRelationalDatabaseSnapshots request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.

Returns:

See Also:

#get_relational_databases(options = {}) ⇒ Types::GetRelationalDatabasesResult

Returns information about all of your databases in Amazon Lightsail.

Examples:

Request syntax with placeholder values


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

Response structure


resp.relational_databases #=> Array
resp.relational_databases[0].name #=> String
resp.relational_databases[0].arn #=> String
resp.relational_databases[0].support_code #=> String
resp.relational_databases[0].created_at #=> Time
resp.relational_databases[0].location.availability_zone #=> String
resp.relational_databases[0].location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.relational_databases[0].resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.relational_databases[0].tags #=> Array
resp.relational_databases[0].tags[0].key #=> String
resp.relational_databases[0].tags[0].value #=> String
resp.relational_databases[0].relational_database_blueprint_id #=> String
resp.relational_databases[0].relational_database_bundle_id #=> String
resp.relational_databases[0].master_database_name #=> String
resp.relational_databases[0].hardware.cpu_count #=> Integer
resp.relational_databases[0].hardware.disk_size_in_gb #=> Integer
resp.relational_databases[0].hardware.ram_size_in_gb #=> Float
resp.relational_databases[0].state #=> String
resp.relational_databases[0].secondary_availability_zone #=> String
resp.relational_databases[0].backup_retention_enabled #=> true/false
resp.relational_databases[0].pending_modified_values.master_user_password #=> String
resp.relational_databases[0].pending_modified_values.engine_version #=> String
resp.relational_databases[0].pending_modified_values.backup_retention_enabled #=> true/false
resp.relational_databases[0].engine #=> String
resp.relational_databases[0].engine_version #=> String
resp.relational_databases[0].latest_restorable_time #=> Time
resp.relational_databases[0].master_username #=> String
resp.relational_databases[0].parameter_apply_status #=> String
resp.relational_databases[0].preferred_backup_window #=> String
resp.relational_databases[0].preferred_maintenance_window #=> String
resp.relational_databases[0].publicly_accessible #=> true/false
resp.relational_databases[0].master_endpoint.port #=> Integer
resp.relational_databases[0].master_endpoint.address #=> String
resp.relational_databases[0].pending_maintenance_actions #=> Array
resp.relational_databases[0].pending_maintenance_actions[0].action #=> String
resp.relational_databases[0].pending_maintenance_actions[0].description #=> String
resp.relational_databases[0].pending_maintenance_actions[0].current_apply_date #=> Time
resp.relational_databases[0].ca_certificate_identifier #=> String
resp.next_page_token #=> String

Options Hash (options):

  • :page_token (String)

    The token to advance to the next page of results from your request.

    To get a page token, perform an initial GetRelationalDatabases request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.

Returns:

See Also:

#get_static_ip(options = {}) ⇒ 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-west-2", "eu-west-3", "eu-central-1", "ca-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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.static_ip.ip_address #=> String
resp.static_ip.attached_to #=> String
resp.static_ip.is_attached #=> true/false

Options Hash (options):

  • :static_ip_name (required, String)

    The name of the static IP in Lightsail.

Returns:

See Also:

#get_static_ips(options = {}) ⇒ 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-west-2", "eu-west-3", "eu-central-1", "ca-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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.static_ips[0].ip_address #=> String
resp.static_ips[0].attached_to #=> String
resp.static_ips[0].is_attached #=> true/false
resp.next_page_token #=> String

Options Hash (options):

  • :page_token (String)

    The token to advance to the next page of results from your request.

    To get a page token, perform an initial GetStaticIps request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.

Returns:

See Also:

#import_key_pair(options = {}) ⇒ 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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operation.is_terminal #=> true/false
resp.operation.operation_details #=> String
resp.operation.operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operation.status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operation.status_changed_at #=> Time
resp.operation.error_code #=> String
resp.operation.error_details #=> String

Options Hash (options):

  • :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:

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

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

Examples:

Request syntax with placeholder values


resp = client.is_vpc_peered()

Response structure


resp.is_peered #=> true/false

Returns:

See Also:

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

Opens ports for a specific Amazon Lightsail instance, and specifies the IP addresses allowed to connect to the instance through the ports, and the protocol.

The OpenInstancePublicPorts action supports tag-based access control via resource tags applied to the resource identified by instanceName. For more information, see the Lightsail Dev Guide.

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, icmp
    cidrs: ["string"],
    cidr_list_aliases: ["string"],
  },
  instance_name: "ResourceName", # required
})

Response structure


resp.operation.id #=> String
resp.operation.resource_name #=> String
resp.operation.resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operation.is_terminal #=> true/false
resp.operation.operation_details #=> String
resp.operation.operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operation.status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operation.status_changed_at #=> Time
resp.operation.error_code #=> String
resp.operation.error_details #=> String

Options Hash (options):

  • :port_info (required, Types::PortInfo)

    An object to describe the ports to open for the specified instance.

  • :instance_name (required, String)

    The name of the instance for which to open ports.

Returns:

See Also:

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

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

Examples:

Request syntax with placeholder values


resp = client.peer_vpc()

Response structure


resp.operation.id #=> String
resp.operation.resource_name #=> String
resp.operation.resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operation.is_terminal #=> true/false
resp.operation.operation_details #=> String
resp.operation.operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operation.status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operation.status_changed_at #=> Time
resp.operation.error_code #=> String
resp.operation.error_details #=> String

Returns:

See Also:

#put_alarm(options = {}) ⇒ Types::PutAlarmResult

Creates or updates an alarm, and associates it with the specified metric.

An alarm is used to monitor a single metric for one of your resources. When a metric condition is met, the alarm can notify you by email, SMS text message, and a banner displayed on the Amazon Lightsail console. For more information, see Alarms in Amazon Lightsail.

When this action creates an alarm, the alarm state is immediately set to INSUFFICIENT_DATA. The alarm is then evaluated and its state is set appropriately. Any actions associated with the new state are then executed.

When you update an existing alarm, its state is left unchanged, but the update completely overwrites the previous configuration of the alarm. The alarm is then evaluated with the updated configuration.

Examples:

Request syntax with placeholder values


resp = client.put_alarm({
  alarm_name: "ResourceName", # required
  metric_name: "CPUUtilization", # required, accepts CPUUtilization, NetworkIn, NetworkOut, StatusCheckFailed, StatusCheckFailed_Instance, StatusCheckFailed_System, 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, DatabaseConnections, DiskQueueDepth, FreeStorageSpace, NetworkReceiveThroughput, NetworkTransmitThroughput, BurstCapacityTime, BurstCapacityPercentage
  monitored_resource_name: "ResourceName", # required
  comparison_operator: "GreaterThanOrEqualToThreshold", # required, accepts GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold, LessThanOrEqualToThreshold
  threshold: 1.0, # required
  evaluation_periods: 1, # required
  datapoints_to_alarm: 1,
  treat_missing_data: "breaching", # accepts breaching, notBreaching, ignore, missing
  contact_protocols: ["Email"], # accepts Email, SMS
  notification_triggers: ["OK"], # accepts OK, ALARM, INSUFFICIENT_DATA
  notification_enabled: 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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :alarm_name (required, String)

    The name for the alarm. Specify the name of an existing alarm to update, and overwrite the previous configuration of the alarm.

  • :metric_name (required, String)

    The name of the metric to associate with the alarm.

    You can configure up to two alarms per metric.

    The following metrics are available for each resource type:

    • Instances: BurstCapacityPercentage, BurstCapacityTime, CPUUtilization, NetworkIn, NetworkOut, StatusCheckFailed, StatusCheckFailed_Instance, and StatusCheckFailed_System.

    • Load balancers: 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, and RequestCount.

    • Relational databases: CPUUtilization, DatabaseConnections, DiskQueueDepth, FreeStorageSpace, NetworkReceiveThroughput, and NetworkTransmitThroughput.

    For more information about these metrics, see Metrics available in Lightsail.

  • :monitored_resource_name (required, String)

    The name of the Lightsail resource that will be monitored.

    Instances, load balancers, and relational databases are the only Lightsail resources that can currently be monitored by alarms.

  • :comparison_operator (required, String)

    The arithmetic operation to use when comparing the specified statistic to the threshold. The specified statistic value is used as the first operand.

  • :threshold (required, Float)

    The value against which the specified statistic is compared.

  • :evaluation_periods (required, Integer)

    The number of most recent periods over which data is compared to the specified threshold. If you are setting an \"M out of N\" alarm, this value (evaluationPeriods) is the N.

    If you are setting an alarm that requires that a number of consecutive data points be breaching to trigger the alarm, this value specifies the rolling period of time in which data points are evaluated.

    Each evaluation period is five minutes long. For example, specify an evaluation period of 24 to evaluate a metric over a rolling period of two hours.

    You can specify a minimum valuation period of 1 (5 minutes), and a maximum evaluation period of 288 (24 hours).

  • :datapoints_to_alarm (Integer)

    The number of data points that must be not within the specified threshold to trigger the alarm. If you are setting an \"M out of N\" alarm, this value (datapointsToAlarm) is the M.

  • :treat_missing_data (String)

    Sets how this alarm will handle missing data points.

    An alarm can treat missing data in the following ways:

    • breaching - Assume the missing data is not within the threshold. Missing data counts towards the number of times the metric is not within the threshold.

    • notBreaching - Assume the missing data is within the threshold. Missing data does not count towards the number of times the metric is not within the threshold.

    • ignore - Ignore the missing data. Maintains the current alarm state.

    • missing - Missing data is treated as missing.

    If treatMissingData is not specified, the default behavior of missing is used.

  • :contact_protocols (Array<String>)

    The contact protocols to use for the alarm, such as Email, SMS (text messaging), or both.

    A notification is sent via the specified contact protocol if notifications are enabled for the alarm, and when the alarm is triggered.

    A notification is not sent if a contact protocol is not specified, if the specified contact protocol is not configured in the AWS Region, or if notifications are not enabled for the alarm using the notificationEnabled paramater.

    Use the CreateContactMethod action to configure a contact protocol in an AWS Region.

  • :notification_triggers (Array<String>)

    The alarm states that trigger a notification.

    An alarm has the following possible states:

    • ALARM - The metric is outside of the defined threshold.

    • INSUFFICIENT_DATA - The alarm has just started, the metric is not available, or not enough data is available for the metric to determine the alarm state.

    • OK - The metric is within the defined threshold.

    When you specify a notification trigger, the ALARM state must be specified. The INSUFFICIENT_DATA and OK states can be specified in addition to the ALARM state.

    • If you specify OK as an alarm trigger, a notification is sent when the alarm switches from an ALARM or INSUFFICIENT_DATA alarm state to an OK state. This can be thought of as an all clear alarm notification.

    • If you specify INSUFFICIENT_DATA as the alarm trigger, a notification is sent when the alarm switches from an OK or ALARM alarm state to an INSUFFICIENT_DATA state.

    The notification trigger defaults to ALARM if you don\'t specify this parameter.

  • :notification_enabled (Boolean)

    Indicates whether the alarm is enabled.

    Notifications are enabled by default if you don\'t specify this parameter.

Returns:

See Also:

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

Opens ports for a specific Amazon Lightsail instance, and specifies the IP addresses allowed to connect to the instance through the ports, and the protocol. This action also closes all currently open ports that are not included in the request. Include all of the ports and the protocols you want to open in your PutInstancePublicPortsrequest. Or use the OpenInstancePublicPorts action to open ports without closing currently open ports.

The PutInstancePublicPorts action supports tag-based access control via resource tags applied to the resource identified by instanceName. For more information, see the Lightsail Dev Guide.

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, icmp
      cidrs: ["string"],
      cidr_list_aliases: ["string"],
    },
  ],
  instance_name: "ResourceName", # required
})

Response structure


resp.operation.id #=> String
resp.operation.resource_name #=> String
resp.operation.resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operation.is_terminal #=> true/false
resp.operation.operation_details #=> String
resp.operation.operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operation.status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operation.status_changed_at #=> Time
resp.operation.error_code #=> String
resp.operation.error_details #=> String

Options Hash (options):

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

    An array of objects to describe the ports to open for the specified instance.

  • :instance_name (required, String)

    The name of the instance for which to open ports.

Returns:

See Also:

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

Restarts a specific instance.

The reboot instance operation supports tag-based access control via resource tags applied to the resource identified by instance name. For more information, see the Lightsail Dev Guide.

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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :instance_name (required, String)

    The name of the instance to reboot.

Returns:

See Also:

#reboot_relational_database(options = {}) ⇒ Types::RebootRelationalDatabaseResult

Restarts a specific database in Amazon Lightsail.

The reboot relational database operation supports tag-based access control via resource tags applied to the resource identified by relationalDatabaseName. For more information, see the Lightsail Dev Guide.

Examples:

Request syntax with placeholder values


resp = client.reboot_relational_database({
  relational_database_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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :relational_database_name (required, String)

    The name of your database to reboot.

Returns:

See Also:

#register_container_image(options = {}) ⇒ Types::RegisterContainerImageResult

Registers a container image to your Amazon Lightsail container service.

This action is not required if you install and use the Lightsail Control (lightsailctl) plugin to push container images to your Lightsail container service. For more information, see Pushing and managing container images on your Amazon Lightsail container services in the Lightsail Dev Guide.

Examples:

Request syntax with placeholder values


resp = client.register_container_image({
  service_name: "ContainerServiceName", # required
  label: "ContainerLabel", # required
  digest: "string", # required
})

Response structure


resp.container_image.image #=> String
resp.container_image.digest #=> String
resp.container_image.created_at #=> Time

Options Hash (options):

  • :service_name (required, String)

    The name of the container service for which to register a container image.

  • :label (required, String)

    The label for the container image when it\'s registered to the container service.

    Use a descriptive label that you can use to track the different versions of your registered container images.

    Use the GetContainerImages action to return the container images registered to a Lightsail container service. The label is the <imagelabel> portion of the following image name example:

    • :container-service-1.<imagelabel>.1

    ^

    If the name of your container service is mycontainerservice, and the label that you specify is mystaticwebsite, then the name of the registered container image will be :mycontainerservice.mystaticwebsite.1.

    The number at the end of these image name examples represents the version of the registered container image. If you push and register another container image to the same Lightsail container service, with the same label, then the version number for the new registered container image will be 2. If you push and register another container image, the version number will be 3, and so on.

  • :digest (required, String)

    The digest of the container image to be registered.

Returns:

See Also:

#release_static_ip(options = {}) ⇒ 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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :static_ip_name (required, String)

    The name of the static IP to delete.

Returns:

See Also:

#reset_distribution_cache(options = {}) ⇒ Types::ResetDistributionCacheResult

Deletes currently cached content from your Amazon Lightsail content delivery network (CDN) distribution.

After resetting the cache, the next time a content request is made, your distribution pulls, serves, and caches it from the origin.

Examples:

Request syntax with placeholder values


resp = client.reset_distribution_cache({
  distribution_name: "ResourceName",
})

Response structure


resp.status #=> String
resp.create_time #=> Time
resp.operation.id #=> String
resp.operation.resource_name #=> String
resp.operation.resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operation.is_terminal #=> true/false
resp.operation.operation_details #=> String
resp.operation.operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operation.status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operation.status_changed_at #=> Time
resp.operation.error_code #=> String
resp.operation.error_details #=> String

Options Hash (options):

  • :distribution_name (String)

    The name of the distribution for which to reset cache.

    Use the GetDistributions action to get a list of distribution names that you can specify.

Returns:

See Also:

#send_contact_method_verification(options = {}) ⇒ Types::SendContactMethodVerificationResult

Sends a verification request to an email contact method to ensure it's owned by the requester. SMS contact methods don't need to be verified.

A contact method is used to send you notifications about your Amazon Lightsail resources. You can add one email address and one mobile phone number contact method in each AWS Region. However, SMS text messaging is not supported in some AWS Regions, and SMS text messages cannot be sent to some countries/regions. For more information, see Notifications in Amazon Lightsail.

A verification request is sent to the contact method when you initially create it. Use this action to send another verification request if a previous verification request was deleted, or has expired.

Notifications are not sent to an email contact method until after it is verified, and confirmed as valid.

Examples:

Request syntax with placeholder values


resp = client.send_contact_method_verification({
  protocol: "Email", # required, accepts Email
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :protocol (required, String)

    The protocol to verify, such as Email or SMS (text messaging).

Returns:

See Also:

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

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

When you start a stopped instance, Lightsail assigns a new public IP address to the instance. To use the same IP address after stopping and starting an instance, create a static IP address and attach it to the instance. For more information, see the Lightsail Dev Guide.

The start instance operation supports tag-based access control via resource tags applied to the resource identified by instance name. For more information, see the Lightsail Dev Guide.

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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :instance_name (required, String)

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

Returns:

See Also:

#start_relational_database(options = {}) ⇒ Types::StartRelationalDatabaseResult

Starts a specific database from a stopped state in Amazon Lightsail. To restart a database, use the reboot relational database operation.

The start relational database operation supports tag-based access control via resource tags applied to the resource identified by relationalDatabaseName. For more information, see the Lightsail Dev Guide.

Examples:

Request syntax with placeholder values


resp = client.start_relational_database({
  relational_database_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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :relational_database_name (required, String)

    The name of your database to start.

Returns:

See Also:

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

Stops a specific Amazon Lightsail instance that is currently running.

When you start a stopped instance, Lightsail assigns a new public IP address to the instance. To use the same IP address after stopping and starting an instance, create a static IP address and attach it to the instance. For more information, see the Lightsail Dev Guide.

The stop instance operation supports tag-based access control via resource tags applied to the resource identified by instance name. For more information, see the Lightsail Dev Guide.

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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :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:

#stop_relational_database(options = {}) ⇒ Types::StopRelationalDatabaseResult

Stops a specific database that is currently running in Amazon Lightsail.

The stop relational database operation supports tag-based access control via resource tags applied to the resource identified by relationalDatabaseName. For more information, see the Lightsail Dev Guide.

Examples:

Request syntax with placeholder values


resp = client.stop_relational_database({
  relational_database_name: "ResourceName", # required
  relational_database_snapshot_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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :relational_database_name (required, String)

    The name of your database to stop.

  • :relational_database_snapshot_name (String)

    The name of your new database snapshot to be created before stopping your database.

Returns:

See Also:

#tag_resource(options = {}) ⇒ Types::TagResourceResult

Adds one or more tags to the specified Amazon Lightsail resource. Each resource can have a maximum of 50 tags. Each tag consists of a key and an optional value. Tag keys must be unique per resource. For more information about tags, see the Lightsail Dev Guide.

The tag resource operation supports tag-based access control via request tags and resource tags applied to the resource identified by resource name. For more information, see the Lightsail Dev Guide.

Examples:

Request syntax with placeholder values


resp = client.tag_resource({
  resource_name: "ResourceName", # required
  resource_arn: "ResourceArn",
  tags: [ # required
    {
      key: "TagKey",
      value: "TagValue",
    },
  ],
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :resource_name (required, String)

    The name of the resource to which you are adding tags.

  • :resource_arn (String)

    The Amazon Resource Name (ARN) of the resource to which you want to add a tag.

  • :tags (required, Array<Types::Tag>)

    The tag key and optional value.

Returns:

See Also:

#test_alarm(options = {}) ⇒ Types::TestAlarmResult

Tests an alarm by displaying a banner on the Amazon Lightsail console. If a notification trigger is configured for the specified alarm, the test also sends a notification to the notification protocol (Email and/or SMS) configured for the alarm.

An alarm is used to monitor a single metric for one of your resources. When a metric condition is met, the alarm can notify you by email, SMS text message, and a banner displayed on the Amazon Lightsail console. For more information, see Alarms in Amazon Lightsail.

Examples:

Request syntax with placeholder values


resp = client.test_alarm({
  alarm_name: "ResourceName", # required
  state: "OK", # required, accepts OK, ALARM, INSUFFICIENT_DATA
})

Response structure


resp.operations #=> Array
resp.operations[0].id #=> String
resp.operations[0].resource_name #=> String
resp.operations[0].resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :alarm_name (required, String)

    The name of the alarm to test.

  • :state (required, String)

    The alarm state to test.

    An alarm has the following possible states that can be tested:

    • ALARM - The metric is outside of the defined threshold.

    • INSUFFICIENT_DATA - The alarm has just started, the metric is not available, or not enough data is available for the metric to determine the alarm state.

    • OK - The metric is within the defined threshold.

Returns:

See Also:

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

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

Examples:

Request syntax with placeholder values


resp = client.unpeer_vpc()

Response structure


resp.operation.id #=> String
resp.operation.resource_name #=> String
resp.operation.resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operation.is_terminal #=> true/false
resp.operation.operation_details #=> String
resp.operation.operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operation.status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operation.status_changed_at #=> Time
resp.operation.error_code #=> String
resp.operation.error_details #=> String

Returns:

See Also:

#untag_resource(options = {}) ⇒ Types::UntagResourceResult

Deletes the specified set of tag keys and their values from the specified Amazon Lightsail resource.

The untag resource operation supports tag-based access control via request tags and resource tags applied to the resource identified by resource name. For more information, see the Lightsail Dev Guide.

Examples:

Request syntax with placeholder values


resp = client.untag_resource({
  resource_name: "ResourceName", # required
  resource_arn: "ResourceArn",
  tag_keys: ["TagKey"], # 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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :resource_name (required, String)

    The name of the resource from which you are removing a tag.

  • :resource_arn (String)

    The Amazon Resource Name (ARN) of the resource from which you want to remove a tag.

  • :tag_keys (required, Array<String>)

    The tag keys to delete from the specified resource.

Returns:

See Also:

#update_container_service(options = {}) ⇒ Types::UpdateContainerServiceResult

Updates the configuration of your Amazon Lightsail container service, such as its power, scale, and public domain names.

Examples:

Request syntax with placeholder values


resp = client.update_container_service({
  service_name: "ContainerServiceName", # required
  power: "nano", # accepts nano, micro, small, medium, large, xlarge
  scale: 1,
  is_disabled: false,
  public_domain_names: {
    "string" => ["string"],
  },
})

Response structure


resp.container_service.container_service_name #=> String
resp.container_service.arn #=> String
resp.container_service.created_at #=> Time
resp.container_service.location.availability_zone #=> String
resp.container_service.location.region_name #=> String, one of "us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-west-1", "eu-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.container_service.resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
resp.container_service.tags #=> Array
resp.container_service.tags[0].key #=> String
resp.container_service.tags[0].value #=> String
resp.container_service.power #=> String, one of "nano", "micro", "small", "medium", "large", "xlarge"
resp.container_service.power_id #=> String
resp.container_service.state #=> String, one of "PENDING", "READY", "RUNNING", "UPDATING", "DELETING", "DISABLED"
resp.container_service.scale #=> Integer
resp.container_service.current_deployment.version #=> Integer
resp.container_service.current_deployment.state #=> String, one of "ACTIVATING", "ACTIVE", "INACTIVE", "FAILED"
resp.container_service.current_deployment.containers #=> Hash
resp.container_service.current_deployment.containers["ContainerName"].image #=> String
resp.container_service.current_deployment.containers["ContainerName"].command #=> Array
resp.container_service.current_deployment.containers["ContainerName"].command[0] #=> String
resp.container_service.current_deployment.containers["ContainerName"].environment #=> Hash
resp.container_service.current_deployment.containers["ContainerName"].environment["string"] #=> String
resp.container_service.current_deployment.containers["ContainerName"].ports #=> Hash
resp.container_service.current_deployment.containers["ContainerName"].ports["string"] #=> String, one of "HTTP", "HTTPS", "TCP", "UDP"
resp.container_service.current_deployment.public_endpoint.container_name #=> String
resp.container_service.current_deployment.public_endpoint.container_port #=> Integer
resp.container_service.current_deployment.public_endpoint.health_check.healthy_threshold #=> Integer
resp.container_service.current_deployment.public_endpoint.health_check.unhealthy_threshold #=> Integer
resp.container_service.current_deployment.public_endpoint.health_check.timeout_seconds #=> Integer
resp.container_service.current_deployment.public_endpoint.health_check.interval_seconds #=> Integer
resp.container_service.current_deployment.public_endpoint.health_check.path #=> String
resp.container_service.current_deployment.public_endpoint.health_check.success_codes #=> String
resp.container_service.current_deployment.created_at #=> Time
resp.container_service.next_deployment.version #=> Integer
resp.container_service.next_deployment.state #=> String, one of "ACTIVATING", "ACTIVE", "INACTIVE", "FAILED"
resp.container_service.next_deployment.containers #=> Hash
resp.container_service.next_deployment.containers["ContainerName"].image #=> String
resp.container_service.next_deployment.containers["ContainerName"].command #=> Array
resp.container_service.next_deployment.containers["ContainerName"].command[0] #=> String
resp.container_service.next_deployment.containers["ContainerName"].environment #=> Hash
resp.container_service.next_deployment.containers["ContainerName"].environment["string"] #=> String
resp.container_service.next_deployment.containers["ContainerName"].ports #=> Hash
resp.container_service.next_deployment.containers["ContainerName"].ports["string"] #=> String, one of "HTTP", "HTTPS", "TCP", "UDP"
resp.container_service.next_deployment.public_endpoint.container_name #=> String
resp.container_service.next_deployment.public_endpoint.container_port #=> Integer
resp.container_service.next_deployment.public_endpoint.health_check.healthy_threshold #=> Integer
resp.container_service.next_deployment.public_endpoint.health_check.unhealthy_threshold #=> Integer
resp.container_service.next_deployment.public_endpoint.health_check.timeout_seconds #=> Integer
resp.container_service.next_deployment.public_endpoint.health_check.interval_seconds #=> Integer
resp.container_service.next_deployment.public_endpoint.health_check.path #=> String
resp.container_service.next_deployment.public_endpoint.health_check.success_codes #=> String
resp.container_service.next_deployment.created_at #=> Time
resp.container_service.is_disabled #=> true/false
resp.container_service.principal_arn #=> String
resp.container_service.private_domain_name #=> String
resp.container_service.public_domain_names #=> Hash
resp.container_service.public_domain_names["string"] #=> Array
resp.container_service.public_domain_names["string"][0] #=> String
resp.container_service.url #=> String

Options Hash (options):

  • :service_name (required, String)

    The name of the container service to update.

  • :power (String)

    The power for the container service.

    The power specifies the amount of memory, vCPUs, and base monthly cost of each node of the container service. The power and scale of a container service makes up its configured capacity. To determine the monthly price of your container service, multiply the base price of the power with the scale (the number of nodes) of the service.

    Use the GetContainerServicePowers action to view the specifications of each power option.

  • :scale (Integer)

    The scale for the container service.

    The scale specifies the allocated compute nodes of the container service. The power and scale of a container service makes up its configured capacity. To determine the monthly price of your container service, multiply the base price of the power with the scale (the number of nodes) of the service.

  • :is_disabled (Boolean)

    A Boolean value to indicate whether the container service is disabled.

  • :public_domain_names (Hash<String,Array<String>>)

    The public domain names to use with the container service, such as example.com and www.example.com.

    You can specify up to four public domain names for a container service. The domain names that you specify are used when you create a deployment with a container configured as the public endpoint of your container service.

    If you don\'t specify public domain names, then you can use the default domain of the container service.

    You must create and validate an SSL/TLS certificate before you can use public domain names with your container service. Use the CreateCertificate action to create a certificate for the public domain names you want to use with your container service.

    You can specify public domain names using a string to array map as shown in the example later on this page.

Returns:

See Also:

#update_distribution(options = {}) ⇒ Types::UpdateDistributionResult

Updates an existing Amazon Lightsail content delivery network (CDN) distribution.

Use this action to update the configuration of your existing distribution

Examples:

Request syntax with placeholder values


resp = client.update_distribution({
  distribution_name: "ResourceName", # required
  origin: {
    name: "ResourceName",
    region_name: "us-east-1", # accepts us-east-1, us-east-2, us-west-1, us-west-2, eu-west-1, eu-west-2, eu-west-3, eu-central-1, ca-central-1, ap-south-1, ap-southeast-1, ap-southeast-2, ap-northeast-1, ap-northeast-2
    protocol_policy: "http-only", # accepts http-only, https-only
  },
  default_cache_behavior: {
    behavior: "dont-cache", # accepts dont-cache, cache
  },
  cache_behavior_settings: {
    default_ttl: 1,
    minimum_ttl: 1,
    maximum_ttl: 1,
    allowed_http_methods: "NonEmptyString",
    cached_http_methods: "NonEmptyString",
    forwarded_cookies: {
      option: "none", # accepts none, allow-list, all
      cookies_allow_list: ["string"],
    },
    forwarded_headers: {
      option: "none", # accepts none, allow-list, all
      headers_allow_list: ["Accept"], # accepts Accept, Accept-Charset, Accept-Datetime, Accept-Encoding, Accept-Language, Authorization, CloudFront-Forwarded-Proto, CloudFront-Is-Desktop-Viewer, CloudFront-Is-Mobile-Viewer, CloudFront-Is-SmartTV-Viewer, CloudFront-Is-Tablet-Viewer, CloudFront-Viewer-Country, Host, Origin, Referer
    },
    forwarded_query_strings: {
      option: false,
      query_strings_allow_list: ["string"],
    },
  },
  cache_behaviors: [
    {
      path: "string",
      behavior: "dont-cache", # accepts dont-cache, cache
    },
  ],
  is_enabled: false,
})

Response structure


resp.operation.id #=> String
resp.operation.resource_name #=> String
resp.operation.resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operation.is_terminal #=> true/false
resp.operation.operation_details #=> String
resp.operation.operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operation.status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operation.status_changed_at #=> Time
resp.operation.error_code #=> String
resp.operation.error_details #=> String

Options Hash (options):

  • :distribution_name (required, String)

    The name of the distribution to update.

    Use the GetDistributions action to get a list of distribution names that you can specify.

  • :origin (Types::InputOrigin)

    An object that describes the origin resource for the distribution, such as a Lightsail instance or load balancer.

    The distribution pulls, caches, and serves content from the origin.

  • :default_cache_behavior (Types::CacheBehavior)

    An object that describes the default cache behavior for the distribution.

  • :cache_behavior_settings (Types::CacheSettings)

    An object that describes the cache behavior settings for the distribution.

    The cacheBehaviorSettings specified in your UpdateDistributionRequest will replace your distribution\'s existing settings.

  • :cache_behaviors (Array<Types::CacheBehaviorPerPath>)

    An array of objects that describe the per-path cache behavior for the distribution.

  • :is_enabled (Boolean)

    Indicates whether to enable the distribution.

Returns:

See Also:

#update_distribution_bundle(options = {}) ⇒ Types::UpdateDistributionBundleResult

Updates the bundle of your Amazon Lightsail content delivery network (CDN) distribution.

A distribution bundle specifies the monthly network transfer quota and monthly cost of your dsitribution.

Update your distribution's bundle if your distribution is going over its monthly network transfer quota and is incurring an overage fee.

You can update your distribution's bundle only one time within your monthly AWS billing cycle. To determine if you can update your distribution's bundle, use the GetDistributions action. The ableToUpdateBundle parameter in the result will indicate whether you can currently update your distribution's bundle.

Examples:

Request syntax with placeholder values


resp = client.update_distribution_bundle({
  distribution_name: "ResourceName",
  bundle_id: "string",
})

Response structure


resp.operation.id #=> String
resp.operation.resource_name #=> String
resp.operation.resource_type #=> String, one of "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operation.is_terminal #=> true/false
resp.operation.operation_details #=> String
resp.operation.operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operation.status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operation.status_changed_at #=> Time
resp.operation.error_code #=> String
resp.operation.error_details #=> String

Options Hash (options):

  • :distribution_name (String)

    The name of the distribution for which to update the bundle.

    Use the GetDistributions action to get a list of distribution names that you can specify.

  • :bundle_id (String)

    The bundle ID of the new bundle to apply to your distribution.

    Use the GetDistributionBundles action to get a list of distribution bundle IDs that you can specify.

Returns:

See Also:

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

Updates a domain recordset after it is created.

The update domain entry operation supports tag-based access control via resource tags applied to the resource identified by domain name. For more information, see the Lightsail Dev Guide.

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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :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:

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

Updates the specified attribute for a load balancer. You can only update one attribute at a time.

The update load balancer attribute operation supports tag-based access control via resource tags applied to the resource identified by load balancer name. For more information, see the Lightsail Dev Guide.

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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :load_balancer_name (required, String)

    The name of the load balancer that you want to modify (e.g., my-load-balancer.

  • :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:

#update_relational_database(options = {}) ⇒ Types::UpdateRelationalDatabaseResult

Allows the update of one or more attributes of a database in Amazon Lightsail.

Updates are applied immediately, or in cases where the updates could result in an outage, are applied during the database's predefined maintenance window.

The update relational database operation supports tag-based access control via resource tags applied to the resource identified by relationalDatabaseName. For more information, see the Lightsail Dev Guide.

Examples:

Request syntax with placeholder values


resp = client.update_relational_database({
  relational_database_name: "ResourceName", # required
  master_user_password: "SensitiveString",
  rotate_master_user_password: false,
  preferred_backup_window: "string",
  preferred_maintenance_window: "string",
  enable_backup_retention: false,
  disable_backup_retention: false,
  publicly_accessible: false,
  apply_immediately: false,
  ca_certificate_identifier: "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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :relational_database_name (required, String)

    The name of your database to update.

  • :master_user_password (String)

    The password for the master user of your database. The password can include any printable ASCII character except \"/\", \"\"\", or \"@\".

    Constraints: Must contain 8 to 41 characters.

  • :rotate_master_user_password (Boolean)

    When true, the master user password is changed to a new strong password generated by Lightsail.

    Use the get relational database master user password operation to get the new password.

  • :preferred_backup_window (String)

    The daily time range during which automated backups are created for your database if automated backups are enabled.

    Constraints:

    • Must be in the hh24:mi-hh24:mi format.

      Example: 16:00-16:30

    • Specified in Coordinated Universal Time (UTC).

    • Must not conflict with the preferred maintenance window.

    • Must be at least 30 minutes.

  • :preferred_maintenance_window (String)

    The weekly time range during which system maintenance can occur on your database.

    The default is a 30-minute window selected at random from an 8-hour block of time for each AWS Region, occurring on a random day of the week.

    Constraints:

    • Must be in the ddd:hh24:mi-ddd:hh24:mi format.

    • Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun.

    • Must be at least 30 minutes.

    • Specified in Coordinated Universal Time (UTC).

    • Example: Tue:17:00-Tue:17:30

  • :enable_backup_retention (Boolean)

    When true, enables automated backup retention for your database.

    Updates are applied during the next maintenance window because this can result in an outage.

  • :disable_backup_retention (Boolean)

    When true, disables automated backup retention for your database.

    Disabling backup retention deletes all automated database backups. Before disabling this, you may want to create a snapshot of your database using the create relational database snapshot operation.

    Updates are applied during the next maintenance window because this can result in an outage.

  • :publicly_accessible (Boolean)

    Specifies the accessibility options for your database. A value of true specifies a database that is available to resources outside of your Lightsail account. A value of false specifies a database that is available only to your Lightsail resources in the same region as your database.

  • :apply_immediately (Boolean)

    When true, applies changes immediately. When false, applies changes during the preferred maintenance window. Some changes may cause an outage.

    Default: false

  • :ca_certificate_identifier (String)

    Indicates the certificate that needs to be associated with the database.

Returns:

See Also:

#update_relational_database_parameters(options = {}) ⇒ Types::UpdateRelationalDatabaseParametersResult

Allows the update of one or more parameters of a database in Amazon Lightsail.

Parameter updates don't cause outages; therefore, their application is not subject to the preferred maintenance window. However, there are two ways in which parameter updates are applied: dynamic or pending-reboot. Parameters marked with a dynamic apply type are applied immediately. Parameters marked with a pending-reboot apply type are applied only after the database is rebooted using the reboot relational database operation.

The update relational database parameters operation supports tag-based access control via resource tags applied to the resource identified by relationalDatabaseName. For more information, see the Lightsail Dev Guide.

Examples:

Request syntax with placeholder values


resp = client.update_relational_database_parameters({
  relational_database_name: "ResourceName", # required
  parameters: [ # required
    {
      allowed_values: "string",
      apply_method: "string",
      apply_type: "string",
      data_type: "string",
      description: "string",
      is_modifiable: false,
      parameter_name: "string",
      parameter_value: "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 "ContainerService", "Instance", "StaticIp", "KeyPair", "InstanceSnapshot", "Domain", "PeeredVpc", "LoadBalancer", "LoadBalancerTlsCertificate", "Disk", "DiskSnapshot", "RelationalDatabase", "RelationalDatabaseSnapshot", "ExportSnapshotRecord", "CloudFormationStackRecord", "Alarm", "ContactMethod", "Distribution", "Certificate"
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-west-2", "eu-west-3", "eu-central-1", "ca-central-1", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2"
resp.operations[0].is_terminal #=> true/false
resp.operations[0].operation_details #=> String
resp.operations[0].operation_type #=> String, one of "DeleteKnownHostKeys", "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", "CreateRelationalDatabase", "UpdateRelationalDatabase", "DeleteRelationalDatabase", "CreateRelationalDatabaseFromSnapshot", "CreateRelationalDatabaseSnapshot", "DeleteRelationalDatabaseSnapshot", "UpdateRelationalDatabaseParameters", "StartRelationalDatabase", "RebootRelationalDatabase", "StopRelationalDatabase", "EnableAddOn", "DisableAddOn", "PutAlarm", "GetAlarms", "DeleteAlarm", "TestAlarm", "CreateContactMethod", "GetContactMethods", "SendContactMethodVerification", "DeleteContactMethod", "CreateDistribution", "UpdateDistribution", "DeleteDistribution", "ResetDistributionCache", "AttachCertificateToDistribution", "DetachCertificateFromDistribution", "UpdateDistributionBundle", "CreateCertificate", "DeleteCertificate", "CreateContainerService", "UpdateContainerService", "DeleteContainerService", "CreateContainerServiceDeployment", "CreateContainerServiceRegistryLogin", "RegisterContainerImage", "DeleteContainerImage"
resp.operations[0].status #=> String, one of "NotStarted", "Started", "Failed", "Completed", "Succeeded"
resp.operations[0].status_changed_at #=> Time
resp.operations[0].error_code #=> String
resp.operations[0].error_details #=> String

Options Hash (options):

  • :relational_database_name (required, String)

    The name of your database for which to update parameters.

  • :parameters (required, Array<Types::RelationalDatabaseParameter>)

    The database parameters to update.

Returns:

See Also:

#wait_until(waiter_name, params = {}) {|waiter| ... } ⇒ Boolean

Waiters polls an API operation until a resource enters a desired state.

Basic Usage

Waiters will poll until they are succesful, they fail by entering a terminal state, or until a maximum number of attempts are made.

# polls in a loop, sleeping between attempts client.waiter_until(waiter_name, params)

Configuration

You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You configure waiters by passing a block to #wait_until:

# poll for ~25 seconds
client.wait_until(...) do |w|
  w.max_attempts = 5
  w.delay = 5
end

Callbacks

You can be notified before each polling attempt and before each delay. If you throw :success or :failure from these callbacks, it will terminate the waiter.

started_at = Time.now
client.wait_until(...) do |w|

  # disable max attempts
  w.max_attempts = nil

  # poll for 1 hour, instead of a number of attempts
  w.before_wait do |attempts, response|
    throw :failure if Time.now - started_at > 3600
  end

end

Handling Errors

When a waiter is successful, it returns true. When a waiter fails, it raises an error. All errors raised extend from Waiters::Errors::WaiterFailed.

begin
  client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
  # resource did not enter the desired state in time
end

Parameters:

  • waiter_name (Symbol)

    The name of the waiter. See #waiter_names for a full list of supported waiters.

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

    Additional request parameters. See the #waiter_names for a list of supported waiters and what request they call. The called request determines the list of accepted parameters.

Yield Parameters:

Returns:

  • (Boolean)

    Returns true if the waiter was successful.

Raises:

  • (Errors::FailureStateError)

    Raised when the waiter terminates because the waiter has entered a state that it will not transition out of, preventing success.

  • (Errors::TooManyAttemptsError)

    Raised when the configured maximum number of attempts have been made, and the waiter is not yet successful.

  • (Errors::UnexpectedError)

    Raised when an error is encounted while polling for a resource that is not expected.

  • (Errors::NoSuchWaiterError)

    Raised when you request to wait for an unknown state.

#waiter_namesArray<Symbol>

Returns the list of supported waiters. The following table lists the supported waiters and the client method they call:

Waiter NameClient MethodDefault Delay:Default Max Attempts:

Returns:

  • (Array<Symbol>)

    the list of supported waiters.