instance_access_details
Creates, updates, deletes, gets or lists an instance_access_details resource.
Overview
| Name | instance_access_details |
| Type | Resource |
| Id | aws.lightsail.instance_access_details |
Fields
The following fields are returned by SELECT queries:
- get_instance_access_details
| Name | Datatype | Description |
|---|---|---|
cert_key | string | For 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_at | string (date-time) | For SSH access, the date on which the temporary keys expire. |
host_keys | array | Describes the public SSH host keys or the RDP certificate. |
instance_name | string | The name of this Amazon Lightsail instance. (pattern: <code>\w[\w-]*\w</code>) |
ip_address | string | The public IP address of the Amazon Lightsail instance. (pattern: <code>([0-9]{1,3}.){3}[0-9]{1,3}</code>) |
ipv_6_addresses | array | The IPv6 address of the Amazon Lightsail instance. |
password | string | For 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_data | object | For 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_key | string | For SSH access, the temporary private key. For OpenSSH clients (command line SSH), you should save this value to tempkey). |
protocol | string | The protocol for these Amazon Lightsail instance access details. (ssh, rdp) |
username | string | The user name to use when logging in to the Amazon Lightsail instance. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_instance_access_details | select | region | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_instance_access_details
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
;