Skip to main content

instance_access_details

Creates, updates, deletes, gets or lists an instance_access_details resource.

Overview

Nameinstance_access_details
TypeResource
Idaws.lightsail.instance_access_details

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
cert_keystringFor SSH access, the public key to use when accessing your instance For OpenSSH clients (command line SSH), you should save this value to tempkey-cert.pub.
expires_atstring (date-time)For SSH access, the date on which the temporary keys expire.
host_keysarrayDescribes the public SSH host keys or the RDP certificate.
instance_namestringThe name of this Amazon Lightsail instance. (pattern: <code>\w[\w-]*\w</code>)
ip_addressstringThe public IP address of the Amazon Lightsail instance. (pattern: <code>([0-9]{1,3}.){3}[0-9]{1,3}</code>)
ipv_6_addressesarrayThe IPv6 address of the Amazon Lightsail instance.
passwordstringFor RDP access, the password for your Amazon Lightsail instance. Password will be an empty string if the password for your new instance is not ready yet. When you create an instance, it can take up to 15 minutes for the instance to be ready. If you create an instance using any key pair other than the default (LightsailDefaultKeyPair), password will always be an empty string. If you change the Administrator password on the instance, Lightsail will continue to return the original password value. When accessing the instance using RDP, you need to manually enter the Administrator password after changing it from the default.
password_dataobjectFor a Windows Server-based instance, an object with the data you can use to retrieve your password. This is only needed if password is empty and the instance is not new (and therefore the password is not ready yet). When you create an instance, it can take up to 15 minutes for the instance to be ready.
private_keystringFor SSH access, the temporary private key. For OpenSSH clients (command line SSH), you should save this value to tempkey).
protocolstringThe protocol for these Amazon Lightsail instance access details. (ssh, rdp)
usernamestringThe user name to use when logging in to the Amazon Lightsail instance.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_instance_access_detailsselectregionReturns 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 Amazon Lightsail Developer Guide.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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 Amazon Lightsail Developer Guide.

SELECT
cert_key,
expires_at,
host_keys,
instance_name,
ip_address,
ipv_6_addresses,
password,
password_data,
private_key,
protocol,
username
FROM aws.lightsail.instance_access_details
WHERE region = '{{ region }}' -- required
;