Table of Contents
Lightsail.Client¶A low-level client representing Amazon Lightsail:
client = session.create_client('lightsail')
These are the available methods:
allocate_static_ip()attach_static_ip()can_paginate()close_instance_public_ports()create_domain()create_domain_entry()create_instance_snapshot()create_instances()create_instances_from_snapshot()create_key_pair()delete_domain()delete_domain_entry()delete_instance()delete_instance_snapshot()delete_key_pair()detach_static_ip()download_default_key_pair()generate_presigned_url()get_active_names()get_blueprints()get_bundles()get_domain()get_domains()get_instance()get_instance_access_details()get_instance_metric_data()get_instance_port_states()get_instance_snapshot()get_instance_snapshots()get_instance_state()get_instances()get_key_pair()get_key_pairs()get_operation()get_operations()get_operations_for_resource()get_paginator()get_regions()get_static_ip()get_static_ips()get_waiter()import_key_pair()is_vpc_peered()open_instance_public_ports()peer_vpc()put_instance_public_ports()reboot_instance()release_static_ip()start_instance()stop_instance()unpeer_vpc()update_domain_entry()allocate_static_ip(**kwargs)¶Allocates a static IP address.
See also: AWS API Documentation
Request Syntax
response = client.allocate_static_ip(
staticIpName='string'
)
| Parameters: | staticIpName (string) – [REQUIRED] The name of the static IP address. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
|
attach_static_ip(**kwargs)¶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'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
|
can_paginate(operation_name)¶Check if an operation can be paginated.
| Parameters: | operation_name (string) – The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo, and you’d normally invoke the
operation as client.create_foo(**kwargs), if the
create_foo operation can be paginated, you can use the
call client.get_paginator("create_foo"). |
|---|---|
| Returns: | True if the operation can be paginated,
False otherwise. |
close_instance_public_ports(**kwargs)¶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'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'operation': {
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
|
create_domain(**kwargs)¶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'
)
| Parameters: | domainName (string) – [REQUIRED] The domain name to manage (e.g., 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. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'operation': {
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
|
create_domain_entry(**kwargs)¶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',
'type': 'string',
'options': {
'string': 'string'
}
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'operation': {
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
|
create_instance_snapshot(**kwargs)¶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'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
|
create_instances(**kwargs)¶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'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
|
create_instances_from_snapshot(**kwargs)¶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',
],
availabilityZone='string',
instanceSnapshotName='string',
bundleId='string',
userData='string',
keyPairName='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
|
create_key_pair(**kwargs)¶Creates sn SSH key pair.
See also: AWS API Documentation
Request Syntax
response = client.create_key_pair(
keyPairName='string'
)
| Parameters: | keyPairName (string) – [REQUIRED] The name for your new key pair. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'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-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'fingerprint': 'string'
},
'publicKeyBase64': 'string',
'privateKeyBase64': 'string',
'operation': {
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
|
delete_domain(**kwargs)¶Deletes the specified domain recordset and all of its domain records.
See also: AWS API Documentation
Request Syntax
response = client.delete_domain(
domainName='string'
)
| Parameters: | domainName (string) – [REQUIRED] The specific domain name to delete. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'operation': {
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
|
delete_domain_entry(**kwargs)¶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',
'type': 'string',
'options': {
'string': 'string'
}
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'operation': {
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
|
delete_instance(**kwargs)¶Deletes a specific Amazon Lightsail virtual private server, or instance .
See also: AWS API Documentation
Request Syntax
response = client.delete_instance(
instanceName='string'
)
| Parameters: | instanceName (string) – [REQUIRED] The name of the instance to delete. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
|
delete_instance_snapshot(**kwargs)¶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'
)
| Parameters: | instanceSnapshotName (string) – [REQUIRED] The name of the snapshot to delete. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
|
delete_key_pair(**kwargs)¶Deletes a specific SSH key pair.
See also: AWS API Documentation
Request Syntax
response = client.delete_key_pair(
keyPairName='string'
)
| Parameters: | keyPairName (string) – [REQUIRED] The name of the key pair to delete. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'operation': {
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
|
detach_static_ip(**kwargs)¶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'
)
| Parameters: | staticIpName (string) – [REQUIRED] The name of the static IP to detach from the instance. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
|
download_default_key_pair()¶Downloads the default SSH key pair from the user’s account.
See also: AWS API Documentation
Request Syntax
response = client.download_default_key_pair()
| Return type: | dict |
|---|---|
| Returns: | Response Syntax{
'publicKeyBase64': 'string',
'privateKeyBase64': 'string'
}
Response Structure
|
generate_presigned_url(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)¶Generate a presigned url given a client, its method, and arguments
| Parameters: |
|
|---|---|
| Returns: | The presigned url |
get_active_names(**kwargs)¶Returns the names of all active (not deleted) resources.
See also: AWS API Documentation
Request Syntax
response = client.get_active_names(
pageToken='string'
)
| Parameters: | pageToken (string) – A token used for paginating results from your get active names request. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'activeNames': [
'string',
],
'nextPageToken': 'string'
}
Response Structure
|
get_blueprints(**kwargs)¶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'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | 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'
},
],
'nextPageToken': 'string'
}
Response Structure
|
get_bundles(**kwargs)¶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'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'bundles': [
{
'price': ...,
'cpuCount': 123,
'diskSizeInGb': 123,
'bundleId': 'string',
'instanceType': 'string',
'isActive': True|False,
'name': 'string',
'power': 123,
'ramSizeInGb': ...,
'transferPerMonthInGb': 123
},
],
'nextPageToken': 'string'
}
Response Structure
|
get_domain(**kwargs)¶Returns information about a specific domain recordset.
See also: AWS API Documentation
Request Syntax
response = client.get_domain(
domainName='string'
)
| Parameters: | domainName (string) – [REQUIRED] The domain name for which your want to return information about. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'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-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'domainEntries': [
{
'id': 'string',
'name': 'string',
'target': 'string',
'type': 'string',
'options': {
'string': 'string'
}
},
]
}
}
Response Structure
|
get_domains(**kwargs)¶Returns a list of all domains in the user’s account.
See also: AWS API Documentation
Request Syntax
response = client.get_domains(
pageToken='string'
)
| Parameters: | pageToken (string) – A token used for advancing to the next page of results from your get domains request. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'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-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'domainEntries': [
{
'id': 'string',
'name': 'string',
'target': 'string',
'type': 'string',
'options': {
'string': 'string'
}
},
]
},
],
'nextPageToken': 'string'
}
Response Structure
|
get_instance(**kwargs)¶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'
)
| Parameters: | instanceName (string) – [REQUIRED] The name of the instance. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'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-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'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-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'sizeInGb': 123,
'gbInUse': 123,
'isSystemDisk': True|False,
'iops': 123,
'path': 'string',
'attachedTo': 'string',
'isAttached': True|False,
'attachmentState': 'string'
},
],
'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
|
get_instance_access_details(**kwargs)¶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'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'accessDetails': {
'certKey': 'string',
'expiresAt': datetime(2015, 1, 1),
'ipAddress': 'string',
'password': 'string',
'privateKey': 'string',
'protocol': 'ssh'|'rdp',
'instanceName': 'string',
'username': 'string'
}
}
Response Structure
|
get_instance_metric_data(**kwargs)¶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',
]
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | 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
|
get_instance_port_states(**kwargs)¶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'
)
| Parameters: | instanceName (string) – [REQUIRED] The name of the instance. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'portStates': [
{
'fromPort': 123,
'toPort': 123,
'protocol': 'tcp'|'all'|'udp',
'state': 'open'|'closed'
},
]
}
Response Structure
|
get_instance_snapshot(**kwargs)¶Returns information about a specific instance snapshot.
See also: AWS API Documentation
Request Syntax
response = client.get_instance_snapshot(
instanceSnapshotName='string'
)
| Parameters: | instanceSnapshotName (string) – [REQUIRED] The name of the snapshot for which you are requesting information. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'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-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'state': 'pending'|'error'|'available',
'progress': 'string',
'fromInstanceName': 'string',
'fromInstanceArn': 'string',
'fromBlueprintId': 'string',
'fromBundleId': 'string',
'sizeInGb': 123
}
}
Response Structure
|
get_instance_snapshots(**kwargs)¶Returns all instance snapshots for the user’s account.
See also: AWS API Documentation
Request Syntax
response = client.get_instance_snapshots(
pageToken='string'
)
| Parameters: | pageToken (string) – A token used for advancing to the next page of results from your get instance snapshots request. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'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-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'state': 'pending'|'error'|'available',
'progress': 'string',
'fromInstanceName': 'string',
'fromInstanceArn': 'string',
'fromBlueprintId': 'string',
'fromBundleId': 'string',
'sizeInGb': 123
},
],
'nextPageToken': 'string'
}
Response Structure
|
get_instance_state(**kwargs)¶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'
)
| Parameters: | instanceName (string) – [REQUIRED] The name of the instance to get state information about. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'state': {
'code': 123,
'name': 'string'
}
}
Response Structure
|
get_instances(**kwargs)¶Returns information about all Amazon Lightsail virtual private servers, or instances .
See also: AWS API Documentation
Request Syntax
response = client.get_instances(
pageToken='string'
)
| Parameters: | pageToken (string) – A token used for advancing to the next page of results from your get instances request. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'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-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'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-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'sizeInGb': 123,
'gbInUse': 123,
'isSystemDisk': True|False,
'iops': 123,
'path': 'string',
'attachedTo': 'string',
'isAttached': True|False,
'attachmentState': 'string'
},
],
'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
|
get_key_pair(**kwargs)¶Returns information about a specific key pair.
See also: AWS API Documentation
Request Syntax
response = client.get_key_pair(
keyPairName='string'
)
| Parameters: | keyPairName (string) – [REQUIRED] The name of the key pair for which you are requesting information. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'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-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'fingerprint': 'string'
}
}
Response Structure
|
get_key_pairs(**kwargs)¶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'
)
| Parameters: | pageToken (string) – A token used for advancing to the next page of results from your get key pairs request. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'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-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'fingerprint': 'string'
},
],
'nextPageToken': 'string'
}
Response Structure
|
get_operation(**kwargs)¶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'
)
| Parameters: | operationId (string) – [REQUIRED] A GUID used to identify the operation. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'operation': {
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
|
get_operations(**kwargs)¶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'
)
| Parameters: | pageToken (string) – A token used for advancing to the next page of results from your get operations request. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
],
'nextPageToken': 'string'
}
Response Structure
|
get_operations_for_resource(**kwargs)¶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'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
],
'nextPageCount': 'string',
'nextPageToken': 'string'
}
Response Structure
|
get_paginator(operation_name)¶Create a paginator for an operation.
| Parameters: | operation_name (string) – The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo, and you’d normally invoke the
operation as client.create_foo(**kwargs), if the
create_foo operation can be paginated, you can use the
call client.get_paginator("create_foo"). |
|---|---|
| Raises: | OperationNotPageableError – Raised if the operation is not
pageable. You can use the client.can_paginate method to
check if an operation is pageable. |
| Return type: | L{botocore.paginate.Paginator} |
| Returns: | A paginator object. |
get_regions(**kwargs)¶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
)
| Parameters: | includeAvailabilityZones (boolean) – A Boolean value indicating whether to also include Availability Zones in your get regions request. Availability Zones are indicated with a letter: e.g., us-east-1a . |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'regions': [
{
'continentCode': 'string',
'description': 'string',
'displayName': 'string',
'name': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2',
'availabilityZones': [
{
'zoneName': 'string',
'state': 'string'
},
]
},
]
}
Response Structure
|
get_static_ip(**kwargs)¶Returns information about a specific static IP.
See also: AWS API Documentation
Request Syntax
response = client.get_static_ip(
staticIpName='string'
)
| Parameters: | staticIpName (string) – [REQUIRED] The name of the static IP in Lightsail. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'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-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'ipAddress': 'string',
'attachedTo': 'string',
'isAttached': True|False
}
}
Response Structure
|
get_static_ips(**kwargs)¶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'
)
| Parameters: | pageToken (string) – A token used for advancing to the next page of results from your get static IPs request. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'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-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'ipAddress': 'string',
'attachedTo': 'string',
'isAttached': True|False
},
],
'nextPageToken': 'string'
}
Response Structure
|
get_waiter(waiter_name)¶import_key_pair(**kwargs)¶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'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'operation': {
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
|
is_vpc_peered()¶Returns a Boolean value indicating whether your Lightsail VPC is peered.
See also: AWS API Documentation
Request Syntax
response = client.is_vpc_peered()
| Return type: | dict |
|---|---|
| Returns: | Response Syntax{
'isPeered': True|False
}
Response Structure
|
open_instance_public_ports(**kwargs)¶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'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'operation': {
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
|
peer_vpc()¶Tries to peer the Lightsail VPC with the user’s default VPC.
See also: AWS API Documentation
Request Syntax
response = client.peer_vpc()
| Return type: | dict |
|---|---|
| Returns: | Response Syntax{
'operation': {
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
|
put_instance_public_ports(**kwargs)¶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'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'operation': {
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
|
reboot_instance(**kwargs)¶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'
)
| Parameters: | instanceName (string) – [REQUIRED] The name of the instance to reboot. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
|
release_static_ip(**kwargs)¶Deletes a specific static IP from your account.
See also: AWS API Documentation
Request Syntax
response = client.release_static_ip(
staticIpName='string'
)
| Parameters: | staticIpName (string) – [REQUIRED] The name of the static IP to delete. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
|
start_instance(**kwargs)¶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'
)
| Parameters: | instanceName (string) – [REQUIRED] The name of the instance (a virtual private server) to start. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
|
stop_instance(**kwargs)¶Stops a specific Amazon Lightsail instance that is currently running.
See also: AWS API Documentation
Request Syntax
response = client.stop_instance(
instanceName='string'
)
| Parameters: | instanceName (string) – [REQUIRED] The name of the instance (a virtual private server) to stop. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
|
unpeer_vpc()¶Attempts to unpeer the Lightsail VPC from the user’s default VPC.
See also: AWS API Documentation
Request Syntax
response = client.unpeer_vpc()
| Return type: | dict |
|---|---|
| Returns: | Response Syntax{
'operation': {
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
}
}
Response Structure
|
update_domain_entry(**kwargs)¶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',
'type': 'string',
'options': {
'string': 'string'
}
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
]
}
Response Structure
|
The available paginators are:
Lightsail.Paginator.GetActiveNamesLightsail.Paginator.GetBlueprintsLightsail.Paginator.GetBundlesLightsail.Paginator.GetDomainsLightsail.Paginator.GetInstanceSnapshotsLightsail.Paginator.GetInstancesLightsail.Paginator.GetKeyPairsLightsail.Paginator.GetOperationsLightsail.Paginator.GetStaticIpsLightsail.Paginator.GetActiveNames¶paginator = client.get_paginator('get_active_names')
paginate(**kwargs)¶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'
}
)
| Parameters: | PaginationConfig (dict) – A dictionary that provides parameters to control pagination.
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'activeNames': [
'string',
],
'NextToken': 'string'
}
Response Structure
|
Lightsail.Paginator.GetBlueprints¶paginator = client.get_paginator('get_blueprints')
paginate(**kwargs)¶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'
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | 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'
},
],
'NextToken': 'string'
}
Response Structure
|
Lightsail.Paginator.GetBundles¶paginator = client.get_paginator('get_bundles')
paginate(**kwargs)¶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'
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'bundles': [
{
'price': ...,
'cpuCount': 123,
'diskSizeInGb': 123,
'bundleId': 'string',
'instanceType': 'string',
'isActive': True|False,
'name': 'string',
'power': 123,
'ramSizeInGb': ...,
'transferPerMonthInGb': 123
},
],
'NextToken': 'string'
}
Response Structure
|
Lightsail.Paginator.GetDomains¶paginator = client.get_paginator('get_domains')
paginate(**kwargs)¶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'
}
)
| Parameters: | PaginationConfig (dict) – A dictionary that provides parameters to control pagination.
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'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-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'domainEntries': [
{
'id': 'string',
'name': 'string',
'target': 'string',
'type': 'string',
'options': {
'string': 'string'
}
},
]
},
],
'NextToken': 'string'
}
Response Structure
|
Lightsail.Paginator.GetInstanceSnapshots¶paginator = client.get_paginator('get_instance_snapshots')
paginate(**kwargs)¶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'
}
)
| Parameters: | PaginationConfig (dict) – A dictionary that provides parameters to control pagination.
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'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-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'state': 'pending'|'error'|'available',
'progress': 'string',
'fromInstanceName': 'string',
'fromInstanceArn': 'string',
'fromBlueprintId': 'string',
'fromBundleId': 'string',
'sizeInGb': 123
},
],
'NextToken': 'string'
}
Response Structure
|
Lightsail.Paginator.GetInstances¶paginator = client.get_paginator('get_instances')
paginate(**kwargs)¶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'
}
)
| Parameters: | PaginationConfig (dict) – A dictionary that provides parameters to control pagination.
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'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-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'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-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'sizeInGb': 123,
'gbInUse': 123,
'isSystemDisk': True|False,
'iops': 123,
'path': 'string',
'attachedTo': 'string',
'isAttached': True|False,
'attachmentState': 'string'
},
],
'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
|
Lightsail.Paginator.GetKeyPairs¶paginator = client.get_paginator('get_key_pairs')
paginate(**kwargs)¶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'
}
)
| Parameters: | PaginationConfig (dict) – A dictionary that provides parameters to control pagination.
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'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-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'fingerprint': 'string'
},
],
'NextToken': 'string'
}
Response Structure
|
Lightsail.Paginator.GetOperations¶paginator = client.get_paginator('get_operations')
paginate(**kwargs)¶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'
}
)
| Parameters: | PaginationConfig (dict) – A dictionary that provides parameters to control pagination.
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'operations': [
{
'id': 'string',
'resourceName': 'string',
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'createdAt': datetime(2015, 1, 1),
'location': {
'availabilityZone': 'string',
'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'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',
'status': 'NotStarted'|'Started'|'Failed'|'Completed',
'statusChangedAt': datetime(2015, 1, 1),
'errorCode': 'string',
'errorDetails': 'string'
},
],
'NextToken': 'string'
}
Response Structure
|
Lightsail.Paginator.GetStaticIps¶paginator = client.get_paginator('get_static_ips')
paginate(**kwargs)¶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'
}
)
| Parameters: | PaginationConfig (dict) – A dictionary that provides parameters to control pagination.
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'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-west-1'|'eu-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'
},
'resourceType': 'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc',
'ipAddress': 'string',
'attachedTo': 'string',
'isAttached': True|False
},
],
'NextToken': 'string'
}
Response Structure
|