Table of Contents
A low-level client representing Amazon Lightsail:
client = session.create_client('lightsail')
These are the available methods:
Allocates a static IP address.
See also: AWS API Documentation
Request Syntax
response = client.allocate_static_ip(
staticIpName='string'
)
[REQUIRED]
The name of the static IP address.
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
An array of key-value pairs containing information about the static IP address you allocated.
Describes the API operation.
The ID of the operation.
The resource name.
The resource type.
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
The region and Availability Zone.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
A Boolean value indicating whether the operation is terminal.
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
The type of operation.
The status of the operation.
The timestamp when the status was changed (e.g., 1479816991.349 ).
The error code.
The error details.
Attaches a block storage disk to a running or stopped Lightsail instance and exposes it to the instance with the specified disk name.
See also: AWS API Documentation
Request Syntax
response = client.attach_disk(
diskName='string',
instanceName='string',
diskPath='string'
)
[REQUIRED]
The unique Lightsail disk name (e.g., my-disk ).
[REQUIRED]
The name of the Lightsail instance where you want to utilize the storage disk.
[REQUIRED]
The disk path to expose to the instance (e.g., /dev/xvdf ).
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An object describing the API operations.
(dict) --
Describes the API operation.
id (string) --
The ID of the operation.
resourceName (string) --
The resource name.
resourceType (string) --
The resource type.
createdAt (datetime) --
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
location (dict) --
The region and Availability Zone.
availabilityZone (string) --
The Availability Zone. Follows the format us-east-2a (case-sensitive).
regionName (string) --
The AWS Region name.
isTerminal (boolean) --
A Boolean value indicating whether the operation is terminal.
operationDetails (string) --
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
operationType (string) --
The type of operation.
status (string) --
The status of the operation.
statusChangedAt (datetime) --
The timestamp when the status was changed (e.g., 1479816991.349 ).
errorCode (string) --
The error code.
errorDetails (string) --
The error details.
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.
See also: AWS API Documentation
Request Syntax
response = client.attach_instances_to_load_balancer(
loadBalancerName='string',
instanceNames=[
'string',
]
)
[REQUIRED]
The name of the load balancer.
[REQUIRED]
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).
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An object representing the API operations.
(dict) --
Describes the API operation.
id (string) --
The ID of the operation.
resourceName (string) --
The resource name.
resourceType (string) --
The resource type.
createdAt (datetime) --
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
location (dict) --
The region and Availability Zone.
availabilityZone (string) --
The Availability Zone. Follows the format us-east-2a (case-sensitive).
regionName (string) --
The AWS Region name.
isTerminal (boolean) --
A Boolean value indicating whether the operation is terminal.
operationDetails (string) --
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
operationType (string) --
The type of operation.
status (string) --
The status of the operation.
statusChangedAt (datetime) --
The timestamp when the status was changed (e.g., 1479816991.349 ).
errorCode (string) --
The error code.
errorDetails (string) --
The error details.
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 operation with the non-attached certificate, and it will replace the existing one and become the attached certificate.
See also: AWS API Documentation
Request Syntax
response = client.attach_load_balancer_tls_certificate(
loadBalancerName='string',
certificateName='string'
)
[REQUIRED]
The name of the load balancer to which you want to associate the SSL/TLS certificate.
[REQUIRED]
The name of your SSL/TLS certificate.
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An object representing the API operations.
These SSL/TLS certificates are only usable by Lightsail load balancers. You can't get the certificate and use it for another purpose.
(dict) --
Describes the API operation.
id (string) --
The ID of the operation.
resourceName (string) --
The resource name.
resourceType (string) --
The resource type.
createdAt (datetime) --
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
location (dict) --
The region and Availability Zone.
availabilityZone (string) --
The Availability Zone. Follows the format us-east-2a (case-sensitive).
regionName (string) --
The AWS Region name.
isTerminal (boolean) --
A Boolean value indicating whether the operation is terminal.
operationDetails (string) --
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
operationType (string) --
The type of operation.
status (string) --
The status of the operation.
statusChangedAt (datetime) --
The timestamp when the status was changed (e.g., 1479816991.349 ).
errorCode (string) --
The error code.
errorDetails (string) --
The error details.
Attaches a static IP address to a specific Amazon Lightsail instance.
See also: AWS API Documentation
Request Syntax
response = client.attach_static_ip(
staticIpName='string',
instanceName='string'
)
[REQUIRED]
The name of the static IP.
[REQUIRED]
The instance name to which you want to attach the static IP address.
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of key-value pairs containing information about your API operations.
(dict) --
Describes the API operation.
id (string) --
The ID of the operation.
resourceName (string) --
The resource name.
resourceType (string) --
The resource type.
createdAt (datetime) --
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
location (dict) --
The region and Availability Zone.
availabilityZone (string) --
The Availability Zone. Follows the format us-east-2a (case-sensitive).
regionName (string) --
The AWS Region name.
isTerminal (boolean) --
A Boolean value indicating whether the operation is terminal.
operationDetails (string) --
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
operationType (string) --
The type of operation.
status (string) --
The status of the operation.
statusChangedAt (datetime) --
The timestamp when the status was changed (e.g., 1479816991.349 ).
errorCode (string) --
The error code.
errorDetails (string) --
The error details.
Check if an operation can be paginated.
Closes the public ports on a specific Amazon Lightsail instance.
See also: AWS API Documentation
Request Syntax
response = client.close_instance_public_ports(
portInfo={
'fromPort': 123,
'toPort': 123,
'protocol': 'tcp'|'all'|'udp'
},
instanceName='string'
)
[REQUIRED]
Information about the public port you are trying to close.
The first port in the range.
The last port in the range.
The protocol.
[REQUIRED]
The name of the instance on which you're attempting to close the public ports.
dict
Response Syntax
{
'operation': {
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
(dict) --
operation (dict) --
An array of key-value pairs that contains information about the operation.
id (string) --
The ID of the operation.
resourceName (string) --
The resource name.
resourceType (string) --
The resource type.
createdAt (datetime) --
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
location (dict) --
The region and Availability Zone.
availabilityZone (string) --
The Availability Zone. Follows the format us-east-2a (case-sensitive).
regionName (string) --
The AWS Region name.
isTerminal (boolean) --
A Boolean value indicating whether the operation is terminal.
operationDetails (string) --
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
operationType (string) --
The type of operation.
status (string) --
The status of the operation.
statusChangedAt (datetime) --
The timestamp when the status was changed (e.g., 1479816991.349 ).
errorCode (string) --
The error code.
errorDetails (string) --
The error details.
Creates a block storage disk that can be attached to a Lightsail instance in the same Availability Zone (e.g., us-east-2a ). The disk is created in the regional endpoint that you send the HTTP request to. For more information, see Regions and Availability Zones in Lightsail .
See also: AWS API Documentation
Request Syntax
response = client.create_disk(
diskName='string',
availabilityZone='string',
sizeInGb=123
)
[REQUIRED]
The unique Lightsail disk name (e.g., my-disk ).
[REQUIRED]
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.
[REQUIRED]
The size of the disk in GB (e.g., 32 ).
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An object describing the API operations.
(dict) --
Describes the API operation.
id (string) --
The ID of the operation.
resourceName (string) --
The resource name.
resourceType (string) --
The resource type.
createdAt (datetime) --
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
location (dict) --
The region and Availability Zone.
availabilityZone (string) --
The Availability Zone. Follows the format us-east-2a (case-sensitive).
regionName (string) --
The AWS Region name.
isTerminal (boolean) --
A Boolean value indicating whether the operation is terminal.
operationDetails (string) --
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
operationType (string) --
The type of operation.
status (string) --
The status of the operation.
statusChangedAt (datetime) --
The timestamp when the status was changed (e.g., 1479816991.349 ).
errorCode (string) --
The error code.
errorDetails (string) --
The error details.
Creates a block storage disk from a disk snapshot that can be attached to a Lightsail instance in the same Availability Zone (e.g., us-east-2a ). The disk is created in the regional endpoint that you send the HTTP request to. For more information, see Regions and Availability Zones in Lightsail .
See also: AWS API Documentation
Request Syntax
response = client.create_disk_from_snapshot(
diskName='string',
diskSnapshotName='string',
availabilityZone='string',
sizeInGb=123
)
[REQUIRED]
The unique Lightsail disk name (e.g., my-disk ).
[REQUIRED]
The name of the disk snapshot (e.g., my-snapshot ) from which to create the new storage disk.
[REQUIRED]
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.
[REQUIRED]
The size of the disk in GB (e.g., 32 ).
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An object describing the API operations.
(dict) --
Describes the API operation.
id (string) --
The ID of the operation.
resourceName (string) --
The resource name.
resourceType (string) --
The resource type.
createdAt (datetime) --
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
location (dict) --
The region and Availability Zone.
availabilityZone (string) --
The Availability Zone. Follows the format us-east-2a (case-sensitive).
regionName (string) --
The AWS Region name.
isTerminal (boolean) --
A Boolean value indicating whether the operation is terminal.
operationDetails (string) --
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
operationType (string) --
The type of operation.
status (string) --
The status of the operation.
statusChangedAt (datetime) --
The timestamp when the status was changed (e.g., 1479816991.349 ).
errorCode (string) --
The error code.
errorDetails (string) --
The error details.
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.
See also: AWS API Documentation
Request Syntax
response = client.create_disk_snapshot(
diskName='string',
diskSnapshotName='string'
)
[REQUIRED]
The unique name of the source disk (e.g., my-source-disk ).
[REQUIRED]
The name of the destination disk snapshot (e.g., my-disk-snapshot ) based on the source disk.
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An object describing the API operations.
(dict) --
Describes the API operation.
id (string) --
The ID of the operation.
resourceName (string) --
The resource name.
resourceType (string) --
The resource type.
createdAt (datetime) --
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
location (dict) --
The region and Availability Zone.
availabilityZone (string) --
The Availability Zone. Follows the format us-east-2a (case-sensitive).
regionName (string) --
The AWS Region name.
isTerminal (boolean) --
A Boolean value indicating whether the operation is terminal.
operationDetails (string) --
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
operationType (string) --
The type of operation.
status (string) --
The status of the operation.
statusChangedAt (datetime) --
The timestamp when the status was changed (e.g., 1479816991.349 ).
errorCode (string) --
The error code.
errorDetails (string) --
The error details.
Creates a domain resource for the specified domain (e.g., example.com).
See also: AWS API Documentation
Request Syntax
response = client.create_domain(
domainName='string'
)
[REQUIRED]
The domain name to manage (e.g., example.com ).
Note
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.
{
'operation': {
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
An array of key-value pairs containing information about the domain resource you created.
The ID of the operation.
The resource name.
The resource type.
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
The region and Availability Zone.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
A Boolean value indicating whether the operation is terminal.
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
The type of operation.
The status of the operation.
The timestamp when the status was changed (e.g., 1479816991.349 ).
The error code.
The error details.
Creates one of the following entry records associated with the domain: A record, CNAME record, TXT record, or MX record.
See also: AWS API Documentation
Request Syntax
response = client.create_domain_entry(
domainName='string',
domainEntry={
'id': 'string',
'name': 'string',
'target': 'string',
'isAlias': True|False,
'type': 'string',
'options': {
'string': 'string'
}
}
)
[REQUIRED]
The domain name (e.g., example.com ) for which you want to create the domain entry.
[REQUIRED]
An array of key-value pairs containing information about the domain entry request.
The ID of the domain recordset entry.
The name of the domain.
The target AWS name server (e.g., ns-111.awsdns-22.com. ).
For Lightsail load balancers, the value looks like ab1234c56789c6b86aba6fb203d443bc-123456789.us-east-2.elb.amazonaws.com . Be sure to also set isAlias to true when setting up an A record for a load balancer.
When true , specifies whether the domain entry is an alias used by the Lightsail load balancer. You can include an alias (A type) record in your request, which points to a load balancer DNS name and routes traffic to your load balancer
The type of domain entry (e.g., SOA or NS ).
(Deprecated) The options for the domain entry.
Note
In releases prior to November 29, 2017, this parameter was not included in the API response. It is now deprecated.
dict
Response Syntax
{
'operation': {
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
(dict) --
operation (dict) --
An array of key-value pairs containing information about the operation.
id (string) --
The ID of the operation.
resourceName (string) --
The resource name.
resourceType (string) --
The resource type.
createdAt (datetime) --
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
location (dict) --
The region and Availability Zone.
availabilityZone (string) --
The Availability Zone. Follows the format us-east-2a (case-sensitive).
regionName (string) --
The AWS Region name.
isTerminal (boolean) --
A Boolean value indicating whether the operation is terminal.
operationDetails (string) --
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
operationType (string) --
The type of operation.
status (string) --
The status of the operation.
statusChangedAt (datetime) --
The timestamp when the status was changed (e.g., 1479816991.349 ).
errorCode (string) --
The error code.
errorDetails (string) --
The error details.
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.
See also: AWS API Documentation
Request Syntax
response = client.create_instance_snapshot(
instanceSnapshotName='string',
instanceName='string'
)
[REQUIRED]
The name for your new snapshot.
[REQUIRED]
The Lightsail instance on which to base your snapshot.
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of key-value pairs containing information about the results of your create instances snapshot request.
(dict) --
Describes the API operation.
id (string) --
The ID of the operation.
resourceName (string) --
The resource name.
resourceType (string) --
The resource type.
createdAt (datetime) --
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
location (dict) --
The region and Availability Zone.
availabilityZone (string) --
The Availability Zone. Follows the format us-east-2a (case-sensitive).
regionName (string) --
The AWS Region name.
isTerminal (boolean) --
A Boolean value indicating whether the operation is terminal.
operationDetails (string) --
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
operationType (string) --
The type of operation.
status (string) --
The status of the operation.
statusChangedAt (datetime) --
The timestamp when the status was changed (e.g., 1479816991.349 ).
errorCode (string) --
The error code.
errorDetails (string) --
The error details.
Creates one or more Amazon Lightsail virtual private servers, or instances .
See also: AWS API Documentation
Request Syntax
response = client.create_instances(
instanceNames=[
'string',
],
availabilityZone='string',
customImageName='string',
blueprintId='string',
bundleId='string',
userData='string',
keyPairName='string'
)
[REQUIRED]
The names to use for your new Lightsail instances. Separate multiple values using quotation marks and commas, for example: ["MyFirstInstance","MySecondInstance"]
[REQUIRED]
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.
(Deprecated) The name for your custom image.
Note
In releases prior to June 12, 2017, this parameter was ignored by the API. It is now deprecated.
[REQUIRED]
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 ).
[REQUIRED]
The bundle of specification information for your virtual private server (or instance ), including the pricing plan (e.g., micro_1_0 ).
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 .
Note
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 .
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of key-value pairs containing information about the results of your create instances request.
(dict) --
Describes the API operation.
id (string) --
The ID of the operation.
resourceName (string) --
The resource name.
resourceType (string) --
The resource type.
createdAt (datetime) --
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
location (dict) --
The region and Availability Zone.
availabilityZone (string) --
The Availability Zone. Follows the format us-east-2a (case-sensitive).
regionName (string) --
The AWS Region name.
isTerminal (boolean) --
A Boolean value indicating whether the operation is terminal.
operationDetails (string) --
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
operationType (string) --
The type of operation.
status (string) --
The status of the operation.
statusChangedAt (datetime) --
The timestamp when the status was changed (e.g., 1479816991.349 ).
errorCode (string) --
The error code.
errorDetails (string) --
The error details.
Uses a specific snapshot as a blueprint for creating one or more new instances that are based on that identical configuration.
See also: AWS API Documentation
Request Syntax
response = client.create_instances_from_snapshot(
instanceNames=[
'string',
],
attachedDiskMapping={
'string': [
{
'originalDiskPath': 'string',
'newDiskName': 'string'
},
]
},
availabilityZone='string',
instanceSnapshotName='string',
bundleId='string',
userData='string',
keyPairName='string'
)
[REQUIRED]
The names for your new instances.
An object containing information about one or more disk mappings.
Describes a block storage disk mapping.
The original disk path exposed to the instance (for example, /dev/sdh ).
The new disk name (e.g., my-new-disk ).
[REQUIRED]
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.
[REQUIRED]
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.
[REQUIRED]
The bundle of specification information for your virtual private server (or instance ), including the pricing plan (e.g., micro_1_0 ).
You can create a launch script that configures a server with additional user data. For example, apt-get -y update .
Note
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 .
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of key-value pairs containing information about the results of your create instances from snapshot request.
(dict) --
Describes the API operation.
id (string) --
The ID of the operation.
resourceName (string) --
The resource name.
resourceType (string) --
The resource type.
createdAt (datetime) --
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
location (dict) --
The region and Availability Zone.
availabilityZone (string) --
The Availability Zone. Follows the format us-east-2a (case-sensitive).
regionName (string) --
The AWS Region name.
isTerminal (boolean) --
A Boolean value indicating whether the operation is terminal.
operationDetails (string) --
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
operationType (string) --
The type of operation.
status (string) --
The status of the operation.
statusChangedAt (datetime) --
The timestamp when the status was changed (e.g., 1479816991.349 ).
errorCode (string) --
The error code.
errorDetails (string) --
The error details.
Creates sn SSH key pair.
See also: AWS API Documentation
Request Syntax
response = client.create_key_pair(
keyPairName='string'
)
[REQUIRED]
The name for your new key pair.
{
'keyPair': {
'name': 'string',
'arn': 'string',
'supportCode': 'string',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'fingerprint': 'string'
},
'publicKeyBase64': 'string',
'privateKeyBase64': 'string',
'operation': {
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
An array of key-value pairs containing information about the new key pair you just created.
The friendly name of the SSH key pair.
The Amazon Resource Name (ARN) of the key pair (e.g., arn:aws:lightsail:us-east-2:123456789101:KeyPair/05859e3d-331d-48ba-9034-12345EXAMPLE ).
The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.
The timestamp when the key pair was created (e.g., 1479816991.349 ).
The region name and Availability Zone where the key pair was created.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The resource type (usually KeyPair ).
The RSA fingerprint of the key pair.
A base64-encoded public key of the ssh-rsa type.
A base64-encoded RSA private key.
An array of key-value pairs containing information about the results of your create key pair request.
The ID of the operation.
The resource name.
The resource type.
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
The region and Availability Zone.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
A Boolean value indicating whether the operation is terminal.
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
The type of operation.
The status of the operation.
The timestamp when the status was changed (e.g., 1479816991.349 ).
The error code.
The error details.
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.
See also: AWS API Documentation
Request Syntax
response = client.create_load_balancer(
loadBalancerName='string',
instancePort=123,
healthCheckPath='string',
certificateName='string',
certificateDomainName='string',
certificateAlternativeNames=[
'string',
]
)
[REQUIRED]
The name of your load balancer.
[REQUIRED]
The instance port where you're creating your load balancer.
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.
The name of the SSL/TLS certificate.
If you specify certificateName , then certificateDomainName is required (and vice-versa).
The domain name with which your certificate is associated (e.g., example.com ).
If you specify certificateDomainName , then certificateName is required (and vice-versa).
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 ).
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An object containing information about the API operations.
(dict) --
Describes the API operation.
id (string) --
The ID of the operation.
resourceName (string) --
The resource name.
resourceType (string) --
The resource type.
createdAt (datetime) --
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
location (dict) --
The region and Availability Zone.
availabilityZone (string) --
The Availability Zone. Follows the format us-east-2a (case-sensitive).
regionName (string) --
The AWS Region name.
isTerminal (boolean) --
A Boolean value indicating whether the operation is terminal.
operationDetails (string) --
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
operationType (string) --
The type of operation.
status (string) --
The status of the operation.
statusChangedAt (datetime) --
The timestamp when the status was changed (e.g., 1479816991.349 ).
errorCode (string) --
The error code.
errorDetails (string) --
The error details.
Creates a Lightsail load balancer TLS certificate.
TLS is just an updated, more secure version of Secure Socket Layer (SSL).
See also: AWS API Documentation
Request Syntax
response = client.create_load_balancer_tls_certificate(
loadBalancerName='string',
certificateName='string',
certificateDomainName='string',
certificateAlternativeNames=[
'string',
]
)
[REQUIRED]
The load balancer name where you want to create the SSL/TLS certificate.
[REQUIRED]
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 .
[REQUIRED]
The domain name (e.g., example.com ) for your SSL/TLS certificate.
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 ).
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An object containing information about the API operations.
(dict) --
Describes the API operation.
id (string) --
The ID of the operation.
resourceName (string) --
The resource name.
resourceType (string) --
The resource type.
createdAt (datetime) --
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
location (dict) --
The region and Availability Zone.
availabilityZone (string) --
The Availability Zone. Follows the format us-east-2a (case-sensitive).
regionName (string) --
The AWS Region name.
isTerminal (boolean) --
A Boolean value indicating whether the operation is terminal.
operationDetails (string) --
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
operationType (string) --
The type of operation.
status (string) --
The status of the operation.
statusChangedAt (datetime) --
The timestamp when the status was changed (e.g., 1479816991.349 ).
errorCode (string) --
The error code.
errorDetails (string) --
The error details.
Deletes the specified block storage disk. The disk must be in the available state (not attached to a Lightsail instance).
Note
The disk may remain in the deleting state for several minutes.
See also: AWS API Documentation
Request Syntax
response = client.delete_disk(
diskName='string'
)
[REQUIRED]
The unique name of the disk you want to delete (e.g., my-disk ).
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
An object describing the API operations.
Describes the API operation.
The ID of the operation.
The resource name.
The resource type.
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
The region and Availability Zone.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
A Boolean value indicating whether the operation is terminal.
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
The type of operation.
The status of the operation.
The timestamp when the status was changed (e.g., 1479816991.349 ).
The error code.
The error details.
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.
See also: AWS API Documentation
Request Syntax
response = client.delete_disk_snapshot(
diskSnapshotName='string'
)
[REQUIRED]
The name of the disk snapshot you want to delete (e.g., my-disk-snapshot ).
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
An object describing the API operations.
Describes the API operation.
The ID of the operation.
The resource name.
The resource type.
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
The region and Availability Zone.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
A Boolean value indicating whether the operation is terminal.
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
The type of operation.
The status of the operation.
The timestamp when the status was changed (e.g., 1479816991.349 ).
The error code.
The error details.
Deletes the specified domain recordset and all of its domain records.
See also: AWS API Documentation
Request Syntax
response = client.delete_domain(
domainName='string'
)
[REQUIRED]
The specific domain name to delete.
{
'operation': {
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
An array of key-value pairs containing information about the results of your delete domain request.
The ID of the operation.
The resource name.
The resource type.
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
The region and Availability Zone.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
A Boolean value indicating whether the operation is terminal.
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
The type of operation.
The status of the operation.
The timestamp when the status was changed (e.g., 1479816991.349 ).
The error code.
The error details.
Deletes a specific domain entry.
See also: AWS API Documentation
Request Syntax
response = client.delete_domain_entry(
domainName='string',
domainEntry={
'id': 'string',
'name': 'string',
'target': 'string',
'isAlias': True|False,
'type': 'string',
'options': {
'string': 'string'
}
}
)
[REQUIRED]
The name of the domain entry to delete.
[REQUIRED]
An array of key-value pairs containing information about your domain entries.
The ID of the domain recordset entry.
The name of the domain.
The target AWS name server (e.g., ns-111.awsdns-22.com. ).
For Lightsail load balancers, the value looks like ab1234c56789c6b86aba6fb203d443bc-123456789.us-east-2.elb.amazonaws.com . Be sure to also set isAlias to true when setting up an A record for a load balancer.
When true , specifies whether the domain entry is an alias used by the Lightsail load balancer. You can include an alias (A type) record in your request, which points to a load balancer DNS name and routes traffic to your load balancer
The type of domain entry (e.g., SOA or NS ).
(Deprecated) The options for the domain entry.
Note
In releases prior to November 29, 2017, this parameter was not included in the API response. It is now deprecated.
dict
Response Syntax
{
'operation': {
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
(dict) --
operation (dict) --
An array of key-value pairs containing information about the results of your delete domain entry request.
id (string) --
The ID of the operation.
resourceName (string) --
The resource name.
resourceType (string) --
The resource type.
createdAt (datetime) --
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
location (dict) --
The region and Availability Zone.
availabilityZone (string) --
The Availability Zone. Follows the format us-east-2a (case-sensitive).
regionName (string) --
The AWS Region name.
isTerminal (boolean) --
A Boolean value indicating whether the operation is terminal.
operationDetails (string) --
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
operationType (string) --
The type of operation.
status (string) --
The status of the operation.
statusChangedAt (datetime) --
The timestamp when the status was changed (e.g., 1479816991.349 ).
errorCode (string) --
The error code.
errorDetails (string) --
The error details.
Deletes a specific Amazon Lightsail virtual private server, or instance .
See also: AWS API Documentation
Request Syntax
response = client.delete_instance(
instanceName='string'
)
[REQUIRED]
The name of the instance to delete.
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
An array of key-value pairs containing information about the results of your delete instance request.
Describes the API operation.
The ID of the operation.
The resource name.
The resource type.
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
The region and Availability Zone.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
A Boolean value indicating whether the operation is terminal.
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
The type of operation.
The status of the operation.
The timestamp when the status was changed (e.g., 1479816991.349 ).
The error code.
The error details.
Deletes a specific snapshot of a virtual private server (or instance ).
See also: AWS API Documentation
Request Syntax
response = client.delete_instance_snapshot(
instanceSnapshotName='string'
)
[REQUIRED]
The name of the snapshot to delete.
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
An array of key-value pairs containing information about the results of your delete instance snapshot request.
Describes the API operation.
The ID of the operation.
The resource name.
The resource type.
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
The region and Availability Zone.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
A Boolean value indicating whether the operation is terminal.
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
The type of operation.
The status of the operation.
The timestamp when the status was changed (e.g., 1479816991.349 ).
The error code.
The error details.
Deletes a specific SSH key pair.
See also: AWS API Documentation
Request Syntax
response = client.delete_key_pair(
keyPairName='string'
)
[REQUIRED]
The name of the key pair to delete.
{
'operation': {
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
An array of key-value pairs containing information about the results of your delete key pair request.
The ID of the operation.
The resource name.
The resource type.
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
The region and Availability Zone.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
A Boolean value indicating whether the operation is terminal.
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
The type of operation.
The status of the operation.
The timestamp when the status was changed (e.g., 1479816991.349 ).
The error code.
The error details.
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.
See also: AWS API Documentation
Request Syntax
response = client.delete_load_balancer(
loadBalancerName='string'
)
[REQUIRED]
The name of the load balancer you want to delete.
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
An object describing the API operations.
Describes the API operation.
The ID of the operation.
The resource name.
The resource type.
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
The region and Availability Zone.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
A Boolean value indicating whether the operation is terminal.
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
The type of operation.
The status of the operation.
The timestamp when the status was changed (e.g., 1479816991.349 ).
The error code.
The error details.
Deletes an SSL/TLS certificate associated with a Lightsail load balancer.
See also: AWS API Documentation
Request Syntax
response = client.delete_load_balancer_tls_certificate(
loadBalancerName='string',
certificateName='string',
force=True|False
)
[REQUIRED]
The load balancer name.
[REQUIRED]
The SSL/TLS certificate name.
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.
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An object describing the API operations.
(dict) --
Describes the API operation.
id (string) --
The ID of the operation.
resourceName (string) --
The resource name.
resourceType (string) --
The resource type.
createdAt (datetime) --
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
location (dict) --
The region and Availability Zone.
availabilityZone (string) --
The Availability Zone. Follows the format us-east-2a (case-sensitive).
regionName (string) --
The AWS Region name.
isTerminal (boolean) --
A Boolean value indicating whether the operation is terminal.
operationDetails (string) --
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
operationType (string) --
The type of operation.
status (string) --
The status of the operation.
statusChangedAt (datetime) --
The timestamp when the status was changed (e.g., 1479816991.349 ).
errorCode (string) --
The error code.
errorDetails (string) --
The error details.
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.
See also: AWS API Documentation
Request Syntax
response = client.detach_disk(
diskName='string'
)
[REQUIRED]
The unique name of the disk you want to detach from your instance (e.g., my-disk ).
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
An object describing the API operations.
Describes the API operation.
The ID of the operation.
The resource name.
The resource type.
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
The region and Availability Zone.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
A Boolean value indicating whether the operation is terminal.
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
The type of operation.
The status of the operation.
The timestamp when the status was changed (e.g., 1479816991.349 ).
The error code.
The error details.
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.
See also: AWS API Documentation
Request Syntax
response = client.detach_instances_from_load_balancer(
loadBalancerName='string',
instanceNames=[
'string',
]
)
[REQUIRED]
The name of the Lightsail load balancer.
[REQUIRED]
An array of strings containing the names of the instances you want to detach from the load balancer.
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An object describing the API operations.
(dict) --
Describes the API operation.
id (string) --
The ID of the operation.
resourceName (string) --
The resource name.
resourceType (string) --
The resource type.
createdAt (datetime) --
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
location (dict) --
The region and Availability Zone.
availabilityZone (string) --
The Availability Zone. Follows the format us-east-2a (case-sensitive).
regionName (string) --
The AWS Region name.
isTerminal (boolean) --
A Boolean value indicating whether the operation is terminal.
operationDetails (string) --
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
operationType (string) --
The type of operation.
status (string) --
The status of the operation.
statusChangedAt (datetime) --
The timestamp when the status was changed (e.g., 1479816991.349 ).
errorCode (string) --
The error code.
errorDetails (string) --
The error details.
Detaches a static IP from the Amazon Lightsail instance to which it is attached.
See also: AWS API Documentation
Request Syntax
response = client.detach_static_ip(
staticIpName='string'
)
[REQUIRED]
The name of the static IP to detach from the instance.
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
An array of key-value pairs containing information about the results of your detach static IP request.
Describes the API operation.
The ID of the operation.
The resource name.
The resource type.
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
The region and Availability Zone.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
A Boolean value indicating whether the operation is terminal.
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
The type of operation.
The status of the operation.
The timestamp when the status was changed (e.g., 1479816991.349 ).
The error code.
The error details.
Downloads the default SSH key pair from the user's account.
See also: AWS API Documentation
Request Syntax
response = client.download_default_key_pair()
{
'publicKeyBase64': 'string',
'privateKeyBase64': 'string'
}
Response Structure
A base64-encoded public key of the ssh-rsa type.
A base64-encoded RSA private key.
Generate a presigned url given a client, its method, and arguments
The presigned url
Returns the names of all active (not deleted) resources.
See also: AWS API Documentation
Request Syntax
response = client.get_active_names(
pageToken='string'
)
{
'activeNames': [
'string',
],
'nextPageToken': 'string'
}
Response Structure
The list of active names returned by the get active names request.
A token used for advancing to the next page of results from your get active names request.
Returns the list of available instance images, or blueprints . You can use a blueprint to create a new virtual private server already running a specific operating system, as well as a preinstalled app or development stack. The software each instance is running depends on the blueprint image you choose.
See also: AWS API Documentation
Request Syntax
response = client.get_blueprints(
includeInactive=True|False,
pageToken='string'
)
dict
Response Syntax
{
'blueprints': [
{
'blueprintId': 'string',
'name': 'string',
'group': 'string',
'type': 'os'|'app',
'description': 'string',
'isActive': True|False,
'minPower': 123,
'version': 'string',
'versionCode': 'string',
'productUrl': 'string',
'licenseUrl': 'string',
'platform': 'LINUX_UNIX'|'WINDOWS'
},
],
'nextPageToken': 'string'
}
Response Structure
(dict) --
blueprints (list) --
An array of key-value pairs that contains information about the available blueprints.
(dict) --
Describes a blueprint (a virtual private server image).
blueprintId (string) --
The ID for the virtual private server image (e.g., app_wordpress_4_4 or app_lamp_7_0 ).
name (string) --
The friendly name of the blueprint (e.g., Amazon Linux ).
group (string) --
The group name of the blueprint (e.g., amazon-linux ).
type (string) --
The type of the blueprint (e.g., os or app ).
description (string) --
The description of the blueprint.
isActive (boolean) --
A Boolean value indicating whether the blueprint is active. When you update your blueprints, you will inactivate old blueprints and keep the most recent versions active.
minPower (integer) --
The minimum bundle power required to run this blueprint. For example, you need a bundle with a power value of 500 or more to create an instance that uses a blueprint with a minimum power value of 500. 0 indicates that the blueprint runs on all instance sizes.
version (string) --
The version number of the operating system, application, or stack (e.g., 2016.03.0 ).
versionCode (string) --
The version code.
productUrl (string) --
The product URL to learn more about the image or blueprint.
licenseUrl (string) --
The end-user license agreement URL for the image or blueprint.
platform (string) --
The operating system platform (either Linux/Unix-based or Windows Server-based) of the blueprint.
nextPageToken (string) --
A token used for advancing to the next page of results from your get blueprints request.
Returns the list of bundles that are available for purchase. A bundle describes the specs for your virtual private server (or instance ).
See also: AWS API Documentation
Request Syntax
response = client.get_bundles(
includeInactive=True|False,
pageToken='string'
)
dict
Response Syntax
{
'bundles': [
{
'price': ...,
'cpuCount': 123,
'diskSizeInGb': 123,
'bundleId': 'string',
'instanceType': 'string',
'isActive': True|False,
'name': 'string',
'power': 123,
'ramSizeInGb': ...,
'transferPerMonthInGb': 123,
'supportedPlatforms': [
'LINUX_UNIX'|'WINDOWS',
]
},
],
'nextPageToken': 'string'
}
Response Structure
(dict) --
bundles (list) --
An array of key-value pairs that contains information about the available bundles.
(dict) --
Describes a bundle, which is a set of specs describing your virtual private server (or instance ).
price (float) --
The price in US dollars (e.g., 5.0 ).
cpuCount (integer) --
The number of vCPUs included in the bundle (e.g., 2 ).
diskSizeInGb (integer) --
The size of the SSD (e.g., 30 ).
bundleId (string) --
The bundle ID (e.g., micro_1_0 ).
instanceType (string) --
The Amazon EC2 instance type (e.g., t2.micro ).
isActive (boolean) --
A Boolean value indicating whether the bundle is active.
name (string) --
A friendly name for the bundle (e.g., Micro ).
power (integer) --
A numeric value that represents the power of the bundle (e.g., 500 ). You can use the bundle's power value in conjunction with a blueprint's minimum power value to determine whether the blueprint will run on the bundle. For example, you need a bundle with a power value of 500 or more to create an instance that uses a blueprint with a minimum power value of 500.
ramSizeInGb (float) --
The amount of RAM in GB (e.g., 2.0 ).
transferPerMonthInGb (integer) --
The data transfer rate per month in GB (e.g., 2000 ).
supportedPlatforms (list) --
The operating system platform (Linux/Unix-based or Windows Server-based) that the bundle supports. You can only launch a WINDOWS bundle on a blueprint that supports the WINDOWS platform. LINUX_UNIX blueprints require a LINUX_UNIX bundle.
nextPageToken (string) --
A token used for advancing to the next page of results from your get active names request.
Returns information about a specific block storage disk.
See also: AWS API Documentation
Request Syntax
response = client.get_disk(
diskName='string'
)
[REQUIRED]
The name of the disk (e.g., my-disk ).
{
'disk': {
'name': 'string',
'arn': 'string',
'supportCode': 'string',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'sizeInGb': 123,
'isSystemDisk': True|False,
'iops': 123,
'path': 'string',
'state': 'pending'|'error'|'available'|'in-use'|'unknown',
'attachedTo': 'string',
'isAttached': True|False,
'attachmentState': 'string',
'gbInUse': 123
}
}
Response Structure
An object containing information about the disk.
The unique name of the disk.
The Amazon Resource Name (ARN) of the disk.
The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.
The date when the disk was created.
The AWS Region and Availability Zone where the disk is located.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The Lightsail resource type (e.g., Disk ).
The size of the disk in GB.
A Boolean value indicating whether this disk is a system disk (has an operating system loaded on it).
The input/output operations per second (IOPS) of the disk.
The disk path.
Describes the status of the disk.
The resources to which the disk is attached.
A Boolean value indicating whether the disk is attached.
(Deprecated) The attachment state of the disk.
Note
In releases prior to November 14, 2017, this parameter returned attached for system disks in the API response. It is now deprecated, but still included in the response. Use isAttached instead.
(Deprecated) The number of GB in use by the disk.
Note
In releases prior to November 14, 2017, this parameter was not included in the API response. It is now deprecated.
Returns information about a specific block storage disk snapshot.
See also: AWS API Documentation
Request Syntax
response = client.get_disk_snapshot(
diskSnapshotName='string'
)
[REQUIRED]
The name of the disk snapshot (e.g., my-disk-snapshot ).
{
'diskSnapshot': {
'name': 'string',
'arn': 'string',
'supportCode': 'string',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'sizeInGb': 123,
'state': 'pending'|'completed'|'error'|'unknown',
'progress': 'string',
'fromDiskName': 'string',
'fromDiskArn': 'string'
}
}
Response Structure
An object containing information about the disk snapshot.
The name of the disk snapshot (e.g., my-disk-snapshot ).
The Amazon Resource Name (ARN) of the disk snapshot.
The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.
The date when the disk snapshot was created.
The AWS Region and Availability Zone where the disk snapshot was created.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The Lightsail resource type (e.g., DiskSnapshot ).
The size of the disk in GB.
The status of the disk snapshot operation.
The progress of the disk snapshot operation.
The unique name of the source disk from which you are creating the disk snapshot.
The Amazon Resource Name (ARN) of the source disk from which you are creating the disk snapshot.
Returns information about all block storage disk snapshots in your AWS account and region.
If you are describing a long list of disk snapshots, you can paginate the output to make the list more manageable. You can use the pageToken and nextPageToken values to retrieve the next items in the list.
See also: AWS API Documentation
Request Syntax
response = client.get_disk_snapshots(
pageToken='string'
)
{
'diskSnapshots': [
{
'name': 'string',
'arn': 'string',
'supportCode': 'string',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'sizeInGb': 123,
'state': 'pending'|'completed'|'error'|'unknown',
'progress': 'string',
'fromDiskName': 'string',
'fromDiskArn': 'string'
},
],
'nextPageToken': 'string'
}
Response Structure
An array of objects containing information about all block storage disk snapshots.
Describes a block storage disk snapshot.
The name of the disk snapshot (e.g., my-disk-snapshot ).
The Amazon Resource Name (ARN) of the disk snapshot.
The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.
The date when the disk snapshot was created.
The AWS Region and Availability Zone where the disk snapshot was created.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The Lightsail resource type (e.g., DiskSnapshot ).
The size of the disk in GB.
The status of the disk snapshot operation.
The progress of the disk snapshot operation.
The unique name of the source disk from which you are creating the disk snapshot.
The Amazon Resource Name (ARN) of the source disk from which you are creating the disk snapshot.
A token used for advancing to the next page of results from your GetDiskSnapshots request.
Returns information about all block storage disks in your AWS account and region.
If you are describing a long list of disks, you can paginate the output to make the list more manageable. You can use the pageToken and nextPageToken values to retrieve the next items in the list.
See also: AWS API Documentation
Request Syntax
response = client.get_disks(
pageToken='string'
)
{
'disks': [
{
'name': 'string',
'arn': 'string',
'supportCode': 'string',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'sizeInGb': 123,
'isSystemDisk': True|False,
'iops': 123,
'path': 'string',
'state': 'pending'|'error'|'available'|'in-use'|'unknown',
'attachedTo': 'string',
'isAttached': True|False,
'attachmentState': 'string',
'gbInUse': 123
},
],
'nextPageToken': 'string'
}
Response Structure
An array of objects containing information about all block storage disks.
Describes a system disk or an block storage disk.
The unique name of the disk.
The Amazon Resource Name (ARN) of the disk.
The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.
The date when the disk was created.
The AWS Region and Availability Zone where the disk is located.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The Lightsail resource type (e.g., Disk ).
The size of the disk in GB.
A Boolean value indicating whether this disk is a system disk (has an operating system loaded on it).
The input/output operations per second (IOPS) of the disk.
The disk path.
Describes the status of the disk.
The resources to which the disk is attached.
A Boolean value indicating whether the disk is attached.
(Deprecated) The attachment state of the disk.
Note
In releases prior to November 14, 2017, this parameter returned attached for system disks in the API response. It is now deprecated, but still included in the response. Use isAttached instead.
(Deprecated) The number of GB in use by the disk.
Note
In releases prior to November 14, 2017, this parameter was not included in the API response. It is now deprecated.
A token used for advancing to the next page of results from your GetDisks request.
Returns information about a specific domain recordset.
See also: AWS API Documentation
Request Syntax
response = client.get_domain(
domainName='string'
)
[REQUIRED]
The domain name for which your want to return information about.
{
'domain': {
'name': 'string',
'arn': 'string',
'supportCode': 'string',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'domainEntries': [
{
'id': 'string',
'name': 'string',
'target': 'string',
'isAlias': True|False,
'type': 'string',
'options': {
'string': 'string'
}
},
]
}
}
Response Structure
An array of key-value pairs containing information about your get domain request.
The name of the domain.
The Amazon Resource Name (ARN) of the domain recordset (e.g., arn:aws:lightsail:global:123456789101:Domain/824cede0-abc7-4f84-8dbc-12345EXAMPLE ).
The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.
The date when the domain recordset was created.
The AWS Region and Availability Zones where the domain recordset was created.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The resource type.
An array of key-value pairs containing information about the domain entries.
Describes a domain recordset entry.
The ID of the domain recordset entry.
The name of the domain.
The target AWS name server (e.g., ns-111.awsdns-22.com. ).
For Lightsail load balancers, the value looks like ab1234c56789c6b86aba6fb203d443bc-123456789.us-east-2.elb.amazonaws.com . Be sure to also set isAlias to true when setting up an A record for a load balancer.
When true , specifies whether the domain entry is an alias used by the Lightsail load balancer. You can include an alias (A type) record in your request, which points to a load balancer DNS name and routes traffic to your load balancer
The type of domain entry (e.g., SOA or NS ).
(Deprecated) The options for the domain entry.
Note
In releases prior to November 29, 2017, this parameter was not included in the API response. It is now deprecated.
Returns a list of all domains in the user's account.
See also: AWS API Documentation
Request Syntax
response = client.get_domains(
pageToken='string'
)
{
'domains': [
{
'name': 'string',
'arn': 'string',
'supportCode': 'string',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'domainEntries': [
{
'id': 'string',
'name': 'string',
'target': 'string',
'isAlias': True|False,
'type': 'string',
'options': {
'string': 'string'
}
},
]
},
],
'nextPageToken': 'string'
}
Response Structure
An array of key-value pairs containing information about each of the domain entries in the user's account.
Describes a domain where you are storing recordsets in Lightsail.
The name of the domain.
The Amazon Resource Name (ARN) of the domain recordset (e.g., arn:aws:lightsail:global:123456789101:Domain/824cede0-abc7-4f84-8dbc-12345EXAMPLE ).
The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.
The date when the domain recordset was created.
The AWS Region and Availability Zones where the domain recordset was created.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The resource type.
An array of key-value pairs containing information about the domain entries.
Describes a domain recordset entry.
The ID of the domain recordset entry.
The name of the domain.
The target AWS name server (e.g., ns-111.awsdns-22.com. ).
For Lightsail load balancers, the value looks like ab1234c56789c6b86aba6fb203d443bc-123456789.us-east-2.elb.amazonaws.com . Be sure to also set isAlias to true when setting up an A record for a load balancer.
When true , specifies whether the domain entry is an alias used by the Lightsail load balancer. You can include an alias (A type) record in your request, which points to a load balancer DNS name and routes traffic to your load balancer
The type of domain entry (e.g., SOA or NS ).
(Deprecated) The options for the domain entry.
Note
In releases prior to November 29, 2017, this parameter was not included in the API response. It is now deprecated.
A token used for advancing to the next page of results from your get active names request.
Returns information about a specific Amazon Lightsail instance, which is a virtual private server.
See also: AWS API Documentation
Request Syntax
response = client.get_instance(
instanceName='string'
)
[REQUIRED]
The name of the instance.
{
'instance': {
'name': 'string',
'arn': 'string',
'supportCode': 'string',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'blueprintId': 'string',
'blueprintName': 'string',
'bundleId': 'string',
'isStaticIp': True|False,
'privateIpAddress': 'string',
'publicIpAddress': 'string',
'ipv6Address': 'string',
'hardware': {
'cpuCount': 123,
'disks': [
{
'name': 'string',
'arn': 'string',
'supportCode': 'string',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'sizeInGb': 123,
'isSystemDisk': True|False,
'iops': 123,
'path': 'string',
'state': 'pending'|'error'|'available'|'in-use'|'unknown',
'attachedTo': 'string',
'isAttached': True|False,
'attachmentState': 'string',
'gbInUse': 123
},
],
'ramSizeInGb': ...
},
'networking': {
'monthlyTransfer': {
'gbPerMonthAllocated': 123
},
'ports': [
{
'fromPort': 123,
'toPort': 123,
'protocol': 'tcp'|'all'|'udp',
'accessFrom': 'string',
'accessType': 'Public'|'Private',
'commonName': 'string',
'accessDirection': 'inbound'|'outbound'
},
]
},
'state': {
'code': 123,
'name': 'string'
},
'username': 'string',
'sshKeyName': 'string'
}
}
Response Structure
An array of key-value pairs containing information about the specified instance.
The name the user gave the instance (e.g., Amazon_Linux-1GB-Ohio-1 ).
The Amazon Resource Name (ARN) of the instance (e.g., arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE ).
The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.
The timestamp when the instance was created (e.g., 1479734909.17 ).
The region name and availability zone where the instance is located.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The type of resource (usually Instance ).
The blueprint ID (e.g., os_amlinux_2016_03 ).
The friendly name of the blueprint (e.g., Amazon Linux ).
The bundle for the instance (e.g., micro_1_0 ).
A Boolean value indicating whether this instance has a static IP assigned to it.
The private IP address of the instance.
The public IP address of the instance.
The IPv6 address of the instance.
The size of the vCPU and the amount of RAM for the instance.
The number of vCPUs the instance has.
The disks attached to the instance.
Describes a system disk or an block storage disk.
The unique name of the disk.
The Amazon Resource Name (ARN) of the disk.
The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.
The date when the disk was created.
The AWS Region and Availability Zone where the disk is located.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The Lightsail resource type (e.g., Disk ).
The size of the disk in GB.
A Boolean value indicating whether this disk is a system disk (has an operating system loaded on it).
The input/output operations per second (IOPS) of the disk.
The disk path.
Describes the status of the disk.
The resources to which the disk is attached.
A Boolean value indicating whether the disk is attached.
(Deprecated) The attachment state of the disk.
Note
In releases prior to November 14, 2017, this parameter returned attached for system disks in the API response. It is now deprecated, but still included in the response. Use isAttached instead.
(Deprecated) The number of GB in use by the disk.
Note
In releases prior to November 14, 2017, this parameter was not included in the API response. It is now deprecated.
The amount of RAM in GB on the instance (e.g., 1.0 ).
Information about the public ports and monthly data transfer rates for the instance.
The amount of data in GB allocated for monthly data transfers.
The amount allocated per month (in GB).
An array of key-value pairs containing information about the ports on the instance.
Describes information about the instance ports.
The first port in the range.
The last port in the range.
The protocol being used. Can be one of the following.
The location from which access is allowed (e.g., Anywhere (0.0.0.0/0) ).
The type of access (Public or Private ).
The common name.
The access direction (inbound or outbound ).
The status code and the state (e.g., running ) for the instance.
The status code for the instance.
The state of the instance (e.g., running or pending ).
The user name for connecting to the instance (e.g., ec2-user ).
The name of the SSH key being used to connect to the instance (e.g., LightsailDefaultKeyPair ).
Returns temporary SSH keys you can use to connect to a specific virtual private server, or instance .
See also: AWS API Documentation
Request Syntax
response = client.get_instance_access_details(
instanceName='string',
protocol='ssh'|'rdp'
)
[REQUIRED]
The name of the instance to access.
dict
Response Syntax
{
'accessDetails': {
'certKey': 'string',
'expiresAt': datetime(2015, 1, 1),
'ipAddress': 'string',
'password': 'string',
'passwordData': {
'ciphertext': 'string',
'keyPairName': 'string'
},
'privateKey': 'string',
'protocol': 'ssh'|'rdp',
'instanceName': 'string',
'username': 'string'
}
}
Response Structure
(dict) --
accessDetails (dict) --
An array of key-value pairs containing information about a get instance access request.
certKey (string) --
For SSH access, the public key to use when accessing your instance For OpenSSH clients (e.g., command line SSH), you should save this value to tempkey-cert.pub .
expiresAt (datetime) --
For SSH access, the date on which the temporary keys expire.
ipAddress (string) --
The public IP 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.
Note
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.
passwordData (dict) --
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.
ciphertext (string) --
The encrypted password. Ciphertext will be an empty string if access to 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.
Note
If you use the default key pair (LightsailDefaultKeyPair ), the decrypted password will be available in the password field.
If you are using a custom key pair, you need to use your own means of decryption.
If you change the Administrator password on the instance, Lightsail will continue to return the original ciphertext value. When accessing the instance using RDP, you need to manually enter the Administrator password after changing it from the default.
keyPairName (string) --
The name of the key pair that you used when creating your instance. If no key pair name was specified when creating the instance, Lightsail uses the default key pair (LightsailDefaultKeyPair ).
If you are using a custom key pair, you need to use your own means of decrypting your password using the ciphertext . Lightsail creates the ciphertext by encrypting your password with the public key part of this key pair.
privateKey (string) --
For SSH access, the temporary private key. For OpenSSH clients (e.g., command line SSH), you should save this value to tempkey ).
protocol (string) --
The protocol for these Amazon Lightsail instance access details.
instanceName (string) --
The name of this Amazon Lightsail instance.
username (string) --
The user name to use when logging in to the Amazon Lightsail instance.
Returns the data points for the specified Amazon Lightsail instance metric, given an instance name.
See also: AWS API Documentation
Request Syntax
response = client.get_instance_metric_data(
instanceName='string',
metricName='CPUUtilization'|'NetworkIn'|'NetworkOut'|'StatusCheckFailed'|'StatusCheckFailed_Instance'|'StatusCheckFailed_System',
period=123,
startTime=datetime(2015, 1, 1),
endTime=datetime(2015, 1, 1),
unit='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'|'Maximum'|'Sum'|'Average'|'SampleCount',
]
)
[REQUIRED]
The name of the instance for which you want to get metrics data.
[REQUIRED]
The metric name to get data about.
[REQUIRED]
The time period for which you are requesting data.
[REQUIRED]
The start time of the time period.
[REQUIRED]
The end time of the time period.
[REQUIRED]
The unit. The list of valid values is below.
[REQUIRED]
The instance statistics.
dict
Response Syntax
{
'metricName': 'CPUUtilization'|'NetworkIn'|'NetworkOut'|'StatusCheckFailed'|'StatusCheckFailed_Instance'|'StatusCheckFailed_System',
'metricData': [
{
'average': 123.0,
'maximum': 123.0,
'minimum': 123.0,
'sampleCount': 123.0,
'sum': 123.0,
'timestamp': datetime(2015, 1, 1),
'unit': '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'
},
]
}
Response Structure
(dict) --
metricName (string) --
The metric name to return data for.
metricData (list) --
An array of key-value pairs containing information about the results of your get instance metric data request.
(dict) --
Describes the metric data point.
average (float) --
The average.
maximum (float) --
The maximum.
minimum (float) --
The minimum.
sampleCount (float) --
The sample count.
sum (float) --
The sum.
timestamp (datetime) --
The timestamp (e.g., 1479816991.349 ).
unit (string) --
The unit.
Returns the port states for a specific virtual private server, or instance .
See also: AWS API Documentation
Request Syntax
response = client.get_instance_port_states(
instanceName='string'
)
[REQUIRED]
The name of the instance.
{
'portStates': [
{
'fromPort': 123,
'toPort': 123,
'protocol': 'tcp'|'all'|'udp',
'state': 'open'|'closed'
},
]
}
Response Structure
Information about the port states resulting from your request.
Describes the port state.
The first port in the range.
The last port in the range.
The protocol being used. Can be one of the following.
Specifies whether the instance port is open or closed .
Returns information about a specific instance snapshot.
See also: AWS API Documentation
Request Syntax
response = client.get_instance_snapshot(
instanceSnapshotName='string'
)
[REQUIRED]
The name of the snapshot for which you are requesting information.
{
'instanceSnapshot': {
'name': 'string',
'arn': 'string',
'supportCode': 'string',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'state': 'pending'|'error'|'available',
'progress': 'string',
'fromAttachedDisks': [
{
'name': 'string',
'arn': 'string',
'supportCode': 'string',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'sizeInGb': 123,
'isSystemDisk': True|False,
'iops': 123,
'path': 'string',
'state': 'pending'|'error'|'available'|'in-use'|'unknown',
'attachedTo': 'string',
'isAttached': True|False,
'attachmentState': 'string',
'gbInUse': 123
},
],
'fromInstanceName': 'string',
'fromInstanceArn': 'string',
'fromBlueprintId': 'string',
'fromBundleId': 'string',
'sizeInGb': 123
}
}
Response Structure
An array of key-value pairs containing information about the results of your get instance snapshot request.
The name of the snapshot.
The Amazon Resource Name (ARN) of the snapshot (e.g., arn:aws:lightsail:us-east-2:123456789101:InstanceSnapshot/d23b5706-3322-4d83-81e5-12345EXAMPLE ).
The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.
The timestamp when the snapshot was created (e.g., 1479907467.024 ).
The region name and availability zone where you created the snapshot.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The type of resource (usually InstanceSnapshot ).
The state the snapshot is in.
The progress of the snapshot.
An array of disk objects containing information about all block storage disks.
Describes a system disk or an block storage disk.
The unique name of the disk.
The Amazon Resource Name (ARN) of the disk.
The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.
The date when the disk was created.
The AWS Region and Availability Zone where the disk is located.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The Lightsail resource type (e.g., Disk ).
The size of the disk in GB.
A Boolean value indicating whether this disk is a system disk (has an operating system loaded on it).
The input/output operations per second (IOPS) of the disk.
The disk path.
Describes the status of the disk.
The resources to which the disk is attached.
A Boolean value indicating whether the disk is attached.
(Deprecated) The attachment state of the disk.
Note
In releases prior to November 14, 2017, this parameter returned attached for system disks in the API response. It is now deprecated, but still included in the response. Use isAttached instead.
(Deprecated) The number of GB in use by the disk.
Note
In releases prior to November 14, 2017, this parameter was not included in the API response. It is now deprecated.
The instance from which the snapshot was created.
The Amazon Resource Name (ARN) of the instance from which the snapshot was created (e.g., arn:aws:lightsail:us-east-2:123456789101:Instance/64b8404c-ccb1-430b-8daf-12345EXAMPLE ).
The blueprint ID from which you created the snapshot (e.g., os_debian_8_3 ). A blueprint is a virtual private server (or instance ) image used to create instances quickly.
The bundle ID from which you created the snapshot (e.g., micro_1_0 ).
The size in GB of the SSD.
Returns all instance snapshots for the user's account.
See also: AWS API Documentation
Request Syntax
response = client.get_instance_snapshots(
pageToken='string'
)
{
'instanceSnapshots': [
{
'name': 'string',
'arn': 'string',
'supportCode': 'string',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'state': 'pending'|'error'|'available',
'progress': 'string',
'fromAttachedDisks': [
{
'name': 'string',
'arn': 'string',
'supportCode': 'string',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'sizeInGb': 123,
'isSystemDisk': True|False,
'iops': 123,
'path': 'string',
'state': 'pending'|'error'|'available'|'in-use'|'unknown',
'attachedTo': 'string',
'isAttached': True|False,
'attachmentState': 'string',
'gbInUse': 123
},
],
'fromInstanceName': 'string',
'fromInstanceArn': 'string',
'fromBlueprintId': 'string',
'fromBundleId': 'string',
'sizeInGb': 123
},
],
'nextPageToken': 'string'
}
Response Structure
An array of key-value pairs containing information about the results of your get instance snapshots request.
Describes the snapshot of the virtual private server, or instance .
The name of the snapshot.
The Amazon Resource Name (ARN) of the snapshot (e.g., arn:aws:lightsail:us-east-2:123456789101:InstanceSnapshot/d23b5706-3322-4d83-81e5-12345EXAMPLE ).
The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.
The timestamp when the snapshot was created (e.g., 1479907467.024 ).
The region name and availability zone where you created the snapshot.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The type of resource (usually InstanceSnapshot ).
The state the snapshot is in.
The progress of the snapshot.
An array of disk objects containing information about all block storage disks.
Describes a system disk or an block storage disk.
The unique name of the disk.
The Amazon Resource Name (ARN) of the disk.
The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.
The date when the disk was created.
The AWS Region and Availability Zone where the disk is located.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The Lightsail resource type (e.g., Disk ).
The size of the disk in GB.
A Boolean value indicating whether this disk is a system disk (has an operating system loaded on it).
The input/output operations per second (IOPS) of the disk.
The disk path.
Describes the status of the disk.
The resources to which the disk is attached.
A Boolean value indicating whether the disk is attached.
(Deprecated) The attachment state of the disk.
Note
In releases prior to November 14, 2017, this parameter returned attached for system disks in the API response. It is now deprecated, but still included in the response. Use isAttached instead.
(Deprecated) The number of GB in use by the disk.
Note
In releases prior to November 14, 2017, this parameter was not included in the API response. It is now deprecated.
The instance from which the snapshot was created.
The Amazon Resource Name (ARN) of the instance from which the snapshot was created (e.g., arn:aws:lightsail:us-east-2:123456789101:Instance/64b8404c-ccb1-430b-8daf-12345EXAMPLE ).
The blueprint ID from which you created the snapshot (e.g., os_debian_8_3 ). A blueprint is a virtual private server (or instance ) image used to create instances quickly.
The bundle ID from which you created the snapshot (e.g., micro_1_0 ).
The size in GB of the SSD.
A token used for advancing to the next page of results from your get instance snapshots request.
Returns the state of a specific instance. Works on one instance at a time.
See also: AWS API Documentation
Request Syntax
response = client.get_instance_state(
instanceName='string'
)
[REQUIRED]
The name of the instance to get state information about.
{
'state': {
'code': 123,
'name': 'string'
}
}
Response Structure
The state of the instance.
The status code for the instance.
The state of the instance (e.g., running or pending ).
Returns information about all Amazon Lightsail virtual private servers, or instances .
See also: AWS API Documentation
Request Syntax
response = client.get_instances(
pageToken='string'
)
{
'instances': [
{
'name': 'string',
'arn': 'string',
'supportCode': 'string',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'blueprintId': 'string',
'blueprintName': 'string',
'bundleId': 'string',
'isStaticIp': True|False,
'privateIpAddress': 'string',
'publicIpAddress': 'string',
'ipv6Address': 'string',
'hardware': {
'cpuCount': 123,
'disks': [
{
'name': 'string',
'arn': 'string',
'supportCode': 'string',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'sizeInGb': 123,
'isSystemDisk': True|False,
'iops': 123,
'path': 'string',
'state': 'pending'|'error'|'available'|'in-use'|'unknown',
'attachedTo': 'string',
'isAttached': True|False,
'attachmentState': 'string',
'gbInUse': 123
},
],
'ramSizeInGb': ...
},
'networking': {
'monthlyTransfer': {
'gbPerMonthAllocated': 123
},
'ports': [
{
'fromPort': 123,
'toPort': 123,
'protocol': 'tcp'|'all'|'udp',
'accessFrom': 'string',
'accessType': 'Public'|'Private',
'commonName': 'string',
'accessDirection': 'inbound'|'outbound'
},
]
},
'state': {
'code': 123,
'name': 'string'
},
'username': 'string',
'sshKeyName': 'string'
},
],
'nextPageToken': 'string'
}
Response Structure
An array of key-value pairs containing information about your instances.
Describes an instance (a virtual private server).
The name the user gave the instance (e.g., Amazon_Linux-1GB-Ohio-1 ).
The Amazon Resource Name (ARN) of the instance (e.g., arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE ).
The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.
The timestamp when the instance was created (e.g., 1479734909.17 ).
The region name and availability zone where the instance is located.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The type of resource (usually Instance ).
The blueprint ID (e.g., os_amlinux_2016_03 ).
The friendly name of the blueprint (e.g., Amazon Linux ).
The bundle for the instance (e.g., micro_1_0 ).
A Boolean value indicating whether this instance has a static IP assigned to it.
The private IP address of the instance.
The public IP address of the instance.
The IPv6 address of the instance.
The size of the vCPU and the amount of RAM for the instance.
The number of vCPUs the instance has.
The disks attached to the instance.
Describes a system disk or an block storage disk.
The unique name of the disk.
The Amazon Resource Name (ARN) of the disk.
The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.
The date when the disk was created.
The AWS Region and Availability Zone where the disk is located.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The Lightsail resource type (e.g., Disk ).
The size of the disk in GB.
A Boolean value indicating whether this disk is a system disk (has an operating system loaded on it).
The input/output operations per second (IOPS) of the disk.
The disk path.
Describes the status of the disk.
The resources to which the disk is attached.
A Boolean value indicating whether the disk is attached.
(Deprecated) The attachment state of the disk.
Note
In releases prior to November 14, 2017, this parameter returned attached for system disks in the API response. It is now deprecated, but still included in the response. Use isAttached instead.
(Deprecated) The number of GB in use by the disk.
Note
In releases prior to November 14, 2017, this parameter was not included in the API response. It is now deprecated.
The amount of RAM in GB on the instance (e.g., 1.0 ).
Information about the public ports and monthly data transfer rates for the instance.
The amount of data in GB allocated for monthly data transfers.
The amount allocated per month (in GB).
An array of key-value pairs containing information about the ports on the instance.
Describes information about the instance ports.
The first port in the range.
The last port in the range.
The protocol being used. Can be one of the following.
The location from which access is allowed (e.g., Anywhere (0.0.0.0/0) ).
The type of access (Public or Private ).
The common name.
The access direction (inbound or outbound ).
The status code and the state (e.g., running ) for the instance.
The status code for the instance.
The state of the instance (e.g., running or pending ).
The user name for connecting to the instance (e.g., ec2-user ).
The name of the SSH key being used to connect to the instance (e.g., LightsailDefaultKeyPair ).
A token used for advancing to the next page of results from your get instances request.
Returns information about a specific key pair.
See also: AWS API Documentation
Request Syntax
response = client.get_key_pair(
keyPairName='string'
)
[REQUIRED]
The name of the key pair for which you are requesting information.
{
'keyPair': {
'name': 'string',
'arn': 'string',
'supportCode': 'string',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'fingerprint': 'string'
}
}
Response Structure
An array of key-value pairs containing information about the key pair.
The friendly name of the SSH key pair.
The Amazon Resource Name (ARN) of the key pair (e.g., arn:aws:lightsail:us-east-2:123456789101:KeyPair/05859e3d-331d-48ba-9034-12345EXAMPLE ).
The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.
The timestamp when the key pair was created (e.g., 1479816991.349 ).
The region name and Availability Zone where the key pair was created.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The resource type (usually KeyPair ).
The RSA fingerprint of the key pair.
Returns information about all key pairs in the user's account.
See also: AWS API Documentation
Request Syntax
response = client.get_key_pairs(
pageToken='string'
)
{
'keyPairs': [
{
'name': 'string',
'arn': 'string',
'supportCode': 'string',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'fingerprint': 'string'
},
],
'nextPageToken': 'string'
}
Response Structure
An array of key-value pairs containing information about the key pairs.
Describes the SSH key pair.
The friendly name of the SSH key pair.
The Amazon Resource Name (ARN) of the key pair (e.g., arn:aws:lightsail:us-east-2:123456789101:KeyPair/05859e3d-331d-48ba-9034-12345EXAMPLE ).
The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.
The timestamp when the key pair was created (e.g., 1479816991.349 ).
The region name and Availability Zone where the key pair was created.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The resource type (usually KeyPair ).
The RSA fingerprint of the key pair.
A token used for advancing to the next page of results from your get key pairs request.
Returns information about the specified Lightsail load balancer.
See also: AWS API Documentation
Request Syntax
response = client.get_load_balancer(
loadBalancerName='string'
)
[REQUIRED]
The name of the load balancer.
{
'loadBalancer': {
'name': 'string',
'arn': 'string',
'supportCode': 'string',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'dnsName': 'string',
'state': 'active'|'provisioning'|'active_impaired'|'failed'|'unknown',
'protocol': 'HTTP_HTTPS'|'HTTP',
'publicPorts': [
123,
],
'healthCheckPath': 'string',
'instancePort': 123,
'instanceHealthSummary': [
{
'instanceName': 'string',
'instanceHealth': 'initial'|'healthy'|'unhealthy'|'unused'|'draining'|'unavailable',
'instanceHealthReason': 'Lb.RegistrationInProgress'|'Lb.InitialHealthChecking'|'Lb.InternalError'|'Instance.ResponseCodeMismatch'|'Instance.Timeout'|'Instance.FailedHealthChecks'|'Instance.NotRegistered'|'Instance.NotInUse'|'Instance.DeregistrationInProgress'|'Instance.InvalidState'|'Instance.IpUnusable'
},
],
'tlsCertificateSummaries': [
{
'name': 'string',
'isAttached': True|False
},
],
'configurationOptions': {
'string': 'string'
}
}
}
Response Structure
An object containing information about your load balancer.
The name of the load balancer (e.g., my-load-balancer ).
The Amazon Resource Name (ARN) of the load balancer.
The support code. Include this code in your email to support when you have questions about your Lightsail load balancer. This code enables our support team to look up your Lightsail information more easily.
The date when your load balancer was created.
The AWS Region where your load balancer was created (e.g., us-east-2a ). Lightsail automatically creates your load balancer across Availability Zones.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The resource type (e.g., LoadBalancer .
The DNS name of your Lightsail load balancer.
The status of your load balancer. Valid values are below.
The protocol you have enabled for your load balancer. Valid values are below.
You can't just have HTTP_HTTPS , but you can have just HTTP .
An array of public port settings for your load balancer. For HTTP, use port 80. For HTTPS, use port 443.
The path you specified to perform your health checks. If no path is specified, the load balancer tries to make a request to the default (root) page.
The port where the load balancer will direct traffic to your Lightsail instances. For HTTP traffic, it's port 80. For HTTPS traffic, it's port 443.
An array of InstanceHealthSummary objects describing the health of the load balancer.
Describes information about the health of the instance.
The name of the Lightsail instance for which you are requesting health check data.
Describes the overall instance health. Valid values are below.
More information about the instance health. If the instanceHealth is healthy , then an instanceHealthReason value is not provided.
If ** instanceHealth ** is initial , the ** instanceHealthReason ** value can be one of the following:
If ** instanceHealth ** is unhealthy , the ** instanceHealthReason ** value can be one of the following:
If ** instanceHealth ** is unused , the ** instanceHealthReason ** value can be one of the following:
If ** instanceHealth ** is draining , the ** instanceHealthReason ** value can be one of the following:
An array of LoadBalancerTlsCertificateSummary objects that provide additional information about the SSL/TLS certificates. For example, if true , the certificate is attached to the load balancer.
Provides a summary of SSL/TLS certificate metadata.
The name of the SSL/TLS certificate.
When true , the SSL/TLS certificate is attached to the Lightsail load balancer.
A string to string map of the configuration options for your load balancer. Valid values are listed below.
Returns information about health metrics for your Lightsail load balancer.
See also: AWS API Documentation
Request Syntax
response = client.get_load_balancer_metric_data(
loadBalancerName='string',
metricName='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=123,
startTime=datetime(2015, 1, 1),
endTime=datetime(2015, 1, 1),
unit='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'|'Maximum'|'Sum'|'Average'|'SampleCount',
]
)
[REQUIRED]
The name of the load balancer.
[REQUIRED]
The metric about which you want to return information. Valid values are listed below, along with the most useful statistics to include in your request.
[REQUIRED]
The time period duration for your health data request.
[REQUIRED]
The start time of the period.
[REQUIRED]
The end time of the period.
[REQUIRED]
The unit for the time period request. Valid values are listed below.
[REQUIRED]
An array of statistics that you want to request metrics for. Valid values are listed below.
dict
Response Syntax
{
'metricName': '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',
'metricData': [
{
'average': 123.0,
'maximum': 123.0,
'minimum': 123.0,
'sampleCount': 123.0,
'sum': 123.0,
'timestamp': datetime(2015, 1, 1),
'unit': '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'
},
]
}
Response Structure
(dict) --
metricName (string) --
The metric about which you are receiving information. Valid values are listed below, along with the most useful statistics to include in your request.
metricData (list) --
An array of metric datapoint objects.
(dict) --
Describes the metric data point.
average (float) --
The average.
maximum (float) --
The maximum.
minimum (float) --
The minimum.
sampleCount (float) --
The sample count.
sum (float) --
The sum.
timestamp (datetime) --
The timestamp (e.g., 1479816991.349 ).
unit (string) --
The unit.
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.
See also: AWS API Documentation
Request Syntax
response = client.get_load_balancer_tls_certificates(
loadBalancerName='string'
)
[REQUIRED]
The name of the load balancer you associated with your SSL/TLS certificate.
{
'tlsCertificates': [
{
'name': 'string',
'arn': 'string',
'supportCode': 'string',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'loadBalancerName': 'string',
'isAttached': True|False,
'status': 'PENDING_VALIDATION'|'ISSUED'|'INACTIVE'|'EXPIRED'|'VALIDATION_TIMED_OUT'|'REVOKED'|'FAILED'|'UNKNOWN',
'domainName': 'string',
'domainValidationRecords': [
{
'name': 'string',
'type': 'string',
'value': 'string',
'validationStatus': 'PENDING_VALIDATION'|'FAILED'|'SUCCESS',
'domainName': 'string'
},
],
'failureReason': 'NO_AVAILABLE_CONTACTS'|'ADDITIONAL_VERIFICATION_REQUIRED'|'DOMAIN_NOT_ALLOWED'|'INVALID_PUBLIC_DOMAIN'|'OTHER',
'issuedAt': datetime(2015, 1, 1),
'issuer': 'string',
'keyAlgorithm': 'string',
'notAfter': datetime(2015, 1, 1),
'notBefore': datetime(2015, 1, 1),
'renewalSummary': {
'renewalStatus': 'PENDING_AUTO_RENEWAL'|'PENDING_VALIDATION'|'SUCCESS'|'FAILED',
'domainValidationOptions': [
{
'domainName': 'string',
'validationStatus': 'PENDING_VALIDATION'|'FAILED'|'SUCCESS'
},
]
},
'revocationReason': 'UNSPECIFIED'|'KEY_COMPROMISE'|'CA_COMPROMISE'|'AFFILIATION_CHANGED'|'SUPERCEDED'|'CESSATION_OF_OPERATION'|'CERTIFICATE_HOLD'|'REMOVE_FROM_CRL'|'PRIVILEGE_WITHDRAWN'|'A_A_COMPROMISE',
'revokedAt': datetime(2015, 1, 1),
'serial': 'string',
'signatureAlgorithm': 'string',
'subject': 'string',
'subjectAlternativeNames': [
'string',
]
},
]
}
Response Structure
An array of LoadBalancerTlsCertificate objects describing your SSL/TLS certificates.
Describes a load balancer SSL/TLS certificate.
TLS is just an updated, more secure version of Secure Socket Layer (SSL).
The name of the SSL/TLS certificate (e.g., my-certificate ).
The Amazon Resource Name (ARN) of the SSL/TLS certificate.
The support code. Include this code in your email to support when you have questions about your Lightsail load balancer or SSL/TLS certificate. This code enables our support team to look up your Lightsail information more easily.
The time when you created your SSL/TLS certificate.
The AWS Region and Availability Zone where you created your certificate.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The resource type (e.g., LoadBalancerTlsCertificate ).
The load balancer name where your SSL/TLS certificate is attached.
When true , the SSL/TLS certificate is attached to the Lightsail load balancer.
The status of the SSL/TLS certificate. Valid values are below.
The domain name for your SSL/TLS certificate.
An array of LoadBalancerTlsCertificateDomainValidationRecord objects describing the records.
Describes the validation record of each domain name in the SSL/TLS certificate.
A fully qualified domain name in the certificate. For example, example.com .
The type of validation record. For example, CNAME for domain validation.
The value for that type.
The validation status. Valid values are listed below.
The domain name against which your SSL/TLS certificate was validated.
The reason for the SSL/TLS certificate validation failure.
The time when the SSL/TLS certificate was issued.
The issuer of the certificate.
The algorithm that was used to generate the key pair (the public and private key).
The timestamp when the SSL/TLS certificate expires.
The timestamp when the SSL/TLS certificate is first valid.
An object containing information about the status of Lightsail's managed renewal for the certificate.
The status of Lightsail's managed renewal of the certificate. Valid values are listed below.
Contains information about the validation of each domain name in the certificate, as it pertains to Lightsail's managed renewal. This is different from the initial validation that occurs as a result of the RequestCertificate request.
Contains information about the domain names on an SSL/TLS certificate that you will use to validate domain ownership.
The fully qualified domain name in the certificate request.
The status of the domain validation. Valid values are listed below.
The reason the certificate was revoked. Valid values are below.
The timestamp when the SSL/TLS certificate was revoked.
The serial number of the certificate.
The algorithm that was used to sign the certificate.
The name of the entity that is associated with the public key contained in the certificate.
One or more domains or subdomains included in the certificate. This list contains the domain names that are bound to the public key that is contained in the certificate. The subject alternative names include the canonical domain name (CNAME) of the certificate and additional domain names that can be used to connect to the website, such as example.com , www.example.com , or m.example.com .
Returns information about all load balancers in an account.
If you are describing a long list of load balancers, you can paginate the output to make the list more manageable. You can use the pageToken and nextPageToken values to retrieve the next items in the list.
See also: AWS API Documentation
Request Syntax
response = client.get_load_balancers(
pageToken='string'
)
{
'loadBalancers': [
{
'name': 'string',
'arn': 'string',
'supportCode': 'string',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'dnsName': 'string',
'state': 'active'|'provisioning'|'active_impaired'|'failed'|'unknown',
'protocol': 'HTTP_HTTPS'|'HTTP',
'publicPorts': [
123,
],
'healthCheckPath': 'string',
'instancePort': 123,
'instanceHealthSummary': [
{
'instanceName': 'string',
'instanceHealth': 'initial'|'healthy'|'unhealthy'|'unused'|'draining'|'unavailable',
'instanceHealthReason': 'Lb.RegistrationInProgress'|'Lb.InitialHealthChecking'|'Lb.InternalError'|'Instance.ResponseCodeMismatch'|'Instance.Timeout'|'Instance.FailedHealthChecks'|'Instance.NotRegistered'|'Instance.NotInUse'|'Instance.DeregistrationInProgress'|'Instance.InvalidState'|'Instance.IpUnusable'
},
],
'tlsCertificateSummaries': [
{
'name': 'string',
'isAttached': True|False
},
],
'configurationOptions': {
'string': 'string'
}
},
],
'nextPageToken': 'string'
}
Response Structure
An array of LoadBalancer objects describing your load balancers.
Describes the Lightsail load balancer.
The name of the load balancer (e.g., my-load-balancer ).
The Amazon Resource Name (ARN) of the load balancer.
The support code. Include this code in your email to support when you have questions about your Lightsail load balancer. This code enables our support team to look up your Lightsail information more easily.
The date when your load balancer was created.
The AWS Region where your load balancer was created (e.g., us-east-2a ). Lightsail automatically creates your load balancer across Availability Zones.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The resource type (e.g., LoadBalancer .
The DNS name of your Lightsail load balancer.
The status of your load balancer. Valid values are below.
The protocol you have enabled for your load balancer. Valid values are below.
You can't just have HTTP_HTTPS , but you can have just HTTP .
An array of public port settings for your load balancer. For HTTP, use port 80. For HTTPS, use port 443.
The path you specified to perform your health checks. If no path is specified, the load balancer tries to make a request to the default (root) page.
The port where the load balancer will direct traffic to your Lightsail instances. For HTTP traffic, it's port 80. For HTTPS traffic, it's port 443.
An array of InstanceHealthSummary objects describing the health of the load balancer.
Describes information about the health of the instance.
The name of the Lightsail instance for which you are requesting health check data.
Describes the overall instance health. Valid values are below.
More information about the instance health. If the instanceHealth is healthy , then an instanceHealthReason value is not provided.
If ** instanceHealth ** is initial , the ** instanceHealthReason ** value can be one of the following:
If ** instanceHealth ** is unhealthy , the ** instanceHealthReason ** value can be one of the following:
If ** instanceHealth ** is unused , the ** instanceHealthReason ** value can be one of the following:
If ** instanceHealth ** is draining , the ** instanceHealthReason ** value can be one of the following:
An array of LoadBalancerTlsCertificateSummary objects that provide additional information about the SSL/TLS certificates. For example, if true , the certificate is attached to the load balancer.
Provides a summary of SSL/TLS certificate metadata.
The name of the SSL/TLS certificate.
When true , the SSL/TLS certificate is attached to the Lightsail load balancer.
A string to string map of the configuration options for your load balancer. Valid values are listed below.
A token used for advancing to the next page of results from your GetLoadBalancers request.
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.
See also: AWS API Documentation
Request Syntax
response = client.get_operation(
operationId='string'
)
[REQUIRED]
A GUID used to identify the operation.
{
'operation': {
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
An array of key-value pairs containing information about the results of your get operation request.
The ID of the operation.
The resource name.
The resource type.
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
The region and Availability Zone.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
A Boolean value indicating whether the operation is terminal.
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
The type of operation.
The status of the operation.
The timestamp when the status was changed (e.g., 1479816991.349 ).
The error code.
The error details.
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.
See also: AWS API Documentation
Request Syntax
response = client.get_operations(
pageToken='string'
)
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
],
'nextPageToken': 'string'
}
Response Structure
An array of key-value pairs containing information about the results of your get operations request.
Describes the API operation.
The ID of the operation.
The resource name.
The resource type.
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
The region and Availability Zone.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
A Boolean value indicating whether the operation is terminal.
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
The type of operation.
The status of the operation.
The timestamp when the status was changed (e.g., 1479816991.349 ).
The error code.
The error details.
A token used for advancing to the next page of results from your get operations request.
Gets operations for a specific resource (e.g., an instance or a static IP).
See also: AWS API Documentation
Request Syntax
response = client.get_operations_for_resource(
resourceName='string',
pageToken='string'
)
[REQUIRED]
The name of the resource for which you are requesting information.
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
],
'nextPageCount': 'string',
'nextPageToken': 'string'
}
Response Structure
(dict) --
operations (list) --
An array of key-value pairs containing information about the results of your get operations for resource request.
(dict) --
Describes the API operation.
id (string) --
The ID of the operation.
resourceName (string) --
The resource name.
resourceType (string) --
The resource type.
createdAt (datetime) --
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
location (dict) --
The region and Availability Zone.
availabilityZone (string) --
The Availability Zone. Follows the format us-east-2a (case-sensitive).
regionName (string) --
The AWS Region name.
isTerminal (boolean) --
A Boolean value indicating whether the operation is terminal.
operationDetails (string) --
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
operationType (string) --
The type of operation.
status (string) --
The status of the operation.
statusChangedAt (datetime) --
The timestamp when the status was changed (e.g., 1479816991.349 ).
errorCode (string) --
The error code.
errorDetails (string) --
The error details.
nextPageCount (string) --
(Deprecated) Returns the number of pages of results that remain.
Note
In releases prior to June 12, 2017, this parameter returned null by the API. It is now deprecated, and the API returns the nextPageToken parameter instead.
nextPageToken (string) --
An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.
Create a paginator for an operation.
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.
See also: AWS API Documentation
Request Syntax
response = client.get_regions(
includeAvailabilityZones=True|False
)
{
'regions': [
{
'continentCode': 'string',
'description': 'string',
'displayName': 'string',
'name': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2',
'availabilityZones': [
{
'zoneName': 'string',
'state': 'string'
},
]
},
]
}
Response Structure
An array of key-value pairs containing information about your get regions request.
Describes the AWS Region.
The continent code (e.g., NA , meaning North America).
The description of the AWS Region (e.g., This region is recommended to serve users in the eastern United States and eastern Canada ).
The display name (e.g., Ohio ).
The region name (e.g., us-east-2 ).
The Availability Zones. Follows the format us-east-2a (case-sensitive).
Describes an Availability Zone.
The name of the Availability Zone. The format is us-east-2a (case-sensitive).
The state of the Availability Zone.
Returns information about a specific static IP.
See also: AWS API Documentation
Request Syntax
response = client.get_static_ip(
staticIpName='string'
)
[REQUIRED]
The name of the static IP in Lightsail.
{
'staticIp': {
'name': 'string',
'arn': 'string',
'supportCode': 'string',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'ipAddress': 'string',
'attachedTo': 'string',
'isAttached': True|False
}
}
Response Structure
An array of key-value pairs containing information about the requested static IP.
The name of the static IP (e.g., StaticIP-Ohio-EXAMPLE ).
The Amazon Resource Name (ARN) of the static IP (e.g., arn:aws:lightsail:us-east-2:123456789101:StaticIp/9cbb4a9e-f8e3-4dfe-b57e-12345EXAMPLE ).
The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.
The timestamp when the static IP was created (e.g., 1479735304.222 ).
The region and Availability Zone where the static IP was created.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The resource type (usually StaticIp ).
The static IP address.
The instance where the static IP is attached (e.g., Amazon_Linux-1GB-Ohio-1 ).
A Boolean value indicating whether the static IP is attached.
Returns information about all static IPs in the user's account.
See also: AWS API Documentation
Request Syntax
response = client.get_static_ips(
pageToken='string'
)
{
'staticIps': [
{
'name': 'string',
'arn': 'string',
'supportCode': 'string',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'ipAddress': 'string',
'attachedTo': 'string',
'isAttached': True|False
},
],
'nextPageToken': 'string'
}
Response Structure
An array of key-value pairs containing information about your get static IPs request.
Describes the static IP.
The name of the static IP (e.g., StaticIP-Ohio-EXAMPLE ).
The Amazon Resource Name (ARN) of the static IP (e.g., arn:aws:lightsail:us-east-2:123456789101:StaticIp/9cbb4a9e-f8e3-4dfe-b57e-12345EXAMPLE ).
The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.
The timestamp when the static IP was created (e.g., 1479735304.222 ).
The region and Availability Zone where the static IP was created.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The resource type (usually StaticIp ).
The static IP address.
The instance where the static IP is attached (e.g., Amazon_Linux-1GB-Ohio-1 ).
A Boolean value indicating whether the static IP is attached.
A token used for advancing to the next page of results from your get static IPs request.
Returns an object that can wait for some condition.
Imports a public SSH key from a specific key pair.
See also: AWS API Documentation
Request Syntax
response = client.import_key_pair(
keyPairName='string',
publicKeyBase64='string'
)
[REQUIRED]
The name of the key pair for which you want to import the public key.
[REQUIRED]
A base64-encoded public key of the ssh-rsa type.
dict
Response Syntax
{
'operation': {
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
(dict) --
operation (dict) --
An array of key-value pairs containing information about the request operation.
id (string) --
The ID of the operation.
resourceName (string) --
The resource name.
resourceType (string) --
The resource type.
createdAt (datetime) --
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
location (dict) --
The region and Availability Zone.
availabilityZone (string) --
The Availability Zone. Follows the format us-east-2a (case-sensitive).
regionName (string) --
The AWS Region name.
isTerminal (boolean) --
A Boolean value indicating whether the operation is terminal.
operationDetails (string) --
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
operationType (string) --
The type of operation.
status (string) --
The status of the operation.
statusChangedAt (datetime) --
The timestamp when the status was changed (e.g., 1479816991.349 ).
errorCode (string) --
The error code.
errorDetails (string) --
The error details.
Returns a Boolean value indicating whether your Lightsail VPC is peered.
See also: AWS API Documentation
Request Syntax
response = client.is_vpc_peered()
{
'isPeered': True|False
}
Response Structure
Returns true if the Lightsail VPC is peered; otherwise, false .
Adds public ports to an Amazon Lightsail instance.
See also: AWS API Documentation
Request Syntax
response = client.open_instance_public_ports(
portInfo={
'fromPort': 123,
'toPort': 123,
'protocol': 'tcp'|'all'|'udp'
},
instanceName='string'
)
[REQUIRED]
An array of key-value pairs containing information about the port mappings.
The first port in the range.
The last port in the range.
The protocol.
[REQUIRED]
The name of the instance for which you want to open the public ports.
dict
Response Syntax
{
'operation': {
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
(dict) --
operation (dict) --
An array of key-value pairs containing information about the request operation.
id (string) --
The ID of the operation.
resourceName (string) --
The resource name.
resourceType (string) --
The resource type.
createdAt (datetime) --
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
location (dict) --
The region and Availability Zone.
availabilityZone (string) --
The Availability Zone. Follows the format us-east-2a (case-sensitive).
regionName (string) --
The AWS Region name.
isTerminal (boolean) --
A Boolean value indicating whether the operation is terminal.
operationDetails (string) --
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
operationType (string) --
The type of operation.
status (string) --
The status of the operation.
statusChangedAt (datetime) --
The timestamp when the status was changed (e.g., 1479816991.349 ).
errorCode (string) --
The error code.
errorDetails (string) --
The error details.
Tries to peer the Lightsail VPC with the user's default VPC.
See also: AWS API Documentation
Request Syntax
response = client.peer_vpc()
{
'operation': {
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
An array of key-value pairs containing information about the request operation.
The ID of the operation.
The resource name.
The resource type.
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
The region and Availability Zone.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
A Boolean value indicating whether the operation is terminal.
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
The type of operation.
The status of the operation.
The timestamp when the status was changed (e.g., 1479816991.349 ).
The error code.
The error details.
Sets the specified open ports for an Amazon Lightsail instance, and closes all ports for every protocol not included in the current request.
See also: AWS API Documentation
Request Syntax
response = client.put_instance_public_ports(
portInfos=[
{
'fromPort': 123,
'toPort': 123,
'protocol': 'tcp'|'all'|'udp'
},
],
instanceName='string'
)
[REQUIRED]
Specifies information about the public port(s).
Describes information about the ports on your virtual private server (or instance ).
The first port in the range.
The last port in the range.
The protocol.
[REQUIRED]
The Lightsail instance name of the public port(s) you are setting.
dict
Response Syntax
{
'operation': {
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
(dict) --
operation (dict) --
Describes metadata about the operation you just executed.
id (string) --
The ID of the operation.
resourceName (string) --
The resource name.
resourceType (string) --
The resource type.
createdAt (datetime) --
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
location (dict) --
The region and Availability Zone.
availabilityZone (string) --
The Availability Zone. Follows the format us-east-2a (case-sensitive).
regionName (string) --
The AWS Region name.
isTerminal (boolean) --
A Boolean value indicating whether the operation is terminal.
operationDetails (string) --
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
operationType (string) --
The type of operation.
status (string) --
The status of the operation.
statusChangedAt (datetime) --
The timestamp when the status was changed (e.g., 1479816991.349 ).
errorCode (string) --
The error code.
errorDetails (string) --
The error details.
Restarts a specific instance. When your Amazon Lightsail instance is finished rebooting, Lightsail assigns a new public IP address. To use the same IP address after restarting, create a static IP address and attach it to the instance.
See also: AWS API Documentation
Request Syntax
response = client.reboot_instance(
instanceName='string'
)
[REQUIRED]
The name of the instance to reboot.
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
An array of key-value pairs containing information about the request operations.
Describes the API operation.
The ID of the operation.
The resource name.
The resource type.
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
The region and Availability Zone.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
A Boolean value indicating whether the operation is terminal.
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
The type of operation.
The status of the operation.
The timestamp when the status was changed (e.g., 1479816991.349 ).
The error code.
The error details.
Deletes a specific static IP from your account.
See also: AWS API Documentation
Request Syntax
response = client.release_static_ip(
staticIpName='string'
)
[REQUIRED]
The name of the static IP to delete.
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
An array of key-value pairs containing information about the request operation.
Describes the API operation.
The ID of the operation.
The resource name.
The resource type.
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
The region and Availability Zone.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
A Boolean value indicating whether the operation is terminal.
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
The type of operation.
The status of the operation.
The timestamp when the status was changed (e.g., 1479816991.349 ).
The error code.
The error details.
Starts a specific Amazon Lightsail instance from a stopped state. To restart an instance, use the reboot instance operation.
See also: AWS API Documentation
Request Syntax
response = client.start_instance(
instanceName='string'
)
[REQUIRED]
The name of the instance (a virtual private server) to start.
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
An array of key-value pairs containing information about the request operation.
Describes the API operation.
The ID of the operation.
The resource name.
The resource type.
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
The region and Availability Zone.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
A Boolean value indicating whether the operation is terminal.
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
The type of operation.
The status of the operation.
The timestamp when the status was changed (e.g., 1479816991.349 ).
The error code.
The error details.
Stops a specific Amazon Lightsail instance that is currently running.
See also: AWS API Documentation
Request Syntax
response = client.stop_instance(
instanceName='string',
force=True|False
)
[REQUIRED]
The name of the instance (a virtual private server) to stop.
When set to True , forces a Lightsail instance that is stuck in a stopping state to stop.
Warning
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.
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of key-value pairs containing information about the request operation.
(dict) --
Describes the API operation.
id (string) --
The ID of the operation.
resourceName (string) --
The resource name.
resourceType (string) --
The resource type.
createdAt (datetime) --
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
location (dict) --
The region and Availability Zone.
availabilityZone (string) --
The Availability Zone. Follows the format us-east-2a (case-sensitive).
regionName (string) --
The AWS Region name.
isTerminal (boolean) --
A Boolean value indicating whether the operation is terminal.
operationDetails (string) --
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
operationType (string) --
The type of operation.
status (string) --
The status of the operation.
statusChangedAt (datetime) --
The timestamp when the status was changed (e.g., 1479816991.349 ).
errorCode (string) --
The error code.
errorDetails (string) --
The error details.
Attempts to unpeer the Lightsail VPC from the user's default VPC.
See also: AWS API Documentation
Request Syntax
response = client.unpeer_vpc()
{
'operation': {
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
An array of key-value pairs containing information about the request operation.
The ID of the operation.
The resource name.
The resource type.
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
The region and Availability Zone.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
A Boolean value indicating whether the operation is terminal.
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
The type of operation.
The status of the operation.
The timestamp when the status was changed (e.g., 1479816991.349 ).
The error code.
The error details.
Updates a domain recordset after it is created.
See also: AWS API Documentation
Request Syntax
response = client.update_domain_entry(
domainName='string',
domainEntry={
'id': 'string',
'name': 'string',
'target': 'string',
'isAlias': True|False,
'type': 'string',
'options': {
'string': 'string'
}
}
)
[REQUIRED]
The name of the domain recordset to update.
[REQUIRED]
An array of key-value pairs containing information about the domain entry.
The ID of the domain recordset entry.
The name of the domain.
The target AWS name server (e.g., ns-111.awsdns-22.com. ).
For Lightsail load balancers, the value looks like ab1234c56789c6b86aba6fb203d443bc-123456789.us-east-2.elb.amazonaws.com . Be sure to also set isAlias to true when setting up an A record for a load balancer.
When true , specifies whether the domain entry is an alias used by the Lightsail load balancer. You can include an alias (A type) record in your request, which points to a load balancer DNS name and routes traffic to your load balancer
The type of domain entry (e.g., SOA or NS ).
(Deprecated) The options for the domain entry.
Note
In releases prior to November 29, 2017, this parameter was not included in the API response. It is now deprecated.
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An array of key-value pairs containing information about the request operation.
(dict) --
Describes the API operation.
id (string) --
The ID of the operation.
resourceName (string) --
The resource name.
resourceType (string) --
The resource type.
createdAt (datetime) --
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
location (dict) --
The region and Availability Zone.
availabilityZone (string) --
The Availability Zone. Follows the format us-east-2a (case-sensitive).
regionName (string) --
The AWS Region name.
isTerminal (boolean) --
A Boolean value indicating whether the operation is terminal.
operationDetails (string) --
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
operationType (string) --
The type of operation.
status (string) --
The status of the operation.
statusChangedAt (datetime) --
The timestamp when the status was changed (e.g., 1479816991.349 ).
errorCode (string) --
The error code.
errorDetails (string) --
The error details.
Updates the specified attribute for a load balancer. You can only update one attribute at a time.
See also: AWS API Documentation
Request Syntax
response = client.update_load_balancer_attribute(
loadBalancerName='string',
attributeName='HealthCheckPath'|'SessionStickinessEnabled'|'SessionStickiness_LB_CookieDurationSeconds',
attributeValue='string'
)
[REQUIRED]
The name of the load balancer that you want to modify (e.g., my-load-balancer .
[REQUIRED]
The name of the attribute you want to update. Valid values are below.
[REQUIRED]
The value that you want to specify for the attribute name.
dict
Response Syntax
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
(dict) --
operations (list) --
An object describing the API operations.
(dict) --
Describes the API operation.
id (string) --
The ID of the operation.
resourceName (string) --
The resource name.
resourceType (string) --
The resource type.
createdAt (datetime) --
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
location (dict) --
The region and Availability Zone.
availabilityZone (string) --
The Availability Zone. Follows the format us-east-2a (case-sensitive).
regionName (string) --
The AWS Region name.
isTerminal (boolean) --
A Boolean value indicating whether the operation is terminal.
operationDetails (string) --
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
operationType (string) --
The type of operation.
status (string) --
The status of the operation.
statusChangedAt (datetime) --
The timestamp when the status was changed (e.g., 1479816991.349 ).
errorCode (string) --
The error code.
errorDetails (string) --
The error details.
The available paginators are:
paginator = client.get_paginator('get_active_names')
Creates an iterator that will paginate through responses from Lightsail.Client.get_active_names().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
{
'activeNames': [
'string',
],
'NextToken': 'string'
}
Response Structure
The list of active names returned by the get active names request.
A token to resume pagination.
paginator = client.get_paginator('get_blueprints')
Creates an iterator that will paginate through responses from Lightsail.Client.get_blueprints().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
includeInactive=True|False,
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
dict
Response Syntax
{
'blueprints': [
{
'blueprintId': 'string',
'name': 'string',
'group': 'string',
'type': 'os'|'app',
'description': 'string',
'isActive': True|False,
'minPower': 123,
'version': 'string',
'versionCode': 'string',
'productUrl': 'string',
'licenseUrl': 'string',
'platform': 'LINUX_UNIX'|'WINDOWS'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
blueprints (list) --
An array of key-value pairs that contains information about the available blueprints.
(dict) --
Describes a blueprint (a virtual private server image).
blueprintId (string) --
The ID for the virtual private server image (e.g., app_wordpress_4_4 or app_lamp_7_0 ).
name (string) --
The friendly name of the blueprint (e.g., Amazon Linux ).
group (string) --
The group name of the blueprint (e.g., amazon-linux ).
type (string) --
The type of the blueprint (e.g., os or app ).
description (string) --
The description of the blueprint.
isActive (boolean) --
A Boolean value indicating whether the blueprint is active. When you update your blueprints, you will inactivate old blueprints and keep the most recent versions active.
minPower (integer) --
The minimum bundle power required to run this blueprint. For example, you need a bundle with a power value of 500 or more to create an instance that uses a blueprint with a minimum power value of 500. 0 indicates that the blueprint runs on all instance sizes.
version (string) --
The version number of the operating system, application, or stack (e.g., 2016.03.0 ).
versionCode (string) --
The version code.
productUrl (string) --
The product URL to learn more about the image or blueprint.
licenseUrl (string) --
The end-user license agreement URL for the image or blueprint.
platform (string) --
The operating system platform (either Linux/Unix-based or Windows Server-based) of the blueprint.
NextToken (string) --
A token to resume pagination.
paginator = client.get_paginator('get_bundles')
Creates an iterator that will paginate through responses from Lightsail.Client.get_bundles().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
includeInactive=True|False,
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
dict
Response Syntax
{
'bundles': [
{
'price': ...,
'cpuCount': 123,
'diskSizeInGb': 123,
'bundleId': 'string',
'instanceType': 'string',
'isActive': True|False,
'name': 'string',
'power': 123,
'ramSizeInGb': ...,
'transferPerMonthInGb': 123,
'supportedPlatforms': [
'LINUX_UNIX'|'WINDOWS',
]
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
bundles (list) --
An array of key-value pairs that contains information about the available bundles.
(dict) --
Describes a bundle, which is a set of specs describing your virtual private server (or instance ).
price (float) --
The price in US dollars (e.g., 5.0 ).
cpuCount (integer) --
The number of vCPUs included in the bundle (e.g., 2 ).
diskSizeInGb (integer) --
The size of the SSD (e.g., 30 ).
bundleId (string) --
The bundle ID (e.g., micro_1_0 ).
instanceType (string) --
The Amazon EC2 instance type (e.g., t2.micro ).
isActive (boolean) --
A Boolean value indicating whether the bundle is active.
name (string) --
A friendly name for the bundle (e.g., Micro ).
power (integer) --
A numeric value that represents the power of the bundle (e.g., 500 ). You can use the bundle's power value in conjunction with a blueprint's minimum power value to determine whether the blueprint will run on the bundle. For example, you need a bundle with a power value of 500 or more to create an instance that uses a blueprint with a minimum power value of 500.
ramSizeInGb (float) --
The amount of RAM in GB (e.g., 2.0 ).
transferPerMonthInGb (integer) --
The data transfer rate per month in GB (e.g., 2000 ).
supportedPlatforms (list) --
The operating system platform (Linux/Unix-based or Windows Server-based) that the bundle supports. You can only launch a WINDOWS bundle on a blueprint that supports the WINDOWS platform. LINUX_UNIX blueprints require a LINUX_UNIX bundle.
NextToken (string) --
A token to resume pagination.
paginator = client.get_paginator('get_domains')
Creates an iterator that will paginate through responses from Lightsail.Client.get_domains().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
{
'domains': [
{
'name': 'string',
'arn': 'string',
'supportCode': 'string',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'domainEntries': [
{
'id': 'string',
'name': 'string',
'target': 'string',
'isAlias': True|False,
'type': 'string',
'options': {
'string': 'string'
}
},
]
},
],
'NextToken': 'string'
}
Response Structure
An array of key-value pairs containing information about each of the domain entries in the user's account.
Describes a domain where you are storing recordsets in Lightsail.
The name of the domain.
The Amazon Resource Name (ARN) of the domain recordset (e.g., arn:aws:lightsail:global:123456789101:Domain/824cede0-abc7-4f84-8dbc-12345EXAMPLE ).
The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.
The date when the domain recordset was created.
The AWS Region and Availability Zones where the domain recordset was created.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The resource type.
An array of key-value pairs containing information about the domain entries.
Describes a domain recordset entry.
The ID of the domain recordset entry.
The name of the domain.
The target AWS name server (e.g., ns-111.awsdns-22.com. ).
For Lightsail load balancers, the value looks like ab1234c56789c6b86aba6fb203d443bc-123456789.us-east-2.elb.amazonaws.com . Be sure to also set isAlias to true when setting up an A record for a load balancer.
When true , specifies whether the domain entry is an alias used by the Lightsail load balancer. You can include an alias (A type) record in your request, which points to a load balancer DNS name and routes traffic to your load balancer
The type of domain entry (e.g., SOA or NS ).
(Deprecated) The options for the domain entry.
Note
In releases prior to November 29, 2017, this parameter was not included in the API response. It is now deprecated.
A token to resume pagination.
paginator = client.get_paginator('get_instance_snapshots')
Creates an iterator that will paginate through responses from Lightsail.Client.get_instance_snapshots().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
{
'instanceSnapshots': [
{
'name': 'string',
'arn': 'string',
'supportCode': 'string',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'state': 'pending'|'error'|'available',
'progress': 'string',
'fromAttachedDisks': [
{
'name': 'string',
'arn': 'string',
'supportCode': 'string',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'sizeInGb': 123,
'isSystemDisk': True|False,
'iops': 123,
'path': 'string',
'state': 'pending'|'error'|'available'|'in-use'|'unknown',
'attachedTo': 'string',
'isAttached': True|False,
'attachmentState': 'string',
'gbInUse': 123
},
],
'fromInstanceName': 'string',
'fromInstanceArn': 'string',
'fromBlueprintId': 'string',
'fromBundleId': 'string',
'sizeInGb': 123
},
],
'NextToken': 'string'
}
Response Structure
An array of key-value pairs containing information about the results of your get instance snapshots request.
Describes the snapshot of the virtual private server, or instance .
The name of the snapshot.
The Amazon Resource Name (ARN) of the snapshot (e.g., arn:aws:lightsail:us-east-2:123456789101:InstanceSnapshot/d23b5706-3322-4d83-81e5-12345EXAMPLE ).
The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.
The timestamp when the snapshot was created (e.g., 1479907467.024 ).
The region name and availability zone where you created the snapshot.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The type of resource (usually InstanceSnapshot ).
The state the snapshot is in.
The progress of the snapshot.
An array of disk objects containing information about all block storage disks.
Describes a system disk or an block storage disk.
The unique name of the disk.
The Amazon Resource Name (ARN) of the disk.
The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.
The date when the disk was created.
The AWS Region and Availability Zone where the disk is located.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The Lightsail resource type (e.g., Disk ).
The size of the disk in GB.
A Boolean value indicating whether this disk is a system disk (has an operating system loaded on it).
The input/output operations per second (IOPS) of the disk.
The disk path.
Describes the status of the disk.
The resources to which the disk is attached.
A Boolean value indicating whether the disk is attached.
(Deprecated) The attachment state of the disk.
Note
In releases prior to November 14, 2017, this parameter returned attached for system disks in the API response. It is now deprecated, but still included in the response. Use isAttached instead.
(Deprecated) The number of GB in use by the disk.
Note
In releases prior to November 14, 2017, this parameter was not included in the API response. It is now deprecated.
The instance from which the snapshot was created.
The Amazon Resource Name (ARN) of the instance from which the snapshot was created (e.g., arn:aws:lightsail:us-east-2:123456789101:Instance/64b8404c-ccb1-430b-8daf-12345EXAMPLE ).
The blueprint ID from which you created the snapshot (e.g., os_debian_8_3 ). A blueprint is a virtual private server (or instance ) image used to create instances quickly.
The bundle ID from which you created the snapshot (e.g., micro_1_0 ).
The size in GB of the SSD.
A token to resume pagination.
paginator = client.get_paginator('get_instances')
Creates an iterator that will paginate through responses from Lightsail.Client.get_instances().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
{
'instances': [
{
'name': 'string',
'arn': 'string',
'supportCode': 'string',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'blueprintId': 'string',
'blueprintName': 'string',
'bundleId': 'string',
'isStaticIp': True|False,
'privateIpAddress': 'string',
'publicIpAddress': 'string',
'ipv6Address': 'string',
'hardware': {
'cpuCount': 123,
'disks': [
{
'name': 'string',
'arn': 'string',
'supportCode': 'string',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'sizeInGb': 123,
'isSystemDisk': True|False,
'iops': 123,
'path': 'string',
'state': 'pending'|'error'|'available'|'in-use'|'unknown',
'attachedTo': 'string',
'isAttached': True|False,
'attachmentState': 'string',
'gbInUse': 123
},
],
'ramSizeInGb': ...
},
'networking': {
'monthlyTransfer': {
'gbPerMonthAllocated': 123
},
'ports': [
{
'fromPort': 123,
'toPort': 123,
'protocol': 'tcp'|'all'|'udp',
'accessFrom': 'string',
'accessType': 'Public'|'Private',
'commonName': 'string',
'accessDirection': 'inbound'|'outbound'
},
]
},
'state': {
'code': 123,
'name': 'string'
},
'username': 'string',
'sshKeyName': 'string'
},
],
'NextToken': 'string'
}
Response Structure
An array of key-value pairs containing information about your instances.
Describes an instance (a virtual private server).
The name the user gave the instance (e.g., Amazon_Linux-1GB-Ohio-1 ).
The Amazon Resource Name (ARN) of the instance (e.g., arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE ).
The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.
The timestamp when the instance was created (e.g., 1479734909.17 ).
The region name and availability zone where the instance is located.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The type of resource (usually Instance ).
The blueprint ID (e.g., os_amlinux_2016_03 ).
The friendly name of the blueprint (e.g., Amazon Linux ).
The bundle for the instance (e.g., micro_1_0 ).
A Boolean value indicating whether this instance has a static IP assigned to it.
The private IP address of the instance.
The public IP address of the instance.
The IPv6 address of the instance.
The size of the vCPU and the amount of RAM for the instance.
The number of vCPUs the instance has.
The disks attached to the instance.
Describes a system disk or an block storage disk.
The unique name of the disk.
The Amazon Resource Name (ARN) of the disk.
The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.
The date when the disk was created.
The AWS Region and Availability Zone where the disk is located.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The Lightsail resource type (e.g., Disk ).
The size of the disk in GB.
A Boolean value indicating whether this disk is a system disk (has an operating system loaded on it).
The input/output operations per second (IOPS) of the disk.
The disk path.
Describes the status of the disk.
The resources to which the disk is attached.
A Boolean value indicating whether the disk is attached.
(Deprecated) The attachment state of the disk.
Note
In releases prior to November 14, 2017, this parameter returned attached for system disks in the API response. It is now deprecated, but still included in the response. Use isAttached instead.
(Deprecated) The number of GB in use by the disk.
Note
In releases prior to November 14, 2017, this parameter was not included in the API response. It is now deprecated.
The amount of RAM in GB on the instance (e.g., 1.0 ).
Information about the public ports and monthly data transfer rates for the instance.
The amount of data in GB allocated for monthly data transfers.
The amount allocated per month (in GB).
An array of key-value pairs containing information about the ports on the instance.
Describes information about the instance ports.
The first port in the range.
The last port in the range.
The protocol being used. Can be one of the following.
The location from which access is allowed (e.g., Anywhere (0.0.0.0/0) ).
The type of access (Public or Private ).
The common name.
The access direction (inbound or outbound ).
The status code and the state (e.g., running ) for the instance.
The status code for the instance.
The state of the instance (e.g., running or pending ).
The user name for connecting to the instance (e.g., ec2-user ).
The name of the SSH key being used to connect to the instance (e.g., LightsailDefaultKeyPair ).
A token to resume pagination.
paginator = client.get_paginator('get_key_pairs')
Creates an iterator that will paginate through responses from Lightsail.Client.get_key_pairs().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
{
'keyPairs': [
{
'name': 'string',
'arn': 'string',
'supportCode': 'string',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'fingerprint': 'string'
},
],
'NextToken': 'string'
}
Response Structure
An array of key-value pairs containing information about the key pairs.
Describes the SSH key pair.
The friendly name of the SSH key pair.
The Amazon Resource Name (ARN) of the key pair (e.g., arn:aws:lightsail:us-east-2:123456789101:KeyPair/05859e3d-331d-48ba-9034-12345EXAMPLE ).
The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.
The timestamp when the key pair was created (e.g., 1479816991.349 ).
The region name and Availability Zone where the key pair was created.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The resource type (usually KeyPair ).
The RSA fingerprint of the key pair.
A token to resume pagination.
paginator = client.get_paginator('get_operations')
Creates an iterator that will paginate through responses from Lightsail.Client.get_operations().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'isTerminal': True|False,
'operationDetails': 'string',
'operationType': '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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed'|'Succeeded',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
],
'NextToken': 'string'
}
Response Structure
An array of key-value pairs containing information about the results of your get operations request.
Describes the API operation.
The ID of the operation.
The resource name.
The resource type.
The timestamp when the operation was initialized (e.g., 1479816991.349 ).
The region and Availability Zone.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
A Boolean value indicating whether the operation is terminal.
Details about the operation (e.g., Debian-1GB-Ohio-1 ).
The type of operation.
The status of the operation.
The timestamp when the status was changed (e.g., 1479816991.349 ).
The error code.
The error details.
A token to resume pagination.
paginator = client.get_paginator('get_static_ips')
Creates an iterator that will paginate through responses from Lightsail.Client.get_static_ips().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
{
'staticIps': [
{
'name': 'string',
'arn': 'string',
'supportCode': 'string',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot',
'ipAddress': 'string',
'attachedTo': 'string',
'isAttached': True|False
},
],
'NextToken': 'string'
}
Response Structure
An array of key-value pairs containing information about your get static IPs request.
Describes the static IP.
The name of the static IP (e.g., StaticIP-Ohio-EXAMPLE ).
The Amazon Resource Name (ARN) of the static IP (e.g., arn:aws:lightsail:us-east-2:123456789101:StaticIp/9cbb4a9e-f8e3-4dfe-b57e-12345EXAMPLE ).
The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.
The timestamp when the static IP was created (e.g., 1479735304.222 ).
The region and Availability Zone where the static IP was created.
The Availability Zone. Follows the format us-east-2a (case-sensitive).
The AWS Region name.
The resource type (usually StaticIp ).
The static IP address.
The instance where the static IP is attached (e.g., Amazon_Linux-1GB-Ohio-1 ).
A Boolean value indicating whether the static IP is attached.
A token to resume pagination.